From cc6fb8c33637566a7b116d46440e6063f016deea Mon Sep 17 00:00:00 2001 From: vimene Date: Tue, 31 Dec 2024 03:40:14 +0100 Subject: 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 --- src/o3d/camera.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/o3d/camera.h') diff --git a/src/o3d/camera.h b/src/o3d/camera.h index 5d72d29..27c31eb 100644 --- a/src/o3d/camera.h +++ b/src/o3d/camera.h @@ -1,19 +1,12 @@ #ifndef O3D_CAMERA_H #define O3D_CAMERA_H -#include "math/vector.h" +#include "math/tform.h" namespace engine::o3d { -class Scene; - -class Camera { - public: - Scene* scene = nullptr; - engine::math::Vector3 loc; - float rot_x, rot_y, rot_z; // TODO: replace by quaternions - - Camera(engine::math::Vector3 loc, float rot_x, float rot_y, float rot_z); +struct Camera { + engine::math::Transform transform; }; } -- cgit v1.2.3