![]() |
Skylicht Engine
|
Struct for holding a mesh with a single material. More...
#include <C:/Projects/skylicht-engine/Projects/Irrlicht/Include/IMeshBuffer.h>
Public Member Functions | |
| IMeshBuffer (video::IVertexDescriptor *vertexDescriptor) | |
| virtual video::IVertexDescriptor * | getVertexDescriptor () const =0 |
| virtual bool | setVertexDescriptor (video::IVertexDescriptor *vertexDescriptor)=0 |
| virtual bool | addVertexBuffer (IVertexBuffer *vertexBuffer)=0 |
| virtual IVertexBuffer * | getVertexBuffer (u32 id=0) const =0 |
| virtual u32 | getVertexBufferCount () const =0 |
| virtual void | removeVertexBuffer (u32 id)=0 |
| virtual bool | setVertexBuffer (IVertexBuffer *vertexBuffer, u32 id=0)=0 |
| bool | isVertexBufferCompatible () const |
| Inform if stored vertex buffers have the same vertex descriptors. | |
| virtual IIndexBuffer * | getIndexBuffer () const =0 |
| virtual bool | setIndexBuffer (IIndexBuffer *indexBuffer)=0 |
| u32 | getPrimitiveCount () const |
| Get primitive count. | |
| E_PRIMITIVE_TYPE | getPrimitiveType () const |
| Get primitive type. | |
| void | setPrimitiveType (E_PRIMITIVE_TYPE primitiveType) |
| Set primitive type. | |
| virtual video::E_VERTEX_TYPE | getVertexType () const =0 |
| virtual video::SMaterial & | getMaterial ()=0 |
| Get the material of this meshbuffer. | |
| virtual const video::SMaterial & | getMaterial () const =0 |
| Get the material of this meshbuffer. | |
| virtual const core::aabbox3df & | getBoundingBox () const =0 |
| Get the axis aligned bounding box of this meshbuffer. | |
| virtual core::aabbox3df & | getBoundingBox ()=0 |
| Get the axis aligned bounding box of this meshbuffer. | |
| virtual void | boundingBoxNeedsRecalculated ()=0 |
| Call this after changing the positions of any vertex. | |
| virtual void | recalculateBoundingBox ()=0 |
| Recalculates the bounding box. Should be called if the mesh changed. | |
| virtual void | append (IVertexBuffer *vertexBuffer, u32 vertexBufferID, IIndexBuffer *indexBuffer)=0 |
| virtual void | append (IMeshBuffer *meshBuffer)=0 |
| Append the meshbuffer to the current buffer. | |
| virtual E_HARDWARE_MAPPING | getHardwareMappingHint_Vertex (u32 id=0) const =0 |
| get the current hardware mapping hint | |
| virtual E_HARDWARE_MAPPING | getHardwareMappingHint_Index () const =0 |
| get the current hardware mapping hint | |
| virtual void | setHardwareMappingHint (E_HARDWARE_MAPPING pMappingHint, E_BUFFER_TYPE type=EBT_VERTEX_AND_INDEX, u32 id=0)=0 |
| set the hardware mapping hint, for driver | |
| virtual void | setDirty (E_BUFFER_TYPE type=EBT_VERTEX_AND_INDEX, u32 id=0)=0 |
| flags the meshbuffer as changed, reloads hardware buffers | |
| virtual u32 | getChangedID_Vertex (u32 id=0) const =0 |
| Get the currently used ID for identification of changes. | |
| virtual u32 | getChangedID_Index () const =0 |
| Get the currently used ID for identification of changes. | |
| virtual core::matrix4 & | getTransformation ()=0 |
| virtual void | setUseForHardwareInstancing (bool b)=0 |
| virtual bool | useForHardwareInstancing ()=0 |
| Public Member Functions inherited from irr::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. | |
Protected Attributes | |
| video::IVertexDescriptor * | VertexDescriptor |
| Vertex descriptor. | |
| bool | VertexBufferCompatible |
| core::array< scene::IVertexBuffer * > | VertexBuffer |
| Vertex buffer array. | |
| scene::IIndexBuffer * | IndexBuffer |
| Index buffer. | |
| E_PRIMITIVE_TYPE | PrimitiveType |
| video::SMaterial | Material |
| Material. | |
| bool | BoundingBoxNeedsRecalculated |
| core::aabbox3d< f32 > | BoundingBox |
| Bounding box. | |
| core::matrix4 | Transformation |
| bool | UseForHardwareInstancing |
Additional Inherited Members | |
| Protected Member Functions inherited from irr::IReferenceCounted | |
| void | setDebugName (const c8 *newName) |
| Sets the debug name of the object. | |
Struct for holding a mesh with a single material.
A part of an IMesh which has the same material on each face of that group. Logical groups of an IMesh need not be put into separate mesh buffers, but can be. Separately animated parts of the mesh must be put into separate mesh buffers. Some mesh buffer implementations have limitations on the number of vertices the buffer can hold. In that case, logical grouping can help. Moreover, the number of vertices should be optimized for the GPU upload, which often depends on the type of gfx card. Typial figures are 1000-10000 vertices per buffer. SMeshBuffer is a simple implementation of a MeshBuffer, which supports up to 65535 vertices.
Since meshbuffers are used for drawing, and hence will be exposed to the driver, chances are high that they are grab()'ed from somewhere. It's therefore required to dynamically allocate meshbuffers which are passed to a video driver and only drop the buffer once it's not used in the current code block anymore.
|
pure virtual |
Append the meshbuffer to the current buffer.
Only works for compatible vertex types
| meshBuffer | Buffer to append to this one. |
Implemented in irr::scene::CMeshBuffer< T >.
|
pure virtual |
|
pure virtual |
Call this after changing the positions of any vertex.
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
Get the axis aligned bounding box of this meshbuffer.
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
Get the axis aligned bounding box of this meshbuffer.
Implemented in irr::scene::CMeshBuffer< T >.
|
pure virtual |
Get the currently used ID for identification of changes.
This shouldn't be used for anything outside the VideoDriver.
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
Get the currently used ID for identification of changes.
This shouldn't be used for anything outside the VideoDriver.
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
get the current hardware mapping hint
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
get the current hardware mapping hint
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
Get the material of this meshbuffer.
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
Get the material of this meshbuffer.
Implemented in irr::scene::CMeshBuffer< T >.
|
pure virtual |
Recalculates the bounding box. Should be called if the mesh changed.
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
flags the meshbuffer as changed, reloads hardware buffers
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.
|
pure virtual |
set the hardware mapping hint, for driver
Implemented in irr::scene::CMeshBuffer< T >, irr::scene::CMeshBuffer< video::S3DVertex >, and irr::scene::CMeshBuffer< video::S3DVertex2TCoords >.