aboutsummaryrefslogtreecommitdiffstats
path: root/include/vec3.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2020-12-21 13:51:18 +0100
committerladevieq <ladevie.quentin@gmail.com>2020-12-21 13:51:18 +0100
commit56bed8e38f5b6d9effd77371ad781ae71601205b (patch)
tree1f57155b8f5b15fd2b33ac7e926e3e5d0ce1754c /include/vec3.hpp
parent92d66138f53645f3400f633c9821a6fa36f589e0 (diff)
Add lambertian and metallic materials
Diffstat (limited to 'include/vec3.hpp')
-rw-r--r--include/vec3.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vec3.hpp b/include/vec3.hpp
index 7b0e469..317f99b 100644
--- a/include/vec3.hpp
+++ b/include/vec3.hpp
@@ -28,6 +28,8 @@ class vec3 {
vec3 unit() const;
+ bool near_zero() const;
+
static vec3 random();
static vec3 random(double min, double max);
@@ -49,6 +51,8 @@ vec3 operator*(double scale, vec3 u);
vec3 operator/(vec3 u, double scale);
+vec3 reflect(vec3 v, vec3 n);
+
std::ostream& operator<<(std::ostream& out, vec3 vec);
vec3 random_in_unit_sphere();