|
Kemena3D
|
Non-skeletal animation clip — collection of per-object tracks. More...
#include <kanimation.h>
Public Member Functions | |
| kAnimation ()=default | |
| Construct an empty clip with default duration / tick rate. | |
| void | addTrack (const kObjectAnimTrack &track) |
| Append a transform track for one target object. | |
| const std::vector< kObjectAnimTrack > & | getTracks () const |
| All tracks in this clip. | |
| const kObjectAnimTrack * | findTrack (const kString &uuid) const |
| Find a track by its target UUID, or nullptr if absent. | |
| void | setName (const kString &n) |
| Set the clip name. | |
| kString | getName () const |
| Get the clip name. | |
| void | setDuration (float d) |
| Set the total clip length in ticks. | |
| float | getDuration () const |
| Get the total clip length in ticks. | |
| void | setTicksPerSecond (float t) |
| Set the tick rate used to convert ticks to seconds. | |
| float | getTicksPerSecond () const |
| Get the tick rate. | |
| void | setSpeed (float s) |
| Set the playback speed multiplier. | |
| float | getSpeed () const |
| Get the playback speed multiplier. | |
Non-skeletal animation clip — collection of per-object tracks.
Reserved for the future cinematic editor. Construct empty, add tracks via addTrack(), set the duration / tick rate, then hand to a kAnimator for playback. Loading from disk will come once a clip file format is defined.
|
default |
Construct an empty clip with default duration / tick rate.
| void kemena::kAnimation::addTrack | ( | const kObjectAnimTrack & | track | ) |
Append a transform track for one target object.
| const kObjectAnimTrack * kemena::kAnimation::findTrack | ( | const kString & | uuid | ) | const |
Find a track by its target UUID, or nullptr if absent.
|
inline |
Get the total clip length in ticks.
|
inline |
Get the clip name.
|
inline |
Get the playback speed multiplier.
|
inline |
Get the tick rate.
| const std::vector< kObjectAnimTrack > & kemena::kAnimation::getTracks | ( | ) | const |
All tracks in this clip.
|
inline |
Set the total clip length in ticks.
| d | Duration in ticks. |
|
inline |
Set the clip name.
| n | New clip name. |
|
inline |
Set the playback speed multiplier.
| s | Speed multiplier (1.0 = normal speed). |
|
inline |
Set the tick rate used to convert ticks to seconds.
| t | Ticks per second. |