6#include "../Math/Vec3.h"
26 Mesh(
float *vertices,
unsigned int vSize,
unsigned int *indices,
unsigned int iCount);
33 Mesh(
const std::vector<float> &vertices,
const std::vector<unsigned int> &indices);
65 const std::vector<float> &
GetVertices()
const {
return m_Vertices; }
71 const std::vector<unsigned int> &
GetIndices()
const {
return m_Indices; }
78 std::vector<float> m_Vertices;
79 std::vector<unsigned int> m_Indices;
80 mutable Vec3 m_MinBounds, m_MaxBounds;
81 mutable bool m_BoundsCalculated =
false;
Manages an OpenGL index buffer object (IBO) for efficient rendering of indexed geometry.
Definition IndexBuffer.h:16
Represents a 3D mesh composed of vertices and indices.
Definition Mesh.h:17
void GetBounds(Vec3 &minBounds, Vec3 &maxBounds) const
Gets the axis-aligned bounding box of the mesh.
Definition Mesh.cpp:53
const std::vector< unsigned int > & GetIndices() const
Gets access to the index data for intersection testing.
Definition Mesh.h:71
~Mesh()
Destroys the Mesh object.
Definition Mesh.cpp:42
Vec3 GetCenter() const
Gets the center point of the mesh bounds.
Definition Mesh.cpp:103
const std::vector< float > & GetVertices() const
Gets access to the vertex data for intersection testing.
Definition Mesh.h:65
void Draw() const
Renders the mesh.
Definition Mesh.cpp:47
Encapsulates an OpenGL Vertex Array Object (VAO).
Definition VertexArray.h:13
Manages an OpenGL Vertex Buffer Object (VBO).
Definition VertexBuffer.h:13