[vtkusers] vtkPicker problem

Patrick de Koning patrick at lkeb.azl.nl
Thu Jun 15 10:05:30 EDT 2000


After detecting 2 bugs in the vtkPicker I encountered another problem. 

I have a renderwindow, which is divided into 4 parts. 3 parts display
orthogonal projections of the scene and the 4th display the 3D scene.

I created an 3D marker which consists of a sphere and 3 tubes running
from the sphere to the boundong box. No problems so far.

In the 3 orthogonal projections I use the vtkDiskSource to display the
marker. The marker is pickable in all 4 views. In the 3D view it works
alright, but when I pick the disk in one of the orthogonal views when
the disk is not at (0,0) nothing happens. 
The problem seems to be that the picker looks at the source of the
picked object, in this case vtkDiskSource, and looks if the bounding box
of the picked object and the pick point intersect. The bounding box of
the vtkDiskSource doesn't change, it is centered around (0,0,0) but the
actor using the vtkDiskSource as input is moved to a new position. This
move doesn't change the polydata and so the picker still thinks the
object is located at (0,0,0).

A possible solution is to add a function SetCenter to the vtkDiskSource.
Several vtkPolyDataSources have a SetCenter fucntion and several others
don't.

I don't now if this is a more common problem, th difference between the
position of an object defined by the polydata and the position set by
the actor.

I hope this all makes some sense. For now I just use a vtkSphereSource
instead of th vtkDiskSource, but I still have the feeling there is a
larger problem with the pickers.

Patrick de Koning.




More information about the vtkusers mailing list