diff --git a/include/osg/NodeVisitor b/include/osg/NodeVisitor index 256ecd9df..cd950d9d3 100644 --- a/include/osg/NodeVisitor +++ b/include/osg/NodeVisitor @@ -228,36 +228,36 @@ class OSG_EXPORT NodeVisitor : public virtual Referenced virtual float getDistanceToViewPoint(const Vec3& /*pos*/, bool /*useLODScale*/) const { return 0.0f; } - virtual void apply(Node& node) { traverse(node);} + virtual void apply(Node& node); - virtual void apply(Geode& node) { apply((Node&)node); } - virtual void apply(Billboard& node) { apply((Geode&)node); } + virtual void apply(Geode& node); + virtual void apply(Billboard& node); - virtual void apply(Group& node) { apply((Node&)node); } + virtual void apply(Group& node); - virtual void apply(ProxyNode& node) { apply((Group&)node); } + virtual void apply(ProxyNode& node); - virtual void apply(Projection& node) { apply((Group&)node); } + virtual void apply(Projection& node); - virtual void apply(CoordinateSystemNode& node) { apply((Group&)node); } + virtual void apply(CoordinateSystemNode& node); - virtual void apply(ClipNode& node) { apply((Group&)node); } - virtual void apply(TexGenNode& node) { apply((Group&)node); } - virtual void apply(LightSource& node) { apply((Group&)node); } + virtual void apply(ClipNode& node); + virtual void apply(TexGenNode& node); + virtual void apply(LightSource& node); - virtual void apply(Transform& node) { apply((Group&)node); } - virtual void apply(Camera& node) { apply((Transform&)node); } - virtual void apply(CameraView& node) { apply((Transform&)node); } - virtual void apply(MatrixTransform& node) { apply((Transform&)node); } - virtual void apply(PositionAttitudeTransform& node) { apply((Transform&)node); } + virtual void apply(Transform& node); + virtual void apply(Camera& node); + virtual void apply(CameraView& node); + virtual void apply(MatrixTransform& node); + virtual void apply(PositionAttitudeTransform& node); - virtual void apply(Switch& node) { apply((Group&)node); } - virtual void apply(Sequence& node) { apply((Group&)node); } - virtual void apply(LOD& node) { apply((Group&)node); } - virtual void apply(PagedLOD& node) { apply((LOD&)node); } - virtual void apply(ClearNode& node) { apply((Group&)node); } - virtual void apply(OccluderNode& node) { apply((Group&)node); } - virtual void apply(OcclusionQueryNode& node) { apply((Group&)node); } + virtual void apply(Switch& node); + virtual void apply(Sequence& node); + virtual void apply(LOD& node); + virtual void apply(PagedLOD& node); + virtual void apply(ClearNode& node); + virtual void apply(OccluderNode& node); + virtual void apply(OcclusionQueryNode& node); /** Callback for managing database paging, such as generated by PagedLOD nodes.*/ diff --git a/src/osg/NodeVisitor.cpp b/src/osg/NodeVisitor.cpp index 2abb0ac17..92bd2e250 100644 --- a/src/osg/NodeVisitor.cpp +++ b/src/osg/NodeVisitor.cpp @@ -11,7 +11,29 @@ * OpenSceneGraph Public License for more details. */ #include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include + #include using namespace osg; @@ -44,3 +66,112 @@ NodeVisitor::~NodeVisitor() // if (_traversalVisitor) detach from _traversalVisitor; } +void NodeVisitor::apply(Node& node) +{ + traverse(node); +} + +void NodeVisitor::apply(Geode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Billboard& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Group& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(ProxyNode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Projection& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(CoordinateSystemNode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(ClipNode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(TexGenNode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(LightSource& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Transform& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Camera& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(CameraView& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(MatrixTransform& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(PositionAttitudeTransform& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Switch& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(Sequence& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(LOD& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(PagedLOD& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(ClearNode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(OccluderNode& node) +{ + apply(static_cast(node)); +} + +void NodeVisitor::apply(OcclusionQueryNode& node) +{ + apply(static_cast(node)); +}