describes material properties. A material can be either simple or "advanced" and in both cases it can be textured. A simple material is described by a 4-tuple of RGBA values. The advanced material defines multiple properties: diffuse, ambient, emissive, specular, shininess and transparency
More...
#include <Model3D.hpp>
|
| Material () |
| default constructor
|
|
| Material (const std::string &nam, float r, float g, float b, float a=1.0) |
| constructor for simple material
|
|
bool | hasTexture () const |
| Check if material has texture. More...
|
|
int | getTextureID () const |
| Get id of the texture for this material. More...
|
|
|
std::string | name |
| material name, not necesarily unique
|
|
bool | simplergb |
| true if this material is a simple material
|
|
short int | texId |
| index to a texture which is stored in Model3D, -1 if not used
|
|
float | rgb [4] |
| Red, Green, Blue and alpha color (simple) or diffues color(advanced)
|
|
float | ambient [4] |
| Ambient color as RGBA.
|
|
float | emissive [4] |
| Emissive color as RGBA.
|
|
float | specular [4] |
| Specular color as RGB.
|
|
float | shininess |
| The shininess \(\in [0,128] \).
|
|
float | transparency |
| Transparency \( in [0, 1]\).
|
|
describes material properties. A material can be either simple or "advanced" and in both cases it can be textured. A simple material is described by a 4-tuple of RGBA values. The advanced material defines multiple properties: diffuse, ambient, emissive, specular, shininess and transparency
◆ getTextureID()
int getTextureID |
( |
| ) |
const |
|
inline |
Get id of the texture for this material.
- Returns
- the texture id.
◆ hasTexture()
bool hasTexture |
( |
| ) |
const |
|
inline |
Check if material has texture.
- Returns
- true if material has texture.
The documentation for this struct was generated from the following file: