Kemena3D
Loading...
Searching...
No Matches
kemena::kAnimation Class Reference

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 kObjectAnimTrackfindTrack (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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ kAnimation()

kemena::kAnimation::kAnimation ( )
default

Construct an empty clip with default duration / tick rate.

Member Function Documentation

◆ addTrack()

void kemena::kAnimation::addTrack ( const kObjectAnimTrack & track)

Append a transform track for one target object.

◆ findTrack()

const kObjectAnimTrack * kemena::kAnimation::findTrack ( const kString & uuid) const

Find a track by its target UUID, or nullptr if absent.

◆ getDuration()

float kemena::kAnimation::getDuration ( ) const
inline

Get the total clip length in ticks.

Returns
Duration in ticks.

◆ getName()

kString kemena::kAnimation::getName ( ) const
inline

Get the clip name.

Returns
The clip name.

◆ getSpeed()

float kemena::kAnimation::getSpeed ( ) const
inline

Get the playback speed multiplier.

Returns
Speed multiplier (1.0 = normal speed).

◆ getTicksPerSecond()

float kemena::kAnimation::getTicksPerSecond ( ) const
inline

Get the tick rate.

Returns
Ticks per second.

◆ getTracks()

const std::vector< kObjectAnimTrack > & kemena::kAnimation::getTracks ( ) const

All tracks in this clip.

◆ setDuration()

void kemena::kAnimation::setDuration ( float d)
inline

Set the total clip length in ticks.

Parameters
dDuration in ticks.

◆ setName()

void kemena::kAnimation::setName ( const kString & n)
inline

Set the clip name.

Parameters
nNew clip name.

◆ setSpeed()

void kemena::kAnimation::setSpeed ( float s)
inline

Set the playback speed multiplier.

Parameters
sSpeed multiplier (1.0 = normal speed).

◆ setTicksPerSecond()

void kemena::kAnimation::setTicksPerSecond ( float t)
inline

Set the tick rate used to convert ticks to seconds.

Parameters
tTicks per second.

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