Struct FlexRuleContext ​
Namespace: ValveResourceFormat.ResourceTypes.ModelFlex
Assembly: ValveResourceFormat.dll
Context for evaluating flex rules.
public readonly struct FlexRuleContextConstructors ​
FlexRuleContext(Stack<float>, float[]) ​
Initializes a new instance of the struct.
public FlexRuleContext(Stack<float> stack, float[] controllerValues)Parameters ​
controllerValues float[]
FlexRuleContext(Stack<float>, float[], FlexController[]?, float[]?) ​
Initializes a new instance of the struct.
public FlexRuleContext(Stack<float> stack, float[] controllerValues, FlexController[]? controllers, float[]? flexValues)Parameters ​
controllerValues float[]
controllers FlexController[]?
flexValues float[]?
Properties ​
ControllerValues ​
Gets the controller values.
public float[] ControllerValues { get; }Property Value ​
float[]
Controllers ​
Gets the controllers, whose ranges the eyelid operations remap against.
public FlexController[]? Controllers { get; }Property Value ​
FlexValues ​
Gets the values of the flexes evaluated so far, which a fetch2 operation reads.
public float[]? FlexValues { get; }Property Value ​
float[]?
Stack ​
Gets the stack for flex operations.
public Stack<float> Stack { get; }Property Value ​
Methods ​
GetControllerValue(int) ​
Gets a controller value, or zero when the index is out of range.
public float GetControllerValue(int index)Parameters ​
index int
Returns ​
GetFlexValue(int) ​
Gets the value of an already evaluated flex, or zero when it has no value yet.
public float GetFlexValue(int index)Parameters ​
index int
Returns ​
GetRemappedControllerValue(int, float, float) ​
Gets a controller value mapped from its own range onto the given one.
public float GetRemappedControllerValue(int index, float min, float max)Parameters ​
index int
min float
max float
Returns ​
Pop() ​
Pops a value, yielding zero on an empty stack the way the engine reads past its own.
public float Pop()Returns ​
PopIndex() ​
Pops a value and reinterprets its bits as an index, the way flex ops encode operand indices as floats.
public int PopIndex()
