<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
K.R.,
<br>I have had success sublcassing vtkActor, letting it hold user
data, and attaching a pickMethod to the actor. In the
pickMethod, you can do pretty much anything you want. Alternatively you
could write your own interactor that knows how to deal with the subclassed
vtkActor when picked. I use both approaches. On the picker
side of things, if you look up the inheritance tree for vtkPicker you will
see the methods GetProp(), GetActor(), etc.. which return the picked object.
I know that vtkPropPicker uses hardware picking instead of the ray-casting
method of vtkPicker. I use the vtkPropPicker because it seems more
reliable (plus I don't care to know the list of objects intersected by
the ray). Hope this helps,
<br>-Jeff
<p>"K.R.Subramanian" wrote:
<blockquote TYPE=CITE>The documentation for vtkPicker says that the the
actor or prop closest
<br>to the camera that was intersected is returned. But I only see methods
<br>that return the list of Actors (and another method to return the list
of
<br>Prop3Ds - what is
<br>the difference?), which are not in sorted order.
<p>I am implementing picking and need to get the closest object hit.
<p>I also agree with an earlier post on picking actors; it would be very
<br>convenient
<br>to have a way of attaching user data with an actor.
For instance, in
<br>my
<br>application, only some of the actors are pickable and I would like
to
<br>attach
<br>some user data that would be useful in identifying the actor
that was
<br>picked.
<p> -- krs
<p>--
<br>K.R.Subramanian
Phone: (704) 687-4872
<br>Department of Computer Science
FAX: (704) 687-4893
<br>UNC Charlotte, CARC 311
Email: krs@cs.uncc.edu
<br>Charlotte, NC 28223-0001
Web: <a href="http://www.cs.uncc.edu/~krs">http://www.cs.uncc.edu/~krs</a>
<p>_______________________________________________
<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <<a href="http://public.kitware.com/cgi-bin/vtkfaq">http://public.kitware.com/cgi-bin/vtkfaq</a>>
<br>Follow this link to subscribe/unsubscribe:
<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a></blockquote>
<pre>--
J.A. Lee</pre>
</html>