root/OpenSceneGraph/trunk/include/osgAnimation/BasicAnimationManager @ 13041

Revision 13041, 1.7 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/*  -*-c++-*-
2 *  Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
3 *
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.
8 *
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.
13*/
14
15#ifndef OSGANIMATION_BASIC_ANIMATION_MANAGER_H
16#define OSGANIMATION_BASIC_ANIMATION_MANAGER_H
17
18#include <osg/Group>
19#include <osgAnimation/AnimationManagerBase>
20#include <osgAnimation/Export>
21#include <osg/FrameStamp>
22
23namespace osgAnimation
24{
25    class OSGANIMATION_EXPORT BasicAnimationManager : public AnimationManagerBase
26    {
27    public:
28
29        META_Object(osgAnimation, BasicAnimationManager);
30
31        BasicAnimationManager();
32        BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
33        virtual ~BasicAnimationManager();
34
35        void update (double time);
36
37        void playAnimation (Animation* pAnimation, int priority = 0, float weight = 1.0);
38        bool stopAnimation (Animation* pAnimation);
39
40        bool findAnimation (Animation* pAnimation);
41        bool isPlaying (Animation* pAnimation);
42        bool isPlaying (const std::string& animationName);
43
44        void stopAll();
45
46    protected:
47        typedef std::map<int, AnimationList > AnimationLayers;
48        AnimationLayers _animationsPlaying;
49        double _lastUpdate;
50    };
51
52}
53#endif
Note: See TracBrowser for help on using the browser.