aboutsummaryrefslogtreecommitdiff
path: root/src/vector.hpp
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-08-13 20:06:29 +0200
committerJulian T <julian@jtle.dk>2020-08-13 20:06:29 +0200
commit5b0b916c561f602723b9ae80f5462a7939b652a1 (patch)
tree6ee419f0dd1649b2c329585551f06a555a631db8 /src/vector.hpp
parent690b72664ca8d471f5c117f6ed87aeae2de0a208 (diff)
Pathtracing working with defuse and emissive lighting
Diffstat (limited to 'src/vector.hpp')
-rw-r--r--src/vector.hpp7
1 files changed, 7 insertions, 0 deletions
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 <iostream>
+
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;
};