[vtkusers] detect vtkActor visibility

David Doria daviddoria+vtk at gmail.com
Tue Apr 27 09:10:59 EDT 2010


On Tue, Apr 27, 2010 at 9:06 AM, Mathieu Coursolle
<mathieu at rogue-research.com> wrote:
> Hi VTK users,
>
> I am displaying a big mesh (head mesh) and a few smaller meshes (spheres) around it.
>
> I position all my vtkActors (small spheres) in the renderer, and then I position my camera based
> on some user UI controls.
>
> Once the camera is positioned, is there a way to know which of those small spheres are actually visible
> for the user in the view. Can I know which ones are totally hidden by the bigger mesh?
>
> Thank you,
>
> Mathieu

This isn't particularly elegant, but this might work:

http://www.vtk.org/Wiki/VTK/Examples/SelectVisiblePoints

Have some data attached to each point indicating which object it
belongs to, and loop through all of the points keeping track of which
objects have had visible points.

Hopefully someone has a better solution for you.

David



More information about the vtkusers mailing list