From 3fdc0b4cfd1ef3df8466d182000084b9c85b28ba Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 5 Feb 2009 15:22:42 +0000 Subject: [PATCH] From Fabian Lavignotte, "Here is some various small fixes i have done while playing with osgAnimation. - Animation : removed the _name attribute that is never used. - BasicAnimationManager : fix a crash on Windows with the example osganimationviewer. The _lastUpdate attribute was not initialized when using copy constructor. - CMakeLists.txt : add RigGeometry to the headers list" --- include/osgAnimation/Animation | 1 - include/osgAnimation/BasicAnimationManager | 2 +- src/osgAnimation/BasicAnimationManager.cpp | 19 ++++++++++++++----- src/osgAnimation/CMakeLists.txt | 1 + 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/include/osgAnimation/Animation b/include/osgAnimation/Animation index b104f3577..bcde1fe03 100644 --- a/include/osgAnimation/Animation +++ b/include/osgAnimation/Animation @@ -84,7 +84,6 @@ namespace osgAnimation ~Animation() {} - std::string _name; double _duration; double _originalDuration; float _weight; diff --git a/include/osgAnimation/BasicAnimationManager b/include/osgAnimation/BasicAnimationManager index 46f851b31..633e89d4a 100644 --- a/include/osgAnimation/BasicAnimationManager +++ b/include/osgAnimation/BasicAnimationManager @@ -29,7 +29,7 @@ namespace osgAnimation META_Object(osgAnimation, BasicAnimationManager); BasicAnimationManager(); - BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) : AnimationManagerBase(b,copyop) {} + BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY); virtual ~BasicAnimationManager(); void update (double time); diff --git a/src/osgAnimation/BasicAnimationManager.cpp b/src/osgAnimation/BasicAnimationManager.cpp index 99c1003a3..df438fa36 100644 --- a/src/osgAnimation/BasicAnimationManager.cpp +++ b/src/osgAnimation/BasicAnimationManager.cpp @@ -17,7 +17,20 @@ using namespace osgAnimation; -BasicAnimationManager::~BasicAnimationManager() {} +BasicAnimationManager::BasicAnimationManager() +: _lastUpdate(0.0) +{ +} + +BasicAnimationManager::BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop) +: AnimationManagerBase(b,copyop) +, _lastUpdate(0.0) +{ +} + +BasicAnimationManager::~BasicAnimationManager() +{ +} void BasicAnimationManager::stopAll() { @@ -31,10 +44,6 @@ void BasicAnimationManager::stopAll() _animationsPlaying.clear(); } -BasicAnimationManager::BasicAnimationManager() -{ - _lastUpdate = 0; -} void BasicAnimationManager::playAnimation(Animation* pAnimation, int priority, float weight) { if (!findAnimation(pAnimation)) diff --git a/src/osgAnimation/CMakeLists.txt b/src/osgAnimation/CMakeLists.txt index b3de8257c..8245e7495 100644 --- a/src/osgAnimation/CMakeLists.txt +++ b/src/osgAnimation/CMakeLists.txt @@ -31,6 +31,7 @@ SET(LIB_PUBLIC_HEADERS ${HEADER_PATH}/EaseMotion ${HEADER_PATH}/Assert ${HEADER_PATH}/Timeline + ${HEADER_PATH}/RigGeometry )