From 893176a0b18a2281abe09def716ccc3db5583c3f Mon Sep 17 00:00:00 2001 From: Julian T Date: Sun, 26 Jul 2020 12:56:27 +0200 Subject: Implemented object intersection and startet work on render gui --- src/vector.hpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/vector.hpp') diff --git a/src/vector.hpp b/src/vector.hpp index 6d15f34..76eb883 100644 --- a/src/vector.hpp +++ b/src/vector.hpp @@ -2,17 +2,23 @@ #define VECTOR_H class Vec3d { - Vec3d(); - Vec3d(double x, double y, double z); + public: + Vec3d(); + Vec3d(double x, double y, double z); - void set(double x, double y, double z); - void normalize(); + void set(double x, double y, double z); + void normalize(); - double length(); + double length() const; + double dot(const Vec3d &vec) const; - Vec3d cross(const Vec3d &vec); + Vec3d cross(const Vec3d &vec) const; - // Operators + // Operators + Vec3d operator-(const Vec3d &vec) const; + Vec3d operator-() const; + + double m_x, m_y, m_z; }; #endif -- cgit v1.2.3