> 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.
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. 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. It restricts the perspective projection matrix to a small box around the mouse click, producing a narrow view frustum. The net result is essentially a polytope intersection. -Paul _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org