cMaterial Class Reference

cMaterial describes the graphic and haptic properties of a solid. More...

#include <CMaterial.h>

List of all members.

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.


Detailed Description

cMaterial describes the graphic and haptic properties of a solid.

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


Member Function Documentation

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

Parameters:
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)

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
a_friction Level of friction.


The documentation for this class was generated from the following files:
Generated on Mon Jun 11 09:41:47 2007 for CHAI 3D by  doxygen 1.5.2