ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Committer:
el17cd
Date:
Mon Apr 29 14:58:59 2019 +0000
Revision:
36:6fbafc8bed80
Parent:
34:5cb9b4d01f5c
Child:
37:524b91130885
Ensured all doxygen descriptions are above function declarations

Who changed what in which revision?

UserRevisionLine numberNew 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 /**brief The constructor of the Face class which instantiates the face object.
el17cd 24:4e8bdcb74266 15 *No parameters are required as the face attributes will be defined after instantiation using the mutator methods.
el17cd 24:4e8bdcb74266 16 */
el17cd 36:6fbafc8bed80 17 Face();
el17cd 34:5cb9b4d01f5c 18 /**brief An accessor method which returns the value depending on the index of the vertex and the axis required
el17cd 24:4e8bdcb74266 19 *@param The index of which vertex is required
el17cd 24:4e8bdcb74266 20 *@param The axis of the 3 dimensional coordinate required
el17cd 24:4e8bdcb74266 21 @returns The float value of the required vertex in a specific axis
el17cd 24:4e8bdcb74266 22 */
el17cd 36:6fbafc8bed80 23 float getVertexValue(int vertex, int axis);
el17cd 34:5cb9b4d01f5c 24 /**brief An accessor method which returns whether the face is visible or not
el17cd 24:4e8bdcb74266 25 @returns The boolean value of the attribute 'visible'
el17cd 24:4e8bdcb74266 26 */
el17cd 36:6fbafc8bed80 27 bool getVisible();
el17cd 34:5cb9b4d01f5c 28 /**brief An mutator method which sets whether the face is visible or not
el17cd 24:4e8bdcb74266 29 @param A boolean which determines whether the visible attribute will be true or false
el17cd 24:4e8bdcb74266 30 */
el17cd 36:6fbafc8bed80 31 void setVisible(bool v);
el17cd 34:5cb9b4d01f5c 32 /**brief A mutator method which sets the verticies of the face
el17cd 24:4e8bdcb74266 33 @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 34 */
el17cd 36:6fbafc8bed80 35 void setVerticies(float (&PointArray)[4][3]);
el17cd 34:5cb9b4d01f5c 36 /**brief An accessor method which returns the average z axis value of the faces verticies
el17cd 24:4e8bdcb74266 37 @returns A float representing the average z axis value of the face
el17cd 24:4e8bdcb74266 38 */
el17cd 36:6fbafc8bed80 39 float getAvgZ();
el17cd 2:a5bc7b3779f7 40 };