Represents a mesh material corresponding to Assimp's aiMaterial.
More...
#include <Material.h>
|
| static void | loadMaterialsFile (const char *const filename) |
| | Loads a supplement file mapping material names to texture images. More...
|
| |
Represents a mesh material corresponding to Assimp's aiMaterial.
| gpu_coverage::Material::Material |
( |
const aiMaterial *const |
material, |
|
|
size_t |
id, |
|
|
const std::string & |
dir |
|
) |
| |
Constructor.
- Parameters
-
| [in] | material | Assimp material structure. |
| [in] | id | Unique ID of this material. |
| [in] | dir | Directory for loading texture images. |
| const float* gpu_coverage::Material::getAmbient |
( |
| ) |
const |
|
inline |
Returns the ambient material color.
- Returns
- Ambient material color.
| const float* gpu_coverage::Material::getDiffuse |
( |
| ) |
const |
|
inline |
Returns the diffuse material color.
- Returns
- Diffuse material color.
| const size_t& gpu_coverage::Material::getId |
( |
| ) |
const |
|
inline |
Returns the unique ID of this material.
- Returns
- ID.
| const std::string& gpu_coverage::Material::getName |
( |
| ) |
const |
|
inline |
Returns the name of this material for logging.
- Returns
- Name of this material.
If available, the name included in the input file read by Assimp is used.
| float gpu_coverage::Material::getShininess |
( |
| ) |
const |
|
inline |
Returns the material's shininess coefficient.
- Returns
- Shininess coefficient.
| const float* gpu_coverage::Material::getSpecular |
( |
| ) |
const |
|
inline |
Returns the specular material color.
- Returns
- Specular material color.
| const Texture* gpu_coverage::Material::getTexture |
( |
| ) |
const |
|
inline |
Returns the diffuse texture if present, NULL otherwise.
- Returns
- Diffuse texture.
| bool gpu_coverage::Material::hasTexture |
( |
| ) |
const |
|
inline |
Returns true if a diffuse texture is assigned to the material.
- Returns
- True if diffuse texture is assigned.
| static void gpu_coverage::Material::loadMaterialsFile |
( |
const char *const |
filename | ) |
|
|
static |
Loads a supplement file mapping material names to texture images.
- Parameters
-
| void gpu_coverage::Material::setTexture |
( |
const Texture *const |
texture | ) |
|
|
inline |
Sets the texture.
- Parameters
-
The documentation for this class was generated from the following file: