From 095da72020fbe9794c41ba1aba9625b3b3c6bb30 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 11 Jul 2007 16:06:04 +0000 Subject: [PATCH] Fixed typo --- include/osg/NodeTrackerCallback | 8 ++++---- include/osgGA/NodeTrackerManipulator | 8 ++++---- include/osgViewer/View | 4 ++-- src/osg/NodeTrackerCallback.cpp | 6 +++--- src/osg/View.cpp | 2 +- src/osgGA/NodeTrackerManipulator.cpp | 6 +++--- src/osgViewer/View.cpp | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/osg/NodeTrackerCallback b/include/osg/NodeTrackerCallback index 04b2b8c47..05c4c21af 100644 --- a/include/osg/NodeTrackerCallback +++ b/include/osg/NodeTrackerCallback @@ -26,7 +26,7 @@ class OSG_EXPORT NodeTrackerCallback : public NodeCallback public: - typedef std::vector< observer_ptr > ObserveredNodePath; + typedef std::vector< observer_ptr > ObserverNodePath; void setTrackNodePath(const osg::NodePath& nodePath) { @@ -35,8 +35,8 @@ class OSG_EXPORT NodeTrackerCallback : public NodeCallback std::copy(nodePath.begin(), nodePath.end(), std::back_inserter(_trackNodePath)); } - void setTrackNodePath(const ObserveredNodePath& nodePath) { _trackNodePath = nodePath; } - ObserveredNodePath& getTrackNodePath() { return _trackNodePath; } + void setTrackNodePath(const ObserverNodePath& nodePath) { _trackNodePath = nodePath; } + ObserverNodePath& getTrackNodePath() { return _trackNodePath; } void setTrackNode(osg::Node* node); osg::Node* getTrackNode() { return _trackNodePath.empty() ? 0 : _trackNodePath.back().get(); } @@ -53,7 +53,7 @@ class OSG_EXPORT NodeTrackerCallback : public NodeCallback protected: - ObserveredNodePath _trackNodePath; + ObserverNodePath _trackNodePath; }; diff --git a/include/osgGA/NodeTrackerManipulator b/include/osgGA/NodeTrackerManipulator index c947c28bd..5b92bff54 100644 --- a/include/osgGA/NodeTrackerManipulator +++ b/include/osgGA/NodeTrackerManipulator @@ -29,7 +29,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator virtual const char* className() const { return "NodeTrackerManipulator"; } - typedef std::vector< osg::observer_ptr > ObserveredNodePath; + typedef std::vector< osg::observer_ptr > ObserverNodePath; void setTrackNodePath(const osg::NodePath& nodePath) { @@ -38,8 +38,8 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator std::copy(nodePath.begin(), nodePath.end(), std::back_inserter(_trackNodePath)); } - void setTrackNodePath(const ObserveredNodePath& nodePath) { _trackNodePath = nodePath; } - ObserveredNodePath& getTrackNodePath() { return _trackNodePath; } + void setTrackNodePath(const ObserverNodePath& nodePath) { _trackNodePath = nodePath; } + ObserverNodePath& getTrackNodePath() { return _trackNodePath; } void setTrackNode(osg::Node* node); osg::Node* getTrackNode() { return _trackNodePath.empty() ? 0 : _trackNodePath.back().get(); } @@ -165,7 +165,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator osg::ref_ptr _node; - ObserveredNodePath _trackNodePath; + ObserverNodePath _trackNodePath; TrackerMode _trackerMode; RotationMode _rotationMode; diff --git a/include/osgViewer/View b/include/osgViewer/View index c869164f6..066dff56a 100644 --- a/include/osgViewer/View +++ b/include/osgViewer/View @@ -194,8 +194,8 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter osg::ref_ptr _cameraManipulator; EventHandlers _eventHandlers; - typedef std::vector< osg::observer_ptr > ObserveredNodePath; - ObserveredNodePath _coordinateSystemNodePath; + typedef std::vector< osg::observer_ptr > ObserverNodePath; + ObserverNodePath _coordinateSystemNodePath; osg::ref_ptr _displaySettings; osgUtil::SceneView::FusionDistanceMode _fusionDistanceMode; diff --git a/src/osg/NodeTrackerCallback.cpp b/src/osg/NodeTrackerCallback.cpp index 7eb29647d..2bbadd3c7 100644 --- a/src/osg/NodeTrackerCallback.cpp +++ b/src/osg/NodeTrackerCallback.cpp @@ -87,14 +87,14 @@ void NodeTrackerCallback::operator()(Node* node, NodeVisitor* nv) bool NodeTrackerCallback::validateNodePath() const { - for(ObserveredNodePath::const_iterator itr = _trackNodePath.begin(); + for(ObserverNodePath::const_iterator itr = _trackNodePath.begin(); itr != _trackNodePath.begin(); ++itr) { if (*itr==0) { osg::notify(osg::NOTICE)<<"Warning: tracked node path has been invalidated by changes in the scene graph."<(_trackNodePath).clear(); + const_cast(_trackNodePath).clear(); return false; } } @@ -107,7 +107,7 @@ void NodeTrackerCallback::update(osg::Node& node) if (!validateNodePath()) return; osg::NodePath nodePath; - for(ObserveredNodePath::iterator itr = _trackNodePath.begin(); + for(ObserverNodePath::iterator itr = _trackNodePath.begin(); itr != _trackNodePath.end(); ++itr) { diff --git a/src/osg/View.cpp b/src/osg/View.cpp index 913b79ae5..01b0aad16 100644 --- a/src/osg/View.cpp +++ b/src/osg/View.cpp @@ -28,7 +28,7 @@ View::View() #if 1 double height = osg::DisplaySettings::instance()->getScreenHeight(); double width = osg::DisplaySettings::instance()->getScreenWidth(); - double distance = osg::DisplaySettings::instance()->getScreenWidth(); + double distance = osg::DisplaySettings::instance()->getScreenDistance(); double vfov = osg::RadiansToDegrees(atan2(height/2.0f,distance)*2.0); diff --git a/src/osgGA/NodeTrackerManipulator.cpp b/src/osgGA/NodeTrackerManipulator.cpp index 158b93966..1fd927c0a 100644 --- a/src/osgGA/NodeTrackerManipulator.cpp +++ b/src/osgGA/NodeTrackerManipulator.cpp @@ -60,7 +60,7 @@ NodeTrackerManipulator::~NodeTrackerManipulator() osg::NodePath NodeTrackerManipulator::getNodePath() const { osg::NodePath nodePath; - for(ObserveredNodePath::const_iterator itr = _trackNodePath.begin(); + for(ObserverNodePath::const_iterator itr = _trackNodePath.begin(); itr != _trackNodePath.end(); ++itr) { @@ -71,14 +71,14 @@ osg::NodePath NodeTrackerManipulator::getNodePath() const bool NodeTrackerManipulator::validateNodePath() const { - for(ObserveredNodePath::const_iterator itr = _trackNodePath.begin(); + for(ObserverNodePath::const_iterator itr = _trackNodePath.begin(); itr != _trackNodePath.begin(); ++itr) { if (*itr==0) { osg::notify(osg::NOTICE)<<"Warning: tracked node path has been invalidated by changes in the scene graph."<(_trackNodePath).clear(); + const_cast(_trackNodePath).clear(); return false; } } diff --git a/src/osgViewer/View.cpp b/src/osgViewer/View.cpp index e7535284e..325af1bb1 100644 --- a/src/osgViewer/View.cpp +++ b/src/osgViewer/View.cpp @@ -209,7 +209,7 @@ void View::setCoordinateSystemNodePath(const osg::NodePath& nodePath) osg::NodePath View::getCoordinateSystemNodePath() const { osg::NodePath nodePath; - for(ObserveredNodePath::const_iterator itr = _coordinateSystemNodePath.begin(); + for(ObserverNodePath::const_iterator itr = _coordinateSystemNodePath.begin(); itr != _coordinateSystemNodePath.end(); ++itr) {