#include <Player.h>
Public Member Functions | |
| Player () | |
| void | setOrientation (double x, double y) |
| void | setOrientation (double angle) |
| void | getOrientationVector (Vector2D *vector) |
| double | getOrientationAngle () |
Public Attributes | |
| Vector2D * | position |
| float | radius |
| Vector2D * | linearVelocity |
| double | angularVelocity |
| bool | collision |
| Vector2D | collisionDirection |
The player class represents a player in a single game. The player is defined through position, radius and velocities. Furthermore he has a collision flag to determine if the player is colliding at the moment.
filename: Player.h
| sonus::Player::Player | ( | ) |
Constructor
| void sonus::Player::setOrientation | ( | double | x, | |
| double | y | |||
| ) |
Sets the orientation of the player by given vector
| x | x part of the vector | |
| y | y part of the vector |
| void sonus::Player::setOrientation | ( | double | angle | ) |
Sets the orientation of the player by given angle (rad)
| angle | orientation angle |
| void sonus::Player::getOrientationVector | ( | Vector2D * | vector | ) |
Returns the orientation of the player as vector
| vector | the output vector |
| double sonus::Player::getOrientationAngle | ( | ) |
Returns the orientation of the player as angle
1.5.4