Show
Ignore:
Timestamp:
08/31/09 11:40:56 (5 years ago)
Author:
cedricpinson
Message:

From Cedric Pinson, The following modification are
Update Timeline.cpp to add current layer to the ActionVisitor?, use correctly the priority
Add accessors in Action.cpp to retrieve protected data
Split files and rename them to classname
Change de default color of UpdateMaterial? to FFOOFF to detect unset value
Add accessors in LinkVisitor? instead of accessing data directly
Update osganimationtimeline example to fit the api callback

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgAnimation/Bone

    r10558 r10561  
    5757        void setDefaultUpdateCallback(const std::string& name = ""); 
    5858 
    59         struct BoneMapVisitor : public osg::NodeVisitor 
    60         { 
    61             BoneMap _map; 
    62             BoneMapVisitor(): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {} 
    63  
    64             META_NodeVisitor("osgAnimation","BoneMapVisitor") 
    65  
    66             void apply(osg::Node&) { return; } 
    67             void apply(osg::Transform& node) 
    68             { 
    69                 Bone* bone = dynamic_cast<Bone*>(&node); 
    70                 if (bone)  
    71                 { 
    72                     _map[bone->getName()] = bone; 
    73                     traverse(node); 
    74                 } 
    75             } 
    76         }; 
    77  
    7859        class OSGANIMATION_EXPORT UpdateBone : public AnimationUpdateCallback <osg::NodeCallback> 
    7960        { 
     
    132113        const osg::Vec3& getTranslation() const { return _position;} 
    133114        const osg::Quat& getRotation() const { return _rotation;} 
     115        const osg::Vec3& getScale() const { return _scale;} 
     116 
    134117        osg::Matrix getMatrixInBoneSpace() const { return (osg::Matrix(getRotation())) * osg::Matrix::translate(getTranslation()) * _bindInBoneSpace;} 
    135118        const osg::Matrix& getBindMatrixInBoneSpace() const { return _bindInBoneSpace; }