diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 23:13:25 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 23:13:25 +0100 |
| commit | 8da53c5f262b09756e1a93257cdcd5be25807839 (patch) | |
| tree | c34344074ca8766dafcbf27958f571bf14c35315 /include/dielectric.hpp | |
| parent | 56bed8e38f5b6d9effd77371ad781ae71601205b (diff) | |
Movable and rotatable camera + dielectric materials
Diffstat (limited to 'include/dielectric.hpp')
| -rw-r--r-- | include/dielectric.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
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_ |
