#include <KSprite.h>
|
| KSprite ()=delete |
|
| KSprite (std::string imageKey) |
|
| KSprite (Image *image) |
|
| KSprite (const KSprite &)=delete |
|
KSprite & | operator= (const KSprite &)=delete |
|
| ~KSprite () |
|
void | Render () |
| Renders the sprite to the default UI camera.
|
|
void | SetPos (float x, float y) |
| Sets position of sprite based on pixel coordinate (relative to original screen size)
|
|
void | SetRelScale (float w, float h) |
| Sets scale relative to original sprite size.
|
|
void | SetRelWidth (float w) |
| Sets width relative to original sprite size.
|
|
void | SetRelHeight (float h) |
| Sets height relative to original sprite size.
|
|
void | SetPixScale (float w, float h) |
| Sets scale by pixel width and height.
|
|
void | SetPixWidth (float w) |
| Sets width in pixels.
|
|
void | SetPixHeight (float h) |
| Sets height in pixels.
|
|
void | SetPivot (float x, float y) |
| Sets the sprite's pivot point.
|
|
void | SetRot (float angle) |
| Sets the rotation angle of the sprite.
|
|
float | GetWidth () |
| Gets the width of the sprite in pixels.
|
|
float | GetHeight () |
| Gets the height of the sprite in pixels.
|
|
◆ KSprite() [1/4]
◆ KSprite() [2/4]
KSprite::KSprite |
( |
std::string |
imageKey | ) |
|
◆ KSprite() [3/4]
KSprite::KSprite |
( |
Image * |
image | ) |
|
◆ KSprite() [4/4]
KSprite::KSprite |
( |
const KSprite & |
| ) |
|
|
delete |
◆ ~KSprite()
◆ GetHeight()
float KSprite::GetHeight |
( |
| ) |
|
Gets the height of the sprite in pixels.
Haru, 3/19/2023.
- Returns
- The height.
◆ GetWidth()
float KSprite::GetWidth |
( |
| ) |
|
Gets the width of the sprite in pixels.
Haru, 3/19/2023.
- Returns
- The width.
◆ operator=()
◆ privConstruct()
void KSprite::privConstruct |
( |
Image * |
img | ) |
|
|
private |
◆ Render()
Renders the sprite to the default UI camera.
Haru, 3/19/2023.
◆ SetPivot()
void KSprite::SetPivot |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
Sets the sprite's pivot point.
Haru, 3/19/2023.
- Parameters
-
x | The x coordinate. |
y | The y coordinate. |
◆ SetPixHeight()
void KSprite::SetPixHeight |
( |
float |
h | ) |
|
Sets height in pixels.
Haru, 3/19/2023.
- Parameters
-
◆ SetPixScale()
void KSprite::SetPixScale |
( |
float |
w, |
|
|
float |
h |
|
) |
| |
Sets scale by pixel width and height.
Haru, 3/19/2023.
- Parameters
-
◆ SetPixWidth()
void KSprite::SetPixWidth |
( |
float |
w | ) |
|
Sets width in pixels.
Haru, 3/19/2023.
- Parameters
-
◆ SetPos()
void KSprite::SetPos |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
Sets position of sprite based on pixel coordinate (relative to original screen size)
Haru, 3/19/2023.
- Parameters
-
x | The x coordinate (bottom-left origin). |
y | The y coordinate (bottom-left origin). |
◆ SetRelHeight()
void KSprite::SetRelHeight |
( |
float |
h | ) |
|
Sets height relative to original sprite size.
Haru, 3/19/2023.
- Parameters
-
h | The height scale factor. |
◆ SetRelScale()
void KSprite::SetRelScale |
( |
float |
w, |
|
|
float |
h |
|
) |
| |
Sets scale relative to original sprite size.
Haru, 3/19/2023.
- Parameters
-
w | The width scale factor. |
h | The height scale factor. |
◆ SetRelWidth()
void KSprite::SetRelWidth |
( |
float |
w | ) |
|
Sets width relative to original sprite size.
Haru, 3/19/2023.
- Parameters
-
◆ SetRot()
void KSprite::SetRot |
( |
float |
angle | ) |
|
Sets the rotation angle of the sprite.
Haru, 3/19/2023.
- Parameters
-
angle | The angle in radians. |
◆ UpdateScale()
void KSprite::UpdateScale |
( |
| ) |
|
|
private |
◆ UpdateWorld()
void KSprite::UpdateWorld |
( |
| ) |
|
|
private |
◆ m_pivotTrans
Matrix KSprite::m_pivotTrans |
|
private |
◆ m_relHeight
float KSprite::m_relHeight |
|
private |
◆ m_relWidth
float KSprite::m_relWidth |
|
private |
◆ m_rot
◆ m_rotAngle
float KSprite::m_rotAngle |
|
private |
◆ m_scale
◆ m_trans
◆ m_world
◆ p_goSprite
GraphicsObject_Sprite* KSprite::p_goSprite |
|
private |
◆ p_image
The documentation for this class was generated from the following files: