arsa  2.7
Public Member Functions | List of all members
irr::scene::IDynamicMeshBuffer Class Referenceabstract

#include <IDynamicMeshBuffer.h>

Inheritance diagram for irr::scene::IDynamicMeshBuffer:
irr::scene::IMeshBuffer irr::IReferenceCounted irr::scene::CDynamicMeshBuffer

Public Member Functions

virtual IVertexBuffergetVertexBuffer () const =0
 
virtual IIndexBuffergetIndexBuffer () const =0
 
virtual void setVertexBuffer (IVertexBuffer *vertexBuffer)=0
 
virtual void setIndexBuffer (IIndexBuffer *indexBuffer)=0
 
virtual video::SMaterialgetMaterial ()=0
 Get the material of this meshbuffer. More...
 
virtual const video::SMaterialgetMaterial () const =0
 Get the material of this meshbuffer. More...
 
virtual const core::aabbox3dfgetBoundingBox () const =0
 Get the axis aligned bounding box of this meshbuffer. More...
 
virtual void setBoundingBox (const core::aabbox3df &box)=0
 Set axis aligned bounding box. More...
 
virtual void recalculateBoundingBox ()=0
 Recalculates the bounding box. Should be called if the mesh changed. More...
 
virtual void append (const void *const vertices, u32 numVertices, const u16 *const indices, u32 numIndices) _IRR_OVERRIDE_
 Append the vertices and indices to the current buffer. More...
 
virtual void append (const IMeshBuffer *const other) _IRR_OVERRIDE_
 Append the meshbuffer to the current buffer. More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex () const _IRR_OVERRIDE_
 get the current hardware mapping hint More...
 
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index () const _IRR_OVERRIDE_
 get the current hardware mapping hint More...
 
virtual void setHardwareMappingHint (E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
 set the hardware mapping hint, for driver More...
 
virtual void setDirty (E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
 flags the mesh as changed, reloads hardware buffers More...
 
virtual u32 getChangedID_Vertex () const _IRR_OVERRIDE_
 Get the currently used ID for identification of changes. More...
 
virtual u32 getChangedID_Index () const _IRR_OVERRIDE_
 Get the currently used ID for identification of changes. More...
 
virtual video::E_VERTEX_TYPE getVertexType () const _IRR_OVERRIDE_
 Get type of vertex data which is stored in this meshbuffer. More...
 
virtual const voidgetVertices () const _IRR_OVERRIDE_
 Get access to vertex data. The data is an array of vertices. More...
 
virtual voidgetVertices () _IRR_OVERRIDE_
 Get access to vertex data. The data is an array of vertices. More...
 
virtual u32 getVertexCount () const _IRR_OVERRIDE_
 Get amount of vertices in meshbuffer. More...
 
virtual video::E_INDEX_TYPE getIndexType () const _IRR_OVERRIDE_
 Get type of index data which is stored in this meshbuffer. More...
 
virtual const u16getIndices () const _IRR_OVERRIDE_
 Get access to indices. More...
 
virtual u16getIndices () _IRR_OVERRIDE_
 Get access to indices. More...
 
virtual u32 getIndexCount () const _IRR_OVERRIDE_
 Get amount of indices in this meshbuffer. More...
 
virtual const core::vector3dfgetPosition (u32 i) const _IRR_OVERRIDE_
 returns position of vertex i More...
 
virtual core::vector3dfgetPosition (u32 i) _IRR_OVERRIDE_
 returns position of vertex i More...
 
virtual const core::vector2dfgetTCoords (u32 i) const _IRR_OVERRIDE_
 returns texture coords of vertex i More...
 
virtual core::vector2dfgetTCoords (u32 i) _IRR_OVERRIDE_
 returns texture coords of vertex i More...
 
virtual const core::vector3dfgetNormal (u32 i) const _IRR_OVERRIDE_
 returns normal of vertex i More...
 
virtual core::vector3dfgetNormal (u32 i) _IRR_OVERRIDE_
 returns normal of vertex i More...
 
- Public Member Functions inherited from irr::scene::IMeshBuffer
virtual void setPrimitiveType (E_PRIMITIVE_TYPE type)=0
 Describe what kind of primitive geometry is used by the meshbuffer. More...
 
virtual E_PRIMITIVE_TYPE getPrimitiveType () const =0
 Get the kind of primitive geometry which is used by the meshbuffer. More...
 
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...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
const c8getDebugName () const
 Returns the debug name of the object. 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

a dynamic meshBuffer

Definition at line 18 of file IDynamicMeshBuffer.h.

Member Function Documentation

◆ append() [1/2]

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

Append the vertices and indices to the current buffer.

Only works for compatible vertex types.

Parameters
verticesPointer to a vertex array.
numVerticesNumber of vertices in the array.
indicesPointer to index array.
numIndicesNumber of indices in array.

Implements irr::scene::IMeshBuffer.

Definition at line 53 of file IDynamicMeshBuffer.h.

54  {
55 
56  }

◆ append() [2/2]

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

Append the meshbuffer to the current buffer.

Only works for compatible vertex types

Parameters
otherBuffer to append to this one.

Implements irr::scene::IMeshBuffer.

Definition at line 61 of file IDynamicMeshBuffer.h.

62  {
63 
64  }

◆ getBoundingBox()

virtual const core::aabbox3df& irr::scene::IDynamicMeshBuffer::getBoundingBox ( ) const
pure virtual

Get the axis aligned bounding box of this meshbuffer.

Returns
Axis aligned bounding box of this buffer.

Implements irr::scene::IMeshBuffer.

Implemented in irr::scene::CDynamicMeshBuffer.

◆ getChangedID_Index()

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

104  {
105  return getIndexBuffer().getChangedID();
106  }
virtual IIndexBuffer & getIndexBuffer() const =0
virtual u32 getChangedID() const =0
Get the currently used ID for identification of changes.

◆ getChangedID_Vertex()

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

99  {
100  return getVertexBuffer().getChangedID();
101  }
virtual u32 getChangedID() const =0
Get the currently used ID for identification of changes.
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getHardwareMappingHint_Index()

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

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 75 of file IDynamicMeshBuffer.h.

76  {
78  }
virtual IIndexBuffer & getIndexBuffer() const =0
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0
get the current hardware mapping hint

◆ getHardwareMappingHint_Vertex()

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

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 69 of file IDynamicMeshBuffer.h.

70  {
72  }
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0
get the current hardware mapping hint
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getIndexBuffer()

virtual IIndexBuffer& irr::scene::IDynamicMeshBuffer::getIndexBuffer ( ) const
pure virtual

◆ getIndexCount()

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

Get amount of indices in this meshbuffer.

Returns
Number of indices in this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 163 of file IDynamicMeshBuffer.h.

164  {
165  return getIndexBuffer().size();
166  }
virtual IIndexBuffer & getIndexBuffer() const =0
virtual u32 size() const =0

◆ getIndexType()

virtual video::E_INDEX_TYPE irr::scene::IDynamicMeshBuffer::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 142 of file IDynamicMeshBuffer.h.

143  {
144  return getIndexBuffer().getType();
145  }
virtual IIndexBuffer & getIndexBuffer() const =0
virtual video::E_INDEX_TYPE getType() const =0

◆ getIndices() [1/2]

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

Get access to indices.

Returns
Pointer to indices array.

Implements irr::scene::IMeshBuffer.

Definition at line 149 of file IDynamicMeshBuffer.h.

150  {
151  return (u16*)getIndexBuffer().getData();
152  }
virtual IIndexBuffer & getIndexBuffer() const =0
unsigned short u16
16 bit unsigned variable.
Definition: irrTypes.h:44
virtual void * getData()=0

◆ getIndices() [2/2]

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

Get access to indices.

Returns
Pointer to indices array.

Implements irr::scene::IMeshBuffer.

Definition at line 156 of file IDynamicMeshBuffer.h.

157  {
158  return (u16*)getIndexBuffer().getData();
159  }
virtual IIndexBuffer & getIndexBuffer() const =0
unsigned short u16
16 bit unsigned variable.
Definition: irrTypes.h:44
virtual void * getData()=0

◆ getMaterial() [1/2]

virtual video::SMaterial& irr::scene::IDynamicMeshBuffer::getMaterial ( )
pure virtual

Get the material of this meshbuffer.

Returns
Material of this buffer.

Implements irr::scene::IMeshBuffer.

Implemented in irr::scene::CDynamicMeshBuffer.

◆ getMaterial() [2/2]

virtual const video::SMaterial& irr::scene::IDynamicMeshBuffer::getMaterial ( ) const
pure virtual

Get the material of this meshbuffer.

Returns
Material of this buffer.

Implements irr::scene::IMeshBuffer.

Implemented in irr::scene::CDynamicMeshBuffer.

◆ getNormal() [1/2]

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

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 193 of file IDynamicMeshBuffer.h.

194  {
195  return getVertexBuffer()[i].Normal;
196  }
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getNormal() [2/2]

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

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 199 of file IDynamicMeshBuffer.h.

200  {
201  return getVertexBuffer()[i].Normal;
202  }
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getPosition() [1/2]

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

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 169 of file IDynamicMeshBuffer.h.

170  {
171  return getVertexBuffer()[i].Pos;
172  }
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getPosition() [2/2]

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

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 175 of file IDynamicMeshBuffer.h.

176  {
177  return getVertexBuffer()[i].Pos;
178  }
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getTCoords() [1/2]

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

returns texture coords of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 181 of file IDynamicMeshBuffer.h.

182  {
183  return getVertexBuffer()[i].TCoords;
184  }
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getTCoords() [2/2]

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

returns texture coords of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 187 of file IDynamicMeshBuffer.h.

188  {
189  return getVertexBuffer()[i].TCoords;
190  }
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getVertexBuffer()

virtual IVertexBuffer& irr::scene::IDynamicMeshBuffer::getVertexBuffer ( ) const
pure virtual

◆ getVertexCount()

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

Get amount of vertices in meshbuffer.

Returns
Number of vertices in this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 135 of file IDynamicMeshBuffer.h.

136  {
137  return getVertexBuffer().size();
138  }
virtual u32 size() const =0
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getVertexType()

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

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

Returns
Vertex type of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 112 of file IDynamicMeshBuffer.h.

113  {
114  return getVertexBuffer().getType();
115  }
virtual video::E_VERTEX_TYPE getType() const =0
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getVertices() [1/2]

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

Get access to vertex data. The data is an array of vertices.

Which vertex type is used can be determined by getVertexType().

Returns
Pointer to array of vertices.

Implements irr::scene::IMeshBuffer.

Definition at line 120 of file IDynamicMeshBuffer.h.

121  {
122  return getVertexBuffer().getData();
123  }
virtual void * getData()=0
virtual IVertexBuffer & getVertexBuffer() const =0

◆ getVertices() [2/2]

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

Get access to vertex data. The data is an array of vertices.

Which vertex type is used can be determined by getVertexType().

Returns
Pointer to array of vertices.

Implements irr::scene::IMeshBuffer.

Definition at line 128 of file IDynamicMeshBuffer.h.

129  {
130  return getVertexBuffer().getData();
131  }
virtual void * getData()=0
virtual IVertexBuffer & getVertexBuffer() const =0

◆ recalculateBoundingBox()

virtual void irr::scene::IDynamicMeshBuffer::recalculateBoundingBox ( )
pure virtual

Recalculates the bounding box. Should be called if the mesh changed.

Implements irr::scene::IMeshBuffer.

Implemented in irr::scene::CDynamicMeshBuffer.

◆ setBoundingBox()

virtual void irr::scene::IDynamicMeshBuffer::setBoundingBox ( const core::aabbox3df box)
pure virtual

Set axis aligned bounding box.

Parameters
boxUser defined axis aligned bounding box to use for this buffer.

Implements irr::scene::IMeshBuffer.

Implemented in irr::scene::CDynamicMeshBuffer.

◆ setDirty()

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

91  {
92  if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
94  if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
96  }
Change the vertex mapping.
virtual IIndexBuffer & getIndexBuffer() const =0
virtual void setDirty()=0
flags the meshbuffer as changed, reloads hardware buffers
Change both vertex and index mapping to the same value.
Change the index mapping.
virtual IVertexBuffer & getVertexBuffer() const =0
virtual void setDirty()=0
flags the meshbuffer as changed, reloads hardware buffers

◆ setHardwareMappingHint()

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

82  {
83  if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
84  getVertexBuffer().setHardwareMappingHint(NewMappingHint);
85  if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_INDEX)
86  getIndexBuffer().setHardwareMappingHint(NewMappingHint);
87  }
Change the vertex mapping.
virtual IIndexBuffer & getIndexBuffer() const =0
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0
set the hardware mapping hint, for driver
Change both vertex and index mapping to the same value.
Change the index mapping.
virtual IVertexBuffer & getVertexBuffer() const =0
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0
set the hardware mapping hint, for driver

◆ setIndexBuffer()

virtual void irr::scene::IDynamicMeshBuffer::setIndexBuffer ( IIndexBuffer indexBuffer)
pure virtual

◆ setVertexBuffer()

virtual void irr::scene::IDynamicMeshBuffer::setVertexBuffer ( IVertexBuffer vertexBuffer)
pure virtual

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