Saga3D API Documentation  1.0-RC4
IAnimatedMeshSceneNode.h
Go to the documentation of this file.
1 #ifndef __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
2 #define __I_ANIMATED_MESH_SCENE_NODE_H_INCLUDED__
3 
4 #include "IMeshSceneNode.h"
5 
6 namespace saga
7 {
8 namespace scene
9 {
10 
11  class IAnimatedMesh;
12  class IAnimatedMeshSceneNode;
13 
15 
20  {
21  public:
22 
24 
27  virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node) = 0;
28  };
29 
32  {
33  public:
34 
37  const std::shared_ptr<IMesh>& mesh,
38  const std::shared_ptr<ISceneNode>& parent,
39  const std::shared_ptr<ISceneManager> mgr,
40  const glm::vec3& position = glm::vec3(0,0,0),
41  const glm::vec3& rotation = glm::vec3(0,0,0),
42  const glm::vec3& scale = glm::vec3(1.0f, 1.0f, 1.0f))
43  : IMeshSceneNode(mesh, parent, mgr, position, rotation, scale) {}
44 
47 
49 
53  virtual void setCurrentFrame(float frame) = 0;
54 
56 
64  virtual bool setFrameLoop(std::int32_t begin, std::int32_t end) = 0;
65 
67 
68  virtual void setAnimationSpeed(float framesPerSecond) = 0;
69 
71 
72  virtual float getAnimationSpeed() const = 0;
73 
75 
89  // virtual IBoneSceneNode* getJointNode(const char* jointName)= 0;
90 
92  // virtual IBoneSceneNode* getJointNode(std::uint32_t jointID) = 0;
93 
95 
96  virtual std::uint32_t getBoneCount() const = 0;
97 
99  virtual float getFrameNumber() const = 0;
100 
102  virtual std::int32_t getStartFrame() const = 0;
103 
105  virtual std::int32_t getEndFrame() const = 0;
106 
108 
109  virtual void setLoopMode(bool playAnimationLooped) = 0;
110 
112 
113  virtual bool getLoopMode() const = 0;
114 
116 
119  virtual void setAnimationEndCallback(IAnimationEndCallBack* callback= 0) = 0;
120 
122 
125  // virtual void setTransitionTime(float Time) = 1;
126 
128 
129  // virtual void animateJoints(bool CalculateAbsolutePositions=true) = 0;
130 
131  };
132 
133 } // namespace scene
134 } // namespace saga
135 
136 #endif
137 
saga::scene::IAnimatedMeshSceneNode::getStartFrame
virtual std::int32_t getStartFrame() const =0
Returns the current start frame number.
saga::scene::IAnimatedMeshSceneNode::setAnimationSpeed
virtual void setAnimationSpeed(float framesPerSecond)=0
Sets the speed with which the animation is played.
saga::scene::IAnimatedMeshSceneNode::getLoopMode
virtual bool getLoopMode() const =0
returns the current loop mode
saga::scene::IMeshSceneNode
A scene node displaying a static mesh.
Definition: IMeshSceneNode.h:18
saga::scene::IAnimatedMeshSceneNode::~IAnimatedMeshSceneNode
virtual ~IAnimatedMeshSceneNode()
Destructor.
Definition: IAnimatedMeshSceneNode.h:46
saga::scene::IAnimatedMeshSceneNode
Scene node capable of displaying an animated mesh.
Definition: IAnimatedMeshSceneNode.h:31
saga::scene::IAnimatedMeshSceneNode::setCurrentFrame
virtual void setCurrentFrame(float frame)=0
Sets the current frame number.
saga::scene::IAnimatedMeshSceneNode::setFrameLoop
virtual bool setFrameLoop(std::int32_t begin, std::int32_t end)=0
Sets the frame numbers between the animation is looped.
saga::scene::IAnimatedMeshSceneNode::setAnimationEndCallback
virtual void setAnimationEndCallback(IAnimationEndCallBack *callback=0)=0
Sets a callback interface which will be called if an animation playback has ended.
saga::scene::IAnimatedMeshSceneNode::setLoopMode
virtual void setLoopMode(bool playAnimationLooped)=0
Sets looping mode which is on by default.
saga::scene::IAnimationEndCallBack::OnAnimationEnd
virtual void OnAnimationEnd(IAnimatedMeshSceneNode *node)=0
Will be called when the animation playback has ended.
saga::scene::IAnimatedMeshSceneNode::getBoneCount
virtual std::uint32_t getBoneCount() const =0
Get a pointer to a joint in the mesh (if the mesh is a bone based mesh).
saga::scene::IAnimatedMeshSceneNode::getAnimationSpeed
virtual float getAnimationSpeed() const =0
Gets the speed with which the animation is played.
saga::scene::IAnimatedMeshSceneNode::getFrameNumber
virtual float getFrameNumber() const =0
Returns the currently displayed frame number.
saga::scene::IAnimationEndCallBack
Callback interface for catching events of ended animations.
Definition: IAnimatedMeshSceneNode.h:19
saga::scene::IAnimatedMeshSceneNode::getEndFrame
virtual std::int32_t getEndFrame() const =0
Returns the current end frame number.
IMeshSceneNode.h
saga::scene::IAnimatedMeshSceneNode::IAnimatedMeshSceneNode
IAnimatedMeshSceneNode(const std::shared_ptr< IMesh > &mesh, const std::shared_ptr< ISceneNode > &parent, const std::shared_ptr< ISceneManager > mgr, const glm::vec3 &position=glm::vec3(0, 0, 0), const glm::vec3 &rotation=glm::vec3(0, 0, 0), const glm::vec3 &scale=glm::vec3(1.0f, 1.0f, 1.0f))
Constructor.
Definition: IAnimatedMeshSceneNode.h:36
saga
Definition: aabbox3d.h:11