ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Committer:
el17cd
Date:
Wed May 08 18:17:59 2019 +0000
Revision:
46:824ec81ff578
Parent:
39:41dcf1604fdf
Potentiometer now changes screen contrast for use on other devices.; Final Submission.; I have read and agreed with the Statement of Academic Integrity.

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 37:524b91130885 4 *@brief A class used to instantiate a Face object, each cube will store 6 of these and will all be passed to the renderer to display the cube.
el17cd 37:524b91130885 5 Each Face object will be sorted in terms of its average z axis position upon which the renderer draws the faces from back to front to create depth.
el17cd 24:4e8bdcb74266 6 *@author Christopher Doel
el17cd 24:4e8bdcb74266 7 *@date April, 2019
el17cd 24:4e8bdcb74266 8 */
el17cd 1:044238f7bdda 9 class Face {
el17cd 1:044238f7bdda 10 private:
el17cd 17:3c9672c6e532 11 float verticies[4][3];
el17cd 17:3c9672c6e532 12 float avgZ;
el17cd 13:f4de03202477 13 bool visible;
el17cd 1:044238f7bdda 14 public:
el17cd 37:524b91130885 15 /** 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 36:6fbafc8bed80 18 Face();
el17cd 37:524b91130885 19 /** An accessor method 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 36:6fbafc8bed80 24 float getVertexValue(int vertex, int axis);
el17cd 37:524b91130885 25 /** An accessor method which returns whether the face is visible or not
el17cd 39:41dcf1604fdf 26 *@returns The boolean value of the attribute 'visible'
el17cd 24:4e8bdcb74266 27 */
el17cd 36:6fbafc8bed80 28 bool getVisible();
el17cd 37:524b91130885 29 /** A mutator method which sets whether the face is visible or not
el17cd 39:41dcf1604fdf 30 *@param A boolean which determines whether the visible attribute will be true or false
el17cd 24:4e8bdcb74266 31 */
el17cd 36:6fbafc8bed80 32 void setVisible(bool v);
el17cd 37:524b91130885 33 /** A mutator method which sets the verticies of the face
el17cd 39:41dcf1604fdf 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 36:6fbafc8bed80 36 void setVerticies(float (&PointArray)[4][3]);
el17cd 37:524b91130885 37 /** An accessor method which returns the average z axis value of the faces verticies
el17cd 39:41dcf1604fdf 38 *@returns A float representing the average z axis value of the face
el17cd 24:4e8bdcb74266 39 */
el17cd 36:6fbafc8bed80 40 float getAvgZ();
el17cd 2:a5bc7b3779f7 41 };