A simple pathtracer program, capable of producing renderings of simple bodies. The program computes global illumination, by intersecting scene objects, such as luminaries and solid bodies, with idealised surface properies.
#ifndef RAYTRACER_MATERIAL_HPP
#define RAYTRACER_MATERIAL_HPP
#include "./color.hpp"
namespace raytracer
{
class material
{
public:
enum type {diffuse, specular, refractive};
material(){}
material(const double emission, const color& c): mult_emission(emission), material_color(c) {}
material(const color& c, material::type matType, double refractI= 3.0, const double emission= 0.0f): material_color(c), refract_index(refractI), mult_emission(emission), material_type(matType) {}
color material_color;
type material_type;
double refract_index;
double mult_emission;
};
}
#endif