Converted View across to use ObserverNodePath.
This commit is contained in:
@@ -228,8 +228,7 @@ 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> > ObserverNodePath;
|
||||
ObserverNodePath _coordinateSystemNodePath;
|
||||
osg::ObserverNodePath _coordinateSystemNodePath;
|
||||
|
||||
osg::ref_ptr<osg::DisplaySettings> _displaySettings;
|
||||
osgUtil::SceneView::FusionDistanceMode _fusionDistanceMode;
|
||||
|
||||
@@ -215,7 +215,7 @@ void View::take(osg::View& rhs)
|
||||
rhs_osgViewer->_cameraManipulator = 0;
|
||||
rhs_osgViewer->_eventHandlers.clear();
|
||||
|
||||
rhs_osgViewer->_coordinateSystemNodePath.clear();
|
||||
rhs_osgViewer->_coordinateSystemNodePath.clearNodePath();
|
||||
|
||||
rhs_osgViewer->_displaySettings = 0;
|
||||
}
|
||||
@@ -386,21 +386,13 @@ void View::removeEventHandler(osgGA::GUIEventHandler* eventHandler)
|
||||
|
||||
void View::setCoordinateSystemNodePath(const osg::NodePath& nodePath)
|
||||
{
|
||||
_coordinateSystemNodePath.clear();
|
||||
std::copy(nodePath.begin(),
|
||||
nodePath.end(),
|
||||
std::back_inserter(_coordinateSystemNodePath));
|
||||
_coordinateSystemNodePath.setNodePath(nodePath);
|
||||
}
|
||||
|
||||
osg::NodePath View::getCoordinateSystemNodePath() const
|
||||
{
|
||||
osg::NodePath nodePath;
|
||||
for(ObserverNodePath::const_iterator itr = _coordinateSystemNodePath.begin();
|
||||
itr != _coordinateSystemNodePath.end();
|
||||
++itr)
|
||||
{
|
||||
nodePath.push_back(const_cast<osg::Node*>(itr->get()));
|
||||
}
|
||||
_coordinateSystemNodePath.getNodePath(nodePath);
|
||||
return nodePath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user