Added missing Node::asAutoTransform() + NodeVisitor::apply(AutoTransform&).

This commit is contained in:
Robert Osfield 2017-04-25 18:04:04 +01:00
parent 3dc3dd3bd6
commit a4b0dc7426
3 changed files with 12 additions and 0 deletions

View File

@ -40,6 +40,8 @@ class OccluderNode;
class OcclusionQueryNode; class OcclusionQueryNode;
class PagedLOD; class PagedLOD;
class PositionAttitudeTransform; class PositionAttitudeTransform;
class AutoTransform;
class MultiViewAutoTransform;
class Projection; class Projection;
class ProxyNode; class ProxyNode;
class Sequence; class Sequence;
@ -338,6 +340,7 @@ class OSG_EXPORT NodeVisitor : public virtual Object
virtual void apply(CameraView& node); virtual void apply(CameraView& node);
virtual void apply(MatrixTransform& node); virtual void apply(MatrixTransform& node);
virtual void apply(PositionAttitudeTransform& node); virtual void apply(PositionAttitudeTransform& node);
virtual void apply(AutoTransform& node);
virtual void apply(Switch& node); virtual void apply(Switch& node);
virtual void apply(Sequence& node); virtual void apply(Sequence& node);

View File

@ -91,6 +91,9 @@ class OSG_EXPORT Transform : public Group
virtual PositionAttitudeTransform* asPositionAttitudeTransform() { return 0; } virtual PositionAttitudeTransform* asPositionAttitudeTransform() { return 0; }
virtual const PositionAttitudeTransform* asPositionAttitudeTransform() const { return 0; } virtual const PositionAttitudeTransform* asPositionAttitudeTransform() const { return 0; }
virtual AutoTransform* asAutoTransform() { return 0; }
virtual const AutoTransform* asAutoTransform() const { return 0; }
enum ReferenceFrame enum ReferenceFrame
{ {
RELATIVE_RF, RELATIVE_RF,

View File

@ -25,6 +25,7 @@
#include <osg/OcclusionQueryNode> #include <osg/OcclusionQueryNode>
#include <osg/PagedLOD> #include <osg/PagedLOD>
#include <osg/PositionAttitudeTransform> #include <osg/PositionAttitudeTransform>
#include <osg/AutoTransform>
#include <osg/Projection> #include <osg/Projection>
#include <osg/ProxyNode> #include <osg/ProxyNode>
#include <osg/Sequence> #include <osg/Sequence>
@ -161,6 +162,11 @@ void NodeVisitor::apply(PositionAttitudeTransform& node)
apply(static_cast<Transform&>(node)); apply(static_cast<Transform&>(node));
} }
void NodeVisitor::apply(AutoTransform& node)
{
apply(static_cast<Transform&>(node));
}
void NodeVisitor::apply(Switch& node) void NodeVisitor::apply(Switch& node)
{ {
apply(static_cast<Group&>(node)); apply(static_cast<Group&>(node));