INFO804 Introduction à l'informatique graphique
|
#include <Material.h>
Public Member Functions | |
Material () | |
Default constructor. | |
Material (Color amb, Color diff, Color spec, Real shiny=0.0f, Real cdiff=1.0f, Real crefl=0.0f, Real crefr=0.0f, Real in_ridx=1.0f, Real out_ridx=1.0f) | |
Constructor from colors and shinyness. | |
Static Public Member Functions | |
static Material | mix (Real t, const Material &m1, const Material &m2) |
Mixes two material (t=0 gives m1, t=1 gives m2, t=0.5 gives their average) | |
static Material | whitePlastic () |
static Material | redPlastic () |
static Material | bronze () |
static Material | emerald () |
static Material | glass () |
Public Attributes | |
Color | ambient |
ambient color | |
Color | diffuse |
diffuse color | |
Color | specular |
specular color | |
Real | shinyness |
shinyness (50: very high, 1: low ) | |
Real | coef_diffusion |
Real | coef_reflexion |
The material has some specularity if coef_reflexion > 0.0. | |
Real | coef_refraction |
The material is transparent if coef_refraction > 0.0. | |
Real | in_refractive_index |
Real | out_refractive_index |
Outside refractive index (1.0f if object is in the air otherwise >= 1.0f) | |
This structure stores the material associated to a graphical object. object should have.
Definition at line 18 of file Material.h.
|
inline |
|
inline |
Constructor from colors and shinyness.
Definition at line 64 of file Material.h.
|
inlinestatic |
Definition at line 100 of file Material.h.
|
inlinestatic |
Definition at line 115 of file Material.h.
|
inlinestatic |
Definition at line 129 of file Material.h.
Mixes two material (t=0 gives m1, t=1 gives m2, t=0.5 gives their average)
Definition at line 44 of file Material.h.
|
inlinestatic |
Definition at line 86 of file Material.h.
|
inlinestatic |
Definition at line 72 of file Material.h.
Color rt::Material::ambient |
ambient color
Definition at line 20 of file Material.h.
Real rt::Material::coef_diffusion |
The material is perfectly diffuse if coef_diffusion == 1.0, otherwise it may have reflexion / transparency properties.
Definition at line 32 of file Material.h.
Real rt::Material::coef_reflexion |
The material has some specularity if coef_reflexion > 0.0.
Definition at line 34 of file Material.h.
Real rt::Material::coef_refraction |
The material is transparent if coef_refraction > 0.0.
Definition at line 36 of file Material.h.
Color rt::Material::diffuse |
diffuse color
Definition at line 22 of file Material.h.
Real rt::Material::in_refractive_index |
Refractive index (1.0f in vacuum, 1.31 in ice, 1.52 window glass, 1.33 water Inside refractive index (for transparent medium) (>= 1.0f)
Definition at line 39 of file Material.h.
Real rt::Material::out_refractive_index |
Outside refractive index (1.0f if object is in the air otherwise >= 1.0f)
Definition at line 41 of file Material.h.
Real rt::Material::shinyness |
shinyness (50: very high, 1: low )
Definition at line 26 of file Material.h.
Color rt::Material::specular |
specular color
Definition at line 24 of file Material.h.