5 #ifndef __T_MESH_BUFFER_H_INCLUDED__ 6 #define __T_MESH_BUFFER_H_INCLUDED__ 127 for (
u32 i=1; i<vsize; ++i)
194 for (i=0; i<numVertices; ++i)
201 for (i=0; i<numIndices; ++i)
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
Get type of vertex data stored in this buffer.
Change the vertex mapping.
Template implementation of the IMeshBuffer interface.
void reallocate(u32 new_size, bool canShrink=true)
Reallocates the array, make it bigger or smaller.
virtual u32 getIndexCount() const _IRR_OVERRIDE_
Get number of indices.
virtual const core::vector3df & getNormal(u32 i) const _IRR_OVERRIDE_
returns normal of vertex i
E_PRIMITIVE_TYPE
Enumeration for all primitive types there are.
video::SMaterial Material
Material for this meshbuffer.
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_
Get the currently used ID for identification of changes.
core::array< u16 > Indices
Indices into the vertices of this buffer.
E_HARDWARE_MAPPING MappingHint_Vertex
hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
get the current hardware mapping hint
GLuint GLuint GLsizei GLenum const GLvoid * indices
CMeshBuffer< video::S3DVertex > SMeshBuffer
Standard meshbuffer.
const T * const_pointer() const
Gets a const pointer to the array.
virtual video::SMaterial & getMaterial() _IRR_OVERRIDE_
Get material of this meshbuffer.
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_
Get the currently used ID for identification of changes.
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
Recalculate the bounding box.
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
Describe what kind of primitive geometry is used by the meshbuffer.
virtual const core::vector3df & getPosition(u32 i) const _IRR_OVERRIDE_
returns position of vertex i
Everything in the Irrlicht Engine can be found in this namespace.
Don't store on the hardware.
virtual u16 * getIndices() _IRR_OVERRIDE_
Get pointer to indices.
virtual void append(const IMeshBuffer *const other) _IRR_OVERRIDE_
Append the meshbuffer to the current buffer.
virtual const video::SMaterial & getMaterial() const _IRR_OVERRIDE_
Get material of this meshbuffer.
virtual core::vector2df & getTCoords(u32 i) _IRR_OVERRIDE_
returns texture coord of vertex i
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
void push_back(const T &element)
Adds an element at back of array.
virtual u32 getVertexCount() const _IRR_OVERRIDE_
Get number of vertices.
bool empty() const
Check if array is empty.
unsigned short u16
16 bit unsigned variable.
virtual const void * getVertices() const _IRR_OVERRIDE_
Get pointer to vertices.
Struct for holding a mesh with a single material.
unsigned int u32
32 bit unsigned variable.
Explicitly set all vertices for each triangle.
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
Get the kind of primitive geometry which is used by the meshbuffer.
Change both vertex and index mapping to the same value.
E_HARDWARE_MAPPING MappingHint_Index
virtual core::vector3df & getPosition(u32 i) _IRR_OVERRIDE_
returns position of vertex i
u32 size() const
Get number of occupied elements of the array.
core::aabbox3d< f32 > BoundingBox
Bounding box of this meshbuffer.
CMeshBuffer< video::S3DVertex2TCoords > SMeshBufferLightMap
Meshbuffer with two texture coords per vertex, e.g. for lightmaps.
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
Get type of index data which is stored in this meshbuffer.
virtual void * getVertices() _IRR_OVERRIDE_
Get pointer to vertices.
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
set the hardware mapping hint, for driver
virtual const core::aabbox3d< f32 > & getBoundingBox() const _IRR_OVERRIDE_
Get the axis aligned bounding box.
Change the index mapping.
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.
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
get the current hardware mapping hint
#define _IRR_OVERRIDE_
Defines an override macro, to protect virtual functions from typos and other mismatches.
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
flags the mesh as changed, reloads hardware buffers
virtual const u16 * getIndices() const _IRR_OVERRIDE_
Get pointer to indices.
void setDebugName(const c8 *newName)
Sets the debug name of the object.
core::array< T > Vertices
Vertices of this buffer.
GLuint GLuint GLsizei GLenum type
virtual const core::vector2df & getTCoords(u32 i) const _IRR_OVERRIDE_
returns texture coord of vertex i
E_VERTEX_TYPE
Enumeration for all vertex types there are.
CMeshBuffer< video::S3DVertexTangents > SMeshBufferTangents
Meshbuffer with vertices having tangents stored, e.g. for normal mapping.
virtual void setBoundingBox(const core::aabbox3df &box) _IRR_OVERRIDE_
Set the axis aligned bounding box.
Struct for holding parameters for a material renderer.
T * pointer()
Gets a pointer to the array.
E_PRIMITIVE_TYPE PrimitiveType
Primitive type used for rendering (triangles, lines, ...)
CMeshBuffer()
Default constructor for empty meshbuffer.
virtual core::vector3df & getNormal(u32 i) _IRR_OVERRIDE_
returns normal of vertex i