Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::MotionSet::MotionEntry Class Reference

Public Member Functions

 AZ_RTTI (MotionSet::MotionEntry, "{A1859687-2DE7-4B29-8A39-07836FDF5956}")
 
 MotionEntry (const char *filename, const AZStd::string &motionId, Motion *motion=nullptr)
 
void SetFilename (const char *filename)
 
const char * GetFilename () const
 
const AZStd::string & GetFilenameString () const
 
MotionGetMotion () const
 
void SetMotion (Motion *motion)
 
const AZStd::string & GetId () const
 
bool GetLoadingFailed () const
 
void SetLoadingFailed (bool failed)
 
void Reset ()
 
bool CheckIfIsAbsoluteFilename () const
 

Static Public Member Functions

static bool CheckIfIsAbsoluteFilename (const AZStd::string &filename)
 
static void Reflect (AZ::ReflectContext *context)
 

Friends

class MotionSet
 

Constructor & Destructor Documentation

◆ MotionEntry()

EMotionFX::MotionSet::MotionEntry::MotionEntry ( const char *  filename,
const AZStd::string &  motionId,
Motion motion = nullptr 
)

Constructor.

Parameters
[in]filenameThe local filename of the motion.
[in]motionIdThe motion name.
[in]motionA pointer to the motion.

Member Function Documentation

◆ CheckIfIsAbsoluteFilename() [1/2]

bool EMotionFX::MotionSet::MotionEntry::CheckIfIsAbsoluteFilename ( ) const

Check if the filename assigned to the motion entry contains a file path relative to the media root folder or if it is an absolute file path.

Returns
True in case the filename is absolute, false in case it is relative to the media root folder.

◆ CheckIfIsAbsoluteFilename() [2/2]

static bool EMotionFX::MotionSet::MotionEntry::CheckIfIsAbsoluteFilename ( const AZStd::string &  filename)
static

Check if the given filename contains a file path relative to the media root folder or if it is an absolute file path.

Returns
True in case the filename is absolute, false in case it is relative to the media root folder.

◆ GetFilename()

const char * EMotionFX::MotionSet::MotionEntry::GetFilename ( ) const
inline

Get the filename of the motion.

Returns
The filename of the motion.

◆ GetFilenameString()

const AZStd::string & EMotionFX::MotionSet::MotionEntry::GetFilenameString ( ) const
inline

Returns the filename of the motion, as a string object.

Returns
The filename of the motion.

◆ GetId()

const AZStd::string & EMotionFX::MotionSet::MotionEntry::GetId ( ) const

Get the id string of the motion.

Returns
The string identification of the the motion.

◆ GetLoadingFailed()

bool EMotionFX::MotionSet::MotionEntry::GetLoadingFailed ( ) const
inline

Check if the last loading attempt failed or not. It is possible that the motion pointer is nullptr, but that this was because loading failed, rather than not having tried to load before.

Returns
Returns true when loading failed before, otherwise false is returned.

◆ GetMotion()

Motion * EMotionFX::MotionSet::MotionEntry::GetMotion ( ) const
inline

Get the motion for this entry.

Returns
The motion pointer.

◆ Reset()

void EMotionFX::MotionSet::MotionEntry::Reset ( )
inline

Reset the entry motion so that it will reload it next time automatically.

◆ SetFilename()

void EMotionFX::MotionSet::MotionEntry::SetFilename ( const char *  filename)
inline

Set the filename of the motion.

Parameters
[in]filenameThe filename of the motion.

◆ SetLoadingFailed()

void EMotionFX::MotionSet::MotionEntry::SetLoadingFailed ( bool  failed)
inline

Set the flag that specifies whether loading failed or not. This flag is used to skip trying to reload the motion on demand when it is nullptr and failed to load before.

Parameters
failedSet to true to skip trying to reload on demand again.

◆ SetMotion()

void EMotionFX::MotionSet::MotionEntry::SetMotion ( Motion motion)
inline

Set the motion pointer.

Parameters
[in]motionThe motion to use for this entry.

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