|
C++ Project 2016-2017: Arkanoid
|
Singleton: This class provides a method to convert screen pixels to their corresponding coordinates in the game world space. More...
#include <transformation.h>
Public Member Functions | |
| arkanoid::Vector2D | convertVector (const sf::Vector2f &vector) |
| double | convertX (double x) |
| double | convertY (double y) |
Static Public Member Functions | |
| static Transformation * | getInstance () |
| static Transformation * | getInstance (double gridWidth, double gridHeight, double windowWidth, double windowHeight) |
Singleton: This class provides a method to convert screen pixels to their corresponding coordinates in the game world space.
Definition at line 17 of file transformation.h.
| arkanoid::Vector2D arkanoidSFML::Transformation::convertVector | ( | const sf::Vector2f & | vector | ) |
Converts a screen pixel to their corresponding game world coordinate.
| vector | The arkanoid::Vector2D (on screen) that needs to converted to the game world space. |
Definition at line 37 of file transformation.cpp.
| double arkanoidSFML::Transformation::convertX | ( | double | x | ) |
Converts an 'x' to their corresponding game world 'x'.
| x | The 'x' component (on screen) that needs to converted to the game world space. |
Definition at line 41 of file transformation.cpp.
| double arkanoidSFML::Transformation::convertY | ( | double | y | ) |
Converts an 'y' to their corresponding game world 'y'.
| y | The 'y' component (on screen) that needs to converted to the game world space. |
Definition at line 45 of file transformation.cpp.
|
static |
Get an instance of the Transformation object.
Definition at line 21 of file transformation.cpp.
|
static |
Get an instance of the Transformation object.
| gridWidth | The width of the grid. |
| gridHeight | The height of the grid. |
| windowWidth | The width of the screen (game window). |
| windowHeight | The height of the screen (game window). |
Definition at line 29 of file transformation.cpp.
1.8.13