CoriEngine
Loading...
Searching...
No Matches
Graphics/Animator/Animation.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace Cori {
4 namespace Graphics {
5 class AnimationPack;
6
10 struct Animation {
15 struct PlayParams {
16 // TODO: implement the logic that uses all this parameters, later
17 //uint32_t Loops{ 0 };
18 //uint32_t MaxFrames{ 0 };
19 //uint32_t StartFrame{ 0 };
20 //uint32_t MaxTicks{ 0 };
21 //uint32_t StartTick{ 0 };
22 bool LoopedInSequence{ false };
23 };
24
25 [[nodiscard]] glm::u16vec2 GetFrameSize() const;
26
27 std::shared_ptr<AnimationPack> m_Pack;
28 uint32_t m_AnimationID{ 0 };
29 };
30
34 using AnimationWithParams = std::pair<Animation, Animation::PlayParams>;
35
36 template<typename T>
37 concept IsAnimationWithParams = std::is_same_v<T, AnimationWithParams>;
38 }
39}
Represents a pack of sprite animations that were loaded from the drive from the pair of an image file...
Almost everything connected to graphics is in this namespace.
Definition Window.hpp:7
std::pair< Animation, Animation::PlayParams > AnimationWithParams
Pair of Animation and Animation::PlayParams.
Global engine namespace.
Tells the QuadAnimator how to play the animation. More details in the QuadAnimator docs.
Owning handle to the animation inside the AnimationPack, when paired with Animation::PlayParams can b...
std::shared_ptr< AnimationPack > m_Pack