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
Diff: Face/Face.h
- Revision:
- 24:4e8bdcb74266
- Parent:
- 17:3c9672c6e532
- Child:
- 32:9c250eda7f3f
--- a/Face/Face.h Wed Apr 03 16:00:50 2019 +0000 +++ b/Face/Face.h Wed Apr 03 16:19:05 2019 +0000 @@ -1,15 +1,39 @@ #include "mbed.h" - +/** Face class +*@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 +*@author Christopher Doel +*@date April, 2019 +*/ class Face { private: float verticies[4][3]; float avgZ; bool visible; public: - Face(); //float (&PointArray)[4][3] + Face(); + /**brief The constructor of the Face class which instantiates the face object. + *No parameters are required as the face attributes will be defined after instantiation using the mutator methods. + */ float getVertexValue(int vertex, int axis); + /**brief An accessor which returns the value depending on the index of the vertex and the axis required + *@param The index of which vertex is required + *@param The axis of the 3 dimensional coordinate required + @returns The float value of the required vertex in a specific axis + */ bool getVisible(); - void setVisible(bool v); + /**brief An accessor which returns whether the face is visible or not + @returns The boolean value of the attribute 'visible' + */ + void setVisible(bool v); + /**brief An mutator which sets whether the face is visible or not + @param A boolean which determines whether the visible attribute will be true or false + */ void setVerticies(float (&PointArray)[4][3]); + /**brief An mutator which sets the verticies of the face + @param A memory address of a two dimentional array containing each vertex and the values of the x, y and z coordinates + */ float getAvgZ(); + /**brief An accessor which returns the average z axis value of the faces verticies + @returns A float representing the average z axis value of the face + */ }; \ No newline at end of file