Open 3D Engine EMotionFX Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::CommandAdjustCollider Class Reference

Inherits MCore::Command, EMotionFX::ParameterMixinActorId, and EMotionFX::ParameterMixinJointName.

Public Member Functions

 AZ_RTTI (CommandAdjustCollider, "{F20BE1AB-6058-43EA-B309-465EBFBAE6C3}", MCore::Command, ParameterMixinActorId, ParameterMixinJointName)
 
AZ_CLASS_ALLOCATOR_DECL CommandAdjustCollider (MCore::Command *orgCommand=nullptr)
 
 CommandAdjustCollider (AZ::u32 actorId, const AZStd::string &jointName, PhysicsSetup::ColliderConfigType configType, size_t colliderIndex, MCore::Command *orgCommand=nullptr)
 
bool Execute (const MCore::CommandLine &parameters, AZStd::string &outResult) override
 
bool Undo (const MCore::CommandLine &parameters, AZStd::string &outResult) override
 
bool GetIsUndoable () const override
 
const char * GetHistoryName () const override
 
const char * GetDescription () const override
 
MCore::CommandCreate () override
 
void SetColliderConfig (PhysicsSetup::ColliderConfigType configType)
 
void SetColliderIndex (AZ::u32 colliderIndex)
 
void SetCollisionLayer (AzPhysics::CollisionLayer collisionLayer)
 
void SetCollisionGroupId (AzPhysics::CollisionGroups::Id collisionGroupId)
 
void SetIsTrigger (bool isTrigger)
 
void SetPosition (AZ::Vector3 position)
 
void SetRotation (AZ::Quaternion rotation)
 
void SetMaterialSlots (Physics::MaterialSlots materialSlots)
 
void SetTag (AZStd::string tag)
 
void SetOldCollisionLayer (AzPhysics::CollisionLayer collisionLayer)
 
void SetOldCollisionGroupId (AzPhysics::CollisionGroups::Id collisionGroupId)
 
void SetOldIsTrigger (bool isTrigger)
 
void SetOldPosition (AZ::Vector3 position)
 
void SetOldRotation (AZ::Quaternion rotation)
 
void SetOldMaterialSlots (Physics::MaterialSlots materialSlots)
 
void SetOldTag (AZStd::string tag)
 
const AZStd::optional< AZStd::string > & GetOldTag () const
 
void SetRadius (float radius)
 
void SetHeight (float height)
 
void SetDimensions (AZ::Vector3 dimensions)
 
void SetOldRadius (float radius)
 
void SetOldHeight (float height)
 
void SetOldDimensions (AZ::Vector3 dimensions)
 
- Public Member Functions inherited from MCore::Command
 Command (AZStd::string commandName, Command *originalCommand)
 
virtual ~Command ()
 
virtual void InitSyntax ()
 
virtual bool SetCommandParameters (const CommandLine &parameters)
 
const char * GetName () const
 
const AZStd::string & GetNameString () const
 
MCORE_INLINE CommandSyntaxGetSyntax ()
 
size_t GetNumCallbacks () const
 
size_t CalcNumPreCommandCallbacks () const
 
size_t CalcNumPostCommandCallbacks () const
 
MCORE_INLINE Command::CallbackGetCallback (size_t index)
 
void AddCallback (Command::Callback *callback)
 
bool CheckIfHasCallback (Command::Callback *callback) const
 
void RemoveCallback (Command::Callback *callback, bool delFromMem=true)
 
void RemoveAllCallbacks ()
 
void SetOriginalCommand (Command *orgCommand)
 
MCORE_INLINE CommandGetOriginalCommand ()
 
template<class T >
void ExecuteParameter (AZStd::optional< T > &oldParameter, AZStd::optional< T > &parameter, T &value)
 
- Public Member Functions inherited from EMotionFX::ParameterMixinActorId
 ParameterMixinActorId (AZ::u32 actorId)
 
void InitSyntax (MCore::CommandSyntax &syntax, bool isParameterRequired=true)
 
bool SetCommandParameters (const MCore::CommandLine &parameters)
 
void SetActorId (AZ::u32 actorId)
 
AZ::u32 GetActorId () const
 
ActorGetActor (const MCore::Command *command, AZStd::string &outResult) const
 
- Public Member Functions inherited from EMotionFX::ParameterMixinJointName
 ParameterMixinJointName (const AZStd::string &jointName)
 
void InitSyntax (MCore::CommandSyntax &syntax, bool isParameterRequired=true)
 
bool SetCommandParameters (const MCore::CommandLine &parameters)
 
void SetJointName (const AZStd::string &jointName)
 
const AZStd::string & GetJointName () const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from MCore::Command
static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from EMotionFX::ParameterMixinActorId
static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from EMotionFX::ParameterMixinJointName
static void Reflect (AZ::ReflectContext *context)
 

Static Public Attributes

static const char * s_commandName
 
- Static Public Attributes inherited from EMotionFX::ParameterMixinActorId
static const char * s_actorIdParameterName = "actorId"
 
- Static Public Attributes inherited from EMotionFX::ParameterMixinJointName
static const char * s_jointNameParameterName = "jointName"
 

Additional Inherited Members

- Protected Attributes inherited from EMotionFX::ParameterMixinActorId
AZ::u32 m_actorId = MCORE_INVALIDINDEX32
 
- Protected Attributes inherited from EMotionFX::ParameterMixinJointName
AZStd::string m_jointName
 

Member Function Documentation

◆ Create()

MCore::Command* EMotionFX::CommandAdjustCollider::Create ( )
inlineoverridevirtual

This will be called by the CommandManager when the command is executed. The function will return an instance of the command implementation which will be stored in the command history. An instance of the called command is needed to be able to store information for the undo.

Returns
The instance of the command.

Implements MCore::Command.

◆ Execute()

bool EMotionFX::CommandAdjustCollider::Execute ( const MCore::CommandLine parameters,
AZStd::string &  outResult 
)
overridevirtual

The do it method should call redo it to make the command happen. The redo it method should do the actual work. This is a pure virtual method, and must be overridden in derived commands.

Parameters
parametersA list of the passed command arguments.
outResultThe result/return value of the command.
Returns
True if the command execution succeeded, false if not.

Implements MCore::Command.

◆ GetDescription()

const char* EMotionFX::CommandAdjustCollider::GetDescription ( ) const
inlineoverridevirtual

Get the command optional description. This can contain additional detailed information about the command.

Returns
A string containing the description of the command, which is optional. On default it is an empty string.

Reimplemented from MCore::Command.

◆ GetHistoryName()

const char* EMotionFX::CommandAdjustCollider::GetHistoryName ( ) const
inlineoverridevirtual

Get the name of the command as it can be shown in the command history. This can be a nicer name than the actual command name. For example some "MyAPILoadActor" command could be shown in the command history to the user with a more friendly name like "Load Actor". The "Load Actor" string could be returned by this function. On default the command name is returned.

Returns
The user-friendly name of the command.

Reimplemented from MCore::Command.

◆ GetIsUndoable()

bool EMotionFX::CommandAdjustCollider::GetIsUndoable ( ) const
inlineoverridevirtual

This method is used to specify whether or not the command is undoable. On default, when not overloaded, it always returns false. If you are writing a command that might be eligible for undo, you should override this method. The is undoable method will be called and used to indicate whether or not the command will be saved in the command history in the command manager.

Returns
True if the command is undoable and should be saved in the command history, false if not.

Reimplemented from MCore::Command.

◆ Undo()

bool EMotionFX::CommandAdjustCollider::Undo ( const MCore::CommandLine parameters,
AZStd::string &  outResult 
)
overridevirtual

This method should undo the work done be the redo it method. This is a pure virtual method, and must be overridden in derived commands.

Parameters
parametersA list of the passed command arguments.
outResultThe result/return value of the command.
Returns
True if the command undo succeeded, false if not.

Reimplemented from MCore::Command.


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