Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
|
Class which holds the geometry of an object. More...
#include <jimcpp/core/engine/IMesh.hpp>
Public Member Functions | |
virtual u32 | getMeshBufferCount () const =0 |
Get the amount of mesh buffers. | |
virtual IMeshBuffer * | getMeshBuffer (u32 nr) const =0 |
Get pointer to a mesh buffer. | |
virtual IMeshBuffer * | getMeshBuffer (const video::SMaterial &material) const =0 |
Get pointer to a mesh buffer which fits a material. | |
virtual const core::aabbox3d< f32 > & | getBoundingBox () const =0 |
Get an axis aligned bounding box of the mesh. | |
virtual void | setBoundingBox (const core::aabbox3df &box)=0 |
Set user-defined axis aligned bounding box. | |
virtual void | setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue)=0 |
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)=0 |
Set the hardware mapping hint. | |
virtual void | setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)=0 |
Flag the meshbuffer as changed, reloads hardware buffers. | |
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 c8 * | getDebugName () const |
Returns the debug name of the object. | |
Additional Inherited Members | |
Protected Member Functions inherited from jpp::IReferenceCounted | |
void | setDebugName (const c8 *newName) |
Sets the debug name of the object. | |
Class which holds the geometry of an object.
An IMesh is nothing more than a collection of some mesh buffers (IMeshBuffer). SMesh is a simple implementation of an IMesh. A mesh is usually added to an IMeshSceneNode in order to be rendered.
|
pure virtual |
Get an axis aligned bounding box of the mesh.
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
pure virtual |
Get pointer to a mesh buffer which fits a material.
material | material to search for |
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
pure virtual |
Get pointer to a mesh buffer.
nr | Zero based index of the mesh buffer. The maximum value is getMeshBufferCount() - 1; |
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
pure virtual |
Get the amount of mesh buffers.
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
inlinevirtual |
Returns the type of the meshes.
This is useful for making a safe downcast. For example, if getMeshType() returns EAMT_MD2 it's safe to cast the IMesh to IAnimatedMeshMD2. Note: It's no longer just about animated meshes, that name has just historical reasons.
Reimplemented in jpp::scene::IAnimatedMesh, and jpp::scene::SAnimatedMesh.
|
pure virtual |
Set user-defined axis aligned bounding box.
box | New bounding box to use for the mesh. |
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
pure virtual |
Flag the meshbuffer as changed, reloads hardware buffers.
This method has to be called every time the vertices or indices have changed. Otherwise, changes won't be updated on the GPU in the next render cycle.
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
pure virtual |
Set the hardware mapping hint.
This methods allows to define optimization hints for the hardware. This enables, e.g., the use of hardware buffers on platforms that support this feature. This can lead to noticeable performance gains.
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.
|
pure virtual |
Sets a flag of all contained materials to a new value.
flag | Flag to set in all materials. |
newvalue | New value to set in all materials. |
Implemented in jpp::scene::SAnimatedMesh, and jpp::scene::SMesh.