#include <ThingMaterial.h>
Inherits Thing.
Inherited by ThingMaterialText.
Inheritance diagram for ThingMaterial:
Public Member Functions | |
ThingMaterial (void) | |
constructor | |
virtual | ~ThingMaterial (void) |
destructor | |
void | setAmbient (float red, float green, float blue, float intensity) |
set the ambient term of the material | |
void | setDiffuse (float red, float green, float blue, float intensity) |
set the diffuse term of the material | |
void | setSpecular (float red, float green, float blue, float intensity) |
set the specular term of the material | |
void | setColor (float red, float green, float blue, float alpha) |
set the color of the material, used if lighting is disabled | |
void | setShininess (float intensity) |
set the shininess of the material, default 50.0 | |
MaterialSettings | getAmbient () |
MaterialSettings | getDiffuse () |
MaterialSettings | getSpecular () |
float | getShininess () |
get the shininess of the material | |
int | addTexture (char *path, int mode=0) |
load the texture at path | |
void | switchTextureOnOff () |
switch the texture on or off | |
char * | getTexturePath () |
get the texture path | |
void | setBlendMode (int textureIndex, int blendMode) |
set the blend mode for a specific texture | |
void | enableLighting (bool) |
switch lighting on/off | |
void | init () |
write the initialization openGL code for init() | |
void | render () |
write the render openGL code for display() | |
void | finish () |
finish up the rendering, e.g. drop all set Attributes | |
Protected Attributes | |
float | color [4] |
float | ambient [4] |
float | diffuse [4] |
float | specular [4] |
float | shininess |
bool | lighting |
unsigned int | textureCount |
unsigned int | g_Texture [MATERIAL_MAX_TEXTURES] |
unsigned int | g_TextureBlendings [MATERIAL_MAX_TEXTURES] |
bool | texture |
char * | texturePath [MATERIAL_MAX_TEXTURES] |
Material Thing for the Scenegraph. Ambient, diffuse, specular term and shiniess can be set. Also Textures can be loaded, multitexturing is supported
|
constructor
|
|
destructor
|
|
load the texture at path
|
|
switch lighting on/off
|
|
finish up the rendering, e.g. drop all set Attributes
Reimplemented from Thing.
Reimplemented in ThingMaterialText.
|
|
|
|
|
|
get the shininess of the material
|
|
|
|
get the texture path
|
|
write the initialization openGL code for init()
Reimplemented from Thing.
Reimplemented in ThingMaterialText.
|
|
write the render openGL code for display()
Reimplemented from Thing.
Reimplemented in ThingMaterialText.
|
|
set the ambient term of the material
|
|
set the blend mode for a specific texture
|
|
set the color of the material, used if lighting is disabled
|
|
set the diffuse term of the material
|
|
set the shininess of the material, default 50.0
|
|
set the specular term of the material
|
|
switch the texture on or off
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|