Saga3D API Documentation
1.0-RC4
|
Simple implementation of the IAnimatedMesh interface. More...
#include <SAnimatedMesh.h>
Public Member Functions | |
SAnimatedMesh (const std::shared_ptr< scene::IMesh > &mesh=nullptr) | |
constructor More... | |
virtual | ~SAnimatedMesh () |
destructor More... | |
virtual E_MESH_TYPE | getMeshType () const override |
virtual std::uint32_t | getFrameCount () const |
Gets the frame count of the animated mesh. More... | |
virtual float | getAnimationSpeed () const |
Gets the default animation speed of the animated mesh. More... | |
virtual void | setAnimationSpeed (float fps) |
Gets the frame count of the animated mesh. More... | |
virtual const std::shared_ptr< IMesh > & | getMesh (std::int32_t frame, std::int32_t detailLevel=255, std::int32_t startFrameLoop=-1, std::int32_t endFrameLoop=-1) |
Returns the IMesh interface for a frame. More... | |
void | addMesh (const std::shared_ptr< IMesh > &mesh) |
adds a Mesh More... | |
virtual const core::aabbox3d< float > & | getBoundingBox () const |
Returns an axis aligned bounding box of the mesh. More... | |
virtual void | setBoundingBox (const core::aabbox3df &box) |
set user axis aligned bounding box More... | |
void | recalculateBoundingBox () |
Recalculates the bounding box. More... | |
virtual std::uint32_t | getMeshBufferCount () const |
returns amount of mesh buffers. More... | |
virtual IMeshBuffer & | getMeshBuffer (std::uint32_t nr=0) override |
returns pointer to a mesh buffer More... | |
virtual void | addMeshBuffer (std::unique_ptr< IMeshBuffer > buf) override |
adds a MeshBuffer More... | |
virtual void | setAnimation (const uint32_t index) override |
Set active animation. More... | |
virtual void | onAnimate (const float time) override |
Animate the mesh. More... | |
![]() | |
void | setID (const ID id) |
ID | getID () const |
Public Attributes | |
std::vector< std::shared_ptr< IMesh > > | Meshes |
All meshes defining the animated mesh. More... | |
core::aabbox3d< float > | Box |
The bounding box of this mesh. More... | |
float | FramesPerSecond |
Default animation speed of this mesh. More... | |
Additional Inherited Members | |
![]() | |
ID | MeshID = INVALID_ID |
ID of this mesh. More... | |
Simple implementation of the IAnimatedMesh interface.
Definition at line 14 of file SAnimatedMesh.h.
|
inline |
constructor
Definition at line 17 of file SAnimatedMesh.h.
|
inlinevirtual |
destructor
Definition at line 24 of file SAnimatedMesh.h.
|
inline |
adds a Mesh
Definition at line 67 of file SAnimatedMesh.h.
|
inlineoverridevirtual |
adds a MeshBuffer
The bounding box is not updated automatically.
Implements saga::scene::IMesh.
Definition at line 119 of file SAnimatedMesh.h.
|
inlinevirtual |
Gets the default animation speed of the animated mesh.
Implements saga::scene::IAnimatedMesh.
Definition at line 40 of file SAnimatedMesh.h.
|
inlinevirtual |
Returns an axis aligned bounding box of the mesh.
Implements saga::scene::IMesh.
Definition at line 77 of file SAnimatedMesh.h.
|
inlinevirtual |
Gets the frame count of the animated mesh.
Implements saga::scene::IAnimatedMesh.
Definition at line 33 of file SAnimatedMesh.h.
|
inlinevirtual |
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 | start frame |
endFrameLoop | end frame |
Definition at line 61 of file SAnimatedMesh.h.
|
inlineoverridevirtual |
returns pointer to a mesh buffer
Implements saga::scene::IMesh.
Definition at line 112 of file SAnimatedMesh.h.
|
inlinevirtual |
returns amount of mesh buffers.
Implements saga::scene::IMesh.
Definition at line 103 of file SAnimatedMesh.h.
|
inlineoverridevirtual |
Implements saga::scene::IMesh.
Definition at line 29 of file SAnimatedMesh.h.
|
inlineoverridevirtual |
Animate the mesh.
Implements saga::scene::IAnimatedMesh.
Definition at line 132 of file SAnimatedMesh.h.
|
inline |
Recalculates the bounding box.
Definition at line 89 of file SAnimatedMesh.h.
|
inlineoverridevirtual |
Set active animation.
index | index of the animation |
Implements saga::scene::IAnimatedMesh.
Definition at line 126 of file SAnimatedMesh.h.
|
inlinevirtual |
Gets the frame count of the animated mesh.
fps | Frames per second to play the animation with. If the amount is 0, it is not animated. The actual speed is set in the scene node the mesh is instantiated in. |
Implements saga::scene::IAnimatedMesh.
Definition at line 48 of file SAnimatedMesh.h.
|
inlinevirtual |
set user axis aligned bounding box
Implements saga::scene::IMesh.
Definition at line 83 of file SAnimatedMesh.h.
core::aabbox3d<float> saga::scene::SAnimatedMesh::Box |
The bounding box of this mesh.
Definition at line 141 of file SAnimatedMesh.h.
float saga::scene::SAnimatedMesh::FramesPerSecond |
Default animation speed of this mesh.
Definition at line 144 of file SAnimatedMesh.h.
std::vector<std::shared_ptr<IMesh> > saga::scene::SAnimatedMesh::Meshes |
All meshes defining the animated mesh.
Definition at line 138 of file SAnimatedMesh.h.