Irrlicht 3D Engine
irr::scene::SSharedMeshBuffer Struct Reference

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

#include <SSharedMeshBuffer.h>

+ Inheritance diagram for irr::scene::SSharedMeshBuffer:

Public Member Functions

 SSharedMeshBuffer ()
 constructor More...
 
 SSharedMeshBuffer (core::array< video::S3DVertex > *vertices)
 constructor More...
 
virtual void append (const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices)
 append the vertices and indices to the current buffer More...
 
virtual void append (const IMeshBuffer *const other)
 append the meshbuffer to the current buffer More...
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const
 returns an axis aligned bounding box More...
 
virtual u32 getChangedID_Index () const
 Get the currently used ID for identification of changes. More...
 
virtual u32 getChangedID_Vertex () const
 Get the currently used ID for identification of changes. More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const
 get the current hardware mapping hint More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const
 get the current hardware mapping hint More...
 
virtual u32 getIndexCount () const
 returns amount of indices More...
 
virtual video::E_INDEX_TYPE getIndexType () const
 Get type of index data which is stored in this meshbuffer. More...
 
virtual const u16getIndices () const
 returns pointer to indices More...
 
virtual u16getIndices ()
 returns pointer to indices More...
 
virtual const video::SMaterialgetMaterial () const
 returns the material of this meshbuffer More...
 
virtual video::SMaterialgetMaterial ()
 returns the material of this meshbuffer More...
 
virtual const core::vector3dfgetNormal (u32 i) const
 returns normal of vertex i More...
 
virtual core::vector3dfgetNormal (u32 i)
 returns normal of vertex i More...
 
virtual const core::vector3dfgetPosition (u32 i) const
 returns position of vertex i More...
 
virtual core::vector3dfgetPosition (u32 i)
 returns position of vertex i More...
 
virtual E_PRIMITIVE_TYPE getPrimitiveType () const
 Get the kind of primitive geometry which is used by the meshbuffer. More...
 
virtual const core::vector2dfgetTCoords (u32 i) const
 returns texture coord of vertex i More...
 
virtual core::vector2dfgetTCoords (u32 i)
 returns texture coord of vertex i More...
 
virtual u32 getVertexCount () const
 returns amount of vertices More...
 
virtual video::E_VERTEX_TYPE getVertexType () const
 returns which type of vertex data is stored. More...
 
virtual const void * getVertices () const
 returns pointer to vertices More...
 
virtual void * getVertices ()
 returns pointer to vertices More...
 
virtual void recalculateBoundingBox ()
 recalculates the bounding box. should be called if the mesh changed. More...
 
virtual void setBoundingBox (const core::aabbox3df &box)
 set user axis aligned bounding box More...
 
virtual void setDirty (E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
 flags the mesh as changed, reloads hardware buffers More...
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
 set the hardware mapping hint, for driver More...
 
virtual void setPrimitiveType (E_PRIMITIVE_TYPE type)
 Describe what kind of primitive geometry is used by the meshbuffer. More...
 
- Public Member Functions inherited from irr::scene::IMeshBuffer
virtual u32 getPrimitiveCount () const
 Calculate how many geometric primitives are used by this meshbuffer. More...
 
- Public Member Functions inherited from irr::IReferenceCounted
 IReferenceCounted ()
 Constructor. More...
 
virtual ~IReferenceCounted ()
 Destructor. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
const c8getDebugName () const
 Returns the debug name of the object. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 

Public Attributes

core::aabbox3df BoundingBox
 Bounding box. More...
 
u32 ChangedID_Index
 ID used for hardware buffer management. More...
 
u32 ChangedID_Vertex
 ID used for hardware buffer management. More...
 
core::array< u16Indices
 Array of indices. More...
 
E_HARDWARE_MAPPING MappingHintIndex
 
E_HARDWARE_MAPPING MappingHintVertex
 hardware mapping hint More...
 
video::SMaterial Material
 Material of this meshBuffer. More...
 
E_PRIMITIVE_TYPE PrimitiveType
 Primitive type used for rendering (triangles, lines, ...) More...
 
core::array< video::S3DVertex > * Vertices
 Shared Array of vertices. More...
 

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object. More...
 

Detailed Description

Implementation of the IMeshBuffer interface with shared vertex list.

Definition at line 16 of file SSharedMeshBuffer.h.

Constructor & Destructor Documentation

◆ SSharedMeshBuffer() [1/2]

irr::scene::SSharedMeshBuffer::SSharedMeshBuffer ( )
inline

constructor

Definition at line 19 of file SSharedMeshBuffer.h.

References irr::IReferenceCounted::setDebugName().

◆ SSharedMeshBuffer() [2/2]

irr::scene::SSharedMeshBuffer::SSharedMeshBuffer ( core::array< video::S3DVertex > *  vertices)
inline

constructor

Definition at line 31 of file SSharedMeshBuffer.h.

References irr::IReferenceCounted::setDebugName().

Member Function Documentation

◆ append() [1/2]

virtual void irr::scene::SSharedMeshBuffer::append ( const void *const  vertices,
u32  numVertices,
const u16 *const  indices,
u32  numIndices 
)
inlinevirtual

append the vertices and indices to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 175 of file SSharedMeshBuffer.h.

◆ append() [2/2]

virtual void irr::scene::SSharedMeshBuffer::append ( const IMeshBuffer *const  other)
inlinevirtual

append the meshbuffer to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 178 of file SSharedMeshBuffer.h.

◆ getBoundingBox()

virtual const core::aabbox3d<f32>& irr::scene::SSharedMeshBuffer::getBoundingBox ( ) const
inlinevirtual

returns an axis aligned bounding box

Implements irr::scene::IMeshBuffer.

Definition at line 102 of file SSharedMeshBuffer.h.

References BoundingBox.

◆ getChangedID_Index()

virtual u32 irr::scene::SSharedMeshBuffer::getChangedID_Index ( ) const
inlinevirtual

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 228 of file SSharedMeshBuffer.h.

References ChangedID_Index.

◆ getChangedID_Vertex()

virtual u32 irr::scene::SSharedMeshBuffer::getChangedID_Vertex ( ) const
inlinevirtual

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 224 of file SSharedMeshBuffer.h.

References ChangedID_Vertex.

◆ getHardwareMappingHint_Index()

virtual E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::getHardwareMappingHint_Index ( ) const
inlinevirtual

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 187 of file SSharedMeshBuffer.h.

References MappingHintIndex.

◆ getHardwareMappingHint_Vertex()

virtual E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::getHardwareMappingHint_Vertex ( ) const
inlinevirtual

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 181 of file SSharedMeshBuffer.h.

References MappingHintVertex.

◆ getIndexCount()

virtual u32 irr::scene::SSharedMeshBuffer::getIndexCount ( ) const
inlinevirtual

returns amount of indices

Implements irr::scene::IMeshBuffer.

Definition at line 90 of file SSharedMeshBuffer.h.

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

◆ getIndexType()

virtual video::E_INDEX_TYPE irr::scene::SSharedMeshBuffer::getIndexType ( ) const
inlinevirtual

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

Implements irr::scene::IMeshBuffer.

Definition at line 96 of file SSharedMeshBuffer.h.

References irr::video::EIT_16BIT.

◆ getIndices() [1/2]

virtual const u16* irr::scene::SSharedMeshBuffer::getIndices ( ) const
inlinevirtual

returns pointer to indices

Implements irr::scene::IMeshBuffer.

Definition at line 78 of file SSharedMeshBuffer.h.

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

◆ getIndices() [2/2]

virtual u16* irr::scene::SSharedMeshBuffer::getIndices ( )
inlinevirtual

returns pointer to indices

Implements irr::scene::IMeshBuffer.

Definition at line 84 of file SSharedMeshBuffer.h.

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

◆ getMaterial() [1/2]

virtual const video::SMaterial& irr::scene::SSharedMeshBuffer::getMaterial ( ) const
inlinevirtual

returns the material of this meshbuffer

Implements irr::scene::IMeshBuffer.

Definition at line 39 of file SSharedMeshBuffer.h.

References Material.

◆ getMaterial() [2/2]

virtual video::SMaterial& irr::scene::SSharedMeshBuffer::getMaterial ( )
inlinevirtual

returns the material of this meshbuffer

Implements irr::scene::IMeshBuffer.

Definition at line 45 of file SSharedMeshBuffer.h.

References Material.

◆ getNormal() [1/2]

virtual const core::vector3df& irr::scene::SSharedMeshBuffer::getNormal ( u32  i) const
inlinevirtual

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 147 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

◆ getNormal() [2/2]

virtual core::vector3df& irr::scene::SSharedMeshBuffer::getNormal ( u32  i)
inlinevirtual

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 154 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

◆ getPosition() [1/2]

virtual const core::vector3df& irr::scene::SSharedMeshBuffer::getPosition ( u32  i) const
inlinevirtual

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 133 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

◆ getPosition() [2/2]

virtual core::vector3df& irr::scene::SSharedMeshBuffer::getPosition ( u32  i)
inlinevirtual

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 140 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

◆ getPrimitiveType()

virtual E_PRIMITIVE_TYPE irr::scene::SSharedMeshBuffer::getPrimitiveType ( ) const
inlinevirtual

Get the kind of primitive geometry which is used by the meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 208 of file SSharedMeshBuffer.h.

References PrimitiveType.

◆ getTCoords() [1/2]

virtual const core::vector2df& irr::scene::SSharedMeshBuffer::getTCoords ( u32  i) const
inlinevirtual

returns texture coord of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 161 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

◆ getTCoords() [2/2]

virtual core::vector2df& irr::scene::SSharedMeshBuffer::getTCoords ( u32  i)
inlinevirtual

returns texture coord of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 168 of file SSharedMeshBuffer.h.

References _IRR_DEBUG_BREAK_IF, Indices, and Vertices.

◆ getVertexCount()

virtual u32 irr::scene::SSharedMeshBuffer::getVertexCount ( ) const
inlinevirtual

returns amount of vertices

Implements irr::scene::IMeshBuffer.

Definition at line 69 of file SSharedMeshBuffer.h.

References Vertices.

◆ getVertexType()

virtual video::E_VERTEX_TYPE irr::scene::SSharedMeshBuffer::getVertexType ( ) const
inlinevirtual

returns which type of vertex data is stored.

Implements irr::scene::IMeshBuffer.

Definition at line 114 of file SSharedMeshBuffer.h.

References irr::video::EVT_STANDARD.

◆ getVertices() [1/2]

virtual const void* irr::scene::SSharedMeshBuffer::getVertices ( ) const
inlinevirtual

returns pointer to vertices

Implements irr::scene::IMeshBuffer.

Definition at line 51 of file SSharedMeshBuffer.h.

References Vertices.

◆ getVertices() [2/2]

virtual void* irr::scene::SSharedMeshBuffer::getVertices ( )
inlinevirtual

returns pointer to vertices

Implements irr::scene::IMeshBuffer.

Definition at line 60 of file SSharedMeshBuffer.h.

References Vertices.

◆ recalculateBoundingBox()

virtual void irr::scene::SSharedMeshBuffer::recalculateBoundingBox ( )
inlinevirtual

◆ setBoundingBox()

virtual void irr::scene::SSharedMeshBuffer::setBoundingBox ( const core::aabbox3df box)
inlinevirtual

set user axis aligned bounding box

Implements irr::scene::IMeshBuffer.

Definition at line 108 of file SSharedMeshBuffer.h.

References BoundingBox.

◆ setDirty()

virtual void irr::scene::SSharedMeshBuffer::setDirty ( E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX)
inlinevirtual

flags the mesh as changed, reloads hardware buffers

Implements irr::scene::IMeshBuffer.

Definition at line 214 of file SSharedMeshBuffer.h.

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

◆ setHardwareMappingHint()

virtual void irr::scene::SSharedMeshBuffer::setHardwareMappingHint ( E_HARDWARE_MAPPING  NewMappingHint,
E_BUFFER_TYPE  buffer = EBT_VERTEX_AND_INDEX 
)
inlinevirtual

set the hardware mapping hint, for driver

Implements irr::scene::IMeshBuffer.

Definition at line 193 of file SSharedMeshBuffer.h.

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

◆ setPrimitiveType()

virtual void irr::scene::SSharedMeshBuffer::setPrimitiveType ( E_PRIMITIVE_TYPE  type)
inlinevirtual

Describe what kind of primitive geometry is used by the meshbuffer.

Implements irr::scene::IMeshBuffer.

Definition at line 202 of file SSharedMeshBuffer.h.

References PrimitiveType.

Member Data Documentation

◆ BoundingBox

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

Bounding box.

Definition at line 246 of file SSharedMeshBuffer.h.

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

◆ ChangedID_Index

u32 irr::scene::SSharedMeshBuffer::ChangedID_Index

ID used for hardware buffer management.

Definition at line 243 of file SSharedMeshBuffer.h.

Referenced by getChangedID_Index(), and setDirty().

◆ ChangedID_Vertex

u32 irr::scene::SSharedMeshBuffer::ChangedID_Vertex

ID used for hardware buffer management.

Definition at line 240 of file SSharedMeshBuffer.h.

Referenced by getChangedID_Vertex(), and setDirty().

◆ Indices

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

Array of indices.

Definition at line 237 of file SSharedMeshBuffer.h.

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

◆ MappingHintIndex

E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::MappingHintIndex

Definition at line 250 of file SSharedMeshBuffer.h.

Referenced by getHardwareMappingHint_Index(), and setHardwareMappingHint().

◆ MappingHintVertex

E_HARDWARE_MAPPING irr::scene::SSharedMeshBuffer::MappingHintVertex

hardware mapping hint

Definition at line 249 of file SSharedMeshBuffer.h.

Referenced by getHardwareMappingHint_Vertex(), and setHardwareMappingHint().

◆ Material

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

Material of this meshBuffer.

Definition at line 231 of file SSharedMeshBuffer.h.

Referenced by getMaterial().

◆ PrimitiveType

E_PRIMITIVE_TYPE irr::scene::SSharedMeshBuffer::PrimitiveType

Primitive type used for rendering (triangles, lines, ...)

Definition at line 253 of file SSharedMeshBuffer.h.

Referenced by getPrimitiveType(), and setPrimitiveType().

◆ Vertices

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

Shared Array of vertices.

Definition at line 234 of file SSharedMeshBuffer.h.

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


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