Class Trauma

Namespace
CodeSmile.AnyMotion.Core.Noise
/
Assembly
ApiSource.dll

Squared-decay burst model (Eiserloh's trauma model): a 0..1 value set by an event and decayed back to 0 over time, whose square is used as an amplitude multiplier so a burst starts strong and fades quickly rather than ramping up. Pure functions over plain floats — the caller owns the state, so any driver can add trauma without this type needing to know what a "driver" is.

public static class Trauma
Expand Details ...
Inheritance
object
Trauma

Methods

Add(float, float)

public static float Add(float trauma, float amount)

Parameters

Type Name Description
float
trauma
float
amount

Returns

float

Decay(float, float, float)

public static float Decay(float trauma, float decayPerSecond, float deltaTime)

Parameters

Type Name Description
float
trauma
float
decayPerSecond
float
deltaTime

Returns

float

Multiplier(float)

public static float Multiplier(float trauma)

Parameters

Type Name Description
float
trauma

Returns

float