Saga3D API Documentation  1.0-RC4
saga::scene::IAnimatedMesh Class Referenceabstract

Interface for an animated mesh. More...

#include <IAnimatedMesh.h>

Inheritance diagram for saga::scene::IAnimatedMesh:
saga::scene::IMesh saga::scene::ISkinnedMesh saga::scene::SAnimatedMesh

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...
 
- Public Member Functions inherited from saga::scene::IMesh
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 IMeshBuffergetMeshBuffer (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

- Protected Attributes inherited from saga::scene::IMesh
ID MeshID = INVALID_ID
 ID of this mesh. More...
 

Detailed Description

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.

Member Function Documentation

◆ getAnimationSpeed()

virtual float saga::scene::IAnimatedMesh::getAnimationSpeed ( ) const
pure virtual

Gets the animation speed of the animated mesh.

Returns
The number of frames per second to play the animation with by default. If the amount is 0, it is a static, non animated mesh.

Implemented in saga::scene::SAnimatedMesh.

◆ getFrameCount()

virtual std::uint32_t saga::scene::IAnimatedMesh::getFrameCount ( ) const
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.

Returns
The amount of frames. If the amount is 1, it is a static, non animated mesh.

Implemented in saga::scene::SAnimatedMesh.

◆ onAnimate()

virtual void saga::scene::IAnimatedMesh::onAnimate ( const float  time)
pure virtual

Animate the mesh.

Depends on underlying implementation, skeletal for mesh animation will be performed

Implemented in saga::scene::SAnimatedMesh.

◆ setAnimation()

virtual void saga::scene::IAnimatedMesh::setAnimation ( const uint32_t  index)
pure virtual

Set active animation.

Parameters
indexindex of the animation

Implemented in saga::scene::SAnimatedMesh.

◆ setAnimationSpeed()

virtual void saga::scene::IAnimatedMesh::setAnimationSpeed ( float  fps)
pure virtual

Sets the animation speed of the animated mesh.

Parameters
fpsNumber 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.


The documentation for this class was generated from the following file: