vtkActor :: SetPointSize未将点大小设置为超出某个值

时间:2013-12-04 19:31:06

标签: vtk

在我的应用程序中,我正在渲染一些点数据。使用vtkActor :: GetPointSize函数设置以像素为单位的磅值,即屏幕单位。点大小超过10像素没有任何影响。这是一个限制吗?在以下示例代码中观察到相同的情况。点大小超过50像素无效。

vtkSmartPointer<vtkPointSource> pointSource = 
    vtkSmartPointer<vtkPointSource>::New();

vtkSmartPointer<vtkPolyDataMapper> mapper = 
    vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(pointSource->GetOutputPort());

vtkSmartPointer<vtkActor> actor = 
    vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
actor->GetProperty()->SetPointSize(200);

// A renderer and render window
vtkSmartPointer<vtkRenderer> renderer = 
    vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow = 
    vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);

// An interactor
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = 
    vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);

// Add the actors to the scene
renderer->AddActor(actor);
renderWindow->Render();
renderWindowInteractor->Start();

1 个答案:

答案 0 :(得分:0)

如果我没有弄错,这简直归结为OpenGL对点大小的限制。