#include <PhongMaterial.h>

Public Member Functions | |
| PhongMaterial () | |
| Standard constuctor. | |
| PhongMaterial (const PhongMaterial &source) | |
| Copy constructor. | |
| PhongMaterial (const GLfloat &r, const GLfloat &g, const GLfloat &b, const GLfloat &a) | |
| Constructor for diffuse initialization (0.0f - 1.0f). | |
| PhongMaterial (const GLint &r, const GLint &g, const GLint &b, const GLint &a) | |
| Constructor for diffuse initialization (0 - 255). | |
| PhongMaterial (const GLfloat &a_r, const GLfloat &a_g, const GLfloat &a_b, const GLfloat &a_a, const GLfloat &d_r, const GLfloat &d_g, const GLfloat &d_b, const GLfloat &d_a, const GLfloat &s_r, const GLfloat &s_g, const GLfloat &s_b, const GLfloat &s_a, const GLfloat &s) | |
| Constructor for initialization by value (0.0f - 1.0f). | |
| PhongMaterial (const GLint &a_r, const GLint &a_g, const GLint &a_b, const GLint &a_a, const GLint &d_r, const GLint &d_g, const GLint &d_b, const GLint &d_a, const GLint &s_r, const GLint &s_g, const GLint &s_b, const GLint &s_a, const GLfloat &s) | |
| Constructor for initialization by value (0 - 255). | |
| ~PhongMaterial () | |
| Standard destructor. | |
| const GLfloat | getARedf () const |
| Getter for ambient red (0.0f - 1.0f). | |
| const GLint | getARedi () const |
| Getter for ambient red (0 - 255). | |
| const GLfloat | getAGreenf () const |
| Getter for ambient green (0.0f - 1.0f). | |
| const GLint | getAGreeni () const |
| Getter for ambient green (0 - 255). | |
| const GLfloat | getABluef () const |
| Getter for ambient blue (0.0f - 1.0f). | |
| const GLint | getABluei () const |
| Getter for ambient blue (0 - 255). | |
| const GLfloat | getAAlphaf () const |
| Getter for ambient alpha (0.0f - 1.0f). | |
| const GLint | getAAlphai () const |
| Getter for ambient alpha (0 - 255). | |
| const GLfloat | getDRedf () const |
| Getter for diffuse red (0.0f - 1.0f). | |
| const GLint | getDRedi () const |
| Getter for diffuse red (0 - 255). | |
| const GLfloat | getDGreenf () const |
| Getter for diffuse green (0.0f - 1.0f). | |
| const GLint | getDGreeni () const |
| Getter for diffuse green (0 - 255). | |
| const GLfloat | getDBluef () const |
| Getter for diffuse blue (0.0f - 1.0f). | |
| const GLint | getDBluei () const |
| Getter for diffuse blue (0 - 255). | |
| const GLfloat | getDAlphaf () const |
| Getter for diffuse alpha (0.0f - 1.0f). | |
| const GLint | getDAlphai () const |
| Getter for diffuse alpha (0 - 255). | |
| const GLfloat | getSRedf () const |
| Getter for specular red (0.0f - 1.0f). | |
| const GLint | getSRedi () const |
| Getter for specular red (0 - 255). | |
| const GLfloat | getSGreenf () const |
| Getter for specular green (0.0f - 1.0f). | |
| const GLint | getSGreeni () const |
| Getter for specular green (0 - 255). | |
| const GLfloat | getSBluef () const |
| Getter for specular blue (0.0f - 1.0f). | |
| const GLint | getSBluei () const |
| Getter for specular blue (0 - 255). | |
| const GLfloat | getSAlphaf () const |
| Getter for specular alpha (0.0f - 1.0f). | |
| const GLint | getSAlphai () const |
| Getter for specular alpha (0 - 255). | |
| const GLfloat | getShininess () const |
| Getter for shininess. | |
| void | setARed (const GLfloat &r) |
| Setter for ambient red (0.0f - 1.0f). | |
| void | setARed (const GLint &r) |
| Setter for ambient red (0 - 255). | |
| void | setAGreen (const GLfloat &g) |
| Setter for ambient green (0.0f - 1.0f). | |
| void | setAGreen (const GLint &g) |
| Setter for ambient green (0 - 255). | |
| void | setABlue (const GLfloat &b) |
| Setter for ambient blue (0.0f - 1.0f). | |
| void | setABlue (const GLint &b) |
| Setter for ambient blue (0 - 255). | |
| void | setAAlpha (const GLfloat &a) |
| Setter for ambient blue (0.0f - 1.0f). | |
| void | setAAlpha (const GLint &a) |
| Setter for ambient blue (0 - 255). | |
| void | setAmbient (const GLfloat &r, const GLfloat &g, const GLfloat &b, const GLfloat &a) |
| Setter for ambient color (0.0f - 1.0f). | |
| void | setAmbient (const GLint &r, const GLint &g, const GLint &b, const GLint &a) |
| Setter for ambient color (0 - 255). | |
| void | setDRed (const GLfloat &r) |
| Setter for diffuse red (0.0f - 1.0f). | |
| void | setDRed (const GLint &r) |
| Setter for diffuse red (0 - 255). | |
| void | setDGreen (const GLfloat &g) |
| Setter for diffuse green (0.0f - 1.0f). | |
| void | setDGreen (const GLint &g) |
| Setter for diffuse green (0 - 255). | |
| void | setDBlue (const GLfloat &b) |
| Setter for diffuse blue (0.0f - 1.0f). | |
| void | setDBlue (const GLint &b) |
| Setter for diffuse blue (0 - 255). | |
| void | setDAlpha (const GLfloat &a) |
| Setter for diffuse blue (0.0f - 1.0f). | |
| void | setDAlpha (const GLint &a) |
| Setter for diffuse blue (0 - 255). | |
| void | setDiffuse (const GLfloat &r, const GLfloat &g, const GLfloat &b, const GLfloat &a) |
| Setter for diffuse color (0.0f - 1.0f). | |
| void | setDiffuse (const GLint &r, const GLint &g, const GLint &b, const GLint &a) |
| Setter for diffuse color (0 - 255). | |
| void | setSRed (const GLfloat &r) |
| Setter for specular red (0.0f - 1.0f). | |
| void | setSRed (const GLint &r) |
| Setter for specular red (0 - 255). | |
| void | setSGreen (const GLfloat &g) |
| Setter for specular green (0.0f - 1.0f). | |
| void | setSGreen (const GLint &g) |
| Setter for specular green (0 - 255). | |
| void | setSBlue (const GLfloat &b) |
| Setter for specular blue (0.0f - 1.0f). | |
| void | setSBlue (const GLint &b) |
| Setter for specular blue (0 - 255). | |
| void | setSAlpha (const GLfloat &a) |
| Setter for specular blue (0.0f - 1.0f). | |
| void | setSAlpha (const GLint &a) |
| Setter for specular blue (0 - 255). | |
| void | setSpecular (const GLfloat &r, const GLfloat &g, const GLfloat &b, const GLfloat &a) |
| Setter for specular color (0.0f - 1.0f). | |
| void | setSpecular (const GLint &r, const GLint &g, const GLint &b, const GLint &a) |
| Setter for specular color (0 - 255). | |
| void | setShininess (const GLfloat &s) |
| Getter for shininess. | |
| void | GLCommandsUseAsMaterial () |
| Use material in OpenGL. | |
| void | GLCommandsUseWithLight (const GLint &light) |
| Use material colors for light source. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
Static Private Member Functions | |
| static const GLfloat | clip (const GLfloat &original) |
| Clippes a float to 0.0f - 1.0f. | |
| static const GLint | clip (const GLint &original) |
| Clippes an int to 0 - 255. | |
| static const GLfloat | compress (const GLint &original) |
| Color space value compression GLint -> GLfloat. | |
| static const GLint | expand (const GLfloat &original) |
| Color space value expansion GLfloat -> GLint. | |
Private Attributes | |
| GLfloat | ambient [4] |
| Ambient color parameters. | |
| GLfloat | diffuse [4] |
| Diffuse color parameters. | |
| GLfloat | specular [4] |
| Specular color parameters. | |
| GLfloat | shine [1] |
| Shininess parameter. | |
This material can be used to render untextured objects or to set the parameters of a light source.
| PhongMaterial::PhongMaterial | ( | ) |
Standard constuctor.
Creates a new Phong material with standard values. This will be an white material with mostly diffuse qualities.
| PhongMaterial::PhongMaterial | ( | const PhongMaterial & | source | ) |
Copy constructor.
Creates a new material by reference. source The material to be copied
| PhongMaterial::PhongMaterial | ( | const GLfloat & | r, | |
| const GLfloat & | g, | |||
| const GLfloat & | b, | |||
| const GLfloat & | a | |||
| ) |
Constructor for diffuse initialization (0.0f - 1.0f).
Creates a new material of the provided color. This will be a material with mostly diffuse qualities. Values must not exceed 1.0f or under-run 0.0f. Invalid values will be clipped.
| r | The red channel of the diffuse color. | |
| g | The green channel of the diffuse color. | |
| b | The blue channel of the diffuse color. | |
| a | The alpha value (opacity) of the material. |
| PhongMaterial::PhongMaterial | ( | const GLint & | r, | |
| const GLint & | g, | |||
| const GLint & | b, | |||
| const GLint & | a | |||
| ) |
Constructor for diffuse initialization (0 - 255).
Creates a new material of the provided color. This will be a material with mostly diffuse qualities. Values must not exceed 255 or under-run 0. Invalid values will be clipped.
| r | The red channel of the diffuse color. | |
| g | The green channel of the diffuse color. | |
| b | The blue channel of the diffuse color. | |
| a | The alpha value (opacity) of the material. |
| PhongMaterial::PhongMaterial | ( | const GLfloat & | a_r, | |
| const GLfloat & | a_g, | |||
| const GLfloat & | a_b, | |||
| const GLfloat & | a_a, | |||
| const GLfloat & | d_r, | |||
| const GLfloat & | d_g, | |||
| const GLfloat & | d_b, | |||
| const GLfloat & | d_a, | |||
| const GLfloat & | s_r, | |||
| const GLfloat & | s_g, | |||
| const GLfloat & | s_b, | |||
| const GLfloat & | s_a, | |||
| const GLfloat & | s | |||
| ) |
Constructor for initialization by value (0.0f - 1.0f).
Creates a material with the provided values. The nine color values may not not exceed 1.0f or under-run 0.0f. The shineness must be 0.0f at least. Invalid values will be clipped.
| a_r | The red channel of the ambient color. | |
| a_g | The green channel of the ambient color. | |
| a_b | The blue channel of the ambient color. | |
| a_a | The alpha value (oppacity) of the ambient color. | |
| d_r | The red channel of the diffuse color. | |
| d_g | The green channel of the diffuse color. | |
| d_b | The blue channel of the diffuse color. | |
| d_a | The alpha value (oppacity) of the diffuse color. | |
| s_r | The red channel of the specular color. | |
| s_g | The green channel of the specular color. | |
| s_b | The blue channel of the specular color. | |
| s_a | The alpha value (oppacity) of the specular color. | |
| a | The shininess of the material. |
| PhongMaterial::PhongMaterial | ( | const GLint & | a_r, | |
| const GLint & | a_g, | |||
| const GLint & | a_b, | |||
| const GLint & | a_a, | |||
| const GLint & | d_r, | |||
| const GLint & | d_g, | |||
| const GLint & | d_b, | |||
| const GLint & | d_a, | |||
| const GLint & | s_r, | |||
| const GLint & | s_g, | |||
| const GLint & | s_b, | |||
| const GLint & | s_a, | |||
| const GLfloat & | s | |||
| ) |
Constructor for initialization by value (0 - 255).
Creates a material with the provided values. The nine color values may not exceed 255 or under-run 0. The shineness must be 0.0f at least. Invalid values will be clipped.
| a_r | The red channel of the ambient color. | |
| a_g | The green channel of the ambient color. | |
| a_b | The blue channel of the ambient color. | |
| a_a | The alpha value (oppacity) of the ambient color. | |
| d_r | The red channel of the diffuse color. | |
| d_g | The green channel of the diffuse color. | |
| d_b | The blue channel of the diffuse color. | |
| d_a | The alpha value (oppacity) of the diffuse color. | |
| s_r | The red channel of the specular color. | |
| s_g | The green channel of the specular color. | |
| s_b | The blue channel of the specular color. | |
| s_a | The alpha value (oppacity) of the specular color. | |
| a | The shininess of the material. |
| PhongMaterial::~PhongMaterial | ( | ) |
Standard destructor.
| const GLfloat PhongMaterial::clip | ( | const GLfloat & | original | ) | [static, private] |
Clippes a float to 0.0f - 1.0f.
Creates a clipped duplicate of the original value
| original | The value to be clipped |
| const GLint PhongMaterial::clip | ( | const GLint & | original | ) | [static, private] |
Clippes an int to 0 - 255.
Creates a clipped duplicate of the original value
| original | The value to be clipped |
| const GLfloat PhongMaterial::compress | ( | const GLint & | original | ) | [static, private] |
Color space value compression GLint -> GLfloat.
Converts a GLint from 0 - 255 (8-bit color) into a equivalent GLfloat ranging from 0.0f - 1.0f. Invalid parameters will be clipped.
| original | The original value to be compressed. |
| const GLint PhongMaterial::expand | ( | const GLfloat & | original | ) | [static, private] |
Color space value expansion GLfloat -> GLint.
Converts a GLfloat from 0.0f - 1.0f into a equivalent GLfloat ranging from 0 - 255 (8-bit color). Invalid parameters will be clipped.
| original | The original value to be compressed. |
| const GLfloat PhongMaterial::getARedf | ( | ) | const |
Getter for ambient red (0.0f - 1.0f).
| const GLint PhongMaterial::getARedi | ( | ) | const |
Getter for ambient red (0 - 255).
| const GLfloat PhongMaterial::getAGreenf | ( | ) | const |
Getter for ambient green (0.0f - 1.0f).
| const GLint PhongMaterial::getAGreeni | ( | ) | const |
Getter for ambient green (0 - 255).
| const GLfloat PhongMaterial::getABluef | ( | ) | const |
Getter for ambient blue (0.0f - 1.0f).
| const GLint PhongMaterial::getABluei | ( | ) | const |
Getter for ambient blue (0 - 255).
| const GLfloat PhongMaterial::getAAlphaf | ( | ) | const |
Getter for ambient alpha (0.0f - 1.0f).
| const GLint PhongMaterial::getAAlphai | ( | ) | const |
Getter for ambient alpha (0 - 255).
| const GLfloat PhongMaterial::getDRedf | ( | ) | const |
Getter for diffuse red (0.0f - 1.0f).
| const GLint PhongMaterial::getDRedi | ( | ) | const |
Getter for diffuse red (0 - 255).
| const GLfloat PhongMaterial::getDGreenf | ( | ) | const |
Getter for diffuse green (0.0f - 1.0f).
| const GLint PhongMaterial::getDGreeni | ( | ) | const |
Getter for diffuse green (0 - 255).
| const GLfloat PhongMaterial::getDBluef | ( | ) | const |
Getter for diffuse blue (0.0f - 1.0f).
| const GLint PhongMaterial::getDBluei | ( | ) | const |
Getter for diffuse blue (0 - 255).
| const GLfloat PhongMaterial::getDAlphaf | ( | ) | const |
Getter for diffuse alpha (0.0f - 1.0f).
| const GLint PhongMaterial::getDAlphai | ( | ) | const |
Getter for diffuse alpha (0 - 255).
| const GLfloat PhongMaterial::getSRedf | ( | ) | const |
Getter for specular red (0.0f - 1.0f).
| const GLint PhongMaterial::getSRedi | ( | ) | const |
Getter for specular red (0 - 255).
| const GLfloat PhongMaterial::getSGreenf | ( | ) | const |
Getter for specular green (0.0f - 1.0f).
| const GLint PhongMaterial::getSGreeni | ( | ) | const |
Getter for specular green (0 - 255).
| const GLfloat PhongMaterial::getSBluef | ( | ) | const |
Getter for specular blue (0.0f - 1.0f).
| const GLint PhongMaterial::getSBluei | ( | ) | const |
Getter for specular blue (0 - 255).
| const GLfloat PhongMaterial::getSAlphaf | ( | ) | const |
Getter for specular alpha (0.0f - 1.0f).
| const GLint PhongMaterial::getSAlphai | ( | ) | const |
Getter for specular alpha (0 - 255).
| const GLfloat PhongMaterial::getShininess | ( | ) | const |
Getter for shininess.
| void PhongMaterial::setARed | ( | const GLfloat & | r | ) |
Setter for ambient red (0.0f - 1.0f).
| r | The new red channel value for the ambient color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setARed | ( | const GLint & | r | ) |
Setter for ambient red (0 - 255).
| r | The new red channel value for the ambient color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setAGreen | ( | const GLfloat & | g | ) |
Setter for ambient green (0.0f - 1.0f).
| g | The new green channel value for the ambient color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setAGreen | ( | const GLint & | g | ) |
Setter for ambient green (0 - 255).
| g | The new green channel value for the ambient color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setABlue | ( | const GLfloat & | b | ) |
Setter for ambient blue (0.0f - 1.0f).
| b | The new blue channel value for the ambient color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setABlue | ( | const GLint & | b | ) |
Setter for ambient blue (0 - 255).
| b | The new blue channel value for the ambient color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setAAlpha | ( | const GLfloat & | a | ) |
Setter for ambient blue (0.0f - 1.0f).
| a | The new alpha value for the ambient color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setAAlpha | ( | const GLint & | a | ) |
Setter for ambient blue (0 - 255).
| a | The new alpha value for the ambient color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setAmbient | ( | const GLfloat & | r, | |
| const GLfloat & | g, | |||
| const GLfloat & | b, | |||
| const GLfloat & | a | |||
| ) |
Setter for ambient color (0.0f - 1.0f).
If the values are not in 0.0f - 1.0f they will be clipped.
| r | The new red channel value for the ambient color. | |
| g | The new green channel value for the ambient color. | |
| b | The new blue channel value for the ambient color. | |
| a | The new alpha value for the ambient color. |
| void PhongMaterial::setAmbient | ( | const GLint & | r, | |
| const GLint & | g, | |||
| const GLint & | b, | |||
| const GLint & | a | |||
| ) |
Setter for ambient color (0 - 255).
If the values are not in 0 - 255 they will be clipped.
| r | The new red channel value for the ambient color. | |
| g | The new green channel value for the ambient color. | |
| b | The new blue channel value for the ambient color. | |
| a | The new alpha value for the ambient color. |
| void PhongMaterial::setDRed | ( | const GLfloat & | r | ) |
Setter for diffuse red (0.0f - 1.0f).
| r | The new red channel value for the diffuse color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setDRed | ( | const GLint & | r | ) |
Setter for diffuse red (0 - 255).
| r | The new red channel value for the diffuse color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setDGreen | ( | const GLfloat & | g | ) |
Setter for diffuse green (0.0f - 1.0f).
| g | The new green channel value for the diffuse color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setDGreen | ( | const GLint & | g | ) |
Setter for diffuse green (0 - 255).
| g | The new green channel value for the diffuse color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setDBlue | ( | const GLfloat & | b | ) |
Setter for diffuse blue (0.0f - 1.0f).
| b | The new blue channel value for the diffuse color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setDBlue | ( | const GLint & | b | ) |
Setter for diffuse blue (0 - 255).
| b | The new blue channel value for the diffuse color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setDAlpha | ( | const GLfloat & | a | ) |
Setter for diffuse blue (0.0f - 1.0f).
| a | The new alpha value for the diffuse color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setDAlpha | ( | const GLint & | a | ) |
Setter for diffuse blue (0 - 255).
| a | The new alpha value for the diffuse color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setDiffuse | ( | const GLfloat & | r, | |
| const GLfloat & | g, | |||
| const GLfloat & | b, | |||
| const GLfloat & | a | |||
| ) |
Setter for diffuse color (0.0f - 1.0f).
If the values are not in 0.0f - 1.0f they will be clipped.
| r | The new red channel value for the diffuse color. | |
| g | The new green channel value for the diffuse color. | |
| b | The new blue channel value for the diffuse color. | |
| a | The new alpha value for the diffuse color. |
| void PhongMaterial::setDiffuse | ( | const GLint & | r, | |
| const GLint & | g, | |||
| const GLint & | b, | |||
| const GLint & | a | |||
| ) |
Setter for diffuse color (0 - 255).
If the values are not in 0 - 255 they will be clipped.
| r | The new red channel value for the diffuse color. | |
| g | The new green channel value for the diffuse color. | |
| b | The new blue channel value for the diffuse color. | |
| a | The new alpha value for the diffuse color. |
| void PhongMaterial::setSRed | ( | const GLfloat & | r | ) |
Setter for specular red (0.0f - 1.0f).
| r | The new red channel value for the specular color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setSRed | ( | const GLint & | r | ) |
Setter for specular red (0 - 255).
| r | The new red channel value for the specular color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setSGreen | ( | const GLfloat & | g | ) |
Setter for specular green (0.0f - 1.0f).
| g | The new green channel value for the specular color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setSGreen | ( | const GLint & | g | ) |
Setter for specular green (0 - 255).
| g | The new green channel value for the specular color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setSBlue | ( | const GLfloat & | b | ) |
Setter for specular blue (0.0f - 1.0f).
| b | The new blue channel value for the specular color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setSBlue | ( | const GLint & | b | ) |
Setter for specular blue (0 - 255).
| b | The new blue channel value for the specular color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setSAlpha | ( | const GLfloat & | a | ) |
Setter for specular blue (0.0f - 1.0f).
| a | The new alpha value for the specular color. If not in 0.0f - 1.0f the vallue will be clipped. |
| void PhongMaterial::setSAlpha | ( | const GLint & | a | ) |
Setter for specular blue (0 - 255).
| a | The new alpha value for the specular color. If not in 0 - 255 the vallue will be clipped. |
| void PhongMaterial::setSpecular | ( | const GLfloat & | r, | |
| const GLfloat & | g, | |||
| const GLfloat & | b, | |||
| const GLfloat & | a | |||
| ) |
Setter for specular color (0.0f - 1.0f).
If the values are not in 0.0f - 1.0f they will be clipped.
| r | The new red channel value for the specular color. | |
| g | The new green channel value for the specular color. | |
| b | The new blue channel value for the specular color. | |
| a | The new alpha value for the specular color. |
| void PhongMaterial::setSpecular | ( | const GLint & | r, | |
| const GLint & | g, | |||
| const GLint & | b, | |||
| const GLint & | a | |||
| ) |
Setter for specular color (0 - 255).
If the values are not in 0 - 255 they will be clipped.
| r | The new red channel value for the specular color. | |
| g | The new green channel value for the specular color. | |
| b | The new blue channel value for the specular color. | |
| a | The new alpha value for the specular color. |
| void PhongMaterial::setShininess | ( | const GLfloat & | s | ) |
Getter for shininess.
| a | The new alpha value for the shininess. High values will result more focussed highlights. Values must be greater than 0.0f, otherwise the Parameter will be clipped. |
| void PhongMaterial::GLCommandsUseAsMaterial | ( | ) |
Use material in OpenGL.
Orders OpenGL's state machine to use this material
| void PhongMaterial::GLCommandsUseWithLight | ( | const GLint & | light | ) |
Use material colors for light source.
Orders OpenGL's state machine to use this material's colors for the GL_AMBIENT, GL_DIFFUSE and GL_SPECULAR properties of the specified lightsource. Used internally by PhongLight
| light | The lightsource to be modified. |
| string PhongMaterial::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from Object.
| string PhongMaterial::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from Object.
| enum classId PhongMaterial::classId | ( | ) | const [virtual] |
GLfloat PhongMaterial::ambient[4] [private] |
Ambient color parameters.
GLfloat PhongMaterial::diffuse[4] [private] |
Diffuse color parameters.
GLfloat PhongMaterial::specular[4] [private] |
Specular color parameters.
GLfloat PhongMaterial::shine[1] [private] |
Shininess parameter.
1.5.6