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
Face/Face.cpp@4:759a5c34e239, 2019-02-22 (annotated)
- Committer:
- el17cd
- Date:
- Fri Feb 22 19:05:28 2019 +0000
- Revision:
- 4:759a5c34e239
- Parent:
- 1:044238f7bdda
- Child:
- 7:15543cb10a14
Cube Class implemented, when instantiated it created 12 vertices and 6 faces
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17cd | 1:044238f7bdda | 1 | #include "mbed.h" |
| el17cd | 4:759a5c34e239 | 2 | #ifndef FACE_H |
| el17cd | 4:759a5c34e239 | 3 | #define FACE_H |
| el17cd | 1:044238f7bdda | 4 | #include "Face.h" |
| el17cd | 4:759a5c34e239 | 5 | #endif |
| el17cd | 1:044238f7bdda | 6 | |
| el17cd | 4:759a5c34e239 | 7 | Face::Face(){//float (&PointArray)[4][3]){ |
| el17cd | 4:759a5c34e239 | 8 | /* |
| el17cd | 4:759a5c34e239 | 9 | for(int vertex = 0; vertex < 4; vertex++){ |
| el17cd | 4:759a5c34e239 | 10 | for(int axis = 0; axis < 3; axis++){ |
| el17cd | 4:759a5c34e239 | 11 | verticies[vertex][axis] = PointArray[vertex][axis]; |
| el17cd | 4:759a5c34e239 | 12 | } |
| el17cd | 4:759a5c34e239 | 13 | }*/ |
| el17cd | 4:759a5c34e239 | 14 | } |
| el17cd | 4:759a5c34e239 | 15 | void Face::setVerticies(float (&PointArray)[4][3]){ |
| el17cd | 1:044238f7bdda | 16 | for(int vertex = 0; vertex < 4; vertex++){ |
| el17cd | 1:044238f7bdda | 17 | for(int axis = 0; axis < 3; axis++){ |
| el17cd | 1:044238f7bdda | 18 | verticies[vertex][axis] = PointArray[vertex][axis]; |
| el17cd | 1:044238f7bdda | 19 | } |
| el17cd | 1:044238f7bdda | 20 | } |
| el17cd | 1:044238f7bdda | 21 | } |
| el17cd | 4:759a5c34e239 | 22 | |
| el17cd | 4:759a5c34e239 | 23 | float Face::getVertexValue(int vertex, int axis){ |
| el17cd | 1:044238f7bdda | 24 | return verticies[vertex][axis]; |
| el17cd | 1:044238f7bdda | 25 | } |