diff options
author | Julian T <julian@jtle.dk> | 2020-07-26 12:56:27 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-07-26 12:56:27 +0200 |
commit | 893176a0b18a2281abe09def716ccc3db5583c3f (patch) | |
tree | a34da79b7dc0fcdbdd39e2a3f4000cc6a1c0a896 /src/vector.hpp | |
parent | 18960c4b88ce912e08b12182b835a7de75388b78 (diff) |
Implemented object intersection and startet work on render gui
Diffstat (limited to 'src/vector.hpp')
-rw-r--r-- | src/vector.hpp | 20 |
1 files changed, 13 insertions, 7 deletions
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 |