Hi, I am looking for some clarification of the primitiveIndex value of polytope intersection. I have added a very simple scene file containing 3 planar faces of a cube with 6 triangles in a primitive set. I have been testing the polytope intersector with osgkeyboardmouse using the following command Code: 'osgkeyboardmouse --kdtree box_partial_work_1set.osgt'
Running this command and hitting the 'p' key and then selecting the 2 triangles making up the red face I get the following output. Code: osgkeyboardmouse --kdtree box_partial_work_1set.osgt Building KdTrees ViewerBase::configureAffinity() numProcessors=4 databasePagers = 1 _forceVertexArrayObject = 0 _forceVertexBufferObject = 0 Using PolytopeIntersector PoltyopeIntersector traversal took 0.104ms Picked 10 2.44399 1.97205 Distance to ref. plane 4.928, max. dist 5.0417, primitive index 4, numIntersectionPoints 2 Hits Geometry nodePath size 3 parent Group PoltyopeIntersector traversal took 0.034ms Picked 10 7.93759 7.66585 Distance to ref. plane 4.13599, max. dist 4.24392, primitive index 5, numIntersectionPoints 2 Hits Geometry nodePath size 4 parent Scribe why are primitive indexes 4 and 5? Shouldn't they be 0 and 1 because those triangles are listed first in the scene file? If I do the same procedure and leave off '--kdtree' I am getting indexes of 1 and 2. Thank you! Cheers, tom[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70992#70992 Attachments: http://forum.openscenegraph.org//files/box_partial_work_1setosgt_251.zip _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org