5#ifndef S_ANIMATED_MESH_HPP_INCLUDED
6#define S_ANIMATED_MESH_HPP_INCLUDED
8#include <duckcpp/core/engine/IAnimatedMesh.hpp>
9#include <duckcpp/core/engine/IMesh.hpp>
10#include <duckcpp/core/engine/aabbox3d.hpp>
11#include <duckcpp/core/engine/irrArray.hpp>
129 return Meshes[0]->getMeshBufferCount();
138 return Meshes[0]->getMeshBuffer(nr);
150 return Meshes[0]->getMeshBuffer(material);
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.hpp:126
void grab() const
Grabs the object. Increments the reference counter by one.
Definition IReferenceCounted.hpp:96
void setDebugName(const dcpp::char_kt *newName)
Sets the debug name of the object.
Definition IReferenceCounted.hpp:163
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
void addInternalBox(const aabbox3d< T > &b)
Adds another bounding box.
Definition aabbox3d.hpp:82
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
Definition aabbox3d.hpp:50
Interface for an animated mesh.
Definition IAnimatedMesh.hpp:21
Class for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
Class which holds the geometry of an object.
Definition IMesh.hpp:72
Simple implementation of the IAnimatedMesh interface.
Definition SAnimatedMesh.hpp:20
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override
set the hardware mapping hint, for driver
Definition SAnimatedMesh.hpp:161
virtual void setAnimationSpeed(dcpp::float32_kt fps) override
Gets the frame count of the animated mesh.
Definition SAnimatedMesh.hpp:59
virtual dcpp::uint32_kt getFrameCount() const override
Gets the frame count of the animated mesh.
Definition SAnimatedMesh.hpp:44
SAnimatedMesh(dcpp::scene::IMesh *mesh=0, dcpp::scene::E_ANIMATED_MESH_TYPE type=dcpp::scene::EAMT_UNKNOWN)
constructor
Definition SAnimatedMesh.hpp:23
virtual void setMaterialFlag(dcpp::video::E_MATERIAL_FLAG flag, bool newvalue) override
Set a material flag for all meshbuffers of this mesh.
Definition SAnimatedMesh.hpp:154
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override
flags the meshbuffer as changed, reloads hardware buffers
Definition SAnimatedMesh.hpp:168
virtual const dcpp::nub::aabbox3df & getBoundingBox() const override
Returns an axis aligned bounding box of the mesh.
Definition SAnimatedMesh.hpp:92
virtual dcpp::float32_kt getAnimationSpeed() const override
Gets the default animation speed of the animated mesh.
Definition SAnimatedMesh.hpp:51
virtual IMeshBuffer * getMeshBuffer(dcpp::uint32_kt nr) const override
returns pointer to a mesh buffer
Definition SAnimatedMesh.hpp:133
virtual E_ANIMATED_MESH_TYPE getMeshType() const override
Returns the type of the animated mesh.
Definition SAnimatedMesh.hpp:118
virtual ~SAnimatedMesh()
destructor
Definition SAnimatedMesh.hpp:34
virtual void setBoundingBox(const dcpp::nub::aabbox3df &box) override
set user axis aligned bounding box
Definition SAnimatedMesh.hpp:98
E_ANIMATED_MESH_TYPE Type
The type of the mesh.
Definition SAnimatedMesh.hpp:185
void recalculateBoundingBox()
Recalculates the bounding box.
Definition SAnimatedMesh.hpp:104
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.
Definition SAnimatedMesh.hpp:72
dcpp::float32_kt FramesPerSecond
Default animation speed of this mesh.
Definition SAnimatedMesh.hpp:182
dcpp::nub::array< IMesh * > Meshes
All meshes defining the animated mesh.
Definition SAnimatedMesh.hpp:176
virtual dcpp::uint32_kt getMeshBufferCount() const override
returns amount of mesh buffers.
Definition SAnimatedMesh.hpp:124
dcpp::nub::aabbox3df Box
The bounding box of this mesh.
Definition SAnimatedMesh.hpp:179
void addMesh(IMesh *mesh)
adds a Mesh
Definition SAnimatedMesh.hpp:81
virtual IMeshBuffer * getMeshBuffer(const dcpp::video::SMaterial &material) const override
Returns pointer to a mesh buffer which fits a material.
Definition SAnimatedMesh.hpp:145
Class for holding parameters for a material renderer.
Definition SMaterial.hpp:304
E_BUFFER_TYPE
Definition EHardwareBufferFlags.hpp:29
@ EBT_VERTEX_AND_INDEX
Change both vertex and index mapping to the same value.
Definition EHardwareBufferFlags.hpp:37
E_ANIMATED_MESH_TYPE
Possible types of meshes.
Definition IMesh.hpp:20
@ EAMT_UNKNOWN
Unknown animated mesh type.
Definition IMesh.hpp:22
E_HARDWARE_MAPPING
Definition EHardwareBufferFlags.hpp:14
E_MATERIAL_FLAG
Material flags.
Definition EMaterialFlags.hpp:15
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition shared_device.hpp:34
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72