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

Container for a collection of animation clips. More...

#include <Animation/CAnimation.h>

Public Member Functions

CAnimationClipgetAnim (const char *lpAnimName)
 Gets an animation clip by name.
CAnimationClipgetAnim (int animID)
 Gets an animation clip by index.
int getAnimCount ()
 Gets the total number of animation clips.
void addClip (CAnimationClip *clip)
 Adds a new animation clip to the collection.
void sortAnimByName ()
 Sorts animation clips alphabetically by name.
std::vector< CAnimationClip * > * getAllAnimClip ()
 Returns the internal vector of animation clips.
std::map< std::string, CAnimationClip * > * getAllAnimNameClip ()
 Returns the internal map of animation clips.
void removeAll ()
 Removes all animation clips from the collection.
void removeClip (const std::string &clipName)
 Removes a specific animation clip by name.
void renameClip (const std::string &oldName, const std::string &newName)
 Renames an animation clip.

Protected Attributes

std::vector< CAnimationClip * > m_clips
std::map< std::string, CAnimationClip * > m_clipName

Detailed Description

Container for a collection of animation clips.

Member Function Documentation

◆ addClip()

void Skylicht::CAnimation::addClip ( CAnimationClip * clip)
inline

Adds a new animation clip to the collection.

Parameters
clipPointer to the clip to add.

◆ getAllAnimClip()

std::vector< CAnimationClip * > * Skylicht::CAnimation::getAllAnimClip ( )
inline

Returns the internal vector of animation clips.

Returns
Pointer to vector of clips.

◆ getAllAnimNameClip()

std::map< std::string, CAnimationClip * > * Skylicht::CAnimation::getAllAnimNameClip ( )
inline

Returns the internal map of animation clips.

Returns
Pointer to map of clips indexed by name.

◆ getAnim() [1/2]

CAnimationClip * Skylicht::CAnimation::getAnim ( const char * lpAnimName)
inline

Gets an animation clip by name.

Parameters
lpAnimNameThe name of the animation.
Returns
Pointer to CAnimationClip, or NULL if not found.

◆ getAnim() [2/2]

CAnimationClip * Skylicht::CAnimation::getAnim ( int animID)
inline

Gets an animation clip by index.

Parameters
animIDThe index of the animation.
Returns
Pointer to CAnimationClip.

◆ getAnimCount()

int Skylicht::CAnimation::getAnimCount ( )
inline

Gets the total number of animation clips.

Returns
Number of clips.

◆ removeClip()

void Skylicht::CAnimation::removeClip ( const std::string & clipName)

Removes a specific animation clip by name.

Parameters
clipNameThe name of the clip to remove.

◆ renameClip()

void Skylicht::CAnimation::renameClip ( const std::string & oldName,
const std::string & newName )

Renames an animation clip.

Parameters
oldNameThe current name of the clip.
newNameThe new name for the clip.

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