project: Global illumination pathtracer

Details

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.

  • last updated: August, 2018
Download source

Screenshots

scene_3smpls.bmp scene_1smpl_dark.bmp scene_30smpls.bmp

src > material.hpp

View raw
#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