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

Simple implementation of the IMesh interface. More...

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

Inheritance diagram for dcpp::scene::SMesh:
Inheritance graph
Collaboration diagram for dcpp::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 nub::aabbox3d< f32 > & getBoundingBox () const override
 returns an axis aligned bounding box
 
virtual void setBoundingBox (const nub::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 dcpp::scene::IMesh
virtual E_ANIMATED_MESH_TYPE getMeshType () const
 Returns the type of the meshes.
 
- Public Member Functions inherited from dcpp::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.
 
i32 getReferenceCount () const
 Get the reference count.
 
const c8getDebugName () const
 Returns the debug name of the object.
 

Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from dcpp::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 dcpp::scene::SMesh::addMeshBuffer ( IMeshBuffer buf)
inline

adds a MeshBuffer

The bounding box is not updated automatically.

◆ getBoundingBox()

virtual const nub::aabbox3d< f32 > & dcpp::scene::SMesh::getBoundingBox ( ) const
inlineoverridevirtual

returns an axis aligned bounding box

Implements dcpp::scene::IMesh.

◆ getMeshBuffer() [1/2]

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

returns a meshbuffer which fits a material

reverse search

Implements dcpp::scene::IMesh.

◆ getMeshBuffer() [2/2]

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

returns pointer to a mesh buffer

Implements dcpp::scene::IMesh.

◆ getMeshBufferCount()

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

returns amount of mesh buffers.

Implements dcpp::scene::IMesh.

◆ setBoundingBox()

virtual void dcpp::scene::SMesh::setBoundingBox ( const nub::aabbox3df box)
inlineoverridevirtual

set user axis aligned bounding box

Implements dcpp::scene::IMesh.

◆ setDirty()

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

flags the meshbuffer as changed, reloads hardware buffers

Implements dcpp::scene::IMesh.

◆ setHardwareMappingHint()

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

set the hardware mapping hint, for driver

Implements dcpp::scene::IMesh.

◆ setMaterialFlag()

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

sets a flag of all contained materials to a new value

Implements dcpp::scene::IMesh.


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

Duckcpp    @cppfx.xyz