OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ActionStripAnimation.h
Go to the documentation of this file.
1 /* -*-c++-*-
2  * Copyright (C) 2009 Cedric Pinson <cedric.pinson@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_ACTION_STRIPANIMATION_H
16 #define OSGANIMATION_ACTION_STRIPANIMATION_H
17 
18 #include <osgAnimation/Action>
19 #include <osgAnimation/Export>
20 #include <osgAnimation/FrameAction>
21 #include <osgAnimation/ActionBlendIn>
22 #include <osgAnimation/ActionBlendOut>
23 #include <osgAnimation/ActionAnimation>
24 
25 namespace osgAnimation
26 {
27 
28  // encapsulate animation with blend in blend out for classic usage
30  {
31  public:
35  ActionStripAnimation(Animation* animation, double blendInDuration = 0.0, double blendOutDuration = 0.0, double blendInWeightTarget = 1.0 );
36  ActionAnimation* getAnimation();
37  ActionBlendIn* getBlendIn();
38  ActionBlendOut* getBlendOut();
39  const ActionAnimation* getAnimation() const;
40  const ActionBlendIn* getBlendIn() const;
41  const ActionBlendOut* getBlendOut() const;
42  unsigned int getBlendOutStartFrame() const;
43 
44  unsigned int getLoop() const;
45  void setLoop(unsigned int loop);
46  void traverse(ActionVisitor& visitor);
47 
48  protected:
49  typedef std::pair<unsigned int, osg::ref_ptr<ActionBlendOut> > FrameBlendOut;
51  FrameBlendOut _blendOut;
53  };
54 
55 }
56 
57 #endif
#define OSGANIMATION_EXPORT
Definition: Export.h:40
osg::ref_ptr< ActionBlendIn > _blendIn
blend in from 0 to weight in duration
Definition: ActionBlendIn.h:26
blend out from weight to 0 in duration
std::pair< unsigned int, osg::ref_ptr< ActionBlendOut > > FrameBlendOut
osg::ref_ptr< ActionAnimation > _animation
#define META_Action(library, name)
Definition: Action.h:24