Singleton manager for loading, caching, and exporting animations.
More...
#include <Animation/CAnimationManager.h>
|
|
std::map< std::string, CAnimationClip * > | m_clips |
| | Cached animation clips indexed by resource path.
|
|
std::map< std::string, CAnimation * > | m_animations |
| | Cached animation containers indexed by name.
|
Singleton manager for loading, caching, and exporting animations.
Example: Loading and playing an animation
CAnimationClip* clip = CAnimationManager::getInstance()->loadAnimation(
"Hero@Idle.sanim");
if (clip)
{
skeleton->setAnimation(clip, true);
}
Represents an animation clip containing multiple animation tracks for different entities.
Definition CAnimationClip.h:41
◆ createAnimation()
| CAnimation * Skylicht::CAnimationManager::createAnimation |
( |
const char * | name | ) |
|
Creates or retrieves a named animation container.
- Parameters
-
| name | The unique name for the container. |
- Returns
- Pointer to CAnimation.
◆ exportAnimation() [1/2]
| bool Skylicht::CAnimationManager::exportAnimation |
( |
CAnimationClip * | clip, |
|
|
const char * | output ) |
Exports an animation clip to a file.
- Parameters
-
| clip | Pointer to the clip to export. |
| output | Destination file path. |
- Returns
- True on success, false on failure.
◆ exportAnimation() [2/2]
Exports an animation clip using a specific exporter.
- Parameters
-
| clip | Pointer to the clip to export. |
| output | Destination file path. |
| exporter | Pointer to the exporter implementation. |
- Returns
- True on success, false on failure.
◆ getAnimation()
| CAnimation * Skylicht::CAnimationManager::getAnimation |
( |
const char * | animName | ) |
|
|
inline |
Gets a named animation container.
- Parameters
-
| animName | The name of the container. |
- Returns
- Pointer to CAnimation, or NULL if not found.
◆ loadAnimation() [1/2]
| CAnimationClip * Skylicht::CAnimationManager::loadAnimation |
( |
const char * | resource | ) |
|
Loads an animation clip from a file.
- Parameters
-
| resource | Path to the animation file (.dae, .fbx, .sanim). |
- Returns
- Pointer to the loaded CAnimationClip, or NULL on failure.
◆ loadAnimation() [2/2]
Loads an animation clip using a specific importer.
- Parameters
-
| resource | Path or identifier for the animation resource. |
| importer | Pointer to the importer implementation. |
- Returns
- Pointer to the loaded CAnimationClip, or NULL on failure.
The documentation for this class was generated from the following file: