![]() |
Duckcpp 2.1.0
Duckcpp is a high-performance c++ graphics engine.
|
Simple implementation of the IAnimatedMesh interface. More...
#include <duckcpp/core/engine/SAnimatedMesh.hpp>
Public Member Functions | |
SAnimatedMesh (scene::IMesh *mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN) | |
constructor | |
virtual | ~SAnimatedMesh () |
destructor | |
virtual u32 | getFrameCount () const override |
Gets the frame count of the animated mesh. | |
virtual f32 | getAnimationSpeed () const override |
Gets the default animation speed of the animated mesh. | |
virtual void | setAnimationSpeed (f32 fps) override |
Gets the frame count of the animated mesh. | |
virtual IMesh * | getMesh (i32 frame, i32 detailLevel=255, i32 startFrameLoop=-1, i32 endFrameLoop=-1) override |
Returns the IMesh interface for a frame. | |
void | addMesh (IMesh *mesh) |
adds a Mesh | |
virtual const nub::aabbox3d< f32 > & | getBoundingBox () const override |
Returns an axis aligned bounding box of the mesh. | |
virtual void | setBoundingBox (const nub::aabbox3df &box) override |
set user axis aligned bounding box | |
void | recalculateBoundingBox () |
Recalculates the bounding box. | |
virtual E_ANIMATED_MESH_TYPE | getMeshType () const override |
Returns the type of the animated mesh. | |
virtual u32 | getMeshBufferCount () const override |
returns amount of mesh buffers. | |
virtual IMeshBuffer * | getMeshBuffer (u32 nr) const override |
returns pointer to a mesh buffer | |
virtual IMeshBuffer * | getMeshBuffer (const video::SMaterial &material) const override |
Returns pointer to a mesh buffer which fits a material. | |
virtual void | setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue) override |
Set a material flag for all meshbuffers of this mesh. | |
virtual void | setHardwareMappingHint (E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override |
set the hardware mapping hint, for driver | |
virtual void | setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override |
flags the meshbuffer as changed, reloads hardware buffers | |
![]() | |
IReferenceCounted () | |
Constructor. | |
virtual | ~IReferenceCounted () |
Destructor. | |
void | grab () const |
Grabs the object. Increments the reference counter by one. | |
bool | drop () const |
Drops the object. Decrements the reference counter by one. | |
i32 | getReferenceCount () const |
Get the reference count. | |
const c8 * | getDebugName () const |
Returns the debug name of the object. | |
Public Attributes | |
nub::array< IMesh * > | Meshes |
All meshes defining the animated mesh. | |
nub::aabbox3d< f32 > | Box |
The bounding box of this mesh. | |
f32 | FramesPerSecond |
Default animation speed of this mesh. | |
E_ANIMATED_MESH_TYPE | Type |
The type of the mesh. | |
Additional Inherited Members | |
![]() | |
void | setDebugName (const c8 *newName) |
Sets the debug name of the object. | |
Simple implementation of the IAnimatedMesh interface.
|
inlineoverridevirtual |
Gets the default animation speed of the animated mesh.
Implements dcpp::scene::IAnimatedMesh.
|
inlineoverridevirtual |
Returns an axis aligned bounding box of the mesh.
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
Gets the frame count of the animated mesh.
Implements dcpp::scene::IAnimatedMesh.
|
inlineoverridevirtual |
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 |
Implements dcpp::scene::IAnimatedMesh.
|
inlineoverridevirtual |
Returns pointer to a mesh buffer which fits a material.
material | material to search for |
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
returns pointer to a mesh buffer
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
returns amount of mesh buffers.
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
Returns the type of the animated mesh.
Reimplemented from dcpp::scene::IAnimatedMesh.
|
inlineoverridevirtual |
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 dcpp::scene::IAnimatedMesh.
|
inlineoverridevirtual |
set user axis aligned bounding box
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
flags the meshbuffer as changed, reloads hardware buffers
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
set the hardware mapping hint, for driver
Implements dcpp::scene::IMesh.
|
inlineoverridevirtual |
Set a material flag for all meshbuffers of this mesh.
Implements dcpp::scene::IMesh.