Added MatrixManipulator::s/getIntersectTraversalMask(uint) to allow control

of which subgraphs should be used in intersection calculations.  Updated
Terrain,Drive and UFO manipulator to use this new flag.
This commit is contained in:
Robert Osfield
2005-03-22 21:06:06 +00:00
parent 0b2ac40fe8
commit 476a83bb9c
6 changed files with 22 additions and 1 deletions

View File

@@ -100,6 +100,8 @@ void UFOManipulator::computeHomePosition()
* from a line segment extending from above to below the database at its
* horizontal center, that intersects the database closest to zero. */
osgUtil::IntersectVisitor iv;
iv.setTraversalMask(_intersectTraversalMask);
osg::ref_ptr<osg::LineSegment> seg = new osg::LineSegment;
osg::Vec3 A = bs.center() + (osg::Vec3(0,0,1)*(bs.radius()*2));
osg::Vec3 B = bs.center() + (osg::Vec3(0,0,-1)*(bs.radius()*2));
@@ -475,6 +477,7 @@ void UFOManipulator::_adjustPosition()
return;
osgUtil::IntersectVisitor iv;
iv.setTraversalMask(_intersectTraversalMask);
// Forward line segment at 3 times our intersect distance
osg::ref_ptr<osg::LineSegment> segForward = new osg::LineSegment;