[vtkusers] vtkSelectVisiblePoints and vtkPolyData Issue
alanwsx
wushx6 at gmail.com
Wed May 31 09:28:08 EDT 2017
Hi,
I am writing some code to do the depth test for some vtkPolyData object, and
I want to use vtkSelectVisiblePoints class in a qvtkwidget. However, I
always got 0 points.
Following is the minimum code:
// in the qvtkwidget class:
visible_filter = vtkSmartPointer<vtkSelectVisiblePoints>::New();
visible_filter->SetInputData(poly_data);
visible_filter->SetRenderer(renderer);
visible_filter->Update();
// in the overriding vtkInteractorStyleTrackballCamera class:
this->visible_filter->Update();
qDebug() << "There are currently: " <<
this->visible_filter->GetOutput()->GetNumberOfPoints() << " visible.";
I am not sure whether this is related to QT or vtkPolyData, since in the
official example, they used SetInputConnection(), but here I used
SetInputData(). Any suggestions would be appreciated.
Thanks,
Shangxuan
--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkSelectVisiblePoints-and-vtkPolyData-Issue-tp5743483.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list