On 08/04/2011 10:24 AM, Mike Garrity wrote:
From: [email protected] 
[mailto:[email protected]] On Behalf Of Tueller, 
Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Tuesday, August 02, 2011 4:49 PM
To: [email protected]
Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned

It is true that QUAD is an OpenGL primitive but the GL driver tessellates it 
into two triangles
underneath the hood.

Most (all?) cards today do break them into 2 tris, but nothing in the OpenGL 
spec
says that they have to, or specifies exactly how they should do it. The reason 
is
that the original SGI geometry engine did not split them. It drew quads directly
with an odd algorithm for interpolating values across the interior. Quad lives 
on
as a historical quirk, like the panda's thumb.


Keep in mind that the intersection methods that OSG provides have little to do with what OpenGL does or doesn't do with quads, triangles or other primitives. OpenGL has no primitive intersection features. These are all provided by OSG itself. The relevant code for separating larger primitives into triangles is in osg::TriangleFunctor. These triangles are then used by osgUtil::LineSegmentIntersector to do the actual segment/triangle intersections.

--"J"

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to