CG-Project2
Loading...
Searching...
No Matches
systems::material Namespace Reference

All utilities to manage entity material. More...

Functions

Material getMaterial (const unsigned int &id)
 Retrieves the material of the given entity.
std::string getMaterialName (const unsigned int &id)
 Retrieves the material name of the entity given.
void updateAmbient (const unsigned int &id, const glm::vec3 &val)
 Updates the ambient vector of a material.
void updateDiffuse (const unsigned int &id, const glm::vec3 &val)
 Updates the diffuse vector of a material.
void updateSpecular (const unsigned int &id, const glm::vec3 &val)
 Updates the specular vector of a material.
void updateShininess (const unsigned int &id, const float &val)
 Updates the shininess value of a material.
void updateMaterial (const unsigned int &id, const Material &material)
 Updates the material of the entity given.

Detailed Description

All utilities to manage entity material.

See also
MaterialComponent
Material

Function Documentation

◆ getMaterial()

Material systems::material::getMaterial ( const unsigned int & id)

Retrieves the material of the given entity.

Parameters
idthe entity id
Returns
the material of the entity

◆ getMaterialName()

std::string systems::material::getMaterialName ( const unsigned int & id)

Retrieves the material name of the entity given.

Parameters
idthe entity id
Returns
the name of the material

◆ updateAmbient()

void systems::material::updateAmbient ( const unsigned int & id,
const glm::vec3 & val )

Updates the ambient vector of a material.

Parameters
idthe entity id
valthe ambient value

◆ updateDiffuse()

void systems::material::updateDiffuse ( const unsigned int & id,
const glm::vec3 & val )

Updates the diffuse vector of a material.

Parameters
idthe entity id
valthe diffuse value

◆ updateMaterial()

void systems::material::updateMaterial ( const unsigned int & id,
const Material & material )

Updates the material of the entity given.

Parameters
idthe entity id
materialthe new material

◆ updateShininess()

void systems::material::updateShininess ( const unsigned int & id,
const float & val )

Updates the shininess value of a material.

Parameters
idthe entity id
valthe shininess value

◆ updateSpecular()

void systems::material::updateSpecular ( const unsigned int & id,
const glm::vec3 & val )

Updates the specular vector of a material.

Parameters
idthe entity id
valthe specular value