-
Notifications
You must be signed in to change notification settings - Fork 1
/
objeto.hpp
executable file
·51 lines (46 loc) · 1.08 KB
/
objeto.hpp
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
#ifndef _OBJETO_HPP_
#define _OBJETO_HPP_
#include "alumiador.hpp"
#include <math.h>
class Objeto{
public:
virtual double tVal(vec, vec) = 0;
virtual vec getNormal(vec, vec, double) = 0;
virtual uvec getDifuseColor() = 0;
virtual uvec getSpecColor() = 0;
virtual double getShineness() = 0;
};
class Esfera : public Objeto{
public:
Esfera(vec, double, uvec={255,255,255}, uvec={255,255,255}, double = 1.0);
double tVal(vec, vec);
vec getNormal(vec, vec, double);
uvec getDifuseColor();
uvec getSpecColor();
double getShineness();
private:
vec centro;
double raio;
uvec cor;
uvec specCor;
double shineness;
};
class Triangulo : public Objeto{
public:
Triangulo(vec, vec, vec, uvec={200,200,200}, uvec={200,200,200}, double = 20.0, vec={0.0, 0.0, 0.0}, vec={0.0, 0.0, 0.0}, vec={0.0, 0.0, 0.0});
double tVal(vec, vec);
vec getNormal(vec, vec, double);
uvec getDifuseColor();
uvec getSpecColor();
double getShineness();
private:
double getBeta(vec, vec);
double getGama(vec, vec);
double getA(vec);
vec a, b, c;
vec nA, nB, nC;
uvec cor;
uvec specCor;
double shineness;
};
#endif