GL Studio C++ Runtime API
Material Class Reference

#include <material.h>

Public Member Functions

void ApplyAmbient (GLenum face=GL_FRONT_AND_BACK)
 
void ApplyDiffuse (GLenum face=GL_FRONT_AND_BACK)
 
void ApplySpecular (GLenum face=GL_FRONT_AND_BACK)
 
void ApplyEmission (GLenum face=GL_FRONT_AND_BACK)
 
void ApplyShininess (GLenum face=GL_FRONT_AND_BACK)
 
void ApplyAll (GLenum face=GL_FRONT_AND_BACK)
 
bool InUse () const
 
void InUse (bool val)
 
const std::string & Name () const
 
void Name (const std::string &name)
 

Static Public Member Functions

static bool MaterialsAreEquivalent (const Material &m1, const Material &m2)
 

Public Attributes

GlsColor _ambient
 
GlsColor _diffuse
 
GlsColor _specular
 
GlsColor _emission
 
float _shininess
 
bool _inUse
 
std::string _name
 
ColorMaterialMode_e _colorMaterialMode
 

Static Public Attributes

static GlsColor _diffuseDefault
 
static GlsColor _specularDefault
 
static GlsColor _emissionDefault
 
static float _shininessDefault
 

Detailed Description

The Material class

Member Function Documentation

void ApplyAll ( GLenum  face = GL_FRONT_AND_BACK)

Applies all of the components of this material to the OpenGL pipeline

Parameters
faceWhich faces to apply this to (front, back or front and back faces)
void ApplyAmbient ( GLenum  face = GL_FRONT_AND_BACK)

Applies the ambient component of this material to the OpenGL pipeline

Parameters
faceWhich faces to apply this to (front, back or front and back faces)
void ApplyDiffuse ( GLenum  face = GL_FRONT_AND_BACK)

Applies the diffuse component of this material to the OpenGL pipeline

Parameters
faceWhich faces to apply this to (front, back or front and back faces)
void ApplyEmission ( GLenum  face = GL_FRONT_AND_BACK)

Applies the emission component of this material to the OpenGL pipeline

Parameters
faceWhich faces to apply this to (front, back or front and back faces)
void ApplyShininess ( GLenum  face = GL_FRONT_AND_BACK)

Applies the shininess component of this material to the OpenGL pipeline

Parameters
faceWhich faces to apply this to (front, back or front and back faces)
void ApplySpecular ( GLenum  face = GL_FRONT_AND_BACK)

Applies the specular component of this material to the OpenGL pipeline

Parameters
faceWhich faces to apply this to (front, back or front and back faces)
bool InUse ( ) const
Returns
True if this material is in use
void InUse ( bool  val)

Sets whether this material is in use

Parameters
valWhether this material is in use
static bool MaterialsAreEquivalent ( const Material m1,
const Material m2 
)
inlinestatic

Materials are equivalent if all of their parameters are the same

const std::string& Name ( ) const
Returns
The material name
void Name ( const std::string &  name)

Sets the material name

Parameters
nameThe material name

Member Data Documentation

GlsColor _ambient

The shininess value for the default material

ColorMaterialMode_e _colorMaterialMode

String name of the material

GlsColor _diffuse

Ambient component of the material

GlsColor _diffuseDefault
static

The ambient value for the default material

GlsColor _emission

Specular component of the material

GlsColor _emissionDefault
static

The specular value for the default material

bool _inUse

Shininess component of the material

std::string _name

True if the material is in use

float _shininess

Emission component of the material

float _shininessDefault
static

The emission value for the default material

GlsColor _specular

Diffuse component of the material

GlsColor _specularDefault
static

The diffuse value for the default material


The documentation for this class was generated from the following file: