Hi, Robert, I have just stumbled on small issue in my intersection code which turned out to be related to different interpretation of r2 param returned by LineSegment::intersect( BoundingBox, r1, r2 ) and LineSegment::intersect( BoundingSphere, r1, r2 ).
Example Code: osg::BoundingBox box( -1,-1,-1, 1, 1, 1 ); osg::BoundingSphere sphere( box ); osg::ref_ptr< osg::LineSegment > diagonal = new osg::LineSegment( box._min, box._max ); double box_r1, box_r2; diagonal->intersect( box, box_r1, box_r2 ); double sphere_r1, sphere_r2; diagonal->intersect( sphere, sphere_r1, sphere_r2 ); printf( "Box r1=%.0f r2=%.0f Sphere r1=%.0f r2=%.0f \n", box_r1, box_r2, sphere_r1, sphere_r2 ); Output: Box r1=0 r2=0 Sphere r1=0 r2=1 Is that a bug or deliberate design ? Cheers, Wojtek Lewandowski
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org