|
Ray Tracer Common Project
Image rendering program based on the ray tracing technique.
|
#include <material.hpp>
Public Member Functions | |
| Material (const color &diffuse, double reflexion=0.0, const photon &emission=photon(), const vector &disturbance=vector(0.0, 0.0, 1.0)) | |
| Make a new material. More... | |
| virtual color | diffuse (const element &e, const photon &external_light) const |
| Get the diffuse color of a surface element. More... | |
| virtual double | reflexion (const element &e, const photon &external_light) const |
| virtual photon | emission (const element &e, const photon &external_light) const |
| virtual vector | disturbance (const element &e, const photon &external_light) const |
Static Public Member Functions | |
| static Material * | defaultMaterial () |
| The default material. More... | |
Protected Attributes | |
| color | _diffuse |
| double | _reflexion |
| photon | _emission |
| vector | _disturbance |
Object material.
A material describes how a geometric element is rendered. More precisely, a material provides all informations needed by rt::ray to compute light comportement on a surface element.
A trivial attribute is the diffuse color of the material, the maner the material absorb the diffuse reflexion.
| rt::Material::Material | ( | const color & | diffuse, |
| double | reflexion = 0.0, |
||
| const photon & | emission = photon(), |
||
| const vector & | disturbance = vector(0.0, 0.0, 1.0) |
||
| ) |
Make a new material.
| diffuse | The material diffuse color. |
|
static |
The default material.
Get the diffuse color of a surface element.
| e | A surface element attached (or not) to this material. |
Reimplemented in rt::TexturedMaterial, and rt::DayNightMaterial.
1.8.15