CG-Project2
Loading...
Searching...
No Matches
Material Class Reference

Basic class to store material information for texturing and light computation. More...

#include <Component.hpp>

Public Member Functions

 Material ()=default
 Instances basic material.
 Material (const glm::vec3 &ambient, const glm::vec3 &diffuse, const glm::vec3 &specular, const float shininess, const std::string &name)
 Instances a material with the given data.
bool operator== (const Material &other)
 Overrides the equal operator, two materials are equal if they have the same name.

Public Attributes

glm::vec3 ambient {0.f}
 ambient vector
glm::vec3 diffuse {0.55f}
 diffuse vector
glm::vec3 specular {0.7f}
 specular vector
float shininess = 32.f
 material shininess
std::string name {"New Material"}
 material name

Detailed Description

Basic class to store material information for texturing and light computation.

Constructor & Destructor Documentation

◆ Material()

Material::Material ( const glm::vec3 & ambient,
const glm::vec3 & diffuse,
const glm::vec3 & specular,
const float shininess,
const std::string & name )
inline

Instances a material with the given data.

Parameters
ambienta glm::vec3 vector
diffusea glm::vec3 vector
speculara glm::vec3 vector
shininessmaterial' shininess value
namematerial's name

Member Function Documentation

◆ operator==()

bool Material::operator== ( const Material & other)
inline

Overrides the equal operator, two materials are equal if they have the same name.

Parameters
otherother material

The documentation for this class was generated from the following file: