Skylicht Engine
Loading...
Searching...
No Matches
Skylicht::CAnimationTrack Class Reference

Handles interpolation and data retrieval for a single animation track. More...

#include <Animation/CAnimationTrack.h>

Public Member Functions

void getFrameData (f32 frame, core::vector3df &position, core::vector3df &scale, core::quaternion &rotation)
 Calculates the interpolated PRS data for a specific frame.
CAnimationDatagetAnimData ()
 Gets the underlying animation data.
void clearAllKeyFrame ()
 Clears all keyframe search hints and resets the track.
void setAnimationData (CAnimationData *data)
 Sets the source animation data for this track.
CAnimationDatagetFrameData ()
 Gets the underlying animation data.

Static Public Member Functions

static void quaternionSlerp (core::quaternion &result, core::quaternion q1, core::quaternion q2, float t)
 Static utility for spherical linear interpolation between quaternions.

Public Attributes

std::string Name
 The name of the track.
bool HaveAnimation
 Whether this track currently has animation data.

Protected Attributes

CAnimationDatam_data
 Pointer to the shared animation data.

Detailed Description

Handles interpolation and data retrieval for a single animation track.

Member Function Documentation

◆ getAnimData()

CAnimationData * Skylicht::CAnimationTrack::getAnimData ( )

Gets the underlying animation data.

Returns
Pointer to CAnimationData.

◆ getFrameData() [1/2]

CAnimationData * Skylicht::CAnimationTrack::getFrameData ( )
inline

Gets the underlying animation data.

Returns
Pointer to CAnimationData.

◆ getFrameData() [2/2]

void Skylicht::CAnimationTrack::getFrameData ( f32 frame,
core::vector3df & position,
core::vector3df & scale,
core::quaternion & rotation )

Calculates the interpolated PRS data for a specific frame.

Parameters
frameTime in seconds.
position[out] Interpolated position.
scale[out] Interpolated scale.
rotation[out] Interpolated rotation.

◆ quaternionSlerp()

void Skylicht::CAnimationTrack::quaternionSlerp ( core::quaternion & result,
core::quaternion q1,
core::quaternion q2,
float t )
static

Static utility for spherical linear interpolation between quaternions.

Parameters
resultResulting quaternion.
q1Start quaternion.
q2End quaternion.
tInterpolation factor (0 to 1).

◆ setAnimationData()

void Skylicht::CAnimationTrack::setAnimationData ( CAnimationData * data)
inline

Sets the source animation data for this track.

Parameters
dataPointer to animation data.

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