<html><head><style type="text/css">body{font:12px Arial;margin:3px;overflow-y:auto;overflow-x:auto}p{margin:0px;}blockquote, ol, ul{margin-top:0px;margin-bottom:0px;}</style></head>
<body><div style="DISPLAY: block; FONT-SIZE: 12px; FONT-FAMILY: Arial"><P>Hi,</P>
<P> </P>
<P>I have a problem with the cell picking in Java.</P>
<P>When I click with the mouse, I want to know the cell Id, but I often get a wrong result.</P>
<P>I tried with different tolerance values but it's still the same thing.</P>
<P>If someone know how to use vtkPicker with Java. Thank you in advance.</P>
<P>Alban</P>
<P> </P>
<P>//renWin is a vtkPanel</P>
<P>iren = new vtkRenderWindowInteractor();<BR>iren.SetRenderWindow(renWin.GetRenderWindow());</P>
<P>...</P>
<P>public void mouseClicked(MouseEvent e) {</P>
<P> picker = new vtkCellPicker();<BR> iren.SetPicker(picker); //iren<BR> picker.SetTolerance(0.01);<BR> picker.Pick(e.getX(), e.getY(), 0, renWin.GetRenderer());<BR> System.out.println(picker.GetCellId());<BR> }</P></br><p style="margin-top:11px;padding-top:3px;background-image: url(http://mail.lycos.co.uk/Images/Mail/_content/dot.gif);background-repeat: repeat-x;background-position: 0px 0px;"><b>La puissance n’est pas innée : elle se construit.</b> <a href="http://ads.lycos-europe.com/event.ng/Type=click&FlightID=190429&AdID=411354&TargetID=null&Segments=19885,2789&Targets=null&Values=243,292,24179,24195,24736,229&RawValues=&Redirect=http://www.nike.com/freeeurope/?l=fr_fr&cid=902" target="_blank">Cliquez ici pour découvrir Nike Free !</a></div></body></html>