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

Represents an animation clip containing multiple animation tracks for different entities. More...

#include <Animation/CAnimationClip.h>

Public Member Functions

void releaseAllAnim ()
 Releases and deletes all entity animations in this clip.
void addAnim (SEntityAnim *anim)
 Adds an entity animation to the clip.
int getNodeAnimCount ()
 Gets the number of entity animations (tracks) in the clip.
SEntityAnim * getAnimOfEntity (int i)
 Gets an entity animation by index.
SEntityAnim * getAnimOfEntity (const std::string &sceneNodeName)
 Gets an entity animation by the name of the scene node/entity.
float getRealTimeLength (float baseFps=30.0f)
 Gets the real-time length of the clip in milliseconds based on a target FPS.

Public Attributes

std::string AnimName
 The name of the animation clip.
float Duration
 Duration of the clip in seconds.
bool Loop
 Whether the clip should loop during playback.
std::vector< SEntityAnim * > AnimInfo
 List of entity animations (tracks) within this clip.
std::map< std::string, SEntityAnim * > AnimNameToInfo
 Map of entity animations indexed by entity name.

Detailed Description

Represents an animation clip containing multiple animation tracks for different entities.

Member Function Documentation

◆ addAnim()

void Skylicht::CAnimationClip::addAnim ( SEntityAnim * anim)
inline

Adds an entity animation to the clip.

Parameters
animPointer to the entity animation structure.

◆ getAnimOfEntity() [1/2]

SEntityAnim * Skylicht::CAnimationClip::getAnimOfEntity ( const std::string & sceneNodeName)
inline

Gets an entity animation by the name of the scene node/entity.

Parameters
sceneNodeNameThe name of the entity.
Returns
Pointer to SEntityAnim, or NULL if not found.

◆ getAnimOfEntity() [2/2]

SEntityAnim * Skylicht::CAnimationClip::getAnimOfEntity ( int i)
inline

Gets an entity animation by index.

Parameters
iThe track index.
Returns
Pointer to SEntityAnim.

◆ getNodeAnimCount()

int Skylicht::CAnimationClip::getNodeAnimCount ( )
inline

Gets the number of entity animations (tracks) in the clip.

Returns
Track count.

◆ getRealTimeLength()

float Skylicht::CAnimationClip::getRealTimeLength ( float baseFps = 30.0f)
inline

Gets the real-time length of the clip in milliseconds based on a target FPS.

Parameters
baseFpsThe reference frames per second (default: 30).
Returns
Duration in milliseconds.

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