#ifndef MESH_H #define MESH_H #include "math/Vector.h" #include "rendering/VertexBuffer.h" #include "utils/TypedBuffer.h" class Mesh final { VertexBuffer vertexBuffer; int vertices; public: struct Vertex final { Vector3 position; Vector2 texture; }; class Triangle final { Vertex a; Vector3 normalA; Vertex b; Vector3 normalB; Vertex c; Vector3 normalC; public: Triangle(const Vertex& a, const Vertex& b, const Vertex& c); }; Mesh(); bool init(); void build(const TypedBuffer& buffer); void draw(); }; #endif