[vtkusers] How to pick a 3D point without the z-buffer?

Julian Ibarz julian.ibarz at gmail.com
Wed Aug 13 10:52:41 EDT 2008


vtkPicker should help you :

http://www.vtk.org/doc/nightly/html/classvtkPicker.html

2008/8/13 Mathieu Coursolle <mcoursolle at rogue-research.com>

> Hi VTK-Users,
>
> I am using VTK on OSX with Core-Animation enabled. Therefore, I am unable
> to use any picking
> algorithm that use the glReadPixel to retrieve the z-buffer, as the openGL
> scene seems to be flattened
> at the end of the drawing process.
>
> I am trying to figure out a way to pick a 3D point in space from a list of
> known pickable actors.
>
> So let's say I have a collection of actors I know I can pick from, and a 2D
> view coordinate where the
> mouse was clicked;
> Is there a class/function in VTK that could be used to detect the
> intersection of the
> vector going from the near plane to the far plane in parallel projection,
> and the nearest actor from the
> list of pickable ones?
>
> Thanks!
>
> Mathieu
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Julian Ibarz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080813/7b174fd7/attachment.htm>


More information about the vtkusers mailing list