aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/obj3d.h
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/obj3d.h
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/obj3d.h')
-rw-r--r--src/o3d/obj3d.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/o3d/obj3d.h b/src/o3d/obj3d.h
index 250b6bc..9f407f9 100644
--- a/src/o3d/obj3d.h
+++ b/src/o3d/obj3d.h
@@ -1,22 +1,15 @@
#ifndef O3D_OBJ3D_H
#define O3D_OBJ3D_H
-#include "math/vector.h"
+#include <type_traits>
+#include "math/tform.h"
#include "o3d/mesh.h"
namespace engine::o3d {
-class Scene;
-
-class Object3D {
- public:
- Scene* scene = nullptr;
- Mesh mesh;
- engine::math::Vector3 loc;
- float scale;
- float rot_x, rot_y, rot_z;
-
- Object3D(Mesh mesh, engine::math::Vector3 loc, float scale, float rot_x, float rot_y, float rot_z);
+struct Object3D {
+ Mesh mesh;
+ math::Transform transform;
};
}