Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
nirt::scene::SMesh Class Reference

Simple implementation of the IMesh interface. More...

#include <nirtcpp/core/engine/SMesh.hpp>

Inheritance diagram for nirt::scene::SMesh:
Inheritance graph
Collaboration diagram for nirt::scene::SMesh:
Collaboration graph

Public Member Functions

 SMesh ()
 constructor
 
virtual ~SMesh ()
 destructor
 
virtual void clear ()
 clean mesh
 
virtual u32 getMeshBufferCount () const override
 returns amount of mesh buffers.
 
virtual IMeshBuffergetMeshBuffer (u32 nr) const override
 returns pointer to a mesh buffer
 
virtual IMeshBuffergetMeshBuffer (const video::SMaterial &material) const override
 returns a meshbuffer which fits a material
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const override
 returns an axis aligned bounding box
 
virtual void setBoundingBox (const core::aabbox3df &box) override
 set user axis aligned bounding box
 
void recalculateBoundingBox ()
 recalculates the bounding box
 
void addMeshBuffer (IMeshBuffer *buf)
 adds a MeshBuffer
 
virtual void setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue) override
 sets a flag of all contained materials to a new value
 
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
 
- Public Member Functions inherited from nirt::scene::IMesh
virtual E_ANIMATED_MESH_TYPE getMeshType () const
 Returns the type of the meshes.
 
- Public Member Functions inherited from nirt::IReferenceCounted
 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.
 
s32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Public Attributes

core::array< IMeshBuffer * > MeshBuffers
 The meshbuffers of this mesh.
 
core::aabbox3d< f32BoundingBox
 The bounding box of this mesh.
 

Additional Inherited Members

- Protected Member Functions inherited from nirt::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object.
 

Detailed Description

Simple implementation of the IMesh interface.

Member Function Documentation

◆ addMeshBuffer()

void nirt::scene::SMesh::addMeshBuffer ( IMeshBuffer buf)
inline

adds a MeshBuffer

The bounding box is not updated automatically.

◆ getBoundingBox()

virtual const core::aabbox3d< f32 > & nirt::scene::SMesh::getBoundingBox ( ) const
inlineoverridevirtual

returns an axis aligned bounding box

Implements nirt::scene::IMesh.

◆ getMeshBuffer() [1/2]

virtual IMeshBuffer * nirt::scene::SMesh::getMeshBuffer ( const video::SMaterial material) const
inlineoverridevirtual

returns a meshbuffer which fits a material

reverse search

Implements nirt::scene::IMesh.

◆ getMeshBuffer() [2/2]

virtual IMeshBuffer * nirt::scene::SMesh::getMeshBuffer ( u32  nr) const
inlineoverridevirtual

returns pointer to a mesh buffer

Implements nirt::scene::IMesh.

◆ getMeshBufferCount()

virtual u32 nirt::scene::SMesh::getMeshBufferCount ( ) const
inlineoverridevirtual

returns amount of mesh buffers.

Implements nirt::scene::IMesh.

◆ setBoundingBox()

virtual void nirt::scene::SMesh::setBoundingBox ( const core::aabbox3df box)
inlineoverridevirtual

set user axis aligned bounding box

Implements nirt::scene::IMesh.

◆ setDirty()

virtual void nirt::scene::SMesh::setDirty ( E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX)
inlineoverridevirtual

flags the meshbuffer as changed, reloads hardware buffers

Implements nirt::scene::IMesh.

◆ setHardwareMappingHint()

virtual void nirt::scene::SMesh::setHardwareMappingHint ( E_HARDWARE_MAPPING  newMappingHint,
E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX 
)
inlineoverridevirtual

set the hardware mapping hint, for driver

Implements nirt::scene::IMesh.

◆ setMaterialFlag()

virtual void nirt::scene::SMesh::setMaterialFlag ( video::E_MATERIAL_FLAG  flag,
bool  newvalue 
)
inlineoverridevirtual

sets a flag of all contained materials to a new value

Implements nirt::scene::IMesh.


The documentation for this class was generated from the following file:

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print