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

#include <AttachmentSkin.h>

Inherits EMotionFX::Attachment.

Classes

struct  JointMapping
 
struct  MorphMapping
 

Public Types

enum  { TYPE_ID = 0x00000002 }
 

Public Member Functions

uint32 GetType () const override
 
const char * GetTypeString () const override
 
bool GetIsInfluencedByMultipleJoints () const override final
 
virtual void UpdateJointTransforms (Pose &outPose) override
 
virtual void Update () override
 
MCORE_INLINE JointMappingGetJointMapping (size_t nodeIndex)
 
MCORE_INLINE const JointMappingGetJointMapping (size_t nodeIndex) const
 
- Public Member Functions inherited from EMotionFX::Attachment
virtual uint32 GetType () const =0
 
virtual const char * GetTypeString () const =0
 
virtual bool GetIsInfluencedByMultipleJoints () const =0
 
virtual void Update ()
 
virtual void UpdateJointTransforms (Pose &outPose)
 
ActorInstanceGetAttachmentActorInstance () const
 
ActorInstanceGetAttachToActorInstance () 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 AttachmentSkinCreate (ActorInstance *attachToActorInstance, ActorInstance *attachment)
 

Protected Member Functions

 AttachmentSkin (ActorInstance *attachToActorInstance, ActorInstance *attachment)
 
virtual ~AttachmentSkin ()
 
void InitJointMap ()
 
void InitMorphMap ()
 
- Protected Member Functions inherited from EMotionFX::Attachment
 Attachment (ActorInstance *attachToActorInstance, ActorInstance *attachment)
 
virtual ~Attachment ()
 
- Protected Member Functions inherited from EMotionFX::BaseObject
void Delete () override
 
virtual void Delete ()
 

Protected Attributes

AZStd::vector< JointMappingm_jointMap
 
AZStd::vector< MorphMappingm_morphMap
 
- Protected Attributes inherited from EMotionFX::Attachment
ActorInstancem_attachment
 
ActorInstancem_actorInstance
 

Detailed Description

The skin attachment class. This represents an attachment that is influenced by multiple joints, skinned to the main skeleton of the actor it gets attached to. An example could be if you want to put on some pair of pants on the character. This can be used to customize your characters. So this attachment will basically copy the tranformations of the main character to the joints inside the actor instance that represents this attachment.

Constructor & Destructor Documentation

◆ AttachmentSkin()

EMotionFX::AttachmentSkin::AttachmentSkin ( ActorInstance attachToActorInstance,
ActorInstance attachment 
)
protected

The constructor for a skin attachment.

Parameters
attachToActorInstanceThe actor instance to attach to (for example a cowboy).
attachmentThe actor instance that you want to attach to this joint (for example a gun).

◆ ~AttachmentSkin()

virtual EMotionFX::AttachmentSkin::~AttachmentSkin ( )
protectedvirtual

The destructor. This does NOT delete the actor instance used by the attachment.

Member Function Documentation

◆ Create()

static AttachmentSkin * EMotionFX::AttachmentSkin::Create ( ActorInstance attachToActorInstance,
ActorInstance attachment 
)
static

Create the attachment that is influenced by multiple joints.

Parameters
attachToActorInstanceThe actor instance to attach to, for example your main character.
attachmentThe actor instance that you want to attach to this actor instance, for example an actor instance that represents some new pants.

◆ GetIsInfluencedByMultipleJoints()

bool EMotionFX::AttachmentSkin::GetIsInfluencedByMultipleJoints ( ) const
inlinefinaloverridevirtual

Check if this attachment is being influenced by multiple joints or not. This is the case for attachments such as clothing items which get influenced by multiple joints inside the actor instance they are attached to.

Returns
Returns true if it is influenced by multiple joints, otherwise false is returned.

Implements EMotionFX::Attachment.

◆ GetJointMapping() [1/2]

MCORE_INLINE JointMapping & EMotionFX::AttachmentSkin::GetJointMapping ( size_t  nodeIndex)
inline

Get the mapping for a given joint.

Parameters
nodeIndexThe joint index inside the actor instance that represents the attachment.
Returns
A reference to the mapping information for this joint.

◆ GetJointMapping() [2/2]

MCORE_INLINE const JointMapping & EMotionFX::AttachmentSkin::GetJointMapping ( size_t  nodeIndex) const
inline

Get the mapping for a given joint.

Parameters
nodeIndexThe joint index inside the actor instance that represents the attachment.
Returns
A reference to the mapping information for this joint.

◆ GetType()

uint32 EMotionFX::AttachmentSkin::GetType ( ) const
inlineoverridevirtual

Get the attachment type ID. Every class inherited from this base class should have some TYPE ID.

Returns
The type ID of this attachment class.

Implements EMotionFX::Attachment.

◆ GetTypeString()

const char * EMotionFX::AttachmentSkin::GetTypeString ( ) const
inlineoverridevirtual

Get the attachment type string. Every class inherited from this base class should have some type ID string, which should be equal to the class name really.

Returns
The type string of this attachment class, which should be the class name.

Implements EMotionFX::Attachment.

◆ InitJointMap()

void EMotionFX::AttachmentSkin::InitJointMap ( )
protected

Initialize the joint map, which links the joints inside the attachment with the actor where we attach to. It is used to copy over the transformations from the main parent actor, to the actor instance representing the attachment object.

◆ Update()

virtual void EMotionFX::AttachmentSkin::Update ( )
overridevirtual

Update the attachment. This can update the parent world space transform stored inside the actor instance.

Reimplemented from EMotionFX::Attachment.

◆ UpdateJointTransforms()

virtual void EMotionFX::AttachmentSkin::UpdateJointTransforms ( Pose outPose)
overridevirtual

Update the joint transforms of the attachment. This can be implemented for say skin attachments, which copy over joint transforms from the actor instance they are attached to.

Parameters
outPoseThe pose that will be modified.

Reimplemented from EMotionFX::Attachment.

Member Data Documentation

◆ m_jointMap

AZStd::vector<JointMapping> EMotionFX::AttachmentSkin::m_jointMap
protected

Specifies which joints we need to copy transforms from and to.

◆ m_morphMap

AZStd::vector<MorphMapping> EMotionFX::AttachmentSkin::m_morphMap
protected

Maps morph targets of the actor instance we attach to with morphs in the attachment actor instance.


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