Loading...
Searching...
No Matches
irr::scene::CMeshBuffer< T > Class Template Reference

Template implementation of the IMeshBuffer interface. More...

`#include <CMeshBuffer.h>`

Inheritance diagram for irr::scene::CMeshBuffer< T >:

## Public Member Functions

| CMeshBuffer ()
| Default constructor for empty meshbuffer.
virtual void | append (const IMeshBuffer *const other)
| Append the meshbuffer to the current buffer.
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 const core::aabbox3d< f32 > & | getBoundingBox () const
| Get the 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
| Get number of indices.
virtual video::E_INDEX_TYPE | getIndexType () const
| Get type of index data which is stored in this meshbuffer.
virtual u16 * | getIndices ()
| Get pointer to indices.
virtual const u16 * | getIndices () const
| Get pointer to indices.
virtual video::SMaterial & | getMaterial ()
| Get material of this meshbuffer.
virtual const video::SMaterial & | getMaterial () const
| Get material of this meshbuffer.
virtual core::vector3df & | getNormal (u32 i)
| returns normal of vertex i
virtual const core::vector3df & | getNormal (u32 i) const
| returns normal of vertex i
virtual core::vector3df & | getPosition (u32 i)
| returns position of vertex i
virtual const core::vector3df & | getPosition (u32 i) const
| returns position of vertex i
virtual core::vector2df & | getTCoords (u32 i)
| returns texture coord of vertex i
virtual const core::vector2df & | getTCoords (u32 i) const
| returns texture coord of vertex i
virtual u32 | getVertexCount () const
| Get number of vertices.
virtual video::E_VERTEX_TYPE | getVertexType () const
| Get type of vertex data stored in this buffer.
virtual void * | getVertices ()
| Get pointer to vertices.
virtual const void * | getVertices () const
| Get pointer to vertices.
virtual void | recalculateBoundingBox ()
| Recalculate the bounding box.
virtual void | setBoundingBox (const core::aabbox3df &box)
| Set the 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 Member Functions inherited from irr::IReferenceCounted
| IReferenceCounted ()
| Constructor.
virtual | ~IReferenceCounted ()
| Destructor.
bool | drop () const
| Drops the object. Decrements the reference counter by one.
const c8 * | getDebugName () const
| Returns the debug name of the object.
s32 | getReferenceCount () const
| Get the reference count.
void | grab () const
| Grabs the object. Increments the reference counter by one.

## Public Attributes

core::aabbox3d< f32 > | BoundingBox
| Bounding box of this meshbuffer.
u32 | ChangedID_Index
u32 | ChangedID_Vertex
core::array< u16 > | Indices
| Indices into the vertices of this buffer.
E_HARDWARE_MAPPING | MappingHint_Index
E_HARDWARE_MAPPING | MappingHint_Vertex
| hardware mapping hint
video::SMaterial | Material
| Material for this meshbuffer.
core::array< T > | Vertices
| Vertices of this buffer.

## Additional Inherited Members

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

## Detailed Description

template<class T>
class irr::scene::CMeshBuffer< T >

Template implementation of the IMeshBuffer interface.

Definition at line 17 of file CMeshBuffer.h.

## Constructor & Destructor Documentation

## CMeshBuffer()

template<class T>

irr::scene::CMeshBuffer< T >::CMeshBuffer | ( |  | ) |

inline

Default constructor for empty meshbuffer.

Definition at line 21 of file CMeshBuffer.h.

## Member Function Documentation

## append() [1/2]

template<class T>

virtual void irr::scene::CMeshBuffer< T >::append | ( | const IMeshBuffer *const | other | ) |

inline virtual

Append the meshbuffer to the current buffer.

Only works for compatible types, i.e. either the same type or the main buffer is of standard type. Otherwise, behavior is undefined.

Parameters

  other | Meshbuffer to be appended to this one.

Implements irr::scene::IMeshBuffer.

Definition at line 209 of file CMeshBuffer.h.

## append() [2/2]

template<class T>

virtual void irr::scene::CMeshBuffer< T >::append | ( | const void *const | vertices,
|  | u32 | numVertices,
|  | const u16 *const | indices,
|  | u32 | numIndices )

inline virtual

Append the vertices and indices to the current buffer.

Only works for compatible types, i.e. either the same type or the main buffer is of standard type. Otherwise, behavior is undefined.

Implements irr::scene::IMeshBuffer.

Definition at line 180 of file CMeshBuffer.h.

## getBoundingBox()

template<class T>

virtual const core::aabbox3d< f32 > & irr::scene::CMeshBuffer< T >::getBoundingBox | ( |  | ) | const

inline virtual

Get the axis aligned bounding box.

Returns
  Axis aligned bounding box of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 101 of file CMeshBuffer.h.

## getChangedID_Index()

template<class T>

virtual u32 irr::scene::CMeshBuffer< T >::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 271 of file CMeshBuffer.h.

## getChangedID_Vertex()

template<class T>

virtual u32 irr::scene::CMeshBuffer< T >::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 267 of file CMeshBuffer.h.

## getHardwareMappingHint_Index()

template<class T>

virtual E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::getHardwareMappingHint_Index | ( |  | ) | const

inline virtual

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 241 of file CMeshBuffer.h.

## getHardwareMappingHint_Vertex()

template<class T>

virtual E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::getHardwareMappingHint_Vertex | ( |  | ) | const

inline virtual

get the current hardware mapping hint

Implements irr::scene::IMeshBuffer.

Definition at line 235 of file CMeshBuffer.h.

## getIndexCount()

template<class T>

virtual u32 irr::scene::CMeshBuffer< T >::getIndexCount | ( |  | ) | const

inline virtual

Get number of indices.

Returns
  Number of indices.

Implements irr::scene::IMeshBuffer.

Definition at line 93 of file CMeshBuffer.h.

Referenced by irr::scene::CMeshBuffer< video::S3DVertex >::append().

## getIndexType()

template<class T>

virtual video::E_INDEX_TYPE irr::scene::CMeshBuffer< T >::getIndexType | ( |  | ) | const

inline virtual

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

Returns
  Index type of this buffer.

Implements irr::scene::IMeshBuffer.

Definition at line 70 of file CMeshBuffer.h.

## getIndices() [1/2]

template<class T>

virtual u16 * irr::scene::CMeshBuffer< T >::getIndices | ( |  | ) |

inline virtual

Get pointer to indices.

Returns
  Pointer to indices.

Implements irr::scene::IMeshBuffer.

Definition at line 85 of file CMeshBuffer.h.

## getIndices() [2/2]

template<class T>

virtual const u16 * irr::scene::CMeshBuffer< T >::getIndices | ( |  | ) | const

inline virtual

Get pointer to indices.

Returns
  Pointer to indices.

Implements irr::scene::IMeshBuffer.

Definition at line 77 of file CMeshBuffer.h.

## getMaterial() [1/2]

template<class T>

virtual video::SMaterial & irr::scene::CMeshBuffer< T >::getMaterial | ( |  | ) |

inline virtual

Get material of this meshbuffer.

Returns
  Material of this buffer

Implements irr::scene::IMeshBuffer.

Definition at line 39 of file CMeshBuffer.h.

## getMaterial() [2/2]

template<class T>

virtual const video::SMaterial & irr::scene::CMeshBuffer< T >::getMaterial | ( |  | ) | const

inline virtual

Get material of this meshbuffer.

Returns
  Material of this buffer

Implements irr::scene::IMeshBuffer.

Definition at line 31 of file CMeshBuffer.h.

## getNormal() [1/2]

template<class T>

virtual core::vector3df & irr::scene::CMeshBuffer< T >::getNormal | ( | u32 | i | ) |

inline virtual

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 157 of file CMeshBuffer.h.

## getNormal() [2/2]

template<class T>

virtual const core::vector3df & irr::scene::CMeshBuffer< T >::getNormal | ( | u32 | i | ) | const

inline virtual

returns normal of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 151 of file CMeshBuffer.h.

## getPosition() [1/2]

template<class T>

virtual core::vector3df & irr::scene::CMeshBuffer< T >::getPosition | ( | u32 | i | ) |

inline virtual

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 145 of file CMeshBuffer.h.

## getPosition() [2/2]

template<class T>

virtual const core::vector3df & irr::scene::CMeshBuffer< T >::getPosition | ( | u32 | i | ) | const

inline virtual

returns position of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 139 of file CMeshBuffer.h.

## getTCoords() [1/2]

template<class T>

virtual core::vector2df & irr::scene::CMeshBuffer< T >::getTCoords | ( | u32 | i | ) |

inline virtual

returns texture coord of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 169 of file CMeshBuffer.h.

## getTCoords() [2/2]

template<class T>

virtual const core::vector2df & irr::scene::CMeshBuffer< T >::getTCoords | ( | u32 | i | ) | const

inline virtual

returns texture coord of vertex i

Implements irr::scene::IMeshBuffer.

Definition at line 163 of file CMeshBuffer.h.

## getVertexCount()

template<class T>

virtual u32 irr::scene::CMeshBuffer< T >::getVertexCount | ( |  | ) | const

inline virtual

Get number of vertices.

Returns
  Number of vertices.

Implements irr::scene::IMeshBuffer.

Definition at line 63 of file CMeshBuffer.h.

Referenced by irr::scene::CMeshBuffer< video::S3DVertex >::append().

## getVertexType()

template<class T>

virtual video::E_VERTEX_TYPE irr::scene::CMeshBuffer< T >::getVertexType | ( |  | ) | const

inline virtual

Get type of vertex data stored in this buffer.

Returns
  Type of vertex data.

Implements irr::scene::IMeshBuffer.

Definition at line 133 of file CMeshBuffer.h.

## getVertices() [1/2]

template<class T>

virtual void * irr::scene::CMeshBuffer< T >::getVertices | ( |  | ) |

inline virtual

Get pointer to vertices.

Returns
  Pointer to vertices.

Implements irr::scene::IMeshBuffer.

Definition at line 55 of file CMeshBuffer.h.

## getVertices() [2/2]

template<class T>

virtual const void * irr::scene::CMeshBuffer< T >::getVertices | ( |  | ) | const

inline virtual

Get pointer to vertices.

Returns
  Pointer to vertices.

Implements irr::scene::IMeshBuffer.

Definition at line 47 of file CMeshBuffer.h.

Referenced by irr::scene::CMeshBuffer< video::S3DVertex >::append().

## recalculateBoundingBox()

template<class T>

virtual void irr::scene::CMeshBuffer< T >::recalculateBoundingBox | ( |  | ) |

inline virtual

Recalculate the bounding box.

should be called if the mesh changed.

Implements irr::scene::IMeshBuffer.

Definition at line 118 of file CMeshBuffer.h.

## setBoundingBox()

template<class T>

virtual void irr::scene::CMeshBuffer< T >::setBoundingBox | ( | const core::aabbox3df & | box | ) |

inline virtual

Set the axis aligned bounding box.

Parameters

  box | New axis aligned bounding box for this buffer. set user axis aligned bounding box

Implements irr::scene::IMeshBuffer.

Definition at line 110 of file CMeshBuffer.h.

## setDirty()

template<class T>

virtual void irr::scene::CMeshBuffer< T >::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 257 of file CMeshBuffer.h.

## setHardwareMappingHint()

template<class T>

virtual void irr::scene::CMeshBuffer< T >::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 247 of file CMeshBuffer.h.

## Member Data Documentation

## BoundingBox

template<class T>

core::aabbox3d<f32> irr::scene::CMeshBuffer< T >::BoundingBox

Bounding box of this meshbuffer.

Definition at line 287 of file CMeshBuffer.h.

## ChangedID_Index

template<class T>

u32 irr::scene::CMeshBuffer< T >::ChangedID_Index

Definition at line 274 of file CMeshBuffer.h.

## ChangedID_Vertex

template<class T>

u32 irr::scene::CMeshBuffer< T >::ChangedID_Vertex

Definition at line 273 of file CMeshBuffer.h.

## Indices

template<class T>

core::array<u16> irr::scene::CMeshBuffer< T >::Indices

Indices into the vertices of this buffer.

Definition at line 285 of file CMeshBuffer.h.

## MappingHint_Index

template<class T>

E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::MappingHint_Index

Definition at line 278 of file CMeshBuffer.h.

## MappingHint_Vertex

template<class T>

E_HARDWARE_MAPPING irr::scene::CMeshBuffer< T >::MappingHint_Vertex

hardware mapping hint

Definition at line 277 of file CMeshBuffer.h.

## Material

template<class T>

video::SMaterial irr::scene::CMeshBuffer< T >::Material

Material for this meshbuffer.

Definition at line 281 of file CMeshBuffer.h.

## Vertices

template<class T>

core::array<T> irr::scene::CMeshBuffer< T >::Vertices

Vertices of this buffer.

Definition at line 283 of file CMeshBuffer.h.

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

- CMeshBuffer.h

- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0