Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Cube/Cube.h@22:236319885874, 2019-04-03 (annotated)
- Committer:
- el17cd
- Date:
- Wed Apr 03 15:11:12 2019 +0000
- Revision:
- 22:236319885874
- Parent:
- 20:3ca430241df0
- Child:
- 23:eb50ab95bb53
Game now runs at a target fps of 60
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17cd | 4:759a5c34e239 | 1 | #include "mbed.h" |
el17cd | 4:759a5c34e239 | 2 | #ifndef FACE_H |
el17cd | 4:759a5c34e239 | 3 | #define FACE_H |
el17cd | 4:759a5c34e239 | 4 | #include "Face.h" |
el17cd | 4:759a5c34e239 | 5 | #endif |
el17cd | 4:759a5c34e239 | 6 | |
el17cd | 4:759a5c34e239 | 7 | class Cube { |
el17cd | 4:759a5c34e239 | 8 | private: |
el17cd | 17:3c9672c6e532 | 9 | float verticies[8][3]; |
el17cd | 4:759a5c34e239 | 10 | Face faces[6]; |
el17cd | 17:3c9672c6e532 | 11 | float xPos, yPos, zPos; |
el17cd | 4:759a5c34e239 | 12 | public: |
el17cd | 16:64cd7bc094f9 | 13 | Cube(); |
el17cd | 16:64cd7bc094f9 | 14 | Face getFace(int index); |
el17cd | 22:236319885874 | 15 | void setVisible(); |
el17cd | 22:236319885874 | 16 | void updateFacesVerticies(float (&vert)[8][3]); |
el17cd | 22:236319885874 | 17 | void assignFacesVerticies(float (&face0Points)[4][3], |
el17cd | 22:236319885874 | 18 | float (&face1Points)[4][3], float (&face2Points)[4][3], |
el17cd | 22:236319885874 | 19 | float (&face3Points)[4][3], float (&face4Points)[4][3], |
el17cd | 22:236319885874 | 20 | float (&face5Points)[4][3]); |
el17cd | 16:64cd7bc094f9 | 21 | bool tooClose(); |
el17cd | 17:3c9672c6e532 | 22 | void rotateX(float angle); |
el17cd | 17:3c9672c6e532 | 23 | void rotateY(float angle); |
el17cd | 17:3c9672c6e532 | 24 | void rotateZ(float angle); |
el17cd | 17:3c9672c6e532 | 25 | void translate(float x, float y, float z); |
el17cd | 20:3ca430241df0 | 26 | void resetPos(); |
el17cd | 16:64cd7bc094f9 | 27 | bool despawn(); |
el17cd | 4:759a5c34e239 | 28 | }; |