39 lines
659 B
C++
39 lines
659 B
C++
#include "Material.h"
|
|
|
|
using namespace std;
|
|
|
|
Material::Material()
|
|
{
|
|
this->ca = glm::vec3(0.3f,0.3f,0.3f);
|
|
this->cd = glm::vec3(0.3f,0.3f,0.3f);
|
|
this->cs = glm::vec3(1.0f,1.0f,1.0f);
|
|
this->shine = 0.0f;
|
|
}
|
|
|
|
void Material::setMaterial(glm::vec3 a, glm::vec3 d, glm::vec3 s, float sh)
|
|
{
|
|
this->ca = a;
|
|
this->cd = d;
|
|
this->cs = s;
|
|
this->shine = sh;
|
|
}
|
|
|
|
glm::vec3 Material::getAmbient()
|
|
{
|
|
return this->ca;
|
|
}
|
|
|
|
glm::vec3 Material::getDiffuse()
|
|
{
|
|
return this->cd;
|
|
}
|
|
|
|
glm::vec3 Material::getSpecular()
|
|
{
|
|
return this->cs;
|
|
}
|
|
|
|
float Material::getShiny()
|
|
{
|
|
return this->shine;
|
|
}
|