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

Revision 13041, 2.1 kB (checked in by robert, 2 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) 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
25namespace osgAnimation
26{
27
28    // encapsulate animation with blend in blend out for classic usage
29    class OSGANIMATION_EXPORT ActionStripAnimation : public Action
30    {
31    public:
32        META_Action(osgAnimation, ActionStripAnimation);
33        ActionStripAnimation() {}
34        ActionStripAnimation(const ActionStripAnimation& a, const osg::CopyOp& c);
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;
50        osg::ref_ptr<ActionBlendIn> _blendIn;
51        FrameBlendOut _blendOut;
52        osg::ref_ptr<ActionAnimation> _animation;
53    };
54
55}
56
57#endif
Note: See TracBrowser for help on using the browser.