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

Simple implementation of the IMesh interface. More...

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

Inheritance diagram for jpp::scene::SMesh:
Inheritance graph
Collaboration diagram for jpp::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 jpp::scene::IMesh
virtual E_ANIMATED_MESH_TYPE getMeshType () const
 Returns the type of the meshes.
 
- Public Member Functions inherited from jpp::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 jpp::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 jpp::scene::SMesh::addMeshBuffer ( IMeshBuffer buf)
inline

adds a MeshBuffer

The bounding box is not updated automatically.

◆ getBoundingBox()

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

returns an axis aligned bounding box

Implements jpp::scene::IMesh.

◆ getMeshBuffer() [1/2]

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

returns a meshbuffer which fits a material

reverse search

Implements jpp::scene::IMesh.

◆ getMeshBuffer() [2/2]

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

returns pointer to a mesh buffer

Implements jpp::scene::IMesh.

◆ getMeshBufferCount()

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

returns amount of mesh buffers.

Implements jpp::scene::IMesh.

◆ setBoundingBox()

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

set user axis aligned bounding box

Implements jpp::scene::IMesh.

◆ setDirty()

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

flags the meshbuffer as changed, reloads hardware buffers

Implements jpp::scene::IMesh.

◆ setHardwareMappingHint()

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

set the hardware mapping hint, for driver

Implements jpp::scene::IMesh.

◆ setMaterialFlag()

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

sets a flag of all contained materials to a new value

Implements jpp::scene::IMesh.


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

Jimcpp    @cppfx.xyz

K