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

#include <MorphMeshDeformer.h>

Inherits EMotionFX::MeshDeformer.

Classes

struct  DeformPass
 

Public Types

enum  { TYPE_ID = 0x00000002 }
 
enum  { SUBTYPE_ID = 0x00000001 }
 

Public Member Functions

uint32 GetType () const override
 
uint32 GetSubType () const override
 
void Update (ActorInstance *actorInstance, Node *node, float timeDelta) override
 
void Reinitialize (Actor *actor, Node *node, size_t lodLevel, uint16 highestJointIndex=0) override
 
MeshDeformerClone (Mesh *mesh) const override
 
void AddDeformPass (const DeformPass &deformPass)
 
size_t GetNumDeformPasses () const
 
void ReserveDeformPasses (size_t numPasses)
 
- Public Member Functions inherited from EMotionFX::MeshDeformer
virtual void Update (ActorInstance *actorInstance, Node *node, float timeDelta)=0
 
virtual void Reinitialize (Actor *actor, Node *node, size_t lodLevel, uint16 highestJointIndex)
 
virtual MeshDeformerClone (Mesh *mesh) const =0
 
virtual uint32 GetType () const =0
 
virtual uint32 GetSubType () const =0
 
bool GetIsEnabled () const
 
void SetIsEnabled (bool enabled)
 
- 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 MorphMeshDeformerCreate (Mesh *mesh)
 

Additional Inherited Members

- Protected Member Functions inherited from EMotionFX::MeshDeformer
 MeshDeformer (Mesh *mesh)
 
virtual ~MeshDeformer ()
 
- Protected Member Functions inherited from EMotionFX::BaseObject
void Delete () override
 
virtual void Delete ()
 
- Protected Attributes inherited from EMotionFX::MeshDeformer
Meshm_mesh
 
bool m_isEnabled
 

Detailed Description

The mesh morph deformer. This works together with the morph setup (MorphSetup). Basically what it does is: output = input + morphTargetA*weightA + morphTargetB*weightB + morphTargetC*weightC.... etc.

Member Function Documentation

◆ AddDeformPass()

void EMotionFX::MorphMeshDeformer::AddDeformPass ( const DeformPass deformPass)

Add a deform pass.

Parameters
deformPassThe deform pass to add.

◆ Clone()

MeshDeformer * EMotionFX::MorphMeshDeformer::Clone ( Mesh mesh) const
overridevirtual

Creates an exact clone (copy) of this deformer, and returns a pointer to it.

Parameters
meshThe mesh to apply the deformer on.
Returns
A pointer to the newly created clone of this deformer.

Implements EMotionFX::MeshDeformer.

◆ Create()

static MorphMeshDeformer * EMotionFX::MorphMeshDeformer::Create ( Mesh mesh)
static

Creation method.

Parameters
meshA pointer to the mesh to deform.

◆ GetNumDeformPasses()

size_t EMotionFX::MorphMeshDeformer::GetNumDeformPasses ( ) const

Get the number of deform passes.

Returns
The number of deform passes.

◆ GetSubType()

uint32 EMotionFX::MorphMeshDeformer::GetSubType ( ) const
overridevirtual

Returns the unique subtype ID of this deformer. A subtype identifies the specialization type of the given deformer. A cplus plus version of a deformer could have a sub type of 0, while the SSE assembly optimized version would have a sub type of 1 for example.

Returns
The sub type identification number.

Implements EMotionFX::MeshDeformer.

◆ GetType()

uint32 EMotionFX::MorphMeshDeformer::GetType ( ) const
overridevirtual

Get the unique deformer type ID.

Returns
The unique ID of this deformer type.

Implements EMotionFX::MeshDeformer.

◆ Reinitialize()

void EMotionFX::MorphMeshDeformer::Reinitialize ( Actor actor,
Node node,
size_t  lodLevel,
uint16  highestJointIndex = 0 
)
overridevirtual

Reinitialize the mesh deformer.

Parameters
actorThe actor to to initialize the deformer for.
nodeThe node where the mesh belongs to during this initialization.
lodLevelThe LOD level of the mesh the mesh deformer works on.

Reimplemented from EMotionFX::MeshDeformer.

◆ ReserveDeformPasses()

void EMotionFX::MorphMeshDeformer::ReserveDeformPasses ( size_t  numPasses)

Pre-allocate space for the deform passes. This does not influence the return value of GetNumDeformPasses().

Parameters
numPassesThe number of passes to pre-allocate space for.

◆ Update()

void EMotionFX::MorphMeshDeformer::Update ( ActorInstance actorInstance,
Node node,
float  timeDelta 
)
overridevirtual

Update the mesh deformer.

Parameters
actorInstanceThe actor instance to use for the update. So the actor where the mesh belongs to during this update.
nodeThe node to use for the update, so the node where the mesh belongs to during this update.
timeDeltaThe time (in seconds) passed since the last call.

Implements EMotionFX::MeshDeformer.


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