diff options
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 |