Added support for tracking the CoordinateSystemNode path, and passing this on to

camera manipulators.
This commit is contained in:
Robert Osfield
2007-05-18 10:33:56 +00:00
parent 79b274b3d6
commit 0d71586ee0
3 changed files with 162 additions and 2 deletions

View File

@@ -84,6 +84,16 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
EventHandlers& getEventHandlers() { return _eventHandlers; }
const EventHandlers& getEventHandlers() const { return _eventHandlers; }
/** Set the NodePath to any active CoordinateSystemNode present in the Scene.*/
void setCoordinateSystemNodePath(const osg::NodePath& nodePath);
/** Get the NodePath to any active CoordinateSystemNode present in the Scene.*/
osg::NodePath getCoordinateSystemNodePath() const;
/** Compute the NodePath to any active CoordinateSystemNode present in the Scene.*/
void computeActiveCoordinateSystemNodePath();
/** Set the DsplaySettings object associated with this view.*/
void setDisplaySettings(osg::DisplaySettings* ds) { _displaySettings = ds; }
@@ -154,6 +164,9 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
osg::ref_ptr<osgGA::MatrixManipulator> _cameraManipulator;
EventHandlers _eventHandlers;
typedef std::vector< osg::observer_ptr<osg::Node> > ObserveredNodePath;
ObserveredNodePath _coordinateSystemNodePath;
osg::ref_ptr<osg::DisplaySettings> _displaySettings;
osgUtil::SceneView::FusionDistanceMode _fusionDistanceMode;
float _fusionDistanceValue;