From 5b0b916c561f602723b9ae80f5462a7939b652a1 Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 13 Aug 2020 20:06:29 +0200 Subject: Pathtracing working with defuse and emissive lighting --- src/vector.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vector.hpp') diff --git a/src/vector.hpp b/src/vector.hpp index 05de25c..20e8210 100644 --- a/src/vector.hpp +++ b/src/vector.hpp @@ -1,6 +1,8 @@ #ifndef VECTOR_H #define VECTOR_H +#include + class Vec3d { public: Vec3d(); @@ -16,9 +18,14 @@ class Vec3d { // Operators Vec3d operator+(const Vec3d &vec) const; + Vec3d& operator+=(const Vec3d &vec); Vec3d operator-(const Vec3d &vec) const; Vec3d operator-() const; Vec3d operator*(double) const; + Vec3d operator*(const Vec3d &vec) const; + Vec3d operator/(double) const; + + friend std::ostream& operator<<(std::ostream& os, const Vec3d &v); double m_x, m_y, m_z; }; -- cgit v1.2.3