-
Notifications
You must be signed in to change notification settings - Fork 0
/
face.cpp
101 lines (84 loc) · 1.54 KB
/
face.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include "face.h"
#include "errorCodes.h"
CmFace::CmFace(const unsigned int &num,
const std::vector<unsigned int> &verticesNums,
int &error)
{
if(verticesNums.size() == 4)
{
m_verticesNums = verticesNums;
m_num = num;
error = ERR_NO_ERROR;
}
else
{
error = ERR_OUT_OF_RANGE;
}
}
bool CmFace::VerticesNums(const std::vector<unsigned int> &verticesNums)
{
if(verticesNums.size() > 4)
return false;
m_verticesNums = verticesNums;
return true;
}
std::vector<unsigned int> CmFace::VerticesNums()
{
return m_verticesNums;
}
unsigned int CmFace::GetIndex()
{
return m_num;
}
void CmFace::AddNeighbor(const unsigned int &neighborIndex)
{
m_neighbors.insert(neighborIndex);
}
void CmFace::RemoveNeighbor(const unsigned int &neighborIndex)
{
m_neighbors.erase(neighborIndex);
}
std::set<unsigned int> CmFace::GetNeighbors()
{
return m_neighbors;
}
void CmFace::SetMaterialIndex(const unsigned int &materialIndex)
{
m_materialIndex = materialIndex;
}
unsigned int CmFace::GetMaterialIndex()
{
return m_materialIndex;
}
void CmFace::BL(const unsigned int &index)
{
m_BL = index;
}
unsigned int CmFace::BL()
{
return m_BL;
}
void CmFace::BR(const unsigned int &index)
{
m_BR = index;
}
unsigned int CmFace::BR()
{
return m_BR;
}
void CmFace::TL(const unsigned int &index)
{
m_TL = index;
}
unsigned int CmFace::TL()
{
return m_TL;
}
void CmFace::TR(const unsigned int &index)
{
m_TR = index;
}
unsigned int CmFace::TR()
{
return m_TR;
}