Saga3D API Documentation
1.0-RC4
|
Interface for an animated mesh. More...
#include <IAnimatedMesh.h>
Public Member Functions | |
virtual std::uint32_t | getFrameCount () const =0 |
Gets the frame count of the animated mesh. More... | |
virtual float | getAnimationSpeed () const =0 |
Gets the animation speed of the animated mesh. More... | |
virtual void | setAnimationSpeed (float fps)=0 |
Sets the animation speed of the animated mesh. More... | |
virtual void | setAnimation (const uint32_t index)=0 |
Set active animation. More... | |
virtual void | onAnimate (const float time)=0 |
Animate the mesh. More... | |
![]() | |
void | setID (const ID id) |
ID | getID () const |
virtual void | addMeshBuffer (std::unique_ptr< IMeshBuffer > buf)=0 |
adds a MeshBuffer More... | |
virtual std::uint32_t | getMeshBufferCount () const =0 |
Get the amount of mesh buffers. More... | |
virtual IMeshBuffer & | getMeshBuffer (std::uint32_t nr=0)=0 |
Get pointer to a mesh buffer. More... | |
virtual const core::aabbox3d< float > & | getBoundingBox () const =0 |
Get an axis aligned bounding box of the mesh. More... | |
virtual void | setBoundingBox (const core::aabbox3df &box)=0 |
Set user-defined axis aligned bounding box. More... | |
virtual E_MESH_TYPE | getMeshType () const =0 |
Additional Inherited Members | |
![]() | |
ID | MeshID = INVALID_ID |
ID of this mesh. More... | |
Interface for an animated mesh.
There are already simple implementations of this interface available so you don't have to implement this interface on your own if you need to: You might want to use saga::scene::SAnimatedMesh, saga::scene::SMesh, saga::scene::SMeshBuffer etc.
Definition at line 16 of file IAnimatedMesh.h.
|
pure virtual |
Gets the animation speed of the animated mesh.
Implemented in saga::scene::SAnimatedMesh.
|
pure virtual |
Gets the frame count of the animated mesh.
Note that the play-time is usually getFrameCount()-1 as it stops as soon as the last frame-key is reached.
Implemented in saga::scene::SAnimatedMesh.
|
pure virtual |
Animate the mesh.
Depends on underlying implementation, skeletal for mesh animation will be performed
Implemented in saga::scene::SAnimatedMesh.
|
pure virtual |
Set active animation.
index | index of the animation |
Implemented in saga::scene::SAnimatedMesh.
|
pure virtual |
Sets the animation speed of the animated mesh.
fps | Number of frames per second to play the animation with by default. If the amount is 0, it is not animated. The actual speed is set in the scene node the mesh is instantiated in. |
Implemented in saga::scene::SAnimatedMesh.