31 #ifndef INCLUDE_ARTICULATION_MATERIAL_H_ 32 #define INCLUDE_ARTICULATION_MATERIAL_H_ 34 #include <gpu_coverage/Texture.h> 35 #include <assimp/scene.h> 51 Material(
const aiMaterial *
const material,
size_t id,
const std::string& dir);
95 inline const std::string&
getName()
const {
float diffuse[4]
Diffuse color RGBA.
Definition: Material.h:145
Material(const aiMaterial *const material, size_t id, const std::string &dir)
Constructor.
const Texture * diffuseTexture
Diffuse texture if available, NULL otherwise.
Definition: Material.h:148
const std::string & getName() const
Returns the name of this material for logging.
Definition: Material.h:95
const float * getAmbient() const
Returns the ambient material color.
Definition: Material.h:61
float ambient[4]
Ambient color RGBA.
Definition: Material.h:144
static void loadMaterialsFile(const char *const filename)
Loads a supplement file mapping material names to texture images.
const std::string name
Name of this animation, see getName().
Definition: Material.h:143
float specular[4]
Specular color RGBA.
Definition: Material.h:146
Texture object.
Definition: Texture.h:46
bool hasTexture() const
Returns true if a diffuse texture is assigned to the material.
Definition: Material.h:103
const size_t id
Unique ID, see getId().
Definition: Material.h:142
const Texture * getTexture() const
Returns the diffuse texture if present, NULL otherwise.
Definition: Material.h:111
Definition: AbstractCamera.h:41
const float * getDiffuse() const
Returns the diffuse material color.
Definition: Material.h:69
void setTexture(const Texture *const texture)
Sets the texture.
Definition: Material.h:119
virtual ~Material()
Destructor.
const size_t & getId() const
Returns the unique ID of this material.
Definition: Material.h:137
float getShininess() const
Returns the material's shininess coefficient.
Definition: Material.h:85
Represents a mesh material corresponding to Assimp's aiMaterial.
Definition: Material.h:43
const float * getSpecular() const
Returns the specular material color.
Definition: Material.h:77
bool allocatedDiffuseTexture
True if this instance has allocated the texture and is responsible for deleting it later...
Definition: Material.h:149
float shininess
Shininess factor.
Definition: Material.h:147