5#ifndef S_MESH_HPP_INCLUDED
6#define S_MESH_HPP_INCLUDED
8#include <nirtcpp/core/engine/IMesh.hpp>
9#include <nirtcpp/core/engine/IMeshBuffer.hpp>
10#include <nirtcpp/core/engine/aabbox3d.hpp>
11#include <nirtcpp/core/engine/irrArray.hpp>
89 bool hasMeshBufferBBox =
false;
95 if ( !hasMeshBufferBBox )
97 hasMeshBufferBBox =
true;
108 if ( !hasMeshBufferBBox )
127 MeshBuffers[i]->getMaterial().setFlag(flag, newvalue);
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
bool isEmpty() const
Check if the box is empty.
Definition aabbox3d.hpp:129
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
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 IMesh interface.
Definition SMesh.hpp:19
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override
flags the meshbuffer as changed, reloads hardware buffers
Definition SMesh.hpp:138
virtual const core::aabbox3d< f32 > & getBoundingBox() const override
returns an axis aligned bounding box
Definition SMesh.hpp:75
virtual IMeshBuffer * getMeshBuffer(u32 nr) const override
returns pointer to a mesh buffer
Definition SMesh.hpp:56
void addMeshBuffer(IMeshBuffer *buf)
adds a MeshBuffer
Definition SMesh.hpp:114
void recalculateBoundingBox()
recalculates the bounding box
Definition SMesh.hpp:87
SMesh()
constructor
Definition SMesh.hpp:22
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) override
sets a flag of all contained materials to a new value
Definition SMesh.hpp:124
virtual void clear()
clean mesh
Definition SMesh.hpp:40
virtual void setBoundingBox(const core::aabbox3df &box) override
set user axis aligned bounding box
Definition SMesh.hpp:81
virtual ~SMesh()
destructor
Definition SMesh.hpp:31
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override
set the hardware mapping hint, for driver
Definition SMesh.hpp:131
virtual u32 getMeshBufferCount() const override
returns amount of mesh buffers.
Definition SMesh.hpp:50
core::array< IMeshBuffer * > MeshBuffers
The meshbuffers of this mesh.
Definition SMesh.hpp:146
virtual IMeshBuffer * getMeshBuffer(const video::SMaterial &material) const override
returns a meshbuffer which fits a material
Definition SMesh.hpp:63
core::aabbox3d< f32 > BoundingBox
The bounding box of this mesh.
Definition SMesh.hpp:149
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_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