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::ChunkProcessor Class Referenceabstract

#include <ChunkProcessors.h>

Inherits EMotionFX::BaseObject.

Public Member Functions

virtual AZ_CLASS_ALLOCATOR_DECL bool Process (MCore::File *file, Importer::ImportParameters &importParams)=0
 
uint32 GetChunkID () const
 
uint32 GetVersion () const
 
void SetLogging (bool loggingActive)
 
bool GetLogging () const
 
- Public Member Functions inherited from EMotionFX::BaseObject
 BaseObject ()
 
virtual ~BaseObject ()
 
- Public Member Functions inherited from MCore::MemoryObject
 MemoryObject ()
 
virtual ~MemoryObject ()
 
void IncreaseReferenceCount ()
 
void DecreaseReferenceCount ()
 
void Destroy ()
 
uint32 GetReferenceCount () const
 

Static Public Member Functions

static MCORE_INLINE void ConvertVector3 (AZ::Vector3 *value, MCore::Endian::EEndianType endianType, uint32 count=1)
 
static MCORE_INLINE void ConvertQuaternion (AZ::Quaternion *value, MCore::Endian::EEndianType endianType, uint32 count=1)
 
static MCORE_INLINE void Convert16BitQuaternion (MCore::Compressed16BitQuaternion *value, MCore::Endian::EEndianType endianType, uint32 count=1)
 
static MCORE_INLINE void ConvertScale (AZ::Vector3 *value, MCore::Endian::EEndianType endianType, uint32 count=1)
 

Protected Member Functions

 ChunkProcessor (uint32 chunkID, uint32 version)
 
virtual ~ChunkProcessor ()
 
- Protected Member Functions inherited from EMotionFX::BaseObject
void Delete () override
 
virtual void Delete ()
 

Protected Attributes

uint32 m_chunkId
 
uint32 m_version
 
bool m_loggingActive
 

Detailed Description

The chunk processor base class. Chunk processors read in a specific chunk, convert them into EMotion FX objects and apply them to either actors or motions. Chunk processors have got a version number, so that there is the possibility of having several processor implementations with different version numbers for one type of chunk. This gives us backward compatibility. Logging can be actived or deactived by functions provided by the base class.

Constructor & Destructor Documentation

◆ ChunkProcessor()

EMotionFX::ChunkProcessor::ChunkProcessor ( uint32  chunkID,
uint32  version 
)
protected

The constructor.

Parameters
chunkIDThe ID of the chunk processor.
versionThe version number of the chunk processor, so what version number of the given chunk this processor can read and process.

◆ ~ChunkProcessor()

virtual EMotionFX::ChunkProcessor::~ChunkProcessor ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ Convert16BitQuaternion()

static MCORE_INLINE void EMotionFX::ChunkProcessor::Convert16BitQuaternion ( MCore::Compressed16BitQuaternion value,
MCore::Endian::EEndianType  endianType,
uint32  count = 1 
)
inlinestatic

Convert a 16 bit compressed Quaternion object. This will convert the coordinate system and the endian type.

Parameters
valueThe quaternion to convert.
endianTypeThe endian type in which the current object is stored.
countThe number of items to convert.

◆ ConvertQuaternion()

static MCORE_INLINE void EMotionFX::ChunkProcessor::ConvertQuaternion ( AZ::Quaternion *  value,
MCore::Endian::EEndianType  endianType,
uint32  count = 1 
)
inlinestatic

Convert a Quaternion object. This will convert the coordinate system and the endian type.

Parameters
valueThe quaternion to convert.
endianTypeThe endian type in which the current object is stored.
countThe number of items to convert.

◆ ConvertScale()

static MCORE_INLINE void EMotionFX::ChunkProcessor::ConvertScale ( AZ::Vector3 *  value,
MCore::Endian::EEndianType  endianType,
uint32  count = 1 
)
inlinestatic

Convert a Vector3 object as scale. This is a bit different from the ConvertVector3, as it will not invert any of the x, y or z components if the coordinate system will require this. This will convert the coordinate system and the endian type.

Parameters
valueThe vector to convert.
endianTypeThe endian type in which the current object is stored.
countThe number of items to convert.

◆ ConvertVector3()

static MCORE_INLINE void EMotionFX::ChunkProcessor::ConvertVector3 ( AZ::Vector3 *  value,
MCore::Endian::EEndianType  endianType,
uint32  count = 1 
)
inlinestatic

Convert a Vector3 object. This will convert the coordinate system and the endian type.

Parameters
valueThe vector to convert.
endianTypeThe endian type in which the current object is stored.
countThe number of items to convert.

◆ GetChunkID()

uint32 EMotionFX::ChunkProcessor::GetChunkID ( ) const

Return the id of the chunk processor.

Returns
The id of the chunk processor.

◆ GetLogging()

bool EMotionFX::ChunkProcessor::GetLogging ( ) const

Return the log status.

Returns
The log status. True if the chunk shall log events, false if not.

◆ GetVersion()

uint32 EMotionFX::ChunkProcessor::GetVersion ( ) const

Return the version number of the chunk processor.

Returns
The version number of the chunk processor.

◆ Process()

virtual AZ_CLASS_ALLOCATOR_DECL bool EMotionFX::ChunkProcessor::Process ( MCore::File file,
Importer::ImportParameters importParams 
)
pure virtual

Read and process a chunk. This is the main method. It will return false when we have reached the end of the file or something bad has happened while reading. This is pure virtual method, which has to be overloaded by the processors inherited from this base class.

Parameters
fileThe file from which the processor reads out the chunk. &
importParamsThe import parameters.
Returns
False when we reached the end of the file, true if not.

◆ SetLogging()

void EMotionFX::ChunkProcessor::SetLogging ( bool  loggingActive)

Set the log status.

Parameters
Thelog status. True if the chunk shall log events, false if not.

Member Data Documentation

◆ m_chunkId

uint32 EMotionFX::ChunkProcessor::m_chunkId
protected

The id of the chunk processor.

◆ m_loggingActive

bool EMotionFX::ChunkProcessor::m_loggingActive
protected

When set to true the processor chunk will log events, otherwise no logging will be performed.

◆ m_version

uint32 EMotionFX::ChunkProcessor::m_version
protected

The version number of the chunk processor, to provide backward compatibility.


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