openscenegraph
ActionStripAnimation
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>
24
25namespace 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 );
40 const ActionBlendIn* getBlendIn() 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;
53 };
54
55}
56
57#endif
Definition ActionAnimation:26
blend in from 0 to weight in duration
Definition ActionBlendIn:27
blend out from weight to 0 in duration
Definition ActionBlendOut:27
Definition ActionStripAnimation:30
osg::ref_ptr< ActionBlendIn > _blendIn
Definition ActionStripAnimation:50
const ActionBlendIn * getBlendIn() const
FrameBlendOut _blendOut
Definition ActionStripAnimation:51
unsigned int getBlendOutStartFrame() const
const ActionBlendOut * getBlendOut() const
std::pair< unsigned int, osg::ref_ptr< ActionBlendOut > > FrameBlendOut
Definition ActionStripAnimation:49
ActionStripAnimation(const ActionStripAnimation &a, const osg::CopyOp &c)
ActionAnimation * getAnimation()
META_Action(osgAnimation, ActionStripAnimation)
void setLoop(unsigned int loop)
osg::ref_ptr< ActionAnimation > _animation
Definition ActionStripAnimation:52
const ActionAnimation * getAnimation() const
ActionStripAnimation(Animation *animation, double blendInDuration=0.0, double blendOutDuration=0.0, double blendInWeightTarget=1.0)
ActionStripAnimation()
Definition ActionStripAnimation:33
void traverse(ActionVisitor &visitor)
Definition ActionVisitor:39
Definition Action:37
Definition Animation:29
Definition CopyOp:41
Definition ref_ptr:32
Definition Action:34
#define OSGANIMATION_EXPORT
Definition osgAnimation/Export:40