![]() |
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 (dcpp::scene::IMesh *mesh=0, dcpp::scene::E_ANIMATED_MESH_TYPE type=dcpp::scene::EAMT_UNKNOWN) | |
constructor | |
virtual | ~SAnimatedMesh () |
destructor | |
virtual dcpp::uint32_kt | getFrameCount () const override |
Gets the frame count of the animated mesh. | |
virtual dcpp::float32_kt | getAnimationSpeed () const override |
Gets the default animation speed of the animated mesh. | |
virtual void | setAnimationSpeed (dcpp::float32_kt fps) override |
Gets the frame count of the animated mesh. | |
virtual IMesh * | getMesh (dcpp::int32_kt frame, dcpp::int32_kt detailLevel=255, dcpp::int32_kt startFrameLoop=-1, dcpp::int32_kt endFrameLoop=-1) override |
Returns the IMesh interface for a frame. | |
void | addMesh (IMesh *mesh) |
adds a Mesh | |
virtual const dcpp::nub::aabbox3df & | getBoundingBox () const override |
Returns an axis aligned bounding box of the mesh. | |
virtual void | setBoundingBox (const dcpp::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 dcpp::uint32_kt | getMeshBufferCount () const override |
returns amount of mesh buffers. | |
virtual IMeshBuffer * | getMeshBuffer (dcpp::uint32_kt nr) const override |
returns pointer to a mesh buffer | |
virtual IMeshBuffer * | getMeshBuffer (const dcpp::video::SMaterial &material) const override |
Returns pointer to a mesh buffer which fits a material. | |
virtual void | setMaterialFlag (dcpp::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. | |
dcpp::int32_kt | getReferenceCount () const |
Get the reference count. | |
const dcpp::char_kt * | getDebugName () const |
Returns the debug name of the object. | |
Public Attributes | |
dcpp::nub::array< IMesh * > | Meshes |
All meshes defining the animated mesh. | |
dcpp::nub::aabbox3df | Box |
The bounding box of this mesh. | |
dcpp::float32_kt | FramesPerSecond |
Default animation speed of this mesh. | |
E_ANIMATED_MESH_TYPE | Type |
The type of the mesh. | |
Additional Inherited Members | |
![]() | |
void | setDebugName (const dcpp::char_kt *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.