From 56bed8e38f5b6d9effd77371ad781ae71601205b Mon Sep 17 00:00:00 2001 From: ladevieq Date: Mon, 21 Dec 2020 13:51:18 +0100 Subject: Add lambertian and metallic materials --- include/vec3.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/vec3.hpp') 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(); -- cgit v1.3