SuperTuxKart
|
Classes | |
struct | SBufferReference |
struct | SDestBufferReference |
struct | SMaterialReference |
Public Member Functions | |
bool | isDirty (s32 id=-1) |
returns true if new buffers have been added without updating the internal buffers | |
void | update () |
refreshes the internal buffers from source | |
void | clear () |
drops all buffers and clears internal states | |
void | finalize () |
first updates the mesh, then drops all source buffers. | |
core::array< s32 > | addMesh (IMesh *mesh, core::vector3df pos=core::vector3df(0, 0, 0), core::vector3df rot=core::vector3df(0, 0, 0), core::vector3df scale=core::vector3df(1, 1, 1)) |
adds a mesh to the buffers with the given offset | |
core::array< s32 > | addMesh (IMesh *mesh, const core::matrix4 &transform) |
adds a mesh with the given transformation | |
s32 | addMeshBuffer (IMeshBuffer *buffer, core::vector3df pos=core::vector3df(0, 0, 0), core::vector3df rot=core::vector3df(0, 0, 0), core::vector3df scale=core::vector3df(1, 1, 1)) |
adds a mesh buffer with the given transformation | |
s32 | addMeshBuffer (IMeshBuffer *buffer, const core::matrix4 &transform) |
adds a mesh with the given transformation | |
void | recalculateBoundingBox () |
updates bouding box from internal buffers | |
core::array< bool > | moveMesh (const core::array< s32 > &bufferIDs, const core::matrix4 &newMatrix) |
Moves a mesh,. | |
bool | moveMeshBuffer (const s32 id, const core::matrix4 &newMatrix) |
Moves a mesh buffer. | |
IMeshBuffer * | getSourceBuffer (s32 id) |
returns the source buffer, if available | |
core::matrix4 | getSourceBufferMatrix (s32 id) |
returns the matrix of the source buffer | |
u32 | getSourceBufferCount () const |
returns the number of source buffers | |
virtual u32 | getMeshBufferCount () const |
Returns the amount of mesh buffers. | |
virtual IMeshBuffer * | getMeshBuffer (u32 nr) const |
Returns pointer to a mesh buffer. | |
virtual IMeshBuffer * | getMeshBuffer (const video::SMaterial &material) const |
Returns pointer to a mesh buffer which fits a material. | |
virtual const core::aabbox3d< f32 > & | getBoundingBox () const |
Returns an axis aligned bounding box of the mesh. | |
virtual void | setBoundingBox (const core::aabbox3df &box) |
set user axis aligned bounding box | |
virtual void | setMaterialFlag (video::E_MATERIAL_FLAG flag, bool newvalue) |
Sets a flag of all contained materials to a new value. | |
virtual void | setHardwareMappingHint (E_HARDWARE_MAPPING mapping, E_BUFFER_TYPE type) |
virtual void | setDirty (E_BUFFER_TYPE type) |
Private Member Functions | |
void | addSourceBuffer (IMeshBuffer *source) |
void | updateDestFromSourceBuffer (u32 id) |
void | recalculateDestBufferBoundingBox (u32 i) |
Private Attributes | |
core::array< IMeshBuffer * > | SourceBuffers |
Source mesh buffers, these are locked. | |
core::array< SBufferReference > | BufferReferences |
core::array< SMaterialReference > | MaterialReferences |
core::array< SDestBufferReference > | DestBuffers |
core::aabbox3d< f32 > | Box |
bounding containing all destination buffers | |
bool | IsDirty |
does it require an update? | |
bool | IsFinal |
can it be changed? | |
core::array< s32 > irr::scene::CBatchingMesh::addMesh | ( | IMesh * | mesh, |
const core::matrix4 & | transform | ||
) |
adds a mesh with the given transformation
\Return: Returns an array of ID numbers
core::array< s32 > irr::scene::CBatchingMesh::addMesh | ( | IMesh * | mesh, |
core::vector3df | pos = core::vector3df(0,0,0) , |
||
core::vector3df | rot = core::vector3df(0,0,0) , |
||
core::vector3df | scale = core::vector3df(1,1,1) |
||
) |
adds a mesh to the buffers with the given offset
\Return: Returns an array of ID numbers
\Returns Returns an array of ID numbers
s32 irr::scene::CBatchingMesh::addMeshBuffer | ( | IMeshBuffer * | buffer, |
const core::matrix4 & | transform | ||
) |
adds a mesh with the given transformation
\Return Returns the ID of this mesh buffer
s32 irr::scene::CBatchingMesh::addMeshBuffer | ( | IMeshBuffer * | buffer, |
core::vector3df | pos = core::vector3df(0,0,0) , |
||
core::vector3df | rot = core::vector3df(0,0,0) , |
||
core::vector3df | scale = core::vector3df(1,1,1) |
||
) |
adds a mesh buffer with the given transformation
\Return: Returns the ID of this mesh buffer
\Return Returns the ID of this mesh buffer
void irr::scene::CBatchingMesh::finalize | ( | ) |
first updates the mesh, then drops all source buffers.
once this mesh has been finalized, it cannot be changed again!
|
virtual |
Returns an axis aligned bounding box of the mesh.
|
virtual |
Returns pointer to a mesh buffer which fits a material.
material | material to search for |
|
virtual |
Returns pointer to a mesh buffer.
nr | Zero based index of the mesh buffer. The maximum value is getMeshBufferCount() - 1; |
|
virtual |
Returns the amount of mesh buffers.
core::array< bool > irr::scene::CBatchingMesh::moveMesh | ( | const core::array< s32 > & | bufferIDs, |
const core::matrix4 & | newMatrix | ||
) |
Moves a mesh,.
Moves a mesh.
mesh buffers in clean destination buffers will be moved immediately, ones in dirty buffers will be left until the next update
bool irr::scene::CBatchingMesh::moveMeshBuffer | ( | const s32 | id, |
const core::matrix4 & | newMatrix | ||
) |
Moves a mesh buffer.
if the destination buffer is clean it will be moved immediately, if a member of a dirty buffer, it will be left until the next update
|
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. |