![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Proj 324 Final
Fork of ELEC351_Group_T by
ROTATE.cpp@57:aba1296e51b1, 2018-08-15 (annotated)
- Committer:
- thomasmorris
- Date:
- Wed Aug 15 21:34:59 2018 +0000
- Revision:
- 57:aba1296e51b1
- Parent:
- 56:bc5345bc6650
Final Version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 56:bc5345bc6650 | 1 | #include "ROTATE.hpp" |
thomasmorris | 56:bc5345bc6650 | 2 | |
thomasmorris | 56:bc5345bc6650 | 3 | ROTATE::ROTATE()//Constructor |
thomasmorris | 56:bc5345bc6650 | 4 | { |
thomasmorris | 56:bc5345bc6650 | 5 | |
thomasmorris | 56:bc5345bc6650 | 6 | } |
thomasmorris | 56:bc5345bc6650 | 7 | ROTATE::~ROTATE()//Destructor |
thomasmorris | 56:bc5345bc6650 | 8 | { |
thomasmorris | 56:bc5345bc6650 | 9 | |
thomasmorris | 56:bc5345bc6650 | 10 | } |
thomasmorris | 56:bc5345bc6650 | 11 | //static Colours CubeMap[6][3][3];//The colours of each section on the cube map |
thomasmorris | 56:bc5345bc6650 | 12 | void ROTATE::CU()//Clockwise upper face |
thomasmorris | 56:bc5345bc6650 | 13 | { |
thomasmorris | 56:bc5345bc6650 | 14 | //Rotate middle face |
thomasmorris | 56:bc5345bc6650 | 15 | CubeMap[0][0][0] == CubeMap[0][0][2]; |
thomasmorris | 56:bc5345bc6650 | 16 | CubeMap[0][0][1] == CubeMap[0][1][2]; |
thomasmorris | 56:bc5345bc6650 | 17 | CubeMap[0][0][2] == CubeMap[0][2][2]; |
thomasmorris | 56:bc5345bc6650 | 18 | CubeMap[0][1][0] == CubeMap[0][0][1]; |
thomasmorris | 56:bc5345bc6650 | 19 | CubeMap[0][1][1] == CubeMap[0][1][1]; |
thomasmorris | 56:bc5345bc6650 | 20 | CubeMap[0][1][2] == CubeMap[0][2][1]; |
thomasmorris | 56:bc5345bc6650 | 21 | CubeMap[0][2][0] == CubeMap[0][0][0]; |
thomasmorris | 56:bc5345bc6650 | 22 | CubeMap[0][2][1] == CubeMap[0][1][0]; |
thomasmorris | 56:bc5345bc6650 | 23 | CubeMap[0][2][2] == CubeMap[0][2][0]; |
thomasmorris | 56:bc5345bc6650 | 24 | //Rotate left face |
thomasmorris | 56:bc5345bc6650 | 25 | CubeMap[1][2][0] == CubeMap[0][0][0]; |
thomasmorris | 56:bc5345bc6650 | 26 | CubeMap[1][2][1] == CubeMap[0][1][0]; |
thomasmorris | 56:bc5345bc6650 | 27 | CubeMap[1][2][2] == CubeMap[0][2][0]; |
thomasmorris | 56:bc5345bc6650 | 28 | //Rotate right face |
thomasmorris | 56:bc5345bc6650 | 29 | CubeMap[2][2][0] == CubeMap[0][0][0]; |
thomasmorris | 56:bc5345bc6650 | 30 | CubeMap[2][2][1] == CubeMap[0][1][0]; |
thomasmorris | 56:bc5345bc6650 | 31 | CubeMap[2][2][2] == CubeMap[0][2][0]; |
thomasmorris | 56:bc5345bc6650 | 32 | //Rotate top face |
thomasmorris | 56:bc5345bc6650 | 33 | CubeMap[3][2][0] == CubeMap[0][0][0]; |
thomasmorris | 56:bc5345bc6650 | 34 | CubeMap[3][2][1] == CubeMap[0][1][0]; |
thomasmorris | 56:bc5345bc6650 | 35 | CubeMap[3][2][2] == CubeMap[0][2][0]; |
thomasmorris | 56:bc5345bc6650 | 36 | //Rotate bottom face |
thomasmorris | 56:bc5345bc6650 | 37 | CubeMap[4][2][0] == CubeMap[0][0][0]; |
thomasmorris | 56:bc5345bc6650 | 38 | CubeMap[4][2][1] == CubeMap[0][1][0]; |
thomasmorris | 56:bc5345bc6650 | 39 | CubeMap[4][2][2] == CubeMap[0][2][0]; |
thomasmorris | 56:bc5345bc6650 | 40 | |
thomasmorris | 56:bc5345bc6650 | 41 | } |
thomasmorris | 56:bc5345bc6650 | 42 | void ROTATE::AU()//AntiClockwise upper face |
thomasmorris | 56:bc5345bc6650 | 43 | { |
thomasmorris | 56:bc5345bc6650 | 44 | |
thomasmorris | 56:bc5345bc6650 | 45 | } |
thomasmorris | 56:bc5345bc6650 | 46 | void ROTATE::CF()//Clockwise front face |
thomasmorris | 56:bc5345bc6650 | 47 | { |
thomasmorris | 56:bc5345bc6650 | 48 | |
thomasmorris | 56:bc5345bc6650 | 49 | } |
thomasmorris | 56:bc5345bc6650 | 50 | void ROTATE::AF()//AntiClockwise front face |
thomasmorris | 56:bc5345bc6650 | 51 | { |
thomasmorris | 56:bc5345bc6650 | 52 | |
thomasmorris | 56:bc5345bc6650 | 53 | } |
thomasmorris | 56:bc5345bc6650 | 54 | void ROTATE::CL()//Clockwise left face |
thomasmorris | 56:bc5345bc6650 | 55 | { |
thomasmorris | 56:bc5345bc6650 | 56 | |
thomasmorris | 56:bc5345bc6650 | 57 | } |
thomasmorris | 56:bc5345bc6650 | 58 | void ROTATE::AL()//AntiClockwise left face |
thomasmorris | 56:bc5345bc6650 | 59 | { |
thomasmorris | 56:bc5345bc6650 | 60 | |
thomasmorris | 56:bc5345bc6650 | 61 | } |
thomasmorris | 56:bc5345bc6650 | 62 | void ROTATE::CR()//Clockwise right face |
thomasmorris | 56:bc5345bc6650 | 63 | { |
thomasmorris | 56:bc5345bc6650 | 64 | |
thomasmorris | 56:bc5345bc6650 | 65 | } |
thomasmorris | 56:bc5345bc6650 | 66 | void ROTATE::AR()//AntiClockwise right face |
thomasmorris | 56:bc5345bc6650 | 67 | { |
thomasmorris | 56:bc5345bc6650 | 68 | |
thomasmorris | 56:bc5345bc6650 | 69 | } |
thomasmorris | 56:bc5345bc6650 | 70 | void ROTATE::CB()//Clockwise back face |
thomasmorris | 56:bc5345bc6650 | 71 | { |
thomasmorris | 56:bc5345bc6650 | 72 | |
thomasmorris | 56:bc5345bc6650 | 73 | } |
thomasmorris | 56:bc5345bc6650 | 74 | void ROTATE::AB()//AntiClockwise back face |
thomasmorris | 56:bc5345bc6650 | 75 | { |
thomasmorris | 56:bc5345bc6650 | 76 | |
thomasmorris | 56:bc5345bc6650 | 77 | } |
thomasmorris | 56:bc5345bc6650 | 78 | void ROTATE::CD()//Clockwise down face |
thomasmorris | 56:bc5345bc6650 | 79 | { |
thomasmorris | 56:bc5345bc6650 | 80 | |
thomasmorris | 56:bc5345bc6650 | 81 | } |
thomasmorris | 56:bc5345bc6650 | 82 | void ROTATE::AD()//AntiClockwise down face |
thomasmorris | 56:bc5345bc6650 | 83 | { |
thomasmorris | 56:bc5345bc6650 | 84 | |
thomasmorris | 56:bc5345bc6650 | 85 | } |