vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::Animation Struct Reference

Component representing an animation that can be applied to an entity. More...

#include <animation.h>

Static Public Member Functions

static float computeDuration (const Animation &animation)
 The effective length: the latest keyframe of the three tracks, or length if greater.

Public Attributes

float length = 0.0f
 Minimum length in seconds (0 = last keyframe)
float time = 0.0f
 Playback head in seconds; session state, unserialized.
float speed = 1.0f
 Playback speed multiplier.
bool playOnStart = true
 Start playing on the first frame the simulation runs.
bool playing = false
 Session state.
bool started = false
 Whether playOnStart has been honoured this session. Session state.

Detailed Description

Component representing an animation that can be applied to an entity.

Drives the position, rotation and scale of the entity's Transform.

Member Function Documentation

◆ computeDuration()

float Vkm::Engine::Animation::computeDuration ( const Animation & animation)
inlinestatic

The effective length: the latest keyframe of the three tracks, or length if greater.

Parameters
animationComponent measured.
Returns
Length in seconds.

Member Data Documentation

◆ playOnStart

bool Vkm::Engine::Animation::playOnStart = true

Start playing on the first frame the simulation runs.

The only one of playOnStart / playing / started that is serialized; see engine.md, "Authored state and session state on one component".


The documentation for this struct was generated from the following file: