[vtkusers] vtkPointPicker problem
Xavier Planes
xavier.planes at upf.edu
Tue Apr 21 10:50:02 EDT 2009
Hi to all,
I need to select a point of a vtkPolyData. This polydata is
composed of points and lines. I've tried with vtkPointPicker but it doesn't
work for all the cases. When I click with the mouse pointer close to one
point of the vtkPolyData it selects another point. I attach you a screenshot
with the selected point in red and the mouse pointer is in the text
(cellID). I modified a little bit the annotatePick.tcl.
http://picasaweb.google.com/xplanes78/Vtk#5327146377240066946
I think the problem is that vtkPointPicker "select a point
by shooting a ray into a graphics window" and sometimes the ray is very
close to another point of the 3D geometry very different from the one that
is close to the mouse pointer in the screen. Perhaps the solution could be
to project the geometry to the screen and find the closest point from the
mouse pointer to the projected geometry in the screen (2D). What do you
think?
Thanks!
Xavi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090421/195e2660/attachment.htm>
More information about the vtkusers
mailing list