[vtkusers] iren->Set*PickMethod() obsoleted?

R K Shyamprakash ramakrishna.prakash at quest-global.com
Wed Apr 23 05:14:20 EDT 2003


Bruce,
        try the following code. The code is in Java.

		vtkPropPicker picker = new vtkPropPicker();
		int pick = picker.Pick(x,y,0,GetRenderer());//x,y is your mouse position

		//if picked, get the pick position
		if(pick != 0){
			double point[] = picker.GetPickPosition(); //point will give you X,Y,Z
coordinate
										 //of the picked point.
		}
Hope this helps.

Regards
Shyam


-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]On Behalf Of
Bruce.Lamond at ed.ac.uk
Sent: Tuesday, April 22, 2003 10:52 PM
To: vtkusers at public.kitware.com
Subject: [vtkusers] iren->Set*PickMethod() obsoleted?


Hi there,
I'm trying to use VTK to return (x,y,z) coordinate corresponding to the
cursor
position when 'p' is pressed. I thought this might involve using the
iren->Set*PickMethod() but see that this is not to be used in future. Does
anyone know how I should go about getting the coordinate corresponding to a
pick
event?
cheers
Bruce Lamond


             ################################################
             # Bruce Lamond                                 #
             # Edinburgh Virtual Environment Centre (EdVEC) #
             # University of Edinburgh                      #
             # JCMB room 2403                               #
             # The King's Buildings                         #
             # West Mains Road                              #
             # Edinburgh EH9 3JZ                            #
             # UK                                           #
             # www.edvec.ed.ac.uk                           #
             # Tel. (00 44 )/(0) 131 650 4981               #
             ################################################
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers




More information about the vtkusers mailing list