[vtkusers] Picking objects in VTK and java

R K Shyamprakash ramakrishna.prakash at quest-global.com
Thu Apr 17 21:38:28 EDT 2003


Hi,
      you can use vtkPicker. following is a code snippet.
vtkPropPicker picker = (vtkPropPicker)iren.GetPicker();//iren is
vtkRenderWindowInteractor
if(picker.Pick(e.getX(),(demo.renWin.getSize().height-e.getY()),0,demo.ren)
!= 0){
	double d1[] = picker.GetPickPosition();
}

make sure you apply proper mutex locking around thw Pick methid.

regards
Shyam

-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]On Behalf Of Christian
Bleiholder
Sent: Thursday, April 17, 2003 5:21 PM
To: vtkusers at public.kitware.com
Subject: [vtkusers] Picking objects in VTK and java



Dear all,

I am new to the VTK;  I use the Java wrapper to VTK 4.2
and I cannot solve the following task:

I use VTK to render some data structures like Spheres,etc.
I then want to be able to pick (by mouse) one of these VTK-spheres and do
some tasks with their underlying data structures.

Can anyone help me?

Regards,
 Christian

_______________________________________________
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