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

#include <Attachment.h>

Inherits EMotionFX::BaseObject.

Inherited by EMotionFX::AttachmentNode, and EMotionFX::AttachmentSkin.

Public Member Functions

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
 

Protected Member Functions

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

Protected Attributes

ActorInstancem_attachment
 
ActorInstancem_actorInstance
 

Detailed Description

The attachment base class. An attachment can be a simple weapon attached to a hand node, but also a mesh or set of meshes and bones that deform with the main skeleton. This last example is useful for clothing items or character customization.

Constructor & Destructor Documentation

◆ Attachment()

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

The constructor.

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

◆ ~Attachment()

virtual EMotionFX::Attachment::~Attachment ( )
protectedvirtual

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

Member Function Documentation

◆ GetAttachmentActorInstance()

ActorInstance * EMotionFX::Attachment::GetAttachmentActorInstance ( ) const

Get the actor instance object of the attachment. This would for example return the actor instance that represents the gun when you attached a gun to a cowboy.

Returns
The actor instance representing the object you attach to something.

◆ GetAttachToActorInstance()

ActorInstance * EMotionFX::Attachment::GetAttachToActorInstance ( ) const

Get the actor instance where we attach this attachment to. This would for example return the cowboy, if we attach a gun to a cowboy.

Returns
The actor instance we are attaching something to.

◆ GetIsInfluencedByMultipleJoints()

virtual bool EMotionFX::Attachment::GetIsInfluencedByMultipleJoints ( ) const
pure virtual

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.

Implemented in EMotionFX::AttachmentNode, and EMotionFX::AttachmentSkin.

◆ GetType()

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

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.

Implemented in EMotionFX::AttachmentNode, and EMotionFX::AttachmentSkin.

◆ GetTypeString()

virtual const char * EMotionFX::Attachment::GetTypeString ( ) const
pure virtual

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.

Implemented in EMotionFX::AttachmentNode, and EMotionFX::AttachmentSkin.

◆ Update()

virtual void EMotionFX::Attachment::Update ( )
inlinevirtual

Update the attachment. This can internally update node matrices for example, or other things. This depends on the attachment type.

Reimplemented in EMotionFX::AttachmentNode, and EMotionFX::AttachmentSkin.

◆ UpdateJointTransforms()

virtual void EMotionFX::Attachment::UpdateJointTransforms ( Pose outPose)
inlinevirtual

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 in EMotionFX::AttachmentSkin.

Member Data Documentation

◆ m_actorInstance

ActorInstance* EMotionFX::Attachment::m_actorInstance
protected

The actor instance where this attachment is added to.

◆ m_attachment

ActorInstance* EMotionFX::Attachment::m_attachment
protected

The actor instance that represents the attachment.


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