From 921f274fbe5e795fb3117a69b255f613409def60 Mon Sep 17 00:00:00 2001 From: Yoel <s73017@beuth-hochschule.de> Date: Tue, 6 Oct 2020 17:27:07 +0200 Subject: [PATCH] DiffuseMaterial refactored as it needs the Random-functions --- RayTracer/material/DiffuseMaterial.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RayTracer/material/DiffuseMaterial.cpp b/RayTracer/material/DiffuseMaterial.cpp index 64eb1a0..c3ee2c9 100644 --- a/RayTracer/material/DiffuseMaterial.cpp +++ b/RayTracer/material/DiffuseMaterial.cpp @@ -1,5 +1,6 @@ #include "DiffuseMaterial.h" +#include "../tools/Random.h" #include "texture/Constant.h" namespace material { @@ -27,7 +28,7 @@ util::Vec3 DiffuseMaterial::emission(float texel_x, float texel_y) const { } util::Vec3 DiffuseMaterial::scattered_d(const util::Vec3& d, const util::Vec3& n) const { - return n + rand_vec3_in_circle(1); + return n + util::rand_vec3_in_circle(1); } bool DiffuseMaterial::scatter() const { return true; -- GitLab