Fixed typo
This commit is contained in:
parent
691a49d0fa
commit
095da72020
@ -26,7 +26,7 @@ class OSG_EXPORT NodeTrackerCallback : public NodeCallback
|
||||
public:
|
||||
|
||||
|
||||
typedef std::vector< observer_ptr<Node> > ObserveredNodePath;
|
||||
typedef std::vector< observer_ptr<Node> > 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;
|
||||
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ class OSGGA_EXPORT NodeTrackerManipulator : public MatrixManipulator
|
||||
|
||||
virtual const char* className() const { return "NodeTrackerManipulator"; }
|
||||
|
||||
typedef std::vector< osg::observer_ptr<osg::Node> > ObserveredNodePath;
|
||||
typedef std::vector< osg::observer_ptr<osg::Node> > 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<osg::Node> _node;
|
||||
|
||||
ObserveredNodePath _trackNodePath;
|
||||
ObserverNodePath _trackNodePath;
|
||||
|
||||
TrackerMode _trackerMode;
|
||||
RotationMode _rotationMode;
|
||||
|
@ -194,8 +194,8 @@ 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;
|
||||
typedef std::vector< osg::observer_ptr<osg::Node> > ObserverNodePath;
|
||||
ObserverNodePath _coordinateSystemNodePath;
|
||||
|
||||
osg::ref_ptr<osg::DisplaySettings> _displaySettings;
|
||||
osgUtil::SceneView::FusionDistanceMode _fusionDistanceMode;
|
||||
|
@ -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."<<std::endl;
|
||||
const_cast<ObserveredNodePath&>(_trackNodePath).clear();
|
||||
const_cast<ObserverNodePath&>(_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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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."<<std::endl;
|
||||
const_cast<ObserveredNodePath&>(_trackNodePath).clear();
|
||||
const_cast<ObserverNodePath&>(_trackNodePath).clear();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user