#include <CMaterial.h>
Public Member Functions | |
cMaterial () | |
Constructor of cMaterial. | |
~cMaterial () | |
Destructor of cMaterial. | |
virtual void | render () |
Render the material in OpenGL. | |
void | setShininess (GLuint a_shininess) |
Set shininess (the exponent used for specular lighting). | |
GLuint | getShininess () |
Get shininess. | |
void | setTransparencyLevel (float a_levelTransparency) |
set transparency level (sets the alpha value for all color properties) | |
void | setStiffness (double a_stiffness) |
set stiffness level [N/m] | |
double | getStiffness () const |
get stiffness level [N/m] | |
void | setStaticFriction (double a_friction) |
set static friction level | |
void | setDynamicFriction (double a_friction) |
set dynamic friction level | |
double | getStaticFriction () const |
get static friction level | |
double | getDynamicFriction () const |
get dynamic friction level | |
bool | isTransparent () const |
tells you whether this material includes partial transparency | |
void | print () const |
For debugging: prints the colors contained in this material. | |
Public Attributes | |
cColorf | m_ambient |
Ambient color. | |
cColorf | m_diffuse |
Diffuse color. | |
cColorf | m_specular |
Specular color. | |
cColorf | m_emission |
Emissive color. | |
GLuint | m_shininess |
OpenGL shininess. | |
Protected Attributes | |
double | m_stiffness |
Stiffness [netwons per meter]. | |
double | m_static_friction |
Static friction constant. | |
double | m_dynamic_friction |
Dynamic friction constant. |
Graphic properties include the OpenGL favorites:
ambient color, diffuse color, specular color, emissive color, and shininess
Haptic properties currently include stiffness, dynamic friction, and static friction
void cMaterial::render | ( | ) | [virtual] |
Render the material in OpenGL.
Render this material in OpenGL.
void cMaterial::setShininess | ( | GLuint | a_shininess | ) |
Set shininess (the exponent used for specular lighting).
Set the level of shininess. Value are clamped to range from 0 --> 128
a_shininess | Level of shininess |
void cMaterial::setTransparencyLevel | ( | float | a_levelTransparency | ) |
set transparency level (sets the alpha value for all color properties)
Set the transparency level (by setting the alpha value for all color properties)
a_levelTransparency | Level of transparency. |
void cMaterial::setStiffness | ( | double | a_stiffness | ) |
set stiffness level [N/m]
Set the level of stiffness. Clamped to be a non-negative value.
a_stiffness | Level of stiffness |
void cMaterial::setStaticFriction | ( | double | a_friction | ) |
set static friction level
Set the level of static friction. Clamped to be a non-negative value.
a_friction | Level of friction. |
void cMaterial::setDynamicFriction | ( | double | a_friction | ) |
set dynamic friction level
Set the level of dynamic friction. Clamped to be a non-negative value.
a_friction | Level of friction. |