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

Enumerations

enum  MaterialType : unsigned int {
  MATERIAL_NONE = 0 , MATERIAL_RPLASTIC , MATERIAL_YPLASTIC , MATERIAL_SLATE ,
  MATERIAL_BRASS , MATERIAL_EMERALD
}
 Enum for materials declared as unsigned int. More...

Functions

Material getMaterialFromPool (const MaterialType &index)
 Retrieves the material by the given type or from a simple index from the defaultMaterials vector.

Variables

std::vector< unsigned int > materialTypes {MATERIAL_NONE, MATERIAL_RPLASTIC, MATERIAL_YPLASTIC, MATERIAL_SLATE, MATERIAL_BRASS, MATERIAL_EMERALD}
 initial material types
std::vector< MaterialdefaultMaterials
 vector containing default start materials

Detailed Description

Namespace containing all material utilities.

Enumeration Type Documentation

◆ MaterialType

enum material::MaterialType : unsigned int

Enum for materials declared as unsigned int.

In this enum each value is an unsigned int so it can be used like index to select an element from materials pool.

Function Documentation

◆ getMaterialFromPool()

Material material::getMaterialFromPool ( const MaterialType & index)
inline

Retrieves the material by the given type or from a simple index from the defaultMaterials vector.

Parameters
indexthe index or MaterialType
See also
MaterialType

Variable Documentation

◆ defaultMaterials

std::vector<Material> material::defaultMaterials
inline
Initial value:
= {
Material(glm::vec3(1.0f), glm::vec3(1.0f), glm::vec3(1.0f), 32.0f, "None"),
Material(glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.5f, 0.0f, 0.0f), glm::vec3(0.7f, 0.6f, 0.6f), 32.0f, "Red Plastic"),
Material(glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.5f, 0.5f, 0.0f), glm::vec3(0.60f, 0.60f, 0.50f), 32.0f, "Yellow Plastic"),
Material(glm::vec3(0.02f, 0.02f, 0.02f), glm::vec3(0.1f, 0.1f, 0.1f), glm::vec3(0.4f, 0.4f, 0.4f), 1.78125f, "Slate"),
Material(glm::vec3(0.329412f, 0.223529f, 0.027451f), glm::vec3(0.780392f, 0.568627f, 0.113725f), glm::vec3(0.992157f, 0.941176f, 0.807843f), 27.8974f, "Brass"),
Material(glm::vec3(0.0215f, 0.1745f, 0.0215f), glm::vec3(0.07568f, 0.61424f, 0.07568f), glm::vec3(0.633f, 0.727811f, 0.633f), 76.8f, "Emerald"),
}
Basic class to store material information for texturing and light computation.
Definition Component.hpp:635

vector containing default start materials

◆ materialTypes

std::vector<unsigned int> material::materialTypes {MATERIAL_NONE, MATERIAL_RPLASTIC, MATERIAL_YPLASTIC, MATERIAL_SLATE, MATERIAL_BRASS, MATERIAL_EMERALD}
inline

initial material types

See also
MaterialType