Saga3D API Documentation
1.0-RC4
|
Go to the documentation of this file. 1 #ifndef __SANIMATED_MESH_H_INCLUDED__
2 #define __SANIMATED_MESH_H_INCLUDED__
61 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)
67 void addMesh(
const std::shared_ptr<IMesh>& mesh)
98 for (std::uint32_t i=1; i <
Meshes.size(); ++i)
108 return Meshes[0]->getMeshBufferCount();
114 return Meshes[0]->getMeshBuffer(nr);
138 std::vector<std::shared_ptr<IMesh>>
Meshes;
core::aabbox3d< float > Box
The bounding box of this mesh.
float FramesPerSecond
Default animation speed of this mesh.
virtual ~SAnimatedMesh()
destructor
virtual void setAnimationSpeed(float fps)
Gets the frame count of the animated mesh.
Simple implementation of the IAnimatedMesh interface.
virtual void addMeshBuffer(std::unique_ptr< IMeshBuffer > buf) override
adds a MeshBuffer
virtual void setAnimation(const uint32_t index) override
Set active animation.
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.
Struct for holding a mesh with a single material.
std::vector< std::shared_ptr< IMesh > > Meshes
All meshes defining the animated mesh.
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
virtual IMeshBuffer & getMeshBuffer(std::uint32_t nr=0) override
returns pointer to a mesh buffer
virtual std::uint32_t getMeshBufferCount() const
returns amount of mesh buffers.
virtual void setBoundingBox(const core::aabbox3df &box)
set user axis aligned bounding box
virtual float getAnimationSpeed() const
Gets the default animation speed of the animated mesh.
void addInternalBox(const aabbox3d< T > &b)
Adds another bounding box.
virtual std::uint32_t getFrameCount() const
Gets the frame count of the animated mesh.
virtual const core::aabbox3d< float > & getBoundingBox() const
Returns an axis aligned bounding box of the mesh.
virtual E_MESH_TYPE getMeshType() const override
void recalculateBoundingBox()
Recalculates the bounding box.
Interface for an animated mesh.
SAnimatedMesh(const std::shared_ptr< scene::IMesh > &mesh=nullptr)
constructor
virtual void onAnimate(const float time) override
Animate the mesh.
void addMesh(const std::shared_ptr< IMesh > &mesh)
adds a Mesh