[vtkusers] vtkPointPicker problem

Xavier Planes xavier.planes at upf.edu
Mon Apr 27 03:30:21 EDT 2009


Hi Paul,

 

                I tried setting tolerance to 0, and then I cannot select any point. I attach you the input data and the TCL example. I run it using VTK-5.4 downloaded from the web site. 

 

                I created another sample code, copying the code of vtkPicker.cxx ( vtkPicker::Pick() ) for computing the ray of the clicked mouse point in the 3D view (p1World and p2World). Then I find the closest point of the input data (P2.skeleton.vtk) to this ray using vtkLine::DistanceToLine() and it works perfect!

 

Thanks!

Xavi

 

From: Paul Harris [mailto:harris.pc at gmail.com] 
Sent: miércoles, 22 de abril de 2009 12:12
To: xavier.planes at upf.edu
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkPointPicker problem

 

did you try setting the tolerance to zero?  it shouldn't pick something that far away with a small enough tolerance.

Note also that I wrote in a previous email how scaling transformations seems to screw up the picker a bit.

2009/4/22 <xavier.planes at upf.edu>

Thanks Dominik,

   I adjusted the tolerance, but it doesn't work.

   I click with the mouse just over the line neart the text (124) that you can see in the screenshot. The selected point is very far away because the other point is closer to the 3D ray used by vtkPointPicker. The problem is that in the screen, the point over the mouse pointer is the closest but using the ray in the 3D world, the other point is closer to the ray.

   I can send you the TCL application and the input data so you can try it if you want.

Thanks!
Xavi

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090427/0b0c2df1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: P2.skeleton.vtk
Type: application/octet-stream
Size: 6339 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090427/0b0c2df1/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotatePickMy.tcl
Type: application/octet-stream
Size: 2904 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090427/0b0c2df1/attachment-0001.obj>


More information about the vtkusers mailing list