9 #ifndef _TurtleBrains_Sprite_h_
10 #define _TurtleBrains_Sprite_h_
12 #include "tb_graphic.h"
13 #include "tb_texture_manager.h"
15 #include "../math/tb_math.h"
218 inline void SetOrigin(
const float originX,
const float originY) { mOrigin.x = originX; mOrigin.y = originY; }
225 inline void SetScale(
const float scale) { mScale.x = mScale.y = scale; }
233 inline void SetScale(
const float scaleX,
const float scaleY) { mScale.x = scaleX; mScale.y = scaleY; }
241 inline void SetRotation(
const float rotation) { mOrientation = rotation; }
250 virtual void OnRender(
void)
const override;
Definition: tb_vector.h:48
TexelSpace uvy
Definition: tb_sprite.h:37
Definition: tb_graphic.h:24
TexelSpace uvh
Definition: tb_sprite.h:39
This anchor will set the origin to the top and horizontal center of the Sprite.
Definition: tb_sprite.h:131
AnchorLocation
Definition: tb_sprite.h:127
float w
Definition: tb_sprite.h:34
Sprite(const SpriteFrame &spriteFrame)
virtual void OnRender(void) const override
Give the GameScene and Entities something to display, Text, Sprites and AnimatedSprites help bring th...
PixelSpace GetPixelTop(void) const
This anchor will set the origin to the center vertically and left most edge of the Sprite...
Definition: tb_sprite.h:133
Definition: tb_sprite.h:30
This anchor will set the origin to the center of the Sprite horizontally and vertically.
Definition: tb_sprite.h:129
unsigned int TextureHandle
Definition: tb_texture_manager.h:41
TexelSpace GetTexelTop(void) const
void SetSpriteFrame(const SpriteFrame &spriteFrame)
This anchor will set the origin to the top and right most corner of the Sprite.
Definition: tb_sprite.h:132
TexelSpace GetTexelHeight(void) const
This anchor will set the origin to the bottom and left most corner of the Sprite. ...
Definition: tb_sprite.h:135
Contains all functions, classes and helpers related to game/application development written by Tim "B...
Definition: tb_application_dialog.h:21
void SetScale(const float scale)
Definition: tb_sprite.h:225
TextureHandle mTexture
Definition: tb_sprite.h:40
This anchor will set the origin to the bottom edge and horizontal center of the Sprite.
Definition: tb_sprite.h:136
void SetScale(const float scaleX, const float scaleY)
Definition: tb_sprite.h:233
Sprite & operator=(const Sprite &other)
TexelSpace uvw
Definition: tb_sprite.h:38
void SetRotation(const float rotation)
Definition: tb_sprite.h:241
This anchor will set the origin to the bottom and right most corner of the Sprite.
Definition: tb_sprite.h:137
void SetOrigin(const float originX, const float originY)
Definition: tb_sprite.h:218
PixelSpace GetPixelBottom(void) const
PixelSpace GetPixelWidth(void) const
tbCore::uint16 PixelSpace
Definition: tb_texture_manager.h:33
void SetOrigin(const AnchorLocation &anchor)
float y
Definition: tb_sprite.h:33
TexelSpace GetTexelRight(void) const
This anchor will set the origin to the top-left corner, effectively: SetOrigin(0.0f, 0.0f).
Definition: tb_sprite.h:130
TexelSpace GetTexelWidth(void) const
TexelSpace GetTexelLeft(void) const
PixelSpace GetPixelLeft(void) const
float x
Definition: tb_sprite.h:32
TexelSpace GetTexelBottom(void) const
const SpriteFrame & GetSpriteFrame(void) const
float TexelSpace
Definition: tb_texture_manager.h:27
This anchor will set the origin to the center vertically and right most edge of the Sprite...
Definition: tb_sprite.h:134
std::string tbString
Definition: tb_string.h:293
PixelSpace GetPixelRight(void) const
static SpriteFrame CreateWith(const TextureHandle &textureHandle)
float h
Definition: tb_sprite.h:35
TexelSpace uvx
Definition: tb_sprite.h:36
PixelSpace GetPixelHeight(void) const
Definition: tb_sprite.h:145