-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextractLeft.cpp
42 lines (34 loc) · 1.2 KB
/
extractLeft.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
#include "extractLeft.h"
#include "cubeface.h"
vector<Color> ExtractLeft::extractLeftFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getRight();
reverse(colors.begin(), colors.end());
return colors;
}
vector<Color> ExtractLeft::extractRightFace(CubeFace* cubeface, bool clockwise) const {
return cubeface->getLeft();
}
vector<Color> ExtractLeft::extractTopFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getLeft();
if (!clockwise)
reverse(colors.begin(), colors.end());
return colors;
}
vector<Color> ExtractLeft::extractBottomFace(CubeFace* cubeface, bool clockwise) const {
vector<Color> colors = cubeface->getLeft();
if (clockwise)
reverse(colors.begin(), colors.end());
return colors;
}
void ExtractLeft::setLeftFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setRight(colors);
}
void ExtractLeft::setRightFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setLeft(colors);
}
void ExtractLeft::setTopFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setLeft(colors);
}
void ExtractLeft::setBottomFace(CubeFace* cubeface, vector<Color> colors) const {
cubeface->setLeft(colors);
}