Paul Martz wrote:
If you want to pick an object by a single click, you can use a line
segment.
If you want to pick by drawing a box, you can use a polytope.

Err, that wasn't Paul, that was me...

You _can_ use a line segment for mouse click picking, but in a perspective
view, polytope is really better suited for this task. Also, polytope will
pick point and line primitives, while line segment intersection will miss
them.

But PolytopeIntersection is really slow, and does not allow (easily) getting the first intersection. If all you want to do is select the object under the cursor, LineSegment is more than enough and is really fast with the kdtree support.

Polytope intersection has traditionally been used for mouse click picking.
See gluPickMatrix in the GLU library, dating back over 15 years. It is
useful for OpenGL 1.x/2.x GL_SELECTION render mode.

Dinosaur! :-)

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to