GpuThesis::Material Class Reference

#include <Material.h>

List of all members.

Public Member Functions

 Material (EngineParameters::MaterialParams material)
float getKa () const
void setKa (float ka)
float getKd () const
void setKd (float kd)
float getKs () const
void setKs (float ks)
float getShininess () const
void setShininess (float shininess)
GLuint getTexture () const
void setTexture (GLuint texture)
bool getHasTexture () const
void setHasTexture (bool hasTexture)


Detailed Description

Material properties for a surface.


Constructor & Destructor Documentation

GpuThesis::Material::Material EngineParameters::MaterialParams  material  ) 
 

Initialize the material with the given parameters.

Parameters:
material the material parameters.


Member Function Documentation

bool GpuThesis::Material::getHasTexture  )  const
 

Check if the material has a texture.

Returns:
whether the material has a texture.

float GpuThesis::Material::getKa  )  const
 

Get the ambient coefficient of the material.

Returns:
the ambient coefficient.

float GpuThesis::Material::getKd  )  const
 

Get the diffuse coefficient of the material.

Returns:
the diffuse coefficient.

float GpuThesis::Material::getKs  )  const
 

Get the specular coefficient of the material.

Returns:
the specular coefficient.

float GpuThesis::Material::getShininess  )  const
 

Get the shininess of the material. Higher shininess causes sharper highlights.

Returns:
the shininess.

GLuint GpuThesis::Material::getTexture  )  const
 

Get the texture id of the material.

Returns:
the OpenGL texture id.

void GpuThesis::Material::setHasTexture bool  hasTexture  ) 
 

Set whether the material has a texture.

Parameters:
hasTexture whether the material has a texture.

void GpuThesis::Material::setKa float  ka  ) 
 

Set the ambient coefficient of the material.

Parameters:
ka the new ambient coefficient.

void GpuThesis::Material::setKd float  kd  ) 
 

Set the diffuse coefficient of the material.

Parameters:
kd the new diffuse coefficient.

void GpuThesis::Material::setKs float  ks  ) 
 

Set the specular coefficient of the material.

Parameters:
ks the new specular coefficient.

void GpuThesis::Material::setShininess float  shininess  ) 
 

Set the shininess of the material.

See also:
getShininess
Parameters:
shininess the new shininess.

void GpuThesis::Material::setTexture GLuint  texture  ) 
 

Set the texture id of the material.

Returns:
the OpenGL texture id.


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 08:42:50 2006 for GPU Thesis by  doxygen 1.4.6-NO