Represents a sprite in the SUNENGINE. More...
#include <SUNENGINESprite.h>
Public Member Functions | |
| SUNENGINESprite (const SUNENGINESprite &)=delete | |
| SUNENGINESprite & | operator= (const SUNENGINESprite &)=delete |
| SUNENGINESprite (std::string key) | |
| Constructor for SUNENGINESprite with a key. | |
| void | SetOrigin (float x, float y) |
| Sets the origin of the sprite. | |
| void | SetPosition (float x, float y) |
| Sets the position of the sprite. | |
| void | SetAngleRadians (float rad) |
| Sets the angle of the sprite in radians. | |
| void | SetAngleDegrees (float deg) |
| Sets the angle of the sprite in degrees. | |
| void | SetScaleFactor (float x, float y) |
| Sets the scale factor of the sprite. | |
| void | SetScalePixel (float x, float y) |
| Sets the scale of the sprite in pixels. | |
| float | GetWidth () const |
| Gets the width of the sprite. | |
| float | GetHeight () const |
| Gets the height of the sprite. | |
| float | GetAngle () const |
| Gets the angle of the sprite. | |
| float | GetScaleX () const |
| Gets the scale factor in the x direction. | |
| float | GetScaleY () const |
| Gets the scale factor in the y direction. | |
| float | GetPosX () const |
| Gets the position in the x direction. | |
| float | GetPosY () const |
| Gets the position in the y direction. | |
| void | Render () |
| Renders the sprite using the specified camera. | |
| SUNENGINESprite (const SUNENGINESprite &)=delete | |
| SUNENGINESprite & | operator= (const SUNENGINESprite &)=delete |
| SUNENGINESprite (std::string key) | |
| Constructor for SUNENGINESprite with a key. | |
| void | SetOrigin (float x, float y) |
| Sets the origin of the sprite. | |
| void | SetPosition (float x, float y) |
| Sets the position of the sprite. | |
| void | SetAngleRadians (float rad) |
| Sets the angle of the sprite in radians. | |
| void | SetAngleDegrees (float deg) |
| Sets the angle of the sprite in degrees. | |
| void | SetScaleFactor (float x, float y) |
| Sets the scale factor of the sprite. | |
| void | SetScalePixel (float x, float y) |
| Sets the scale of the sprite in pixels. | |
| float | GetWidth () |
| Gets the width of the sprite. | |
| float | GetHeight () |
| Gets the height of the sprite. | |
| float | GetAngle () |
| Gets the angle of the sprite. | |
| void | Render (Camera *cam) |
| Renders the sprite using the specified camera. | |
Private Member Functions | |
| void | UpdateWorld () |
| Updates the world transformation matrix for the sprite. | |
| void | UpdateWorld () |
| Updates the world transformation matrix for the sprite. | |
Represents a sprite in the SUNENGINE.
The SUNENGINESprite class is responsible for managing and rendering a sprite in the SUNENGINE. It provides methods to set the sprite's origin, position, angle, scale, and to render the sprite.
| SUNENGINESprite::SUNENGINESprite | ( | std::string | key | ) |
Constructor for SUNENGINESprite with a key.
| key | The key associated with the sprite. |
| SUNENGINESprite::SUNENGINESprite | ( | std::string | key | ) |
Constructor for SUNENGINESprite with a key.
| key | The key associated with the sprite. |
| float SUNENGINESprite::GetAngle | ( | ) |
Gets the angle of the sprite.
| float SUNENGINESprite::GetAngle | ( | ) | const |
Gets the angle of the sprite.
| float SUNENGINESprite::GetHeight | ( | ) |
Gets the height of the sprite.
| float SUNENGINESprite::GetHeight | ( | ) | const |
Gets the height of the sprite.
| float SUNENGINESprite::GetPosX | ( | ) | const |
Gets the position in the x direction.
| float SUNENGINESprite::GetPosY | ( | ) | const |
Gets the position in the y direction.
| float SUNENGINESprite::GetScaleX | ( | ) | const |
Gets the scale factor in the x direction.
| float SUNENGINESprite::GetScaleY | ( | ) | const |
Gets the scale factor in the y direction.
| float SUNENGINESprite::GetWidth | ( | ) |
Gets the width of the sprite.
| float SUNENGINESprite::GetWidth | ( | ) | const |
Gets the width of the sprite.
| void SUNENGINESprite::Render | ( | ) |
Renders the sprite using the specified camera.
| cam | Pointer to the camera used for rendering. |
| void SUNENGINESprite::Render | ( | Camera * | cam | ) |
Renders the sprite using the specified camera.
| cam | Pointer to the camera used for rendering. |
| void SUNENGINESprite::SetAngleDegrees | ( | float | deg | ) |
Sets the angle of the sprite in degrees.
| deg | The angle in degrees. |
| void SUNENGINESprite::SetAngleDegrees | ( | float | deg | ) |
Sets the angle of the sprite in degrees.
| deg | The angle in degrees. |
| void SUNENGINESprite::SetAngleRadians | ( | float | rad | ) |
Sets the angle of the sprite in radians.
| rad | The angle in radians. |
| void SUNENGINESprite::SetAngleRadians | ( | float | rad | ) |
Sets the angle of the sprite in radians.
| rad | The angle in radians. |
| void SUNENGINESprite::SetOrigin | ( | float | x, |
| float | y ) |
Sets the origin of the sprite.
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
| void SUNENGINESprite::SetOrigin | ( | float | x, |
| float | y ) |
Sets the origin of the sprite.
| x | The x-coordinate of the origin. |
| y | The y-coordinate of the origin. |
| void SUNENGINESprite::SetPosition | ( | float | x, |
| float | y ) |
Sets the position of the sprite.
| x | The x-coordinate of the position. |
| y | The y-coordinate of the position. |
| void SUNENGINESprite::SetPosition | ( | float | x, |
| float | y ) |
Sets the position of the sprite.
| x | The x-coordinate of the position. |
| y | The y-coordinate of the position. |
| void SUNENGINESprite::SetScaleFactor | ( | float | x, |
| float | y ) |
Sets the scale factor of the sprite.
| x | The scale factor in the x direction. |
| y | The scale factor in the y direction. |
| void SUNENGINESprite::SetScaleFactor | ( | float | x, |
| float | y ) |
Sets the scale factor of the sprite.
| x | The scale factor in the x direction. |
| y | The scale factor in the y direction. |
| void SUNENGINESprite::SetScalePixel | ( | float | x, |
| float | y ) |
Sets the scale of the sprite in pixels.
| x | The width in pixels. |
| y | The height in pixels. |
| void SUNENGINESprite::SetScalePixel | ( | float | x, |
| float | y ) |
Sets the scale of the sprite in pixels.
| x | The width in pixels. |
| y | The height in pixels. |