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::TransformData Class Reference

#include <TransformData.h>

Inherits EMotionFX::BaseObject.

Public Types

enum  ENodeFlags { FLAG_HASSCALE = 1 << 0 }
 

Public Member Functions

void InitForActorInstance (ActorInstance *actorInstance)
 
void Release ()
 
MCORE_INLINE AZ::Matrix3x4 * GetSkinningMatrices ()
 
MCORE_INLINE const AZ::Matrix3x4 * GetSkinningMatrices () const
 
MCORE_INLINE PoseGetBindPose () const
 
MCORE_INLINE const PoseGetCurrentPose () const
 
MCORE_INLINE PoseGetCurrentPose ()
 
void ResetToBindPoseTransformation (size_t nodeIndex)
 
void ResetToBindPoseTransformations ()
 
 EMFX_SCALECODE (void SetBindPoseLocalScaleInherit(size_t nodeIndex, const AZ::Vector3 &scale);void SetBindPoseLocalScale(size_t nodeIndex, const AZ::Vector3 &scale);) MCORE_INLINE const ActorInstance *GetActorInstance() const
 
MCORE_INLINE size_t GetNumTransforms () const
 
void MakeBindPoseTransformsUnique ()
 
void SetNumMorphWeights (size_t numMorphWeights)
 
- 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 TransformDataCreate ()
 

Additional Inherited Members

- Protected Member Functions inherited from EMotionFX::BaseObject
void Delete () override
 
virtual void Delete ()
 

Detailed Description

The transformation data class. This class holds all transformation data for each node. This includes local space transforms, local space matrices as well as world space matrices. If for example you wish to get the world space matrices for all nodes, to be used for rendering, you will have to use this class.

Member Enumeration Documentation

◆ ENodeFlags

Some flags per node, that allow specific optimizations inside EMotion FX.

Enumerator
FLAG_HASSCALE 

Has the node a scale factor?

Member Function Documentation

◆ Create()

static TransformData * EMotionFX::TransformData::Create ( )
static

The creation method.

◆ GetSkinningMatrices() [1/2]

MCORE_INLINE AZ::Matrix3x4 * EMotionFX::TransformData::GetSkinningMatrices ( )
inline

Get the skinning matrices (offset from the pose). The size of the returned array is equal to the amount of nodes in the actor or the value returned by GetNumTransforms()

Returns
The array of skinning matrices.

◆ GetSkinningMatrices() [2/2]

MCORE_INLINE const AZ::Matrix3x4 * EMotionFX::TransformData::GetSkinningMatrices ( ) const
inline

Get the skinning matrices (offset from the pose), in read-only (const) mode. The size of the returned array is equal to the amount of nodes in the actor or the value returned by GetNumTransforms()

Returns
The array of skinning matrices.

◆ InitForActorInstance()

void EMotionFX::TransformData::InitForActorInstance ( ActorInstance actorInstance)

Initialize the transformation data for a given ActorInstance object. This will allocate data for the number of nodes in the actor. You can call this multiple times if needed.

Parameters
actorInstanceThe actor instance to initialize for.

◆ Release()

void EMotionFX::TransformData::Release ( )

Release all allocated memory.

◆ ResetToBindPoseTransformation()

void EMotionFX::TransformData::ResetToBindPoseTransformation ( size_t  nodeIndex)
inline

Reset the local space transform of a given node to its bind pose local space transform.

Parameters
nodeIndexThe node number, which must be in range of [0..GetNumTransforms()-1].

◆ ResetToBindPoseTransformations()

void EMotionFX::TransformData::ResetToBindPoseTransformations ( )
inline

Reset all local space transforms to the local space transforms of the bind pose.


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