-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMaterial.cpp
More file actions
62 lines (46 loc) · 986 Bytes
/
Copy pathMaterial.cpp
File metadata and controls
62 lines (46 loc) · 986 Bytes
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
/*
* Material.cpp
*
* Created on: Oct 22, 2015
* Author: hugocm93
*/
#include "Material.h"
Material::Material(string name, ColorRGB* kd, ColorRGB*ks, float especular, float reflexCoeficient, float refractionIndex, float opacity, Texture* texture){
this->name = name;
this->kd = kd;
this->ks = ks;
this->especular = especular;
this->reflexCoeficient = reflexCoeficient;
this->refractionIndex = refractionIndex;
this->opacity = opacity;
this->texture = texture;
}
Material::~Material() {
delete kd;
delete ks;
delete texture;
}
string Material::getName(){
return this->name;
}
float Material::getEspecular(){
return especular;
}
ColorRGB* Material::getKd(){
return kd;
}
ColorRGB* Material::getKs(){
return ks;
}
float Material::getOpacity(){
return opacity;
}
float Material::getReflexCoeficient(){
return reflexCoeficient;
}
float Material::getRefractionIndex(){
return refractionIndex;
}
Texture* Material::getTexture(){
return texture;
}