Responsible for Sprite Creation and Positioning. More...
#include <Sprite.h>
Public Member Functions | |
| Sprite (std::string imgKey) | |
| Creates a Sprite using a given Image Key. | |
| float | GetAngleRad () |
| Gets Sprite's current angle in radians. | |
| float | GetAngleDeg () |
| Gets Sprite's current angle in degrees. | |
| void | SetAngleRad (float a) |
| Sets sprites angle in radians based on sprite center. | |
| void | SetAngleDeg (float a) |
| Sets sprites angle in degrees based on sprite center. | |
| float | GetScaleX () |
| Gets Sprite's current size X. | |
| float | GetScaleXPixel () |
| Gets Sprite's current size X in pixels. | |
| float | GetScaleY () |
| Gets Sprite's current size Y. | |
| float | GetScaleYPixel () |
| Gets Sprite's current size Y in pixels. | |
| float | GetCenterX () |
| Gets Sprite's current center X. | |
| float | GetCenterY () |
| Gets Sprite's current center Y. | |
| void | SetCenter (float offsetx, float offsety) |
| Sets a new Sprite Center. | |
| float | GetPosX () |
| Gets Sprite's current position X. | |
| float | GetPosY () |
| Gets Sprite's current position Y. | |
| void | SetPosition (float x, float y) |
| Sets Sprite's position XY. | |
| void | SetScaleFactor (float scalex, float scaley) |
| Sets Sprite's current orientation to ScaleFactorX and ScaleFactorY. | |
| void | SetScalePixel (float width, float height) |
| Sets Sprite's current orientation to width and height. | |
| void | Render () |
| Renders Sprite to the 2D Camera. | |
Responsible for Sprite Creation and Positioning.
| Sprite::Sprite | ( | std::string | imgKey | ) |
| float Sprite::GetAngleDeg | ( | ) |
Gets Sprite's current angle in degrees.
| float Sprite::GetAngleRad | ( | ) |
Gets Sprite's current angle in radians.
| float Sprite::GetCenterX | ( | ) |
Gets Sprite's current center X.
| float Sprite::GetCenterY | ( | ) |
Gets Sprite's current center Y.
| float Sprite::GetPosX | ( | ) |
Gets Sprite's current position X.
| float Sprite::GetPosY | ( | ) |
Gets Sprite's current position Y.
| float Sprite::GetScaleX | ( | ) |
Gets Sprite's current size X.
| float Sprite::GetScaleXPixel | ( | ) |
Gets Sprite's current size X in pixels.
| float Sprite::GetScaleY | ( | ) |
Gets Sprite's current size Y.
| float Sprite::GetScaleYPixel | ( | ) |
Gets Sprite's current size Y in pixels.
| void Sprite::SetAngleDeg | ( | float | a | ) |
Sets sprites angle in degrees based on sprite center.
| a |
| void Sprite::SetAngleRad | ( | float | a | ) |
Sets sprites angle in radians based on sprite center.
| a |
| void Sprite::SetCenter | ( | float | offsetx, |
| float | offsety ) |
Sets a new Sprite Center.
| offsetx | |
| offsety |
| void Sprite::SetPosition | ( | float | x, |
| float | y ) |
Sets Sprite's position XY.
| x | |
| y |
| void Sprite::SetScaleFactor | ( | float | scalex, |
| float | scaley ) |
Sets Sprite's current orientation to ScaleFactorX and ScaleFactorY.
| scalex | |
| scaley |
| void Sprite::SetScalePixel | ( | float | width, |
| float | height ) |
Sets Sprite's current orientation to width and height.
| width | |
| height |