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::GroupParameter Class Reference

#include <GroupParameter.h>

Inherits EMotionFX::Parameter.

Public Member Functions

 GroupParameter (AZStd::string name, AZStd::string description={})
 
const char * GetTypeDisplayName () const override
 
size_t GetNumParameters () const
 
size_t GetNumValueParameters () const
 
const ParameterFindParameter (size_t index) const
 
ParameterVector RecursivelyGetChildParameters () const
 
GroupParameterVector RecursivelyGetChildGroupParameters () const
 
ValueParameterVector RecursivelyGetChildValueParameters () const
 
const ParameterVector & GetChildParameters () const
 
ValueParameterVector GetChildValueParameters () const
 
const ParameterFindParameterByName (const AZStd::string &parameterName) const
 
const GroupParameterFindGroupParameterByName (const AZStd::string &groupParameterName) const
 
const GroupParameterFindParentGroupParameter (const Parameter *parameter) const
 
AZ::Outcome< size_t > FindParameterIndexByName (const AZStd::string &parameterName) const
 
AZ::Outcome< size_t > FindValueParameterIndexByName (const AZStd::string &parameterName) const
 
AZ::Outcome< size_t > FindParameterIndex (const Parameter *parameter) const
 
AZ::Outcome< size_t > FindValueParameterIndex (const Parameter *valueParameter) const
 
AZ::Outcome< size_t > FindRelativeParameterIndex (const Parameter *parameter) const
 
bool AddParameter (Parameter *parameter, const GroupParameter *parent)
 
bool InsertParameter (size_t index, Parameter *parameter, const GroupParameter *parent)
 
bool RemoveParameter (Parameter *parameter)
 
bool TakeParameterFromParent (const Parameter *parameter)
 
- Public Member Functions inherited from EMotionFX::Parameter
 Parameter (AZStd::string name, AZStd::string description={})
 
virtual const char * GetTypeDisplayName () const =0
 
const AZStd::string & GetName () const
 
void SetName (const AZStd::string &name)
 
const AZStd::string & GetDescription () const
 
void SetDescription (const AZStd::string &description)
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
- Static Public Member Functions inherited from EMotionFX::Parameter
static void Reflect (AZ::ReflectContext *context)
 
static bool IsNameValid (const AZStd::string &name, AZStd::string *outInvalidCharacters)
 

Additional Inherited Members

- Protected Attributes inherited from EMotionFX::Parameter
AZStd::string m_name
 
AZStd::string m_description
 
- Static Protected Attributes inherited from EMotionFX::Parameter
static const char s_invalidCharacters []
 

Detailed Description

GroupParameter inherits from Parameter and is the type that allows to nest parameters.

Member Function Documentation

◆ AddParameter()

bool EMotionFX::GroupParameter::AddParameter ( Parameter parameter,
const GroupParameter parent 
)

Add the given parameter. The parameter will be fully managed and destroyed by this group.

Parameters
[in]parameterA pointer to the parameter to add. #param[in] parent Parent group parameter. If nullptr, the parameter will be added to the root group parameter
Returns
success if the parameter was added, the returned index is the absolute index among all parameter values

◆ FindGroupParameterByName()

const GroupParameter * EMotionFX::GroupParameter::FindGroupParameterByName ( const AZStd::string &  groupParameterName) const

Find a group parameter by name.

Parameters
groupNameThe group name to search for.
Returns
A pointer to the group parameter with the given name. nullptr will be returned in case it has not been found.

◆ FindParameter()

const Parameter * EMotionFX::GroupParameter::FindParameter ( size_t  index) const

Get a pointer to the given parameter.

Parameters
[in]indexThe index of the parameter to return (index based on all parameters, returned parameter could be a group).
Returns
A pointer to the parameter.

◆ FindParameterByName()

const Parameter * EMotionFX::GroupParameter::FindParameterByName ( const AZStd::string &  parameterName) const

Find parameter by name.

Parameters
[in]paramNameThe name of the parameter to search for.
Returns
A pointer to the parameter with the given name. nullptr will be returned in case it has not been found.

◆ FindParameterIndex()

AZ::Outcome< size_t > EMotionFX::GroupParameter::FindParameterIndex ( const Parameter parameter) const

Find parameter index by parameter.

Parameters
[in]parameterThe parameter to search for.
Returns
The index of the parameter. AZ::Failure will be returned in case it has not been found.

◆ FindParameterIndexByName()

AZ::Outcome< size_t > EMotionFX::GroupParameter::FindParameterIndexByName ( const AZStd::string &  parameterName) const

Find parameter index by name.

Parameters
[in]paramNameThe name of the parameter to search for.
Returns
The index of the parameter with the given name. AZ::Failure will be returned in case it has not been found.

◆ FindParentGroupParameter()

const GroupParameter * EMotionFX::GroupParameter::FindParentGroupParameter ( const Parameter parameter) const

Find the group parameter the given parameter is part of.

Parameters
[in]parameterThe parameter to search the group parameter for.
Returns
A pointer to the group parameter in which the given parameter is in. nullptr will be returned in case the parameter is not part of a group parameter.

◆ FindRelativeParameterIndex()

AZ::Outcome< size_t > EMotionFX::GroupParameter::FindRelativeParameterIndex ( const Parameter parameter) const

Find parameter index by parameter. Index is relative to its siblings.

Parameters
[in]parameterThe parameter to search for.
Returns
The index of the parameter. AZ::Failure will be returned in case it has not been found.

◆ FindValueParameterIndex()

AZ::Outcome< size_t > EMotionFX::GroupParameter::FindValueParameterIndex ( const Parameter valueParameter) const

Find value parameter index by parameter. Index is relative to other value parameters.

Parameters
[in]parameterThe parameter to search for.
Returns
The index of the parameter. AZ::Failure will be returned in case it has not been found.

◆ FindValueParameterIndexByName()

AZ::Outcome< size_t > EMotionFX::GroupParameter::FindValueParameterIndexByName ( const AZStd::string &  parameterName) const

Find value parameter index by name. Index is relative to other value parameters.

Parameters
[in]paramNameThe name of the value parameter to search for.
Returns
The index of the parameter with the given name. AZ::Failure will be returned in case it has not been found.

◆ GetChildParameters()

const ParameterVector & EMotionFX::GroupParameter::GetChildParameters ( ) const

Get all the parameters contained directly by this group. This means that if this group contains a group which contains more parameters, those are not returned (but the group is).

Returns
The parameters contained directly by this group.

◆ GetChildValueParameters()

ValueParameterVector EMotionFX::GroupParameter::GetChildValueParameters ( ) const

Get all the value parameters contained directly by this group. This means that if this group contains a group which contains more value parameters, those are not returned.

Returns
The value parameters contained directly by this group.

◆ GetNumParameters()

size_t EMotionFX::GroupParameter::GetNumParameters ( ) const

Get the total number of parameters inside this group. This will be the number of parameters from all child group parameters counting the groups (therefore is the amount of parameters that have a value)

Returns
The number of parameters.

◆ GetNumValueParameters()

size_t EMotionFX::GroupParameter::GetNumValueParameters ( ) const

Get the total number of value parameters inside this group. This will be the number of parameters from all group parameters. without counting the groups.

Returns
The number of value parameters.

◆ GetTypeDisplayName()

const char * EMotionFX::GroupParameter::GetTypeDisplayName ( ) const
overridevirtual

Implements EMotionFX::Parameter.

◆ InsertParameter()

bool EMotionFX::GroupParameter::InsertParameter ( size_t  index,
Parameter parameter,
const GroupParameter parent 
)

Insert the given parameter at the specified index. The index is relative to the parent. The parameter will be fully managed and destroyed by this group.

Parameters
[in]indexThe index at which position the new parameter shall be inserted.
[in]parameterA pointer to the attribute info to insert. #param[in] parent Parent group parameter. If nullptr, the parameter will be added to the root group parameter
Returns
success if the parameter was added, the returned index is the absolute index among all parameter values

◆ RecursivelyGetChildGroupParameters()

GroupParameterVector EMotionFX::GroupParameter::RecursivelyGetChildGroupParameters ( ) const

Get all the group parameters contained in this group, recursively. This means that if a group is contained in another group within this group, it is returned as well.

Returns
The group parameters contained in this group, recursively.

◆ RecursivelyGetChildParameters()

ParameterVector EMotionFX::GroupParameter::RecursivelyGetChildParameters ( ) const

Get all the parameters contained by this group, recursively. This means that if a group contains more value parameters, those are returned as well.

Returns
The value parameters contained in this group, recursively.

◆ RecursivelyGetChildValueParameters()

ValueParameterVector EMotionFX::GroupParameter::RecursivelyGetChildValueParameters ( ) const

Get all the value parameters contained in this group, recursively. This means that if a group contains more value parameters, those are returned as well.

Returns
The value parameters contained in this group, recursively.

◆ RemoveParameter()

bool EMotionFX::GroupParameter::RemoveParameter ( Parameter parameter)

Removes the parameter specified by index. The parameter will be deleted.

Parameters
[in]parameterThe parameter to remove.

◆ TakeParameterFromParent()

bool EMotionFX::GroupParameter::TakeParameterFromParent ( const Parameter parameter)

Iterate over all group parameters and make sure the given parameter is not part of any of the groups anymore.

Parameters
[in]parameterIndexThe index of the parameter to be removed from all group parameters.

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