-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCara.cpp
More file actions
64 lines (53 loc) · 1.28 KB
/
Cara.cpp
File metadata and controls
64 lines (53 loc) · 1.28 KB
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
64
// Cara.cpp: implementation of the Cara class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Cara.h"
#include "Punto3D.h"
#define epsilon 0.1
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Cara::Cara(Punto3D * c1, Punto3D * c2, Punto3D * c3) {
this->c1 = c1;
this->c2 = c2;
this->c3 = c3;
this->v = 1;
listaCaras[0] = c1;
listaCaras[1] = c2;
listaCaras[2] = c3;
numCaras = 3;
}
Cara::Cara(Punto3D * c1, Punto3D * c2, Punto3D * c3, Punto3D * c4) {
this->c1 = c1;
this->c2 = c2;
this->c3 = c3;
this->c4 = c4;
this->v = 1;
listaCaras[0] = c1;
listaCaras[1] = c2;
listaCaras[2] = c3;
listaCaras[3] = c4;
numCaras = 4;
}
Cara::Cara(Punto3D * c1, Punto3D * c2, Punto3D * c3, Punto3D * c4, Punto3D * c5) {
this->c1 = c1;
this->c2 = c2;
this->c3 = c3;
this->c4 = c4;
this->c5 = c5;
this->v = 1;
listaCaras[0] = c1;
listaCaras[1] = c2;
listaCaras[2] = c3;
listaCaras[3] = c4;
listaCaras[4] = c5;
numCaras = 5;
}
Cara::Cara() { }
Cara::~Cara() { }
int Cara::modVisible(int v) {
if (this->v == v) return -1;
this->v = v;
return 0;
}