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

#include <MeshDeformer.h>

Inherits MCore::RefCounted.

Inherited by EMotionFX::DualQuatSkinDeformer, EMotionFX::MorphMeshDeformer, and EMotionFX::SoftSkinDeformer.

Public Member Functions

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 MCore::RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void IncreaseReferenceCount ()
 
void DecreaseReferenceCount ()
 
void Destroy ()
 
uint32 GetReferenceCount () const
 

Protected Member Functions

 MeshDeformer (Mesh *mesh)
 
virtual ~MeshDeformer ()
 
- Protected Member Functions inherited from MCore::RefCounted
virtual void Delete ()
 

Protected Attributes

Meshm_mesh
 
bool m_isEnabled
 

Detailed Description

The mesh deformer base class. A mesh deformer can deform (apply modifications) on a given mesh. Examples of deformers could be a TwistDeformer, SoftSkinDeformer, MorphDeformer, etc. Every deformer has its own unique type ID number and the MeshDeformerStack contains a list of deformers which are executed in the specified order.

Constructor & Destructor Documentation

◆ MeshDeformer()

EMotionFX::MeshDeformer::MeshDeformer ( Mesh mesh)
protected

Default constructor.

Parameters
meshA pointer to the mesh to deform.

◆ ~MeshDeformer()

virtual EMotionFX::MeshDeformer::~MeshDeformer ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ Clone()

virtual MeshDeformer* EMotionFX::MeshDeformer::Clone ( Mesh mesh) const
pure virtual

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

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

Implemented in EMotionFX::SoftSkinDeformer, EMotionFX::MorphMeshDeformer, and EMotionFX::DualQuatSkinDeformer.

◆ GetIsEnabled()

bool EMotionFX::MeshDeformer::GetIsEnabled ( ) const

Check if the controller is enabled or not.

Returns
Returns true when the controller is active (enabled) or false when the controller is inactive (disabled).

◆ GetSubType()

virtual uint32 EMotionFX::MeshDeformer::GetSubType ( ) const
pure virtual

Returns the sub type identification number. This number is used to identify special specilizations of a given deformer, like the same type of deformer, but with P4 optimizations. In that case the type will be the same, but the subtype will be different for each specialization.

Returns
The unique subtype identification number.

Implemented in EMotionFX::SoftSkinDeformer, EMotionFX::MorphMeshDeformer, and EMotionFX::DualQuatSkinDeformer.

◆ GetType()

virtual uint32 EMotionFX::MeshDeformer::GetType ( ) const
pure virtual

Returns the type identification number of the deformer class.

Returns
The type identification number.

Implemented in EMotionFX::SoftSkinDeformer, EMotionFX::MorphMeshDeformer, and EMotionFX::DualQuatSkinDeformer.

◆ Reinitialize()

virtual void EMotionFX::MeshDeformer::Reinitialize ( Actor actor,
Node node,
size_t  lodLevel,
uint16  highestJointIndex 
)
virtual

Reinitialize the mesh deformer.

Parameters
actorThe actor that will use the deformer.
nodeThe node where the mesh belongs to during this initialization.
lodLevelThe LOD level of the mesh the mesh deformer works on.
highestJointIndexThe pre-calculated highest index of all the joint id's in m_mesh

Reimplemented in EMotionFX::MorphMeshDeformer, EMotionFX::DualQuatSkinDeformer, and EMotionFX::SoftSkinDeformer.

◆ SetIsEnabled()

void EMotionFX::MeshDeformer::SetIsEnabled ( bool  enabled)

Enable or disable the controller. Disabling a controller just results in the Update method of the controller not being called during the Actor::Update() call.

Parameters
enabledSet to true when you want to enable the controller or to false when you want to disable the controller.

◆ Update()

virtual void EMotionFX::MeshDeformer::Update ( ActorInstance actorInstance,
Node node,
float  timeDelta 
)
pure virtual

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.

Implemented in EMotionFX::SoftSkinDeformer, EMotionFX::MorphMeshDeformer, and EMotionFX::DualQuatSkinDeformer.

Member Data Documentation

◆ m_isEnabled

bool EMotionFX::MeshDeformer::m_isEnabled
protected

When set to true, this mesh deformer will be processed, otherwise it will be skipped during update.

◆ m_mesh

Mesh* EMotionFX::MeshDeformer::m_mesh
protected

Pointer to the mesh to which the deformer belongs to.


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