#include <tb_sprite_sheet.hpp>
Public Types | |
| typedef std::map< String, AnimationSequence > | AnimationSequenceContainer |
Public Member Functions | |
| SpriteSheet (const TextureHandle &textureHandle=InvalidTexture()) | |
| void | AddSpriteFrame (const String &spriteName, const SpriteFrame &spriteFrame) |
| const SpriteFrame & | GetSpriteFrame (const String &spriteName) const |
| void | AddAnimationSequence (const String &spriteName, const String &animationName, const AnimationSequence &animationSequence) |
| const AnimationSequence & | GetAnimationSequence (const String &animationName) const |
| const AnimationSequence & | GetAnimationSequence (const String &spriteName, const String &animationName) const |
| bool | AddGlobalAnimationSequencesToSprite (const String &spriteName, const std::vector< String > &animationNames) |
| const AnimationSequenceContainer & | GetAnimationSequencesForSprite (const String &spriteName) const |
| void | SetTextureHandle (const TextureHandle &textureHandle) |
| const TextureHandle & | GetTextureHandle (void) const |
A sprite sheet is a collection of information regarding the sprites on a particular texture file. Each Sprite has a sprite frame, location and size on the texture and can optionally have animation sequences as well. It would be rare for the SpriteSheet objects to be used directly as the SpriteManager handles the loading of the sprite sheets as well as the creation of the Sprite objects and AnimatedSprite objects.
|
explicit |
This is an implementation detail of the SpriteManager and should not be used directly.
| void TurtleBrains::Graphics::SpriteSheet::AddAnimationSequence | ( | const String & | spriteName, |
| const String & | animationName, | ||
| const AnimationSequence & | animationSequence | ||
| ) |
This is an implementation detail of the SpriteManager and should not be used directly.
| spriteName | The name of the sprite to attach the animation to, or if left empty string this will be a global animation sequence for any sprite to use. |
| bool TurtleBrains::Graphics::SpriteSheet::AddGlobalAnimationSequencesToSprite | ( | const String & | spriteName, |
| const std::vector< String > & | animationNames | ||
| ) |
This is an implementation detail of the SpriteManager and should not be used directly.
| void TurtleBrains::Graphics::SpriteSheet::AddSpriteFrame | ( | const String & | spriteName, |
| const SpriteFrame & | spriteFrame | ||
| ) |
This is an implementation detail of the SpriteManager and should not be used directly.
| const AnimationSequence& TurtleBrains::Graphics::SpriteSheet::GetAnimationSequence | ( | const String & | animationName | ) | const |
This is an implementation detail of the SpriteManager and should not be used directly.
| const AnimationSequence& TurtleBrains::Graphics::SpriteSheet::GetAnimationSequence | ( | const String & | spriteName, |
| const String & | animationName | ||
| ) | const |
This is an implementation detail of the SpriteManager and should not be used directly.
| const AnimationSequenceContainer& TurtleBrains::Graphics::SpriteSheet::GetAnimationSequencesForSprite | ( | const String & | spriteName | ) | const |
This is an implementation detail of the SpriteManager and should not be used directly.
This is an implementation detail of the SpriteManager and should not be used directly.
| const SpriteFrame& TurtleBrains::Graphics::SpriteSheet::GetSpriteFrame | ( | const String & | spriteName | ) | const |
This is an implementation detail of the SpriteManager and should not be used directly.
| const TextureHandle& TurtleBrains::Graphics::SpriteSheet::GetTextureHandle | ( | void | ) | const |
This is an implementation detail of the SpriteManager and should not be used directly.
| void TurtleBrains::Graphics::SpriteSheet::SetTextureHandle | ( | const TextureHandle & | textureHandle | ) |
This is an implementation detail of the SpriteManager and should not be used directly.