diff --git a/include/omath/3d_primitives/mesh.hpp b/include/omath/3d_primitives/mesh.hpp index f5f47b7..bd89733 100644 --- a/include/omath/3d_primitives/mesh.hpp +++ b/include/omath/3d_primitives/mesh.hpp @@ -33,13 +33,13 @@ namespace omath::primitives private: using Vbo = std::vector; - using Vao = std::vector>; + using Ebo = std::vector>; public: Vbo m_vertex_buffer; - Vao m_vertex_array_object; + Ebo m_vertex_array_object; - Mesh(Vbo vbo, Vao vao, + Mesh(Vbo vbo, Ebo vao, const VectorType scale = { 1, @@ -97,7 +97,7 @@ namespace omath::primitives } [[nodiscard]] - Vector3 vertex_to_world_space(const Vector3& vertex_position) const + VectorType vertex_to_world_space(const Vector3& vertex_position) const requires HasPosition { auto abs_vec = get_to_world_matrix() * mat_column_from_vector(vertex_position); @@ -106,7 +106,7 @@ namespace omath::primitives } [[nodiscard]] - Triangle> make_face_in_world_space(const Vao::const_iterator vao_iterator) const + Triangle make_face_in_world_space(const Ebo::const_iterator vao_iterator) const requires HasPosition { return {vertex_to_world_space(m_vertex_buffer.at(vao_iterator->x).position), diff --git a/tests/general/unit_test_epa.cpp b/tests/general/unit_test_epa.cpp index c0b8464..10287a3 100644 --- a/tests/general/unit_test_epa.cpp +++ b/tests/general/unit_test_epa.cpp @@ -24,7 +24,7 @@ TEST(UnitTestEpa, TestCollisionTrue) { { 1.f, -1.f, 1.f}, {}, {} }, { { 1.f, -1.f, -1.f}, {}, {} } }; - std::vector> vao; // not needed + std::vector> vao; // not needed Mesh a(vbo, vao, {1, 1, 1}); Mesh b(vbo, vao, {1, 1, 1}); @@ -98,7 +98,7 @@ TEST(UnitTestEpa, TestCollisionTrue2) { { 1.f, -1.f, 1.f }, {}, {} }, { { 1.f, -1.f, -1.f }, {}, {} } }; - std::vector> vao; // not needed + std::vector> vao; // not needed Mesh a(vbo, vao, {1, 1, 1}); Mesh b(vbo, vao, {1, 1, 1});