h o m e | d o c u m e n t a t i o n | c l a s s h i e r a r c h y |
#include <Material.h>
Public Member Functions | |
Material () | |
Material (const float *iDiffuse, const float *iAmbiant, const float *iSpecular, const float *iEmission, const float iShininess) | |
Material (const Material &m) | |
virtual | ~Material () |
const float * | diffuse () const |
const float | diffuseR () const |
const float | diffuseG () const |
const float | diffuseB () const |
const float | diffuseA () const |
const float * | specular () const |
const float | specularR () const |
const float | specularG () const |
const float | specularB () const |
const float | specularA () const |
const float * | ambient () const |
const float | ambientR () const |
const float | ambientG () const |
const float | ambientB () const |
const float | ambientA () const |
const float * | emission () const |
const float | emissionR () const |
const float | emissionG () const |
const float | emissionB () const |
const float | emissionA () const |
const float | shininess () const |
void | SetDiffuse (const float r, const float g, const float b, const float a) |
void | SetSpecular (const float r, const float g, const float b, const float a) |
void | SetAmbient (const float r, const float g, const float b, const float a) |
void | SetEmission (const float r, const float g, const float b, const float a) |
void | SetShininess (const float s) |
Material | ( | ) | [inline] |
Default constructor
Material | ( | const float * | iDiffuse, | |
const float * | iAmbiant, | |||
const float * | iSpecular, | |||
const float * | iEmission, | |||
const float | iShininess | |||
) | [inline] |
Builds a Material from its diffuse, ambiant, specular, emissive colors and a shininess coefficient.
iDiffuse | A 4 element float-array containing the diffuse color. | |
iAmbiant | A 4 element float-array containing the ambiant color. | |
iSpecular | A 4 element float-array containing the specular color. | |
iEmission | A 4 element float-array containing the emissive color. | |
iShininess | The shininess coefficient. |
virtual ~Material | ( | ) | [inline, virtual] |
Destructor
const float* diffuse | ( | ) | const [inline] |
Returns the diffuse color as a 4 float array
const float diffuseR | ( | ) | const [inline] |
Returns the red component of the diffuse color
const float diffuseG | ( | ) | const [inline] |
Returns the green component of the diffuse color
const float diffuseB | ( | ) | const [inline] |
Returns the blue component of the diffuse color
const float diffuseA | ( | ) | const [inline] |
Returns the alpha component of the diffuse color
const float* specular | ( | ) | const [inline] |
Returns the specular color as a 4 float array
const float specularR | ( | ) | const [inline] |
Returns the red component of the specular color
const float specularG | ( | ) | const [inline] |
Returns the green component of the specular color
const float specularB | ( | ) | const [inline] |
Returns the blue component of the specular color
const float specularA | ( | ) | const [inline] |
Returns the alpha component of the specular color
const float* ambient | ( | ) | const [inline] |
Returns the ambiant color as a 4 float array
const float ambientR | ( | ) | const [inline] |
Returns the red component of the ambiant color
const float ambientG | ( | ) | const [inline] |
Returns the green component of the ambiant color
const float ambientB | ( | ) | const [inline] |
Returns the blue component of the ambiant color
const float ambientA | ( | ) | const [inline] |
Returns the alpha component of the ambiant color
const float* emission | ( | ) | const [inline] |
Returns the emissive color as a 4 float array
const float emissionR | ( | ) | const [inline] |
Returns the red component of the emissive color
const float emissionG | ( | ) | const [inline] |
Returns the green component of the emissive color
const float emissionB | ( | ) | const [inline] |
Returns the blue component of the emissive color
const float emissionA | ( | ) | const [inline] |
Returns the alpha component of the emissive color
const float shininess | ( | ) | const [inline] |
Returns the shininess coefficient
void SetDiffuse | ( | const float | r, | |
const float | g, | |||
const float | b, | |||
const float | a | |||
) | [inline] |
Sets the diffuse color.
r | Red component | |
g | Green component | |
b | Blue component | |
a | Alpha component |
void SetSpecular | ( | const float | r, | |
const float | g, | |||
const float | b, | |||
const float | a | |||
) | [inline] |
Sets the specular color.
r | Red component | |
g | Green component | |
b | Blue component | |
a | Alpha component |
void SetAmbient | ( | const float | r, | |
const float | g, | |||
const float | b, | |||
const float | a | |||
) | [inline] |
Sets the ambiant color.
r | Red component | |
g | Green component | |
b | Blue component | |
a | Alpha component |
void SetEmission | ( | const float | r, | |
const float | g, | |||
const float | b, | |||
const float | a | |||
) | [inline] |
Sets the emissive color.
r | Red component | |
g | Green component | |
b | Blue component | |
a | Alpha component |
void SetShininess | ( | const float | s | ) | [inline] |
Sets the shininess.
s | Shininess |