ezEngine Release 25.08
Loading...
Searching...
No Matches
ezImpulseTypeConfig Class Reference

Public Member Functions

void Save (ezStreamWriter &inout_stream) const
 
void Load (ezStreamReader &inout_stream)
 
ezResult Save (ezStringView sFile=s_sConfigFile) const
 
ezResult Load (ezStringView sFile=s_sConfigFile)
 
ezUInt8 FindByName (ezTempHashedString sName) const
 Returns the key of the element with the searched name, or InvalidKey, if it doesn't exist.
 
ezUInt8 GetFreeKey () const
 Returns the next free key, or InvalidKey, if the list is full.
 
float GetImpulseForWeight (ezUInt8 uiImpulseType, ezUInt8 uiWeightCategory) const
 Looks up the impulse type and returns either the default impulse value or the override impulse for the given weight category.
 

Public Attributes

ezArrayMap< ezUInt8, ezImpulseTypem_Types
 

Static Public Attributes

static constexpr const ezUInt8 InvalidKey = 255
 value for when a key doesn't exist
 
static constexpr const ezUInt8 FirstValidKey = 10
 any key smaller than this is not a valid impulse type key, but may represent another option
 
static constexpr const ezUInt8 CustomValueKey = 0
 the impulse type key with this value corresponds to "<Custom Value>"
 
static constexpr const ezUInt8 NoValueKey = 1
 the impulse type key with this value corresponds to "<None>"
 
static constexpr const ezStringView s_sConfigFile = ":project/RuntimeConfigs/ImpulseTypes.cfg"_ezsv
 

Member Function Documentation

◆ GetImpulseForWeight()

float ezImpulseTypeConfig::GetImpulseForWeight ( ezUInt8  uiImpulseType,
ezUInt8  uiWeightCategory 
) const

Looks up the impulse type and returns either the default impulse value or the override impulse for the given weight category.

Returns 1 for uiImpulseType == CustomValueKey and for non-existing impulse types. Returns 0 for uiImpulseType == NoValueKey

Multiply the returned value by the normalized impulse direction vector.


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