Glad to elaborate. (However, I fear I'm about to earn the nickname of "that raving lunatic who insists on using polytopes for picking"... :-)
When you do a mouse pick, you generally are trying to pick an object that falls into a small screen-space box around the cursor. In a perspective view, the box has smaller world-space extents at the near plane, and larger world-space extents at the far plane. In essence, it looks like a view frustum. PolytopeIntersector is the only intersector that accurately represents this pick volume. A line segment is less accurate because it does a poor job of representing that view volume. And in fact, the line segment becomes less and less accurate when you try to pick objects that are farther and farther away from the viewer. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly Sent: Thursday, April 23, 2009 5:30 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Picking Problem PolytopeIntersector Paul Martz wrote: > 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. > Unless you're dealing with points/lines, I'm failing to see why a polytope is "really better suited for this task." I also fail to see why accuracy would be a problem when using line segments (unless you're trying to pick something one or two pixels wide, which doesn't happen often in my experience). Can you elaborate a bit (or point me at something that explains it)? --"J" _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org