[vtkusers] a problem about picking ( urgent )

lian jiang jl_vtk at yahoo.com
Fri Mar 22 09:27:12 EST 2002


My java-vtk program has a GUI and use vtkPanel as the platform of rendering.

I use a instance of vtkUnstructuredGrid to render a group of ellipsoids. To do this, I give the instance a group of points, each of which is associated with a tensor. So one point and one tensor associated with correspond to an ellipsoid. All the ellipsoids  are rendered by only one vtkActor. Now what I want to do is, when I click one ellipsoid with mouse in the vtkPanel window, the program should tell me which ellipsoid I have picked. 

How can I do this?

I cannot use vtkCellPicker because each time the cellId returned is always -1. vtkPicker can also not be used here because the function only returns a list of Actors instead of a specific object of the Actor. 

One clumsy way can probably solve this problem --- assigning one actor to each of the ellipsoid. Then I can use vtkPicker to pick any of the ellipsoid. I am not ready to adopt this method because it makes the "light" ellipsoids much more "heavy".

Could you give me an idea, with which I can not only render the group of ellipsoids in a window but also pick up any of the ellipsoid in a decent way. Thanks a lot in advance.

Regards

Lian

 



---------------------------------
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020322/626822ac/attachment.htm>


More information about the vtkusers mailing list