Interface for an animated mesh. More...
#include <IAnimatedMesh.h>
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 irr::scene::SAnimatedMesh, irr::scene::SMesh, irr::scene::SMeshBuffer etc.
Definition at line 62 of file IAnimatedMesh.h.
virtual f32 irr::scene::IAnimatedMesh::getAnimationSpeed | ( | ) | const [pure virtual] |
Gets the animation speed of the animated mesh.
Implemented in irr::scene::SAnimatedMesh.
virtual u32 irr::scene::IAnimatedMesh::getFrameCount | ( | ) | const [pure virtual] |
Gets the frame count of the animated mesh.
Implemented in irr::scene::SAnimatedMesh.
virtual IMesh* irr::scene::IAnimatedMesh::getMesh | ( | s32 | frame, |
s32 | detailLevel = 255 , |
||
s32 | startFrameLoop = -1 , |
||
s32 | endFrameLoop = -1 |
||
) | [pure virtual] |
Returns the IMesh interface for a frame.
frame,: | Frame number as zero based index. The maximum frame number is getFrameCount() - 1; |
detailLevel,: | Level of detail. 0 is the lowest, 255 the highest level of detail. Most meshes will ignore the detail level. |
startFrameLoop,: | Because some animated meshes (.MD2) are blended between 2 static frames, and maybe animated in a loop, the startFrameLoop and the endFrameLoop have to be defined, to prevent the animation to be blended between frames which are outside of this loop. If startFrameLoop and endFrameLoop are both -1, they are ignored. |
endFrameLoop,: | see startFrameLoop. |
Implemented in irr::scene::SAnimatedMesh.
virtual E_ANIMATED_MESH_TYPE irr::scene::IAnimatedMesh::getMeshType | ( | ) | const [inline, virtual] |
Returns the type of the animated mesh.
In most cases it is not neccessary to use this method. This is useful for making a safe downcast. For example, if getMeshType() returns EAMT_MD2 it's safe to cast the IAnimatedMesh to IAnimatedMeshMD2.
Reimplemented in irr::scene::SAnimatedMesh.
Definition at line 105 of file IAnimatedMesh.h.
References irr::scene::EAMT_UNKNOWN.
virtual void irr::scene::IAnimatedMesh::setAnimationSpeed | ( | f32 | fps | ) | [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 irr::scene::SAnimatedMesh.