group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
AnimationLibrary Class Reference

Collection of animation clips loaded on top of a shared skeleton. More...

#include <AnimationLibrary.hpp>

Classes

struct  Impl
 

Public Member Functions

 AnimationLibrary ()
 
 ~AnimationLibrary ()
 
 AnimationLibrary (const AnimationLibrary &)=delete
 
AnimationLibraryoperator= (const AnimationLibrary &)=delete
 
 AnimationLibrary (AnimationLibrary &&) noexcept
 
AnimationLibraryoperator= (AnimationLibrary &&) noexcept
 
bool loadClipFromFBX (const CharacterRig &rig, ClipId id, const std::string &path)
 Load one clip from an FBX file onto the rig's skeleton.
 
bool has (ClipId id) const
 True if a clip has been loaded for id.
 
const ozz::animation::Animation * get (ClipId id) const
 Pointer to the loaded clip, or null if not loaded.
 
float duration (ClipId id) const
 Duration of the clip in seconds (0 if not loaded).
 

Detailed Description

Collection of animation clips loaded on top of a shared skeleton.

Each clip is stored as an owning ozz::animation::Animation keyed by ClipId. Lookup is O(1) via get(id).

Constructor & Destructor Documentation

◆ AnimationLibrary() [1/3]

AnimationLibrary::AnimationLibrary ( )

◆ ~AnimationLibrary()

AnimationLibrary::~AnimationLibrary ( )
default

◆ AnimationLibrary() [2/3]

AnimationLibrary::AnimationLibrary ( const AnimationLibrary )
delete

◆ AnimationLibrary() [3/3]

AnimationLibrary::AnimationLibrary ( AnimationLibrary &&  )
defaultnoexcept

Member Function Documentation

◆ duration()

float AnimationLibrary::duration ( ClipId  id) const

Duration of the clip in seconds (0 if not loaded).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

const ozz::animation::Animation * AnimationLibrary::get ( ClipId  id) const

Pointer to the loaded clip, or null if not loaded.

Here is the caller graph for this function:

◆ has()

bool AnimationLibrary::has ( ClipId  id) const

True if a clip has been loaded for id.

◆ loadClipFromFBX()

bool AnimationLibrary::loadClipFromFBX ( const CharacterRig rig,
ClipId  id,
const std::string &  path 
)

Load one clip from an FBX file onto the rig's skeleton.

Parameters
rigSource rig (used for joint names + rest poses).
idWhich slot the clip occupies.
pathAbsolute path to the FBX file.
Returns
True on success; false logs and leaves the slot empty.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

AnimationLibrary & AnimationLibrary::operator= ( AnimationLibrary &&  )
defaultnoexcept

◆ operator=() [2/2]

AnimationLibrary & AnimationLibrary::operator= ( const AnimationLibrary )
delete

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