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,12 @@ public:
/** Get the FusionDistanceValue. Used by SceneView for setting up setereo convergence.*/
virtual float getFusionDistanceValue() const { return 1.0f; }
/** Set the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection.
* The intersection traversal mask is useful for controlling what parts of the scene graph should be used for intersection purposes.*/
void setIntersectTraversalMask(unsigned int mask) { _intersectTraversalMask = mask; }
/** Get the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection.*/
unsigned int getIntersectTraversalMask() const { return _intersectTraversalMask; }
/**
Attach a node to the manipulator, automatically detaching any previously attached node.
@@ -185,6 +191,8 @@ protected:
double _minimumDistance;
unsigned int _intersectTraversalMask;
bool _autoComputeHomePosition;
osg::Vec3d _homeEye;
@@ -192,6 +200,7 @@ protected:
osg::Vec3d _homeUp;
osg::ref_ptr<CoordinateFrameCallback> _coordinateFrameCallback;
};
}