Introduce NodeVisitor::className and libraryName()

This commit is contained in:
Robert Osfield
2008-12-17 12:13:15 +00:00
parent a5c32da4ff
commit 8a6e04b84d
27 changed files with 90 additions and 52 deletions

View File

@@ -56,6 +56,8 @@ namespace osgAnimation
BoneMap _map;
BoneMapVisitor(): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
META_NodeVisitor("osgAnimation","BoneMapVisitor")
void apply(osg::Node& node) { return; }
void apply(osg::Transform& node)
{

View File

@@ -26,8 +26,12 @@ namespace osgAnimation
{
AnimationList _animations;
unsigned int _nbLinkedTarget;
LinkVisitor(Animation* animation) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) { _animations.push_back(animation); _nbLinkedTarget = 0;}
LinkVisitor(const AnimationList& animations) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) { _animations = animations; _nbLinkedTarget = 0;}
META_NodeVisitor("osgAnimation","LinkVisitor")
void apply(osg::Node& node)
{
osgAnimation::AnimationUpdateCallback* cb = dynamic_cast<osgAnimation::AnimationUpdateCallback*>(node.getUpdateCallback());

View File

@@ -77,6 +77,9 @@ namespace osgAnimation
{
osg::ref_ptr<Skeleton> _root;
BuildVertexTransformerVisitor(Skeleton* root): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) { _root = root;}
META_NodeVisitor("osgAnimation","BuildVertexTransformerVisitor")
void apply(osg::Geode& node)
{
int num = node.getNumDrawables();