Sprite¶
Inherited: None
Description¶
Sprites usually used in games to display environment and characters in 2D games.
Public Methods¶
border () const |
|
bounds () const |
|
Mesh * |
mesh () const |
pivot () const |
|
float |
pixelsPerUnit () const |
void |
setBorder (const Vector4 & border) |
void |
setBounds (const Vector4 & bounds) |
void |
setPivot (const Vector2 & pivot) |
void |
setPixelsPerUnit (float pixels) |
void |
setTexture (Texture * texture) |
Texture * |
texture () const |
Static Methods¶
None
Methods Description¶
Vector4 Sprite::border () const
Returns the border sizes of the Sprite.
X=left, Y=bottom, Z=right, W=top.
See also setBorder().
Vector4 Sprite::bounds () const
Returns bounds of the Sprite.
See also setBounds().
Mesh * Sprite::mesh () const
Returns a mesh which represents the sprite.
Vector2 Sprite::pivot () const
Returns pivot point of the Sprite.
See also setPivot().
float Sprite::pixelsPerUnit () const
Returns pixels per unit to create sprite meshes.
See also setPixelsPerUnit().
void Sprite::setBorder (Vector4 & border)
Sets new border sizes for the Sprite.
See also border().
void Sprite::setBounds (Vector4 & bounds)
Sets bounds of the Sprite.
See also bounds().
void Sprite::setPivot (Vector2 & pivot)
Sets new pivot point for the Sprite.
See also pivot().
void Sprite::setPixelsPerUnit (float pixels)
Sets pixels per unit to create sprite meshes.
See also pixelsPerUnit().
void Sprite::setTexture (Texture * texture)
Sets a new sprite texture.
See also texture().
Texture * Sprite::texture () const
Returns a sprite texture.
See also setTexture().