From 8da53c5f262b09756e1a93257cdcd5be25807839 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Mon, 21 Dec 2020 23:13:25 +0100 Subject: Movable and rotatable camera + dielectric materials --- include/dielectric.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/dielectric.hpp (limited to 'include/dielectric.hpp') diff --git a/include/dielectric.hpp b/include/dielectric.hpp new file mode 100644 index 0000000..91f1541 --- /dev/null +++ b/include/dielectric.hpp @@ -0,0 +1,18 @@ +#ifndef __DIELECTRIC_HPP_ +#define __DIELECTRIC_HPP_ + +#include "material.hpp" + +class dielectric : public material { + public: + dielectric(double index_of_refraction); + + virtual bool scatter(const ray& r, const struct hit_info& info, color& attenuation, ray& scattered) const; + + double ior; + + private: + static double reflectance(double cosine, double ref_idx); +}; + +#endif // !__DIELECTRIC_HPP_ -- cgit v1.3