]>
Dogcows Code - chaz/yoink/blob - src/Animation.hh
2 /*] Copyright (c) 2009-2011, Charles McGarvey [*****************************
3 **] All rights reserved.
5 * Distributable under the terms and conditions of the 2-clause BSD license;
6 * see the file COPYING for a complete text of the license.
8 *****************************************************************************/
10 #ifndef _ANIMATION_HH_
11 #define _ANIMATION_HH_
20 #include <boost/shared_ptr.hpp>
22 #include <moof/math.hh>
26 typedef boost::shared_ptr
<Animation
> AnimationP
;
29 * A class to manage frame-based animation. Animation sequences can be
30 * loaded from file, then named sequences are started. The animation is
31 * updated periodically (each update cycle), and the correct current frame
32 * is determined. This class is generic enough that a frame can mean just
33 * about anything to whatever drawing context is used to render the frame.
39 Animation(const std::string
& name
);
41 static AnimationP
alloc(const std::string
& name
)
43 return AnimationP(new Animation(name
));
46 void startSequence(const std::string
& name
);
48 void update(moof::scalar t
, moof::scalar dt
);
49 unsigned getFrame() const;
54 boost::shared_ptr
<impl
> impl_
;
58 #endif // _ANIMATION_HH_
This page took 0.036577 seconds and 5 git commands to generate.