#include <AttachmentNode.h>
Inherits EMotionFX::Attachment.
|
enum | { TYPE_ID = 0x00000001
} |
|
A regular node attachment. With node we mean that this attachment is only influenced by one given node in the ActorInstance it is attached to. An example of this could be a gun attached to the hand node of a character. Please keep in mind that the actor instance you attach can be a fully animated character as well. It is just being influenced by one single node of the actor instance you attach it to.
◆ AttachmentNode()
EMotionFX::AttachmentNode::AttachmentNode |
( |
ActorInstance * |
attachToActorInstance, |
|
|
size_t |
attachToNodeIndex, |
|
|
ActorInstance * |
attachment, |
|
|
bool |
managedExternally = false |
|
) |
| |
|
protected |
The constructor for a regular attachment.
- Parameters
-
attachToActorInstance | The actor instance to attach to (for example a cowboy). |
attachToNodeIndex | The node to attach to. This has to be part of the actor where the attachToActorInstance is instanced from. |
attachment | The actor instance that you want to attach to this node (for example a gun). |
managedExternally | Specify whether the parent transform (where we are attached to) propagates into the attachment actor instance. |
◆ ~AttachmentNode()
virtual EMotionFX::AttachmentNode::~AttachmentNode |
( |
| ) |
|
|
protectedvirtual |
The destructor. This does NOT delete the actor instance used by the attachment.
◆ Create()
Create an attachment that is attached to a single node.
- Parameters
-
attachToActorInstance | The actor instance to attach to, for example the main character in the game. |
attachToNodeIndex | The node to attach to. This has to be part of the actor where the attachToActorInstance is instanced from. |
attachment | The actor instance that you want to attach to this node (for example a gun). |
managedExternally | Specify whether the parent transform (where we are attached to) propagates into the attachment actor instance. |
◆ GetAttachToNodeIndex()
size_t EMotionFX::AttachmentNode::GetAttachToNodeIndex |
( |
| ) |
const |
Get the node where we attach something to. This node is part of the actor from which the actor instance returned by GetAttachToActorInstance() is created.
- Returns
- The node index where we will attach this attachment to.
◆ GetIsInfluencedByMultipleJoints()
bool EMotionFX::AttachmentNode::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.
◆ GetIsManagedExternally()
bool EMotionFX::AttachmentNode::GetIsManagedExternally |
( |
| ) |
const |
Check whether the transformations of the attachment are modified by using a parent-child relationship in forward kinematics. When external management is disbled (which it is on default), then the parent actor instance's global transform is forwarded into the attachment's actor instance. When external management is disabled, this will not happen.
- Returns
- Returns true when this attachments transforms are managed externally.
◆ GetType()
uint32 EMotionFX::AttachmentNode::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::AttachmentNode::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.
◆ SetIsManagedExternally()
void EMotionFX::AttachmentNode::SetIsManagedExternally |
( |
bool |
managedExternally | ) |
|
Specify whether the transformations of the attachment are modified by using a parent-child relationship in forward kinematics. When external management is disbled (which it is on default), then the parent actor instance's global transform is forwarded into the attachment's actor instance. When external management is disabled, this will not happen.
- Parameters
-
managedExternally | When set to true, the parent transformation will not propagate into the attachment's actor instance transformation. |
◆ Update()
void EMotionFX::AttachmentNode::Update |
( |
| ) |
|
|
overridevirtual |
◆ m_attachedToNode
size_t EMotionFX::AttachmentNode::m_attachedToNode |
|
protected |
The node where the attachment is linked to.
◆ m_isManagedExternally
bool EMotionFX::AttachmentNode::m_isManagedExternally |
|
protected |
Is this attachment basically managed (transformation wise) by something else? (like an Attachment component). The default is false.
The documentation for this class was generated from the following file:
- Gems/EMotionFX/Code/EMotionFX/Source/AttachmentNode.h