Gems/EMotionFX/Code/MCore/Source/CommandLine.cpp
// get the value as a four component vector
get the value as a four component vector
get the value as a four component vector
AZ::Vector4 CommandLine::GetValueAsVector4(const char* paramName, const AZ::Vector4& defaultValue) const
    {
        const size_t paramIndex = FindParameterIndex(paramName);
        if (paramIndex == InvalidIndex)
        {
            return defaultValue;
        }
        if (m_parameters[paramIndex].m_value.empty())
        {
            return defaultValue;
        }
        return AzFramework::StringFunc::ToVector4(m_parameters[paramIndex].m_value.c_str());
    }
AZ :: Vector4 CommandLine :: GetValueAsVector4 ( const char * paramName , const AZ :: Vector4 & defaultValue ) const { const size_t paramIndex = FindParameterIndex ( paramName ) ; if ( paramIndex == InvalidIndex ) { return defaultValue ; } if ( m_parameters [ paramIndex ] . m_value . empty ( ) ) { return defaultValue ; } return AzFramework :: StringFunc :: ToVector4 ( m_parameters [ paramIndex ] . m_value . c_str ( ) ) ; }
get the value as a four component vector
get the value as a four component vector
// try to find the parameter index // return the default value if the parameter value is empty // return the parameter value