Class TransformAnimationComponent

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Class Documentation

class TransformAnimationComponent : public Component

Manages animations based on provided keyframes.

Public Types

enum TransitionType

First word is for incoming, second word for outgoing.

Values:

SmashSmash = 0
EaseEase = 1
SmashEase = 2
EaseSmash = 3
enum AnimationMode

Values:

None = 0
Looping = 1
Alternating = 2

Public Functions

TransformAnimationComponent(Entity &owner, const JSON::json &data)
~TransformAnimationComponent()
void pushKeyframe(const Keyframe &keyFrame)
void popKeyframe(int count)
bool isPlaying() const
bool isPlayOnStart() const
bool hasEnded() const
float getStartTime() const
float getEndTime() const
void reset()
void interpolate(float t)
void setPlaying(bool enabled)
bool setupData()

Perform setting up internal data needed from other components after they have been added to the owning entity.

JSON::json getJSON() const

Get JSON representation of the component data needed to re-construct component from memory.

void draw()

Expose the component data with ImGui.

struct Keyframe

Public Members

float timePosition
Matrix transform