[vtkusers] Picking in Java

Jingyi Jin jinjingyi at yahoo.com
Fri Oct 5 19:25:51 EDT 2001


Hi Carlos, 

I had the same problem before, a kind person gave me
the following suggestion, that was about point
picking, but I guess you can derive actor picking from
it as well. Good luck!

Jingyi

++++++++++++++++++++++++++++++++++++++

Hi Jingyi,

I've included some own code in a local copy of
vtkPanel (so I'm not
usingthe original one but the local one. And I'm not
using any
Interactors. It's still OK for me). It looks like
this:

if ('p' == keyChar) {
      	Render();
      	vtkPointPicker pPicker = new vtkPointPicker();
     
pPicker.Pick(lastX,getSize().getHeight()-lastY,0.0,ren);
      	int pickedPointId = pPicker.GetPointId();
	...
	...
}


Hope this helps
Karin


--- Carlos Martinez Burgos <cmarbur at iti.upv.es> wrote:
> Hi all.
> 
> Does somebody use VTK with Java?
> 
> I do, but I have problems with picking. The things
> don't result as
> expected. Do you get good results?
> 
> When I pick on the vtkPanel pointing to an actor,
> this sometimes is hit
> and sometimes not, depending on the display
> coordinates where the mouse
> is (I supose). Does this happend to you?
> 
> Why can I use an vtkRenderInteractor inside
> vtkPanel?
> 
> I need an answer because if I can get good results
> with picking in Java
> I must implement it myself.
> 
> Thanks.
> 
> -- 
>
----------------------------------------------------------------------
> Carlos Martínez Burgos      |     Instituto
> Tecnológico de Informática
> Ingeniero Informático       |      Universidad
> Politécnica de Valencia
> Tlf: +34 963877237          |                       
> Camí de Vera, S/N
> cmarbur at iti.upv.es          |                  
> 46071 Valencia - Spain
> www.iti.upv.es/~cmarbur     |                       
>    www.iti.upv.es
>
----------------------------------------------------------------------
> 
> _______________________________________________
> 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


__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1



More information about the vtkusers mailing list