2 * Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
4 * This library is open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version. The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * OpenSceneGraph Public License for more details.
15#ifndef OSGANIMATION_BASIC_ANIMATION_MANAGER_H
16#define OSGANIMATION_BASIC_ANIMATION_MANAGER_H
19#include <osgAnimation/AnimationManagerBase>
20#include <osgAnimation/Export>
21#include <osg/FrameStamp>
25 class OSGANIMATION_EXPORT BasicAnimationManager : public AnimationManagerBase
29 META_Object(osgAnimation, BasicAnimationManager);
31 BasicAnimationManager();
32 BasicAnimationManager(const BasicAnimationManager& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
33 BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
34 virtual ~BasicAnimationManager();
36 void update (double time);
38 void playAnimation (Animation* pAnimation, int priority = 0, float weight = 1.0);
39 bool stopAnimation (Animation* pAnimation);
41 bool findAnimation (Animation* pAnimation);
42 bool isPlaying (Animation* pAnimation);
43 bool isPlaying (const std::string& animationName);
48 typedef std::map<int, AnimationList > AnimationLayers;
49 AnimationLayers _animationsPlaying;