5#ifndef NIRT_I_DYNAMIC_MESH_BUFFER_HPP_INCLUDED
6#define NIRT_I_DYNAMIC_MESH_BUFFER_HPP_INCLUDED
8#include <nirtcpp/core/engine/IMeshBuffer.hpp>
9#include <nirtcpp/core/engine/IVertexBuffer.hpp>
10#include <nirtcpp/core/engine/IIndexBuffer.hpp>
25 virtual void setIndexBuffer(
IIndexBuffer *indexBuffer) =0;
80 return getVertexBuffer().getType();
88 return getVertexBuffer().
getData();
96 return getVertexBuffer().
getData();
103 return getVertexBuffer().
size();
110 return getIndexBuffer().getType();
131 return getIndexBuffer().
size();
137 return getVertexBuffer()[i].Pos;
143 return getVertexBuffer()[i].Pos;
149 return getVertexBuffer()[i].TCoords;
155 return getVertexBuffer()[i].TCoords;
161 return getVertexBuffer()[i].Normal;
167 return getVertexBuffer()[i].Normal;
173 return getVertexBuffer()[i].Color;
179 return getVertexBuffer()[i].Color;
Definition IDynamicMeshBuffer.hpp:19
virtual const core::vector2df & getTCoords(u32 i) const override
returns texture coords of vertex i
Definition IDynamicMeshBuffer.hpp:147
virtual core::vector2df & getTCoords(u32 i) override
returns texture coords of vertex i
Definition IDynamicMeshBuffer.hpp:153
virtual u16 * getIndices() override
Get access to indices.
Definition IDynamicMeshBuffer.hpp:122
virtual core::vector3df & getNormal(u32 i) override
returns normal of vertex i
Definition IDynamicMeshBuffer.hpp:165
virtual video::E_INDEX_TYPE getIndexType() const override
Get type of index data which is stored in this meshbuffer.
Definition IDynamicMeshBuffer.hpp:108
virtual u32 getVertexCount() const override
Get amount of vertices in meshbuffer.
Definition IDynamicMeshBuffer.hpp:101
virtual const void * getVertices() const override
Get access to vertex data. The data is an array of vertices.
Definition IDynamicMeshBuffer.hpp:86
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const override
get the current hardware mapping hint
Definition IDynamicMeshBuffer.hpp:36
virtual u32 getChangedID_Vertex() const override
Get the currently used ID for identification of changes.
Definition IDynamicMeshBuffer.hpp:65
virtual const core::vector3df & getNormal(u32 i) const override
returns normal of vertex i
Definition IDynamicMeshBuffer.hpp:159
virtual video::E_VERTEX_TYPE getVertexType() const override
Get type of vertex data which is stored in this meshbuffer.
Definition IDynamicMeshBuffer.hpp:78
virtual u32 getChangedID_Index() const override
Get the currently used ID for identification of changes.
Definition IDynamicMeshBuffer.hpp:70
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const override
get the current hardware mapping hint
Definition IDynamicMeshBuffer.hpp:42
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) override
flags the mesh as changed, reloads hardware buffers
Definition IDynamicMeshBuffer.hpp:57
virtual video::SColor & getColor(u32 i) override
returns color of vertex i
Definition IDynamicMeshBuffer.hpp:171
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) override
set the hardware mapping hint, for driver
Definition IDynamicMeshBuffer.hpp:48
virtual u32 getIndexCount() const override
Get amount of indices in this meshbuffer.
Definition IDynamicMeshBuffer.hpp:129
virtual const core::vector3df & getPosition(u32 i) const override
returns position of vertex i
Definition IDynamicMeshBuffer.hpp:135
virtual const u16 * getIndices() const override
Get access to indices.
Definition IDynamicMeshBuffer.hpp:115
virtual core::vector3df & getPosition(u32 i) override
returns position of vertex i
Definition IDynamicMeshBuffer.hpp:141
virtual void * getVertices() override
Get access to vertex data. The data is an array of vertices.
Definition IDynamicMeshBuffer.hpp:94
virtual const video::SColor & getColor(u32 i) const override
returns color of vertex i
Definition IDynamicMeshBuffer.hpp:177
Definition IIndexBuffer.hpp:20
virtual void * getData()=0
Pointer to first element.
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0
get the current hardware mapping hint
virtual void setDirty()=0
flags the meshbuffer as changed, reloads hardware buffers
virtual u32 getChangedID() const =0
Get the currently used ID for identification of changes.
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0
set the hardware mapping hint, for driver
virtual u32 size() const =0
Number of elements.
Class for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
Definition IVertexBuffer.hpp:19
virtual void setDirty()=0
flags the meshbuffer as changed, reloads hardware buffers
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const =0
get the current hardware mapping hint
virtual u32 getChangedID() const =0
Get the currently used ID for identification of changes.
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING NewMappingHint)=0
set the hardware mapping hint, for driver
virtual u32 size() const =0
Number of elements.
virtual void * getData()=0
Pointer to first element of vertex data.
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
E_BUFFER_TYPE
Definition EHardwareBufferFlags.hpp:29
@ EBT_VERTEX_AND_INDEX
Change both vertex and index mapping to the same value.
Definition EHardwareBufferFlags.hpp:37
@ EBT_INDEX
Change the index mapping.
Definition EHardwareBufferFlags.hpp:35
@ EBT_VERTEX
Change the vertex mapping.
Definition EHardwareBufferFlags.hpp:33
E_HARDWARE_MAPPING
Definition EHardwareBufferFlags.hpp:14
E_VERTEX_TYPE
Enumeration for all vertex types there are.
Definition S3DVertex.hpp:19
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned short u16
16 bit unsigned variable.
Definition irrTypes.hpp:46
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64