[vtkusers] vtkPointPicker

David Gobbi david.gobbi at gmail.com
Mon Dec 14 10:09:40 EST 2009


Hi Julia,

If you want to make sure that the pick doesn't pass through the
surface, you need to use vtkCellPicker and set the Tolerance to a
small value (e.g. SetTolerance(1e-15)).  After you have the
PickPosition, you will have to do a FindPoint to get the nearest
point, because the CellPicker will not return point information.

Your best option, if you are using VTK cvs, is to try the
vtkSurfacePicker that I added to VTK a few weeks ago.  It works like a
CellPicker, but it is also able to return the closest point, and if
you have a large data set it can use vtkCellLocator to make the pick
more efficient.

    David


On Mon, Dec 14, 2009 at 1:48 AM, 杨清云 <qiyuewei at gmail.com> wrote:
> Hi all,
>
> I want to pick some points on the surface nearest to me.
>
> But when I use vtkPointPicker to pick points, some of them pass through the
> nearest surface to the next one.
>
> Could someone tell me the reason and what can I do to prevent it?
>
> Thanks a lot!
>
>
>
> Julia



More information about the vtkusers mailing list