Fixes to removed dependency on RefNodePath.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include <osg/ArgumentParser>
|
||||
#include <osg/ApplicationUsage>
|
||||
#include <osg/AnimationPath>
|
||||
#include <osg/RefNodePath>
|
||||
#include <osg/observer_ptr>
|
||||
|
||||
#include <osgUtil/IntersectVisitor>
|
||||
|
||||
@@ -225,11 +225,9 @@ class OSGPRODUCER_EXPORT Viewer : public OsgCameraGroup, public osgGA::GUIAction
|
||||
|
||||
void computeActiveCoordinateSystemNodePath();
|
||||
|
||||
void setCoordinateSystemNodePath(const osg::RefNodePath& nodePath) { _coordinateSystemNodePath = nodePath; }
|
||||
|
||||
void setCoordinateSystemNodePath(const osg::NodePath& nodePath);
|
||||
|
||||
const osg::RefNodePath& getCoordinateSystemNodePath() const { return _coordinateSystemNodePath; }
|
||||
osg::NodePath getCoordinateSystemNodePath() const;
|
||||
|
||||
/** Dispatch the cull and draw for each of the Camera's for this frame.*/
|
||||
virtual void frame();
|
||||
@@ -323,7 +321,8 @@ class OSGPRODUCER_EXPORT Viewer : public OsgCameraGroup, public osgGA::GUIAction
|
||||
osg::ref_ptr<osgGA::EventVisitor> _eventVisitor;
|
||||
|
||||
|
||||
osg::RefNodePath _coordinateSystemNodePath;
|
||||
typedef std::vector< osg::observer_ptr<osg::Node> > ObserveredNodePath;
|
||||
ObserveredNodePath _coordinateSystemNodePath;
|
||||
|
||||
bool _recordingAnimationPath;
|
||||
double _recordingStartTime;
|
||||
|
||||
@@ -114,7 +114,7 @@ void NodeTrackerCallback::update(osg::Node& node)
|
||||
|
||||
osg::NodePath nodePath;
|
||||
for(ObserveredNodePath::iterator itr = _trackNodePath.begin();
|
||||
itr != _trackNodePath.begin();
|
||||
itr != _trackNodePath.end();
|
||||
++itr)
|
||||
{
|
||||
nodePath.push_back(itr->get());
|
||||
|
||||
@@ -262,6 +262,18 @@ Viewer::~Viewer()
|
||||
{
|
||||
}
|
||||
|
||||
osg::NodePath Viewer::getCoordinateSystemNodePath() const
|
||||
{
|
||||
osg::NodePath nodePath;
|
||||
for(ObserveredNodePath::const_iterator itr = _coordinateSystemNodePath.begin();
|
||||
itr != _coordinateSystemNodePath.end();
|
||||
++itr)
|
||||
{
|
||||
nodePath.push_back(const_cast<osg::Node*>(itr->get()));
|
||||
}
|
||||
return nodePath;
|
||||
}
|
||||
|
||||
void Viewer::setWriteImageFileName(const std::string& filename)
|
||||
{
|
||||
_writeImageFileName = filename;
|
||||
|
||||
Reference in New Issue
Block a user