<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
K.R.,
<br>I have had success sublcassing&nbsp; vtkActor, letting it hold user
data, and attaching&nbsp; a pickMethod to the actor.&nbsp;&nbsp; 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.&nbsp; I use both approaches.&nbsp; 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.&nbsp;
I know that vtkPropPicker uses hardware picking instead of the ray-casting
method of vtkPicker.&nbsp; I use the vtkPropPicker because it seems more
reliable (plus I don't care to know the list of objects intersected by
the ray).&nbsp; 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&nbsp; user data with&nbsp; an actor.&nbsp;
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&nbsp;
that was
<br>picked.
<p>&nbsp;&nbsp;&nbsp; -- krs
<p>--
<br>K.R.Subramanian&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Phone: (704) 687-4872
<br>Department of Computer Science&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FAX:&nbsp;&nbsp; (704) 687-4893
<br>UNC Charlotte, CARC 311&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Email: krs@cs.uncc.edu
<br>Charlotte, NC 28223-0001&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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: &lt;<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>--&nbsp;
J.A. Lee</pre>
&nbsp;</html>