[vtkusers] vtkSelectVisiblePoints returns all points inside frustum (ignoring occlusion)

Thomas Koletschka thomas.koletschka at gmail.com
Fri Jun 8 00:19:59 EDT 2012


Hello,

I'm using vtkSelectVisiblePoints inside a callback function (actually I'd
even prefer to use it outside a callback but at the moment that's the only
way I get it to work) to get a list of all the visible non-occluded points.
The problem is that I need to interact with the render window once in order
to make it work correctly. If I just render my view and try to get all
visible points I get a list of ALL points inside the frustum (i.e. it
ignores occlusion even though the zbuffer shows the correct values when
reading it right before the vtkSelectVisiblePoints update) but once I do
any user interaction such as a mouse click inside the window it fixes the
problem and vtkSelectVisiblePoints returns the correct number of visible
points.

Can anyone tell me what I might be doing wrong? I'm using the code as given
in the example at
http://www.cmake.org/Wiki/VTK/Examples/Cxx/PolyData/SelectVisiblePointsjust
that I'm listening to a reoccurring timer instead of a mouse click
(and ultimately I'd like to run the code outside a callback and simply
render N different camera positions and get the visible points using those
camera settings).

Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120608/4b5717d6/attachment.htm>


More information about the vtkusers mailing list