#include <EMotionFXManager.h>
Inherits EMotionFX::BaseObject.
The EMotion FX manager. This class can be used to obtain things such as version information about the current library version. Also it will provide initialization functionality which will automatically register things such as the EMotionFX related memory categories to the Core memory manager.
◆ BuildLowVersionString()
void EMotionFX::EMotionFXManager::BuildLowVersionString |
( |
AZStd::string & |
outLowVersionString | ) |
|
Build the low version string. In case of EMotion FX v3.9 this would make the output string equal to "9". In case of EMotion FX v3.05 this would make it equal to "05".
- Parameters
-
outLowVersionString | The output string to store the low version number in. |
◆ ConstructAbsoluteFilename() [1/2]
AZStd::string EMotionFX::EMotionFXManager::ConstructAbsoluteFilename |
( |
const char * |
relativeFilename | ) |
|
Convert relative filename (e.g. 'MyFolder/MyMotion.motion') to absolute one (e.g. 'C:/MyGame/Data/MyFolder/MyMotion.motion'). Converts the input filename to match the folder separator character and replaces the media root keyword with the actual media root folder location.
- Parameters
-
relativeFilename | Relative filename containing the '' keyword. |
- Returns
- Will contain the absolute filename after execution.
◆ ConstructAbsoluteFilename() [2/2]
void EMotionFX::EMotionFXManager::ConstructAbsoluteFilename |
( |
const char * |
relativeFilename, |
|
|
AZStd::string & |
outAbsoluteFilename |
|
) |
| |
Convert relative filename (e.g. 'MyFolder/MyMotion.motion') to absolute one (e.g. 'C:/MyGame/Data/MyFolder/MyMotion.motion'). Converts the input filename to match the folder separator character and replaces the media root keyword with the actual media root folder location.
- Parameters
-
relativeFilename | Relative filename containing the '' keyword. |
outAbsoluteFilename | Will contain the absolute filename after execution. |
◆ GetActorManager()
MCORE_INLINE ActorManager * EMotionFX::EMotionFXManager::GetActorManager |
( |
| ) |
const |
|
inline |
Get the actor manager. This can also be accessed with the GetActorManager() macro.
- Returns
- A pointer to the actor manager.
◆ GetAnimGraphManager()
MCORE_INLINE AnimGraphManager * EMotionFX::EMotionFXManager::GetAnimGraphManager |
( |
| ) |
const |
|
inline |
Get the animgraph manager; This can also be accessed with the GetAnimGraphManager() macro.
- Returns
- A pointer to the animgraph manager.
◆ GetAssetCacheFolder()
MCORE_INLINE const AZStd::string & EMotionFX::EMotionFXManager::GetAssetCacheFolder |
( |
| ) |
const |
|
inline |
Get the asset cache folder path.
- Returns
- The path of the asset cache folder.
◆ GetAssetSourceFolder()
MCORE_INLINE const AZStd::string & EMotionFX::EMotionFXManager::GetAssetSourceFolder |
( |
| ) |
const |
|
inline |
Get the asset source folder path.
- Returns
- The path of the asset source folder.
◆ GetCompilationDate()
const char * EMotionFX::EMotionFXManager::GetCompilationDate |
( |
| ) |
const |
Get the compilation date string.
- Returns
- The compilation date string.
◆ GetDebugDraw()
MCORE_INLINE DebugDraw * EMotionFX::EMotionFXManager::GetDebugDraw |
( |
| ) |
const |
|
inline |
Get the debug drawing class.
- Returns
- A pointer to the wavelet cache.
◆ GetEnableServerOptimization()
bool EMotionFX::EMotionFXManager::GetEnableServerOptimization |
( |
| ) |
const |
|
inline |
Get if EMotionFX is enabled for server optimization.
- Returns
- True if EMotionFX is in server mode and enabled for server optimization.
◆ GetEventManager()
MCORE_INLINE EventManager * EMotionFX::EMotionFXManager::GetEventManager |
( |
| ) |
const |
|
inline |
Get the event manager. This can also be accessed with the GetEventManager() macro.
- Returns
- A pointer to the event manager.
◆ GetFilenameRelativeTo()
static void EMotionFX::EMotionFXManager::GetFilenameRelativeTo |
( |
AZStd::string * |
inOutFilename, |
|
|
const char * |
folderPath |
|
) |
| |
|
static |
Convert the given absolute filename to one relative to the given folder path.
- Parameters
-
folderPath | Base folder path to remove. |
inOutFileName | Absolute filename to be changed to a relative one. |
◆ GetFilenameRelativeToMediaRoot()
void EMotionFX::EMotionFXManager::GetFilenameRelativeToMediaRoot |
( |
AZStd::string * |
inOutFilename | ) |
const |
Convert the passed absolute filename to one relative to the media root folder.
- Parameters
-
inOutFileName | Absolute filename to be changed to a relative one using the current media root folder. |
◆ GetGlobalSimulationSpeed()
float EMotionFX::EMotionFXManager::GetGlobalSimulationSpeed |
( |
| ) |
const |
Get the global simulation speed factor. This value is multiplied with the timePassedInSeconds values (the frame times) when doing update calls. The default value is 1.0.
- Returns
- The currently set simulation play speed.
◆ GetHighVersion()
uint32 EMotionFX::EMotionFXManager::GetHighVersion |
( |
| ) |
const |
Get the high version number. This would be 3 in case of EMotion FX v3.01.
- Returns
- The high version number.
◆ GetImporter()
MCORE_INLINE Importer * EMotionFX::EMotionFXManager::GetImporter |
( |
| ) |
const |
|
inline |
Get the importer, which can be used to load actors and motions. This can also be accessed with the GetImporter() macro.
- Returns
- A pointer to the importer.
◆ GetIsInEditorMode()
bool EMotionFX::EMotionFXManager::GetIsInEditorMode |
( |
| ) |
const |
|
inline |
Get if EMotionFX is in editor mode or not
- Returns
- True if EMotionFX is configured in editor mode (e.g. ly editor or EMStudio).
◆ GetIsInServerMode()
bool EMotionFX::EMotionFXManager::GetIsInServerMode |
( |
| ) |
const |
|
inline |
Get if EMotionFX is in server mode or not
- Returns
- True if EMotionFX is configured in server mode.
◆ GetLowVersion()
uint32 EMotionFX::EMotionFXManager::GetLowVersion |
( |
| ) |
const |
Get the low version number. This would be 0 in case of EMotion FX v3.0. And it would be 10 in case of v3.01, or 100 in case of v3.10.
- Returns
- The low version number.
◆ GetMediaRootFolder()
MCORE_INLINE const char * EMotionFX::EMotionFXManager::GetMediaRootFolder |
( |
| ) |
const |
|
inline |
Get the path of the media root folder.
- Returns
- The path of the media root directory.
◆ GetMediaRootFolderString()
MCORE_INLINE const AZStd::string & EMotionFX::EMotionFXManager::GetMediaRootFolderString |
( |
| ) |
const |
|
inline |
Get the path of the media root folder as a string object.
- Returns
- The path of the media root directory.
◆ GetMotionInstancePool()
MCORE_INLINE MotionInstancePool * EMotionFX::EMotionFXManager::GetMotionInstancePool |
( |
| ) |
const |
|
inline |
Get the motion instance pool. This can also be accessed with the GetMotionInstancePool() macro.
- Returns
- A pointer to the motion instance pool.
◆ GetMotionManager()
MCORE_INLINE MotionManager * EMotionFX::EMotionFXManager::GetMotionManager |
( |
| ) |
const |
|
inline |
Get the motion manager. This can also be accessed with the GetMotionManager() macro.
- Returns
- A pointer to the motion manager.
◆ GetNumThreads()
MCORE_INLINE size_t EMotionFX::EMotionFXManager::GetNumThreads |
( |
| ) |
const |
|
inline |
Get the number of threads that are internally created.
- Returns
- The number of threads that we have internally created.
◆ GetRecorder()
MCORE_INLINE Recorder * EMotionFX::EMotionFXManager::GetRecorder |
( |
| ) |
const |
|
inline |
Get the recorder. This can also be accessed with the EMFX_RECODRER macro.
- Returns
- A pointer to the recorder.
◆ GetRenderActorSettings()
Get the render actor settings
- Returns
- A pointer to global render actor settings.
◆ GetSoftSkinManager()
MCORE_INLINE SoftSkinManager * EMotionFX::EMotionFXManager::GetSoftSkinManager |
( |
| ) |
const |
|
inline |
Get the soft-skin manager. This manager is responsible for creating the best suitable softskin deformer type. On SSE powered PC's this could for example return an SSE optimized softskin mesh deformer, while on other systems it would return a native C++ version. This can also be accessed with the GetSoftSkinManager() macro.
- Returns
- A pointer to the soft-skinning manager.
◆ GetThreadData()
MCORE_INLINE ThreadData * EMotionFX::EMotionFXManager::GetThreadData |
( |
uint32 |
threadIndex | ) |
const |
|
inline |
Get the unique per thread data for a given thread by index.
- Parameters
-
- Returns
- The unique thread data for this thread.
◆ GetUnitType()
MCore::Distance::EUnitType EMotionFX::EMotionFXManager::GetUnitType |
( |
| ) |
const |
Get the current unit type used. On default this is set to meters, so where one unit is one meter.
- Returns
- The unit type currently used.
◆ GetVersionString()
const char * EMotionFX::EMotionFXManager::GetVersionString |
( |
| ) |
const |
Get the version string, which can be like: "EMotion FX v3.0".
- Returns
- The version string.
◆ InitAssetFolderPaths()
void EMotionFX::EMotionFXManager::InitAssetFolderPaths |
( |
| ) |
|
Initialize the asset source and cache folder paths.
◆ LogInfo()
void EMotionFX::EMotionFXManager::LogInfo |
( |
| ) |
|
Log information about this EMotion FX version.
◆ RegisterMemoryCategories()
Register the EMotion FX related memory categories to a given memory tracker.
- Parameters
-
memTracker | The memory tracker to register to. |
◆ ResolvePath()
static AZStd::string EMotionFX::EMotionFXManager::ResolvePath |
( |
const char * |
path | ) |
|
|
static |
Accesses the FileIO instance to resolve file alias to full paths
- Parameters
-
path | file path to resolve file aliases |
- Returns
- The path with file aliases substituted to the registered path entries in the FileIO instance
◆ SetGlobalSimulationSpeed()
void EMotionFX::EMotionFXManager::SetGlobalSimulationSpeed |
( |
float |
speedFactor | ) |
|
Set the global simulation speed factor. On default this is 1.0, which is normal speed. The value you set is basically being multiplied with the timePassedInSeconds values (the frame times) when doing update calls.
- Parameters
-
speedFactor | The speed factor, which can be any number equal to zero or higher. |
◆ SetIsInEditorMode()
void EMotionFX::EMotionFXManager::SetIsInEditorMode |
( |
bool |
isInEditorMode | ) |
|
|
inline |
Sets EMotionFX's editor mode.
- Parameters
-
editorMode | Indicating if EMotionFX is running in editor mode. |
◆ SetIsInServerMode()
void EMotionFX::EMotionFXManager::SetIsInServerMode |
( |
bool |
isInServerMode | ) |
|
|
inline |
Sets EMotionFX's server mode.
- Parameters
-
editorMode | Indicating if EMotionFX is running in server mode. |
◆ SetMediaRootFolder()
void EMotionFX::EMotionFXManager::SetMediaRootFolder |
( |
const char * |
path | ) |
|
Set the path of the media root directory.
- Parameters
-
path | The path of the media root folder. |
◆ SetUnitType()
void EMotionFX::EMotionFXManager::SetUnitType |
( |
MCore::Distance::EUnitType |
unitType | ) |
|
Initialize the internal unit type to a given one. A unit type is for example meters, centimeters, etc. This normally is done at init time. All loaded data will be converted into this unit type scale. On default EMotion FX uses meters, so if you have an actor that is 180 centimeters high, it will be 1.8 units in height after loading. It is recommended to save all your files into the same unit system as your game uses. Set EMotion Studio to this same unit type and save your data (actors, motions, animgraphs). Please keep in mind switching the unit type using this method after you have actors loaded does not modify the already loaded actors. The same goes for motions and animgraphs and anything else.
- Parameters
-
unitType | The unit type to use internally. |
◆ ShrinkPools()
void EMotionFX::EMotionFXManager::ShrinkPools |
( |
| ) |
|
Shrink the memory pools, to reduce memory usage. When you create many actor instances and destroy them later again, the pools have been grown internally, which increases memory usage. To shrink the pools back to their minimum size again this method can be called. Keep in mind that this will free blocks of memory and can cause new allocations to happen again in next frames. So it is not advised to run this every frame.
◆ Update()
void EMotionFX::EMotionFXManager::Update |
( |
float |
timePassedInSeconds | ) |
|
Update EMotion FX with a given time delta. You normally will call this only once per frame. It will update all actor instances internally.
- Parameters
-
timePassedInSeconds | The time delta to update with, so basically the time passed since the last time you called Update. |
The documentation for this class was generated from the following file:
- Gems/EMotionFX/Code/EMotionFX/Source/EMotionFXManager.h