-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextractBack.cpp
More file actions
47 lines (38 loc) · 1.31 KB
/
Copy pathextractBack.cpp
File metadata and controls
47 lines (38 loc) · 1.31 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
#include "extractBack.h"
#include "cubeface.h"
vector<Color> ExtractBack::extractLeftFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getRight();
if (!clockwise)
reverse(colors.begin(), colors.end());
return colors;
}
vector<Color> ExtractBack::extractRightFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getLeft();
if (!clockwise)
reverse(colors.begin(), colors.end());
return colors;
}
vector<Color> ExtractBack::extractTopFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getTop();
if (clockwise)
reverse(colors.begin(), colors.end());
return colors;
}
vector<Color> ExtractBack::extractBottomFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getBottom();
if (clockwise)
reverse(colors.begin(), colors.end());
return colors;
}
void ExtractBack::setLeftFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setRight(colors);
}
void ExtractBack::setRightFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setLeft(colors);
}
void ExtractBack::setTopFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setTop(colors);
}
void ExtractBack::setBottomFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setBottom(colors);
}