#include <lvt/Material.h>
Inheritance diagram for Material:
Use the Material class to specify material properties for use with the OpenGL lighting model. Some common material properties are provided with the MaterialType enum, which can be passed into the Material constructor, or set with a call to SetType.
Public Types | |
enum | MaterialType { CUSTOM = 0, BRASS, BRONZE, POLISHED_BRONZE, CHROME, COPPER, POLISHED_COPPER, GOLD, POLISHED_GOLD, PEWTER, SILVER, POLISHED_SILVER, EMERALD, JADE, OBSIDIAN, PEARL, RUBY, TURQUOISE, BLACK_PLASTIC, BLACK_RUBBER } |
Pre-defined material types. More... | |
Public Member Functions | |
Material (MaterialType type=CUSTOM) | |
Constructs the new material using the specified material type. | |
virtual void | Render () |
Renders the object. | |
void | SetFace (GLenum face) |
Sets which type of face (front-facing or back-facing) the Material applies to. | |
void | SetShininess (float s) |
Sets the shininess of the material. | |
void | SetType (MaterialType type) |
Sets the Material properties to that of the specified type. | |
void | SetAmbient (float r, float g, float b, float a=1.0f) |
Sets the ambient component. | |
void | SetAmbient (const Vec &v) |
Sets the ambient component. | |
void | SetColor (float r, float g, float b, float a=1.0f) |
Sets the ambient, diffuse, and specular components. | |
void | SetColor (const Vec &v) |
Sets the ambient, diffuse, and specular components. | |
void | SetDiffuse (float r, float g, float b, float a=1.0f) |
Sets the diffuse component. | |
void | SetDiffuse (const Vec &v) |
Sets the diffuse component. | |
void | SetEmission (float r, float g, float b, float a=1.0f) |
Sets the emissive component. | |
void | SetEmission (const Vec &v) |
Sets the emissive component. | |
void | SetSpecular (float r, float g, float b, float a=1.0f) |
Sets the specular component. | |
void | SetSpecular (const Vec &v) |
Sets the specular component. |
|
|
Constructs the new material using the specified material type. The custom material type (the default) corresponds to an ambient component of (0.2, 0.2, 0.2, 1.0), a diffuse component of (0.8, 0.8, 0.8, 1.0) and no specular component. |
|
Renders the object. Draws the object and/or modifies the OpenGL state appropriately. Implements Node. |
|
Sets the ambient component.
|
|
Sets the ambient component.
|
|
Sets the ambient, diffuse, and specular components.
|
|
Sets the ambient, diffuse, and specular components.
|
|
Sets the diffuse component.
|
|
Sets the diffuse component.
|
|
Sets the emissive component.
|
|
Sets the emissive component.
|
|
Sets which type of face (front-facing or back-facing) the Material applies to.
|
|
Sets the shininess of the material.
|
|
Sets the specular component.
|
|
Sets the specular component.
|
|
Sets the Material properties to that of the specified type.
|