28 float nx,
float ny,
float nz,
29 float tx,
float ty,
float tz,
float tw,
30 float u = 0.0f,
float v = 0.0f)
34 r(1.0f),
g(1.0f),
b(1.0f),
a(1.0f),
47 this->r =
r; this->g =
g; this->b =
b; this->a =
a;
51 this->u =
u; this->v =
v;
55 return { 3, 3, 4, 2, 4, 4 };
84 void AddVertex(std::initializer_list<Vertex> vertexList) {
85 vertices.add(vertexList);
91 size_t GetSize()
const {
return vertices.GetSize(); }
94 void clear() { vertices.clear(); }
Implements a dynamic array-like list for storing and managing a collection of elements.
Vertex * GetMutableData()
void AddVertex(const Vertex &vertex)
void AddVertex(std::initializer_list< Vertex > vertexList)
size_t GetSizeInBytes() const
const Vertex * GetData() const
Root namespace for everything the engine exposes.
List< IndexType > IndexGroup
static constexpr std::array< size_t, 6 > GetAttributeOffsets()
Vertex(float px, float py, float pz, float nx, float ny, float nz, float tx, float ty, float tz, float tw, float u=0.0f, float v=0.0f)
static constexpr std::array< size_t, 6 > GetAttributeSizes()
static constexpr size_t GetSize()
void SetColor(float r, float g, float b, float a)
void SetTexCoord(float u, float v)
void SetNormal(float x, float y, float z)
void SetPosition(float x, float y, float z)