5#ifndef S_ANIMATED_MESH_HPP_INCLUDED
6#define S_ANIMATED_MESH_HPP_INCLUDED
8#include <nirtcpp/core/engine/IAnimatedMesh.hpp>
9#include <nirtcpp/core/engine/IMesh.hpp>
10#include <nirtcpp/core/engine/aabbox3d.hpp>
11#include <nirtcpp/core/engine/irrArray.hpp>
129 return Meshes[0]->getMeshBufferCount();
138 return Meshes[0]->getMeshBuffer(nr);
150 return Meshes[0]->getMeshBuffer(material);
void setDebugName(const c8 *newName)
Sets the debug name of the object.
Definition IReferenceCounted.hpp:163
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
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
SAnimatedMesh(scene::IMesh *mesh=0, scene::E_ANIMATED_MESH_TYPE type=scene::EAMT_UNKNOWN)
constructor
Definition SAnimatedMesh.hpp:23
virtual IMeshBuffer * getMeshBuffer(const video::SMaterial &material) const override
Returns pointer to a mesh buffer which fits a material.
Definition SAnimatedMesh.hpp:145
void recalculateBoundingBox()
Recalculates the bounding box.
Definition SAnimatedMesh.hpp:104
core::array< IMesh * > Meshes
All meshes defining the animated mesh.
Definition SAnimatedMesh.hpp:176
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 ~SAnimatedMesh()
destructor
Definition SAnimatedMesh.hpp:34
f32 FramesPerSecond
Default animation speed of this mesh.
Definition SAnimatedMesh.hpp:182
core::aabbox3d< f32 > Box
The bounding box of this mesh.
Definition SAnimatedMesh.hpp:179
virtual const core::aabbox3d< f32 > & getBoundingBox() const override
Returns an axis aligned bounding box of the mesh.
Definition SAnimatedMesh.hpp:92
virtual E_ANIMATED_MESH_TYPE getMeshType() const override
Returns the type of the animated mesh.
Definition SAnimatedMesh.hpp:118
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) override
Set a material flag for all meshbuffers of this mesh.
Definition SAnimatedMesh.hpp:154
E_ANIMATED_MESH_TYPE Type
The type of the mesh.
Definition SAnimatedMesh.hpp:185
virtual void setBoundingBox(const core::aabbox3df &box) override
set user axis aligned bounding box
Definition SAnimatedMesh.hpp:98
void addMesh(IMesh *mesh)
adds a Mesh
Definition SAnimatedMesh.hpp:81
virtual IMeshBuffer * getMeshBuffer(u32 nr) const override
returns pointer to a mesh buffer
Definition SAnimatedMesh.hpp:133
virtual u32 getFrameCount() const override
Gets the frame count of the animated mesh.
Definition SAnimatedMesh.hpp:44
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 f32 getAnimationSpeed() const override
Gets the default animation speed of the animated mesh.
Definition SAnimatedMesh.hpp:51
virtual u32 getMeshBufferCount() const override
returns amount of mesh buffers.
Definition SAnimatedMesh.hpp:124
virtual void setAnimationSpeed(f32 fps) override
Gets the frame count of the animated mesh.
Definition SAnimatedMesh.hpp:59
virtual IMesh * getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) override
Returns the IMesh interface for a frame.
Definition SAnimatedMesh.hpp:72
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 Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110