Quantcast

vtkSelectVisiblePoints and vtkPolyData

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vtkSelectVisiblePoints and vtkPolyData

alanwsx
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 overloading vtkInteractorStyleTrackballCamera class:
        this->visible_filter->Update();
        qDebug() << "There are currently: " << this->visible_filter->GetOutput()->GetNumberOfPoints() << " visible.";




Thanks,
Shangxuan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkSelectVisiblePoints and vtkPolyData

alanwsx
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().
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtkSelectVisiblePoints and vtkPolyData

alanwsx
In reply to this post by alanwsx
Still not solved. Any ideas would be appreciated.

Shangxuan
Loading...