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

@@ -105,6 +105,7 @@ void DriveManipulator::computeHomePosition()
// check to see if any obstruction in front.
osgUtil::IntersectVisitor iv;
iv.setTraversalMask(_intersectTraversalMask);
bool positionSet = false;
@@ -223,6 +224,7 @@ void DriveManipulator::init(const GUIEventAdapter& ea,GUIActionAdapter& us)
// check to see if any obstruction in front.
osgUtil::IntersectVisitor iv;
iv.setTraversalMask(_intersectTraversalMask);
bool positionSet = false;
@@ -574,6 +576,8 @@ bool DriveManipulator::calcMovement()
// check to see if any obstruction in front.
osgUtil::IntersectVisitor iv;
iv.setTraversalMask(_intersectTraversalMask);
osg::ref_ptr<osg::LineSegment> segForward = new osg::LineSegment;
segForward->set(_eye,_eye+lv*(signedBuffer+distanceToMove));
iv.addLineSegment(segForward.get());