aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/mesh.cpp
diff options
context:
space:
mode:
authorvimene <vincent.menegaux@gmail.com>2024-12-31 03:40:14 +0100
committervimene <vincent.menegaux@gmail.com>2024-12-31 03:40:14 +0100
commitcc6fb8c33637566a7b116d46440e6063f016deea (patch)
tree5cc83f84525507994add57df7dd974e6611d675a /src/o3d/mesh.cpp
parent6b765a85cf81bf4b7162e4c9280dd4054581c611 (diff)
downloadengine-cc6fb8c33637566a7b116d46440e6063f016deea.tar.gz
various improvements
- added quaternions and rewrote all rotations to use them - added transforms to put all object transforms in a single place - added Wavefront .obj file parser - removed frame buffer's abstract class - improved vectors, matrices, triangles, vertices and vertices data by putting all code in header file - added vector's operations - changed from NULL to nullptr - miscellaneous improvements
Diffstat (limited to 'src/o3d/mesh.cpp')
-rw-r--r--src/o3d/mesh.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/o3d/mesh.cpp b/src/o3d/mesh.cpp
index 2dba328..60c7f8b 100644
--- a/src/o3d/mesh.cpp
+++ b/src/o3d/mesh.cpp
@@ -6,29 +6,6 @@
using namespace engine::o3d;
-// Mesh Mesh::cube() {
-// return {
-// {
-// { engine::math::Vector3(-1.f, -1.f, -1.f), {} },
-// { engine::math::Vector3(+1.f, -1.f, -1.f), {} },
-// { engine::math::Vector3(-1.f, +1.f, -1.f), {} },
-// { engine::math::Vector3(+1.f, +1.f, -1.f), {} },
-// { engine::math::Vector3(-1.f, -1.f, +1.f), {} },
-// { engine::math::Vector3(+1.f, -1.f, +1.f), {} },
-// { engine::math::Vector3(-1.f, +1.f, +1.f), {} },
-// { engine::math::Vector3(+1.f, +1.f, +1.f), {} },
-// },
-// {
-// { 0, 2, 3 }, { 0, 3, 1 }, // face 1
-// { 0, 4, 6 }, { 0, 6, 2 }, // face 2
-// { 0, 1, 5 }, { 0, 5, 4 }, // face 3
-// { 7, 6, 4 }, { 7, 4, 5 }, // face 4
-// { 7, 3, 2 }, { 7, 2, 6 }, // face 5
-// { 7, 5, 1 }, { 7, 1, 3 }, // face 6
-// }
-// };
-// }
-
Mesh Mesh::plane() {
return {
{
@@ -52,10 +29,3 @@ Mesh Mesh::plane() {
}
};
}
-
-Mesh::Mesh(std::vector<engine::math::Vector4> vertices,
- std::vector<engine::math::Vector3> normals,
- std::vector<VertexData> vertices_data,
- std::vector<std::array<std::array<std::size_t, 3>, 3>> indices)
- : vertices{vertices}, normals{normals}, vertices_data{vertices_data}, indices{indices} {
-}