In file graphics3D/Material.h:

class Material

OpenGL Material

Inheritance:


Public Fields

static const char* synopsis
-material option synopsis

Public Methods

void setMaterial (const GLfloat *ambient, const GLfloat *diffuse, const GLfloat *specular, GLfloat shininess)
set a material
void setMaterial (const Color& color)
set a material from a new color
void setAmbient (const GLfloat *ambient)
set ambient material coefficients
void setDiffuse (const GLfloat *diffuse)
set diffuse material coefficients
void setSpecular (const GLfloat *specular)
set specular material coefficients
void setShininess (const GLfloat shininess)
set material shininess
void setEmission (const GLfloat *specular)
set emission material coefficients
void setLight (bool l)
returns lighted flag
void setAlpha (double alpha)
set material transparency
void glSet (void)
recomputes if needed executes material display list
const GLfloat* getAmbient (void) const
returns material ambient light coefficients
const GLfloat* getDiffuse (void) const
returns material diffuse light coefficients
const GLfloat* getSpecular (void) const
returns material specular light coefficients
GLfloat getShininess (void) const
returns material shininess
const GLfloat* getEmission (void) const
returns material specular light coefficients
bool getLight (void) const
returns lighted flag
double getAlpha (void) const
returns material transparency coefficient
int materialCmd (TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-material TCL command

Public

constructors
Material ()
default material
Material (const GLfloat *ambient, const GLfloat *diffuse, const GLfloat *specular, GLfloat shininess)
creates a new material
Material (const Color& color)
set a material from a new color
destructor
~Material ()
destroys display list

Protected Fields

GLfloat ambient [4]
material ambient light coefficients
GLfloat diffuse [4]
material diffuse light coefficients
GLfloat specular [4]
material specular light coefficients
GLfloat shininess
material shininess
GLfloat emission [4]
material light emission coefficients
GLuint list
display list index
bool lighted
emissive light flag

Documentation

OpenGL Material
GLfloat ambient[4]
material ambient light coefficients

GLfloat diffuse[4]
material diffuse light coefficients

GLfloat specular[4]
material specular light coefficients

GLfloat shininess
material shininess

GLfloat emission[4]
material light emission coefficients

GLuint list
display list index

bool lighted
emissive light flag

constructors

Material()
default material

Material(const GLfloat *ambient, const GLfloat *diffuse, const GLfloat *specular, GLfloat shininess)
creates a new material
Parameters:
ambient - material ambient light reflexion 4 coefficients
diffuse - material diffuse light reflexion 4 coefficients
specular - material specular light reflexion 4 coefficients
shininess - material shininess

Material(const Color& color)
set a material from a new color
Parameters:
color - material color

destructor

~Material()
destroys display list

void setMaterial(const GLfloat *ambient, const GLfloat *diffuse, const GLfloat *specular, GLfloat shininess)
set a material
Parameters:
ambient - material ambient light reflexion 4 coefficients
diffuse - material diffuse light reflexion 4 coefficients
specular - material specular light reflexion 4 coefficients
shininess - material shininess

void setMaterial(const Color& color)
set a material from a new color
Parameters:
color - material color

void setAmbient(const GLfloat *ambient)
set ambient material coefficients
Parameters:
ambient - 4 coefficients array

void setDiffuse(const GLfloat *diffuse)
set diffuse material coefficients
Parameters:
diffuse - 4 coefficients array

void setSpecular(const GLfloat *specular)
set specular material coefficients
Parameters:
specular - 4 coefficients array

void setShininess(const GLfloat shininess)
set material shininess
Parameters:
shininess - material shininess

void setEmission(const GLfloat *specular)
set emission material coefficients
Parameters:
specular - 4 coefficients array

void setLight(bool l)
returns lighted flag
Parameters:
l - new light state

void setAlpha(double alpha)
set material transparency
Parameters:
alpha - transparency factor (0 is opaque and 1 is invisible)

void glSet(void)
recomputes if needed executes material display list

const GLfloat* getAmbient(void) const
returns material ambient light coefficients

const GLfloat* getDiffuse(void) const
returns material diffuse light coefficients

const GLfloat* getSpecular(void) const
returns material specular light coefficients

GLfloat getShininess(void) const
returns material shininess

const GLfloat* getEmission(void) const
returns material specular light coefficients

bool getLight(void) const
returns lighted flag

double getAlpha(void) const
returns material transparency coefficient

int materialCmd(TclModule *m, Data3D *data, int argc, char **argv, int i = 0)
-material TCL command

static const char* synopsis
-material option synopsis


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de