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@17:3c9672c6e532, 2019-03-31 (annotated)
- Committer:
- el17cd
- Date:
- Sun Mar 31 18:10:18 2019 +0000
- Revision:
- 17:3c9672c6e532
- Parent:
- 16:64cd7bc094f9
- Child:
- 20:3ca430241df0
changed from double precision to single (massive performance gain!)
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 | 17:3c9672c6e532 | 14 | Cube(float x, float y, float z, float size); |
el17cd | 16:64cd7bc094f9 | 15 | Face getFace(int index); |
el17cd | 17:3c9672c6e532 | 16 | void updateFaceVerticies(float (&verticies)[8][3]); |
el17cd | 16:64cd7bc094f9 | 17 | bool tooClose(); |
el17cd | 17:3c9672c6e532 | 18 | void rotateX(float angle); |
el17cd | 17:3c9672c6e532 | 19 | void rotateY(float angle); |
el17cd | 17:3c9672c6e532 | 20 | void rotateZ(float angle); |
el17cd | 17:3c9672c6e532 | 21 | void translate(float x, float y, float z); |
el17cd | 16:64cd7bc094f9 | 22 | bool despawn(); |
el17cd | 4:759a5c34e239 | 23 | }; |