#include <MorphSetup.h>
Inherits EMotionFX::BaseObject.
The morph setup class. This class contains a collection of morph targets. Each LOD in an Actor object can have a morph setup.
◆ MorphSetup()
EMotionFX::MorphSetup::MorphSetup |
( |
| ) |
|
|
protecteddefault |
◆ ~MorphSetup()
EMotionFX::MorphSetup::~MorphSetup |
( |
| ) |
|
|
protected |
The destructor. Automatically removes all morph targets from memory.
◆ AddMorphTarget()
void EMotionFX::MorphSetup::AddMorphTarget |
( |
MorphTarget * |
morphTarget | ) |
|
Add a morph target to this morph setup.
- Parameters
-
morphTarget | The morph target to add. |
◆ Clone()
MorphSetup * EMotionFX::MorphSetup::Clone |
( |
| ) |
const |
Clone the morph setup, and return the clone.
- Returns
- Returns an exact clone of this morph setup.
◆ FindMorphTargetByID()
MorphTarget * EMotionFX::MorphSetup::FindMorphTargetByID |
( |
uint32 |
id | ) |
const |
Find a morph target by its unique ID, which has been calculated based on its name. All morph targets with the same ID will also have the same name.
- Parameters
-
- Returns
- A pointer to the morph target that has the specified ID, or nullptr when none could be found.
◆ FindMorphTargetByName()
MorphTarget * EMotionFX::MorphSetup::FindMorphTargetByName |
( |
const char * |
name | ) |
const |
Find a morph target by its name. Please remember that this is case sensitive.
- Returns
- A pointer to the morph target, or nullptr when not found.
◆ FindMorphTargetByNameNoCase()
MorphTarget * EMotionFX::MorphSetup::FindMorphTargetByNameNoCase |
( |
const char * |
name | ) |
const |
Find a morph target by its name. Please remember that this is NOT case sensitive.
- Returns
- A pointer to the morph target, or nullptr when not found.
◆ FindMorphTargetIndexByName()
size_t EMotionFX::MorphSetup::FindMorphTargetIndexByName |
( |
const char * |
name | ) |
const |
Find a morph target index by its name. Please remember that this is case sensitive.
- Returns
- The index of the morph target that you can pass to GetMorphTarget(index).
◆ FindMorphTargetIndexByNameNoCase()
size_t EMotionFX::MorphSetup::FindMorphTargetIndexByNameNoCase |
( |
const char * |
name | ) |
const |
Find a morph target index by its name. Please remember that this is case insensitive.
- Returns
- The index of the morph target that you can pass to GetMorphTarget(index).
◆ FindMorphTargetNumberByID()
size_t EMotionFX::MorphSetup::FindMorphTargetNumberByID |
( |
uint32 |
id | ) |
const |
Find a morph target index by its unique ID, which has been calculated based on its name. All morph targets with the same ID will also have the same name.
- Parameters
-
- Returns
- The morph target number, or InvalidIndex when not found. You can use the returned number with the method GetMorphTarget(nr) in order to convert it into a direct pointer to the morph target.
◆ GetMorphTarget()
MCORE_INLINE MorphTarget * EMotionFX::MorphSetup::GetMorphTarget |
( |
size_t |
nr | ) |
const |
|
inline |
Get a given morph target.
- Parameters
-
- Returns
- A pointer to the morph target.
◆ GetNumMorphTargets()
MCORE_INLINE size_t EMotionFX::MorphSetup::GetNumMorphTargets |
( |
| ) |
const |
|
inline |
Get the number of morph targets inside this morph setup.
- Returns
- The number of morph targets.
◆ RemoveAllMorphTargets()
void EMotionFX::MorphSetup::RemoveAllMorphTargets |
( |
| ) |
|
Remove all morph targets inside this setup. NOTE: They will also be deleted from memory.
◆ RemoveMorphTarget() [1/2]
void EMotionFX::MorphSetup::RemoveMorphTarget |
( |
MorphTarget * |
morphTarget, |
|
|
bool |
delFromMem = true |
|
) |
| |
Remove a given morph target.
- Parameters
-
morphTarget | A pointer to the morph target to remove. This morph target must be part of this morph setup. |
delFromMem | When set to true, the morph target will be deleted from memory as well. When false, it will only be removed from the array of morph targets inside this class. |
◆ RemoveMorphTarget() [2/2]
void EMotionFX::MorphSetup::RemoveMorphTarget |
( |
size_t |
nr, |
|
|
bool |
delFromMem = true |
|
) |
| |
Remove a given morph target, by index.
- Parameters
-
nr | The morph target number to remove. This value must be in range of [0..GetNumMorphTargets()-1]. |
delFromMem | When set to true, the morph target will be deleted from memory as well. When false, it will only be removed from the array of morph targets inside this class. |
◆ ReserveMorphTargets()
void EMotionFX::MorphSetup::ReserveMorphTargets |
( |
size_t |
numMorphTargets | ) |
|
Pre-allocate space for a given amount of morph targets. This does not influence the return value of GetNumMorphTargets().
- Parameters
-
numMorphTargets | The number of morph targets to pre-allocate space for. |
◆ Scale()
void EMotionFX::MorphSetup::Scale |
( |
float |
scaleFactor | ) |
|
Scale all transform and positional data. This is a very slow operation and is used to convert between different unit systems (cm, meters, etc).
- Parameters
-
scaleFactor | The scale factor to scale the current data by. |
◆ m_morphTargets
AZStd::vector<MorphTarget*> EMotionFX::MorphSetup::m_morphTargets |
|
protected |
The collection of morph targets.
The documentation for this class was generated from the following file:
- Gems/EMotionFX/Code/EMotionFX/Source/MorphSetup.h