[vtkusers] detect vtkActor visibility

Mathieu Coursolle mathieu at rogue-research.com
Tue Apr 27 13:20:51 EDT 2010


Thanks, it works fine.
However, is it possible that there is an error in the API, unless I am mistaken.

Whenever I call isPointOccluded(), it returns false if the point is hidden, true otherwise.
I would expect the opposite right?

Thanks,
Mathieu

On 2010-04-27, at 9:10 AM, David Doria wrote:

> 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