![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Collection of animations for an entity with multi-spritesheet support. More...
#include <AnimationTypes.h>
Public Member Functions | |
| AnimationBank () | |
| const SpritesheetInfo * | GetSpritesheet (const std::string &id) const |
| Get spritesheet by ID. | |
| SpritesheetInfo * | GetSpritesheet (const std::string &id) |
| const AnimationSequence * | GetSequence (const std::string &name) const |
| Get animation sequence by name. | |
| AnimationSequence * | GetSequence (const std::string &name) |
| SDL_FRect | CalculateFrameRect (int frameIndex) const |
| DEPRECATED: Calculate source rectangle for a frame based on spritesheet layout. | |
| const AnimationSequence * | GetAnimation (const std::string &name) const |
| DEPRECATED: Get animation sequence by name (use GetSequence() instead) | |
Public Attributes | |
| std::string | bankId |
| Unique identifier for this animation bank. | |
| std::string | description |
| std::string | author |
| std::string | createdDate |
| std::string | lastModifiedDate |
| std::vector< std::string > | tags |
| std::vector< SpritesheetInfo > | spritesheets |
| int | frameWidth |
| Width of each frame in pixels. | |
| int | frameHeight |
| Height of each frame in pixels. | |
| int | columns |
| Number of columns in spritesheet. | |
| int | spacing |
| Spacing between frames in pixels. | |
| int | margin |
| Margin around spritesheet edges in pixels. | |
| std::unordered_map< std::string, AnimationSequence > | animations |
Collection of animations for an entity with multi-spritesheet support.
Definition at line 219 of file AnimationTypes.h.
|
inline |
Definition at line 241 of file AnimationTypes.h.
DEPRECATED: Calculate source rectangle for a frame based on spritesheet layout.
| frameIndex | Frame index (0-based) |
Definition at line 301 of file AnimationTypes.h.
References columns, frameHeight, frameWidth, GetComponentTypeID_Static(), margin, and spacing.
Here is the call graph for this function:
|
inline |
DEPRECATED: Get animation sequence by name (use GetSequence() instead)
| name | Animation name |
Definition at line 321 of file AnimationTypes.h.
References GetSequence().
Here is the call graph for this function:
|
inline |
Definition at line 290 of file AnimationTypes.h.
References animations, and GetComponentTypeID_Static().
Here is the call graph for this function:
|
inline |
Get animation sequence by name.
| name | Animation name |
Definition at line 284 of file AnimationTypes.h.
References animations, and GetComponentTypeID_Static().
Referenced by GetAnimation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 269 of file AnimationTypes.h.
References GetComponentTypeID_Static(), and spritesheets.
Here is the call graph for this function:
|
inline |
Get spritesheet by ID.
| id | Spritesheet identifier |
Definition at line 259 of file AnimationTypes.h.
References GetComponentTypeID_Static(), and spritesheets.
Referenced by Olympe::AnimationEditorWindow::RenderPreviewFrame().
Here is the call graph for this function:
Here is the caller graph for this function:| std::unordered_map<std::string, AnimationSequence> Olympe::AnimationBank::animations |
Definition at line 239 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::AddSequence(), Olympe::AnimationEditorWindow::ExportBankJSON(), GetSequence(), GetSequence(), Olympe::AnimationEditorWindow::RemoveSequence(), Olympe::AnimationEditorWindow::RenderPreviewFrame(), Olympe::AnimationEditorWindow::RenderPreviewPanel(), Olympe::AnimationEditorWindow::RenderSequencePanel(), Olympe::AnimationEditorWindow::ResetPreview(), Olympe::AnimationEditorWindow::StartPreview(), and Olympe::AnimationEditorWindow::UpdatePreview().
| std::string Olympe::AnimationBank::author |
Definition at line 223 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::ExportBankJSON(), Olympe::AnimationEditorWindow::NewBank(), and Olympe::AnimationEditorWindow::RenderPropertiesPanel().
| std::string Olympe::AnimationBank::bankId |
Unique identifier for this animation bank.
Definition at line 221 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::ExportBankJSON(), Olympe::AnimationEditorWindow::ImportBankJSON(), Olympe::AnimationEditorWindow::NewBank(), Olympe::AnimationEditorWindow::RenderPropertiesPanel(), and Olympe::AnimationEditorWindow::SaveBankAs().
| int Olympe::AnimationBank::columns |
Number of columns in spritesheet.
Definition at line 234 of file AnimationTypes.h.
Referenced by CalculateFrameRect().
| std::string Olympe::AnimationBank::createdDate |
Definition at line 224 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::ExportBankJSON(), Olympe::AnimationEditorWindow::NewBank(), and Olympe::AnimationEditorWindow::RenderPropertiesPanel().
| std::string Olympe::AnimationBank::description |
Definition at line 222 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::ExportBankJSON(), and Olympe::AnimationEditorWindow::RenderPropertiesPanel().
| int Olympe::AnimationBank::frameHeight |
Height of each frame in pixels.
Definition at line 233 of file AnimationTypes.h.
Referenced by CalculateFrameRect().
| int Olympe::AnimationBank::frameWidth |
Width of each frame in pixels.
Definition at line 232 of file AnimationTypes.h.
Referenced by CalculateFrameRect().
| std::string Olympe::AnimationBank::lastModifiedDate |
Definition at line 225 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::ExportBankJSON(), Olympe::AnimationEditorWindow::NewBank(), and Olympe::AnimationEditorWindow::RenderPropertiesPanel().
| int Olympe::AnimationBank::margin |
Margin around spritesheet edges in pixels.
Definition at line 236 of file AnimationTypes.h.
Referenced by CalculateFrameRect().
| int Olympe::AnimationBank::spacing |
Spacing between frames in pixels.
Definition at line 235 of file AnimationTypes.h.
Referenced by CalculateFrameRect().
| std::vector<SpritesheetInfo> Olympe::AnimationBank::spritesheets |
Definition at line 229 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::AddSequence(), Olympe::AnimationEditorWindow::AddSpritesheet(), Olympe::AnimationEditorWindow::ExportBankJSON(), GetSpritesheet(), GetSpritesheet(), Olympe::AnimationEditorWindow::RemoveSpritesheet(), Olympe::AnimationEditorWindow::RenderSequencePanel(), and Olympe::AnimationEditorWindow::RenderSpritesheetPanel().
| std::vector<std::string> Olympe::AnimationBank::tags |
Definition at line 226 of file AnimationTypes.h.
Referenced by Olympe::AnimationEditorWindow::ExportBankJSON().