CMaterial Class Reference

A collection of OpenGL material parameters. More...

#include <light.h>

List of all members.

Public Member Functions

 CMaterial (void)
 Constructs a CMaterial object.
vec4_t getEmission (void) const
 Reads emission color.
void setEmission (const vec4_t &v)
 Writes emission color.
vec4_t getAmbient (void) const
 Reads ambient color.
void setAmbient (const vec4_t &v)
 Writes ambient color.
vec4_t getDiffuse (void) const
 Reads diffuse color.
void setDiffuse (const vec4_t &v)
 Writes diffuse colors.
vec4_t getSpecular (void) const
 Reads specular color.
void setSpecular (const vec4_t &v)
 Writes specular color.
float getSpecularExponent (void) const
 Reads the specular exponent.
void setSpecularExponent (float f)
 Writes the specular exponent.
bool getUseVertexColor (void) const
 Reads the use-vertex-color flag.
void setUseVertexColor (bool enable)
 Writes the use-vertex-color flag.


Detailed Description

A collection of OpenGL material parameters.

This class allows storing the most important OpenGL material parameters like colors and the specular exponent. It also supports a flag, wether the diffuse color should be taken form the current vertex color instead of the diffuse color stored. The initial state of the lighting parameters is the same like that defined in the OpenGL specification.

The methods of this class are only used for reading/writing material parameters and have no side effects. That's why they are less documented.


Constructor & Destructor Documentation

CMaterial::CMaterial ( void   )  [inline]

Constructs a CMaterial object.

It initializes all colors to back (0,0,0,0) and the specular exponent to zero. The use-vertex-color flag is set to False.


The documentation for this class was generated from the following file:
Generated on Sun Mar 2 17:12:32 2008 for Shader Maker by  doxygen 1.5.4