-
Notifications
You must be signed in to change notification settings - Fork 0
/
Material.cpp
63 lines (53 loc) · 907 Bytes
/
Material.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "Material.h"
void Material::setEmission(float r, float g, float b, float a)
{
emission[0] = r;
emission[1] = g;
emission[2] = b;
emission[3] = a;
}
void Material::setAmbient(float r, float g, float b, float a)
{
ambient[0] = r;
ambient[1] = g;
ambient[2] = b;
ambient[3] = a;
}
void Material::setDiffuse(float r, float g, float b, float a)
{
diffuse[0] = r;
diffuse[1] = g;
diffuse[2] = b;
diffuse[3] = a;
}
void Material::setSpecular(float r, float g, float b, float a)
{
specular[0] = r;
specular[1] = g;
specular[2] = b;
specular[3] = a;
}
void Material::setShininess(float sh)
{
shininess[0] = sh;
}
float* Material::getEmission()
{
return emission;
}
float* Material::getAmbient()
{
return ambient;
}
float* Material::getDiffuse()
{
return diffuse;
}
float* Material::getSpecular()
{
return specular;
}
float* Material::getShininess()
{
return shininess;
}