| Irrlicht 3D Engine |

Public Member Functions | Public Attributes
irr::scene::SSharedMeshBuffer Struct Reference

Implementation of the IMeshBuffer interface with shared vertex list. More...

`#include <SSharedMeshBuffer.h>`

Inheritance diagram for irr::scene::SSharedMeshBuffer:

List of all members.

## Public Member Functions

- SSharedMeshBuffer ()
    constructor
- SSharedMeshBuffer (core::array< video::S3DVertex > *vertices)
    constructor
- virtual void append (const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)
    append the vertices and indices to the current buffer
- virtual void append (const IMeshBuffer *const other)
    append the meshbuffer to the current buffer
- virtual const core::aabbox3d
  < f32 > & getBoundingBox () const
    returns an axis aligned bounding box
- virtual u32 getChangedID_Index () const
    Get the currently used ID for identification of changes.
- virtual u32 getChangedID_Vertex () const
    Get the currently used ID for identification of changes.
- virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const
    get the current hardware mapping hint
- virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const
    get the current hardware mapping hint
- virtual u32 getIndexCount () const
    returns amount of indices
- virtual video::E_INDEX_TYPE getIndexType () const
    Get type of index data which is stored in this meshbuffer.
- virtual const u16 * getIndices () const
    returns pointer to Indices
- virtual u16 * getIndices ()
    returns pointer to Indices
- virtual const video::SMaterial & getMaterial () const
    returns the material of this meshbuffer
- virtual video::SMaterial & getMaterial ()
    returns the material of this meshbuffer
- virtual const core::vector3df & getNormal (u32 i) const
    returns normal of vertex i
- virtual core::vector3df & getNormal (u32 i)
    returns normal of vertex i
- virtual const core::vector3df & getPosition (u32 i) const
    returns position of vertex i
- virtual core::vector3df & getPosition (u32 i)
    returns position of vertex i
- virtual const core::vector2df & getTCoords (u32 i) const
    returns texture coord of vertex i
- virtual core::vector2df & getTCoords (u32 i)
    returns texture coord of vertex i
- virtual u32 getVertexCount () const
    returns amount of vertices
- virtual video::E_VERTEX_TYPE getVertexType () const
    returns which type of vertex data is stored.
- virtual const void * getVertices () const
    returns pointer to vertices
- virtual void * getVertices ()
    returns pointer to vertices
- virtual void recalculateBoundingBox ()
    recalculates the bounding box. should be called if the mesh changed.
- virtual void setBoundingBox (const core::aabbox3df &box)
    set user axis aligned bounding box
- virtual void setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
    flags the mesh as changed, reloads hardware buffers
- virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
    set the hardware mapping hint, for driver

## Public Attributes

- core::aabbox3df BoundingBox
    Bounding box.
- u32 ChangedID_Index
    ID used for hardware buffer management.
- u32 ChangedID_Vertex
    ID used for hardware buffer management.
- core::array< u16 > Indices
    Array of Indices.
- E_HARDWARE_MAPPING MappingHintIndex
- E_HARDWARE_MAPPING MappingHintVertex
    hardware mapping hint
- video::SMaterial Material
    Material of this meshBuffer.
- core::array< video::S3DVertex > * Vertices
    Shared Array of vertices.

## Detailed Description

Implementation of the IMeshBuffer interface with shared vertex list.

Definition at line 16 of file SSharedMeshBuffer.h.

## Constructor & Destructor Documentation

irr::scene::SSharedMeshBuffer::SSharedMeshBuffer | ( |  | ) | `[inline]`

constructor

Definition at line 19 of file SSharedMeshBuffer.h.

References irr::IReferenceCounted::setDebugName().

irr::scene::SSharedMeshBuffer::SSharedMeshBuffer | ( | core::array< video::S3DVertex > * | vertices | ) | `[inline]`

constructor

Definition at line 27 of file SSharedMeshBuffer.h.

References irr::IReferenceCounted::setDebugName().

## Member Function Documentation

virtual void irr::scene::SSharedMeshBuffer::append | ( | const void *const | vertices,
|  | u32 | numVertices,
|  | const u16 *const | indices,
|  | u32 | numIndices
| ) |  | `[inline, virtual]`

append the vertices and indices to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 171 of file SSharedMeshBuffer.h.

virtual void irr::scene::SSharedMeshBuffer::append | ( | const IMeshBuffer *const | other | ) | `[inline, virtual]`

append the meshbuffer to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 174 of file SSharedMeshBuffer.h.

virtual const core::aabbox3d<f32>& irr::scene::SSharedMeshBuffer::getBoundingBox | ( |  | ) | const`[inline, virtual]`

returns an axis aligned bounding box

Implements irr::scene::IMeshBuffer.

Definition at line 98 of file SSharedMeshBuffer.h.

References BoundingBox.

virtual u32 irr::scene::SSharedMeshBuffer::getChangedID_Index | ( |  | ) | const`[inline, virtual]`

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements irr::scene::IMeshBuffer.

Definition at line 212 of file SSharedMeshBuffer.h.

References ChangedID_Index.

virtual u32 irr::scene::SSharedMeshBuffer::getChangedID_Vertex | ( |  | ) | const`[inline, virtual]`

Get the currently used ID for identification of changes.

This shouldn't be used for anything outside the VideoDriver.

Implements irr::scene::IMeshBuffer.

Definition at line 208 of file SSharedMeshBuffer.h.

References ChangedID_Vertex.

virtual E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::getHardwareMappingHint_Index | ( |  | ) | const`[inline, virtual]`

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 183 of file SSharedMeshBuffer.h.

References MappingHintIndex.

virtual E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::getHardwareMappingHint_Vertex | ( |  | ) | const`[inline, virtual]`

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 177 of file SSharedMeshBuffer.h.

References MappingHintVertex.

virtual u32 irr::scene::SSharedMeshBuffer::getIndexCount | ( |  | ) | const`[inline, virtual]`

returns amount of indices

Implements irr::scene::IMeshBuffer.

Definition at line 86 of file SSharedMeshBuffer.h.

References Indices, and irr::core::array< T, TAlloc >::size().

virtual video::E_INDEX_TYPE irr::scene::SSharedMeshBuffer::getIndexType | ( |  | ) | const`[inline, virtual]`

Get type of index data which is stored in this meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 92 of file SSharedMeshBuffer.h.

References irr::video::EIT_16BIT.

virtual const u16* irr::scene::SSharedMeshBuffer::getIndices | ( |  | ) | const`[inline, virtual]`

returns pointer to Indices

Implements irr::scene::IMeshBuffer.

Definition at line 74 of file SSharedMeshBuffer.h.

References irr::core::array< T, TAlloc >::const_pointer(), and Indices.

virtual u16* irr::scene::SSharedMeshBuffer::getIndices | ( |  | ) | `[inline, virtual]`

returns pointer to Indices

Implements irr::scene::IMeshBuffer.

Definition at line 80 of file SSharedMeshBuffer.h.

References Indices, and irr::core::array< T, TAlloc >::pointer().

virtual const video::SMaterial& irr::scene::SSharedMeshBuffer::getMaterial | ( |  | ) | const`[inline, virtual]`

returns the material of this meshbuffer

Implements irr::scene::IMeshBuffer.

Definition at line 35 of file SSharedMeshBuffer.h.

References Material.

virtual video::SMaterial& irr::scene::SSharedMeshBuffer::getMaterial | ( |  | ) | `[inline, virtual]`

returns the material of this meshbuffer

Implements irr::scene::IMeshBuffer.

Definition at line 41 of file SSharedMeshBuffer.h.

References Material.

virtual const core::vector3df& irr::scene::SSharedMeshBuffer::getNormal | ( | u32 | i | ) | const`[inline, virtual]`

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 143 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

virtual core::vector3df& irr::scene::SSharedMeshBuffer::getNormal | ( | u32 | i | ) | `[inline, virtual]`

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 150 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

virtual const core::vector3df& irr::scene::SSharedMeshBuffer::getPosition | ( | u32 | i | ) | const`[inline, virtual]`

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 129 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

virtual core::vector3df& irr::scene::SSharedMeshBuffer::getPosition | ( | u32 | i | ) | `[inline, virtual]`

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 136 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

virtual const core::vector2df& irr::scene::SSharedMeshBuffer::getTCoords | ( | u32 | i | ) | const`[inline, virtual]`

returns texture coord of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 157 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

virtual core::vector2df& irr::scene::SSharedMeshBuffer::getTCoords | ( | u32 | i | ) | `[inline, virtual]`

returns texture coord of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 164 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

virtual u32 irr::scene::SSharedMeshBuffer::getVertexCount | ( |  | ) | const`[inline, virtual]`

returns amount of vertices

Implements irr::scene::IMeshBuffer.

Definition at line 65 of file SSharedMeshBuffer.h.

References irr::core::array< T, TAlloc >::size(), and Vertices.

virtual video::E_VERTEX_TYPE irr::scene::SSharedMeshBuffer::getVertexType | ( |  | ) | const`[inline, virtual]`

returns which type of vertex data is stored.

Implements irr::scene::IMeshBuffer.

Definition at line 110 of file SSharedMeshBuffer.h.

References irr::video::EVT_STANDARD.

virtual const void* irr::scene::SSharedMeshBuffer::getVertices | ( |  | ) | const`[inline, virtual]`

returns pointer to vertices

Implements irr::scene::IMeshBuffer.

Definition at line 47 of file SSharedMeshBuffer.h.

References irr::core::array< T, TAlloc >::const_pointer(), and Vertices.

virtual void* irr::scene::SSharedMeshBuffer::getVertices | ( |  | ) | `[inline, virtual]`

returns pointer to vertices

Implements irr::scene::IMeshBuffer.

Definition at line 56 of file SSharedMeshBuffer.h.

References irr::core::array< T, TAlloc >::pointer(), and Vertices.

virtual void irr::scene::SSharedMeshBuffer::recalculateBoundingBox | ( |  | ) | `[inline, virtual]`

recalculates the bounding box. should be called if the mesh changed.

Implements irr::scene::IMeshBuffer.

Definition at line 116 of file SSharedMeshBuffer.h.

References irr::core::aabbox3d< T >::addInternalPoint(), BoundingBox, irr::core::array< T, TAlloc >::empty(), Indices, irr::core::aabbox3d< T >::reset(), irr::core::array< T, TAlloc >::size(), and Vertices.

virtual void irr::scene::SSharedMeshBuffer::setBoundingBox | ( | const core::aabbox3df & | box | ) | `[inline, virtual]`

set user axis aligned bounding box

Implements irr::scene::IMeshBuffer.

Definition at line 104 of file SSharedMeshBuffer.h.

References BoundingBox.

virtual void irr::scene::SSharedMeshBuffer::setDirty | ( | E_BUFFER_TYPE | buffer = `EBT_VERTEX_AND_INDEX` | ) | `[inline, virtual]`

flags the mesh as changed, reloads hardware buffers

Implements irr::scene::IMeshBuffer.

Definition at line 198 of file SSharedMeshBuffer.h.

References ChangedID_Index, ChangedID_Vertex, irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, and irr::scene::EBT_VERTEX_AND_INDEX.

virtual void irr::scene::SSharedMeshBuffer::setHardwareMappingHint | ( | E_HARDWARE_MAPPING | NewMappingHint,
|  | E_BUFFER_TYPE | buffer = `EBT_VERTEX_AND_INDEX`
| ) |  | `[inline, virtual]`

set the hardware mapping hint, for driver

Implements irr::scene::IMeshBuffer.

Definition at line 189 of file SSharedMeshBuffer.h.

References irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, irr::scene::EBT_VERTEX_AND_INDEX, MappingHintIndex, and MappingHintVertex.

## Member Data Documentation

core::aabbox3df irr::scene::SSharedMeshBuffer::BoundingBox

Bounding box.

Definition at line 230 of file SSharedMeshBuffer.h.

Referenced by getBoundingBox(), recalculateBoundingBox(), and setBoundingBox().

u32 irr::scene::SSharedMeshBuffer::ChangedID_Index

ID used for hardware buffer management.

Definition at line 227 of file SSharedMeshBuffer.h.

Referenced by getChangedID_Index(), and setDirty().

u32 irr::scene::SSharedMeshBuffer::ChangedID_Vertex

ID used for hardware buffer management.

Definition at line 224 of file SSharedMeshBuffer.h.

Referenced by getChangedID_Vertex(), and setDirty().

core::array<u16> irr::scene::SSharedMeshBuffer::Indices

Array of Indices.

Definition at line 221 of file SSharedMeshBuffer.h.

Referenced by getIndexCount(), getIndices(), getNormal(), getPosition(), getTCoords(), and recalculateBoundingBox().

E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::MappingHintIndex

Definition at line 234 of file SSharedMeshBuffer.h.

Referenced by getHardwareMappingHint_Index(), and setHardwareMappingHint().

E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::MappingHintVertex

hardware mapping hint

Definition at line 233 of file SSharedMeshBuffer.h.

Referenced by getHardwareMappingHint_Vertex(), and setHardwareMappingHint().

video::SMaterial irr::scene::SSharedMeshBuffer::Material

Material of this meshBuffer.

Definition at line 215 of file SSharedMeshBuffer.h.

Referenced by getMaterial().

core::array<video::S3DVertex>* irr::scene::SSharedMeshBuffer::Vertices

Shared Array of vertices.

Definition at line 218 of file SSharedMeshBuffer.h.

Referenced by getNormal(), getPosition(), getTCoords(), getVertexCount(), getVertices(), and recalculateBoundingBox().

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

- SSharedMeshBuffer.h