Max Houghton
/
MazeGame_el15mh
el15mh 200929957
Diff: Ball/Ball.h
- Revision:
- 10:989e5dbd12ee
- Parent:
- 9:960dfc71c224
diff -r 960dfc71c224 -r 989e5dbd12ee Ball/Ball.h --- a/Ball/Ball.h Thu May 04 14:43:29 2017 +0000 +++ b/Ball/Ball.h Thu May 04 17:39:23 2017 +0000 @@ -1,9 +1,3 @@ -/** - @brief Ball Class contains necessary parameters to draw the ball of the correct position, size and fill style. - @author Max Houghton - @date March 19 2017 - */ - #ifndef BALL_H #define BALL_H @@ -11,6 +5,12 @@ #include "N5110.h" #include "Gamepad.h" +/** + @brief Ball Class contains necessary parameters to draw the ball of the correct position, size and colour. + @author Max Houghton + @date March 19 2017 + */ + class Ball { @@ -62,6 +62,7 @@ /** Get Velocity * * @details - Function returns a 2D Vector struct containing information about the ball's next position. + * @return position * */ Vector2D getVelocity(); @@ -70,6 +71,7 @@ * * @details - This function dictates the position of the ball for the next update of the game. It is used in the wall collision check and goal check functions. * @param - p - 2D Vector struct containing the location of the ball to be set to. + * @return velocity * */ void setPosition(Vector2D p); @@ -92,27 +94,29 @@ /** Check For Interference * * @details - When using the accelerometer data for position values, small but non-zero values can cause the ball undesirably. This function removes all small values of the data ensuring the ball only moves according to deliberate movements of the accelerometer. + * @return velocity * */ Vector2D checkForInterference(Vector2D velocity); /** - * @param - _radius - Integer to decide size of the ball to be drawn. + * @param _radius - Integer to decide size of the ball to be drawn. */ int _radius; /** - * @param - _x - Float value specifying x coordinate of centre of ball. + * @param _x - Float value specifying x coordinate of centre of ball. */ float _x; /** - * @param - _y - Float value specifying y coordinate of centre of ball. + * @param _y - Float value specifying y coordinate of centre of ball. */ float _y; /** - * @param - _colour - Boolean value specifying fill style of the ball; true corresponds to transparent fill and false to solid fill. + * @param _colour - Boolean value specifying fill style of the ball; true corresponds to transparent fill and false to solid fill. + * @return _colour */ bool _colour;