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

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime. More...

#include <SSkinMeshBuffer.h>

+ Inheritance diagram for irr::scene::SSkinMeshBuffer:

Public Member Functions

 SSkinMeshBuffer (video::E_VERTEX_TYPE vt=video::EVT_STANDARD)
 Default 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...
 
void boundingBoxNeedsRecalculated (void)
 Call this after changing the positions of any vertex. More...
 
virtual void convertTo2TCoords ()
 Convert to 2tcoords vertex type. More...
 
virtual void convertToTangents ()
 Convert to tangents vertex type. More...
 
virtual const core::aabbox3d< f32 > & getBoundingBox () const
 Get 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 for index buffers More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const
 get the current hardware mapping hint for vertex buffers More...
 
virtual u32 getIndexCount () const
 Get index count. More...
 
virtual video::E_INDEX_TYPE getIndexType () const
 Get type of index data which is stored in this meshbuffer. More...
 
virtual const u16getIndices () const
 Get pointer to index array. More...
 
virtual u16getIndices ()
 Get pointer to index array. More...
 
virtual const video::SMaterialgetMaterial () const
 Get Material of this buffer. More...
 
virtual video::SMaterialgetMaterial ()
 Get Material of this buffer. 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 coords of vertex i More...
 
virtual core::vector2dfgetTCoords (u32 i)
 returns texture coords of vertex i More...
 
virtual video::S3DVertexgetVertex (u32 index)
 Get standard vertex at given index. More...
 
virtual u32 getVertexCount () const
 Get vertex count. More...
 
virtual video::E_VERTEX_TYPE getVertexType () const
 Get vertex type. More...
 
virtual const void * getVertices () const
 Get pointer to vertex array. More...
 
virtual void * getVertices ()
 Get pointer to vertex array. More...
 
virtual void recalculateBoundingBox ()
 Recalculate bounding box. More...
 
virtual void setBoundingBox (const core::aabbox3df &box)
 Set 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::aabbox3d< f32BoundingBox
 
bool BoundingBoxNeedsRecalculated:1
 
u32 ChangedID_Index
 
u32 ChangedID_Vertex
 
core::array< u16Indices
 
E_HARDWARE_MAPPING MappingHint_Index:3
 
E_HARDWARE_MAPPING MappingHint_Vertex:3
 
video::SMaterial Material
 
E_PRIMITIVE_TYPE PrimitiveType
 Primitive type used for rendering (triangles, lines, ...) More...
 
core::matrix4 Transformation
 
video::E_VERTEX_TYPE VertexType
 
core::array< video::S3DVertex2TCoordsVertices_2TCoords
 
core::array< video::S3DVertexVertices_Standard
 
core::array< video::S3DVertexTangentsVertices_Tangents
 

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

A mesh buffer able to choose between S3DVertex2TCoords, S3DVertex and S3DVertexTangents at runtime.

Definition at line 19 of file SSkinMeshBuffer.h.

Constructor & Destructor Documentation

◆ SSkinMeshBuffer()

irr::scene::SSkinMeshBuffer::SSkinMeshBuffer ( video::E_VERTEX_TYPE  vt = video::EVT_STANDARD)
inline

Default constructor.

Definition at line 22 of file SSkinMeshBuffer.h.

References irr::IReferenceCounted::setDebugName().

Member Function Documentation

◆ append() [1/2]

virtual void irr::scene::SSkinMeshBuffer::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 330 of file SSkinMeshBuffer.h.

◆ append() [2/2]

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

append the meshbuffer to the current buffer

Implements irr::scene::IMeshBuffer.

Definition at line 333 of file SSkinMeshBuffer.h.

◆ boundingBoxNeedsRecalculated()

void irr::scene::SSkinMeshBuffer::boundingBoxNeedsRecalculated ( void  )
inline

Call this after changing the positions of any vertex.

Definition at line 387 of file SSkinMeshBuffer.h.

References BoundingBoxNeedsRecalculated.

◆ convertTo2TCoords()

virtual void irr::scene::SSkinMeshBuffer::convertTo2TCoords ( )
inlinevirtual

◆ convertToTangents()

virtual void irr::scene::SSkinMeshBuffer::convertToTangents ( )
inlinevirtual

◆ getBoundingBox()

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

Get bounding box.

Implements irr::scene::IMeshBuffer.

Definition at line 127 of file SSkinMeshBuffer.h.

References BoundingBox.

◆ getChangedID_Index()

virtual u32 irr::scene::SSkinMeshBuffer::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 384 of file SSkinMeshBuffer.h.

References ChangedID_Index.

◆ getChangedID_Vertex()

virtual u32 irr::scene::SSkinMeshBuffer::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 382 of file SSkinMeshBuffer.h.

References ChangedID_Vertex.

◆ getHardwareMappingHint_Index()

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

get the current hardware mapping hint for index buffers

Implements irr::scene::IMeshBuffer.

Definition at line 342 of file SSkinMeshBuffer.h.

References MappingHint_Index.

◆ getHardwareMappingHint_Vertex()

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

get the current hardware mapping hint for vertex buffers

Implements irr::scene::IMeshBuffer.

Definition at line 336 of file SSkinMeshBuffer.h.

References MappingHint_Vertex.

◆ getIndexCount()

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

Get index count.

Implements irr::scene::IMeshBuffer.

Definition at line 121 of file SSkinMeshBuffer.h.

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

◆ getIndexType()

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

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

Returns
Index type of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 103 of file SSkinMeshBuffer.h.

References irr::video::EIT_16BIT.

◆ getIndices() [1/2]

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

Get pointer to index array.

Implements irr::scene::IMeshBuffer.

Definition at line 109 of file SSkinMeshBuffer.h.

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

◆ getIndices() [2/2]

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

Get pointer to index array.

Implements irr::scene::IMeshBuffer.

Definition at line 115 of file SSkinMeshBuffer.h.

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

◆ getMaterial() [1/2]

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

Get Material of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 34 of file SSkinMeshBuffer.h.

References Material.

◆ getMaterial() [2/2]

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

Get Material of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 40 of file SSkinMeshBuffer.h.

References Material.

◆ getNormal() [1/2]

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

◆ getNormal() [2/2]

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

◆ getPosition() [1/2]

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

◆ getPosition() [2/2]

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

◆ getPrimitiveType()

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

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

Implements irr::scene::IMeshBuffer.

Definition at line 368 of file SSkinMeshBuffer.h.

References PrimitiveType.

◆ getTCoords() [1/2]

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

returns texture coords of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 302 of file SSkinMeshBuffer.h.

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

◆ getTCoords() [2/2]

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

returns texture coords of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 316 of file SSkinMeshBuffer.h.

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

◆ getVertex()

virtual video::S3DVertex* irr::scene::SSkinMeshBuffer::getVertex ( u32  index)
inlinevirtual

Get standard vertex at given index.

Definition at line 46 of file SSkinMeshBuffer.h.

References irr::video::EVT_2TCOORDS, irr::video::EVT_TANGENTS, VertexType, Vertices_2TCoords, Vertices_Standard, and Vertices_Tangents.

◆ getVertexCount()

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

◆ getVertexType()

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

Get vertex type.

Implements irr::scene::IMeshBuffer.

Definition at line 188 of file SSkinMeshBuffer.h.

References VertexType.

◆ getVertices() [1/2]

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

◆ getVertices() [2/2]

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

◆ recalculateBoundingBox()

◆ setBoundingBox()

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

Set bounding box.

Implements irr::scene::IMeshBuffer.

Definition at line 133 of file SSkinMeshBuffer.h.

References BoundingBox.

◆ setDirty()

virtual void irr::scene::SSkinMeshBuffer::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 374 of file SSkinMeshBuffer.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::SSkinMeshBuffer::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 348 of file SSkinMeshBuffer.h.

References irr::scene::EBT_INDEX, irr::scene::EBT_VERTEX, irr::scene::EBT_VERTEX_AND_INDEX, MappingHint_Index, and MappingHint_Vertex.

◆ setPrimitiveType()

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

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

Implements irr::scene::IMeshBuffer.

Definition at line 362 of file SSkinMeshBuffer.h.

References PrimitiveType.

Member Data Documentation

◆ BoundingBox

core::aabbox3d<f32> irr::scene::SSkinMeshBuffer::BoundingBox

Definition at line 403 of file SSkinMeshBuffer.h.

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

◆ BoundingBoxNeedsRecalculated

bool irr::scene::SSkinMeshBuffer::BoundingBoxNeedsRecalculated

Definition at line 412 of file SSkinMeshBuffer.h.

Referenced by boundingBoxNeedsRecalculated(), and recalculateBoundingBox().

◆ ChangedID_Index

u32 irr::scene::SSkinMeshBuffer::ChangedID_Index

Definition at line 395 of file SSkinMeshBuffer.h.

Referenced by getChangedID_Index(), and setDirty().

◆ ChangedID_Vertex

u32 irr::scene::SSkinMeshBuffer::ChangedID_Vertex

Definition at line 394 of file SSkinMeshBuffer.h.

Referenced by getChangedID_Vertex(), and setDirty().

◆ Indices

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

Definition at line 392 of file SSkinMeshBuffer.h.

Referenced by getIndexCount(), and getIndices().

◆ MappingHint_Index

E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::MappingHint_Index

Definition at line 410 of file SSkinMeshBuffer.h.

Referenced by getHardwareMappingHint_Index(), and setHardwareMappingHint().

◆ MappingHint_Vertex

E_HARDWARE_MAPPING irr::scene::SSkinMeshBuffer::MappingHint_Vertex

Definition at line 409 of file SSkinMeshBuffer.h.

Referenced by getHardwareMappingHint_Vertex(), and setHardwareMappingHint().

◆ Material

video::SMaterial irr::scene::SSkinMeshBuffer::Material

Definition at line 400 of file SSkinMeshBuffer.h.

Referenced by getMaterial().

◆ PrimitiveType

E_PRIMITIVE_TYPE irr::scene::SSkinMeshBuffer::PrimitiveType

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

Definition at line 406 of file SSkinMeshBuffer.h.

Referenced by getPrimitiveType(), and setPrimitiveType().

◆ Transformation

core::matrix4 irr::scene::SSkinMeshBuffer::Transformation

Definition at line 398 of file SSkinMeshBuffer.h.

◆ VertexType

◆ Vertices_2TCoords

◆ Vertices_Standard

◆ Vertices_Tangents


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