aboutsummaryrefslogtreecommitdiffstats
path: root/include/hittable.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/hittable.hpp
parent92d66138f53645f3400f633c9821a6fa36f589e0 (diff)
Add lambertian and metallic materials
Diffstat (limited to 'include/hittable.hpp')
-rw-r--r--include/hittable.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hittable.hpp b/include/hittable.hpp
index 4978e57..aa55034 100644
--- a/include/hittable.hpp
+++ b/include/hittable.hpp
@@ -1,13 +1,18 @@
#ifndef __HITTABLE_HPP_
#define __HITTABLE_HPP_
+#include <memory>
+
#include "ray.hpp"
+class material;
+
struct hit_info {
double t;
point3 point;
vec3 normal;
bool front_face;
+ std::shared_ptr<material> mat_ptr;
inline void set_face_normal(const ray& r, const vec3& outward_normal) {
front_face = r.direction.dot(outward_normal) < 0.0;