Debian Codegraph @

include/imd5model.h

raw
1 #pragma once
2
3 #include <memory>
4 #include "imd5anim.h"
5
6 namespace md5
7 {
8
9 /**
10 * Interface for a MD5 model object. This can be used
11 * to control the animation applied to the MD5.
12 */
13 class IMD5Model
14 {
15 public:
16 /**
17 * Set the animation to play on this model.
18 * Pass a NULL animation to clear any anim.
19 */
20 virtual void setAnim(const IMD5AnimPtr& anim) = 0;
21
22 /**
23 * Returns the currently applied animation.
24 */
25 virtual const IMD5AnimPtr& getAnim() const = 0;
26
27 /**
28 * Update the mesh using the given animation playback time.
29 */
30 virtual void updateAnim(std::size_t time) = 0;
31 };
32 typedef std::shared_ptr<IMD5Model> IMD5ModelPtr;
33
34 } // namespace