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.h@32:9c250eda7f3f, 2019-04-05 (annotated)
- Committer:
- el17cd
- Date:
- Fri Apr 05 15:43:27 2019 +0000
- Revision:
- 32:9c250eda7f3f
- Parent:
- 24:4e8bdcb74266
- Child:
- 34:5cb9b4d01f5c
Removed unnecessary includes in .h files
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17cd | 2:a5bc7b3779f7 | 1 | #include "mbed.h" |
el17cd | 32:9c250eda7f3f | 2 | |
el17cd | 24:4e8bdcb74266 | 3 | /** Face class |
el17cd | 24:4e8bdcb74266 | 4 | *@brief A class used to instantiate a face object, each cube will store 6 of these and will all be rendered to display the cube |
el17cd | 24:4e8bdcb74266 | 5 | *@author Christopher Doel |
el17cd | 24:4e8bdcb74266 | 6 | *@date April, 2019 |
el17cd | 24:4e8bdcb74266 | 7 | */ |
el17cd | 1:044238f7bdda | 8 | class Face { |
el17cd | 1:044238f7bdda | 9 | private: |
el17cd | 17:3c9672c6e532 | 10 | float verticies[4][3]; |
el17cd | 17:3c9672c6e532 | 11 | float avgZ; |
el17cd | 13:f4de03202477 | 12 | bool visible; |
el17cd | 1:044238f7bdda | 13 | public: |
el17cd | 24:4e8bdcb74266 | 14 | Face(); |
el17cd | 24:4e8bdcb74266 | 15 | /**brief The constructor of the Face class which instantiates the face object. |
el17cd | 24:4e8bdcb74266 | 16 | *No parameters are required as the face attributes will be defined after instantiation using the mutator methods. |
el17cd | 24:4e8bdcb74266 | 17 | */ |
el17cd | 17:3c9672c6e532 | 18 | float getVertexValue(int vertex, int axis); |
el17cd | 24:4e8bdcb74266 | 19 | /**brief An accessor which returns the value depending on the index of the vertex and the axis required |
el17cd | 24:4e8bdcb74266 | 20 | *@param The index of which vertex is required |
el17cd | 24:4e8bdcb74266 | 21 | *@param The axis of the 3 dimensional coordinate required |
el17cd | 24:4e8bdcb74266 | 22 | @returns The float value of the required vertex in a specific axis |
el17cd | 24:4e8bdcb74266 | 23 | */ |
el17cd | 13:f4de03202477 | 24 | bool getVisible(); |
el17cd | 24:4e8bdcb74266 | 25 | /**brief An accessor which returns whether the face is visible or not |
el17cd | 24:4e8bdcb74266 | 26 | @returns The boolean value of the attribute 'visible' |
el17cd | 24:4e8bdcb74266 | 27 | */ |
el17cd | 24:4e8bdcb74266 | 28 | void setVisible(bool v); |
el17cd | 24:4e8bdcb74266 | 29 | /**brief An mutator which sets whether the face is visible or not |
el17cd | 24:4e8bdcb74266 | 30 | @param A boolean which determines whether the visible attribute will be true or false |
el17cd | 24:4e8bdcb74266 | 31 | */ |
el17cd | 17:3c9672c6e532 | 32 | void setVerticies(float (&PointArray)[4][3]); |
el17cd | 24:4e8bdcb74266 | 33 | /**brief An mutator which sets the verticies of the face |
el17cd | 24:4e8bdcb74266 | 34 | @param A memory address of a two dimentional array containing each vertex and the values of the x, y and z coordinates |
el17cd | 24:4e8bdcb74266 | 35 | */ |
el17cd | 17:3c9672c6e532 | 36 | float getAvgZ(); |
el17cd | 24:4e8bdcb74266 | 37 | /**brief An accessor which returns the average z axis value of the faces verticies |
el17cd | 24:4e8bdcb74266 | 38 | @returns A float representing the average z axis value of the face |
el17cd | 24:4e8bdcb74266 | 39 | */ |
el17cd | 2:a5bc7b3779f7 | 40 | }; |