OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BasicAnimationManager.h
Go to the documentation of this file.
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 
23 namespace osgAnimation
24 {
26  {
27  public:
28 
30 
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
#define OSGANIMATION_EXPORT
Definition: Export.h:40
std::map< int, AnimationList > AnimationLayers
#define META_Object(library, name)
Definition: Object.h:42