Show
Ignore:
Timestamp:
03/09/09 18:38:39 (9 years ago)
Author:
robert
Message:

From Roland Smeenk & Cedric Pinson,

"Summary of changes:
From Roland
-Added MorphGeometry?
-Bone Bindmatrix is only calculated if needed
-osgAnimation plugin now supports all available channel types (before only linear vec3 or quat channels)
-osgAnimation plugin now supports MorphGeometry?
-osgAnimation plugin now supports animation and channel weights, animation playmode, duration and starttime
-removed osgAnimationManager.cpp from CMakeList

From Cedric
-fixed the last_update field (it was only updated at the first update) in BasicAnimationManager?.cpp
- Refactore some part of MorphGeometry? minor changes
- Add osganimationmorph as example
"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgAnimation/Bone.cpp

    r9370 r9877  
    1717#include <osgAnimation/Skeleton> 
    1818 
    19 osgAnimation::Bone::UpdateBone::UpdateBone(const osgAnimation::Bone::UpdateBone& apc,const osg::CopyOp& copyop): 
     19osgAnimation::Bone::UpdateBone::UpdateBone(const osgAnimation::Bone::UpdateBone& apc,const osg::CopyOp& copyop) : 
    2020    osgAnimation::AnimationUpdateCallback(apc, copyop), 
    2121    _position(apc._position), 
     
    2626 
    2727 
    28 osgAnimation::Bone::Bone(const Bone& b, const osg::CopyOp& copyop) 
    29     : osg::Transform(b,copyop), 
    30       _position(b._position), 
     28osgAnimation::Bone::Bone(const Bone& b, const osg::CopyOp& copyop) : 
     29    osg::Transform(b,copyop), 
     30    _position(b._position), 
    3131    _rotation(b._rotation), 
    32     _scale(b._scale)  
     32    _scale(b._scale), 
     33    _needToRecomputeBindMatrix(true) 
    3334{ 
    3435} 
     
    5758    if (!parent) 
    5859    { 
    59 #if 0 
    60         // no more parent means, we get the skeleton 
    61         if (getParents().empty()) { 
    62             osg::notify(osg::WARN) << "Warning " << className() <<"::computeBindMatrix you should not have this message, it means you miss to attach this bone(" << getName() <<") to a Skeleton node" << std::endl; 
    63             return; 
    64         } else if (getParents().size() > 1) { 
    65             osg::notify(osg::WARN) << "Warning " << className() <<"::computeBindMatrix you have more than one parent in a skeleton structure (" << getName() <<") unknown behaviour" << std::endl; 
    66             return; 
    67         } 
    68         osgAnimation::Skeleton* skel = dynamic_cast<osgAnimation::Skeleton*>(getParents()[0]); 
    69         if (!skel) { 
    70             osg::notify(osg::WARN) << "Warning " << className() <<"::computeBindMatrix you should not have this message, it means you miss to attach this bone(" << getName() <<") to a Skeleton node" << std::endl; 
    71             return; 
    72         } 
    73         _invBindInSkeletonSpace = osg::Matrix::inverse(skel->getMatrix()) * _invBindInSkeletonSpace; 
    74 #else 
    7560        osg::notify(osg::WARN) << "Warning " << className() <<"::computeBindMatrix you should not have this message, it means you miss to attach this bone(" << getName() <<") to a Skeleton node" << std::endl; 
    76 #endif 
    7761        return; 
    7862    }