Class FlexRule
Namespace: ValveResourceFormat.ResourceTypes.ModelFlex
Assembly: ValveResourceFormat.dll
Represents a flex rule that evaluates flex operations.
csharp
public class FlexRuleInheritance
Constructors
FlexRule(int, FlexOp[])
Initializes a new instance of the class.
csharp
public FlexRule(int flexID, FlexOp[] flexOps)Parameters
flexID int
flexOps FlexOp[]
Properties
FlexID
Gets the flex ID.
csharp
public int FlexID { get; }Property Value
FlexOps
Gets the flex operations for this rule.
csharp
public FlexOp[] FlexOps { get; }Property Value
FlexOp[]
Methods
Evaluate(float[])
Evaluates the flex rule with the given controller values.
csharp
public float Evaluate(float[] flexControllerValues)Parameters
flexControllerValues float[]
Returns
Evaluate(float[], FlexController[]?, float[]?)
Evaluates the flex rule, giving the operations that need them the controller ranges and the values of the flexes evaluated so far.
csharp
public float Evaluate(float[] flexControllerValues, FlexController[]? controllers, float[]? flexValues)Parameters
flexControllerValues float[]
controllers FlexController[]?
flexValues float[]?
Returns
GetFlexValueCount(IReadOnlyCollection<FlexRule>)
Gets the number of flex value slots needed to evaluate a set of rules, one more than the highest flex ID among them.
csharp
public static int GetFlexValueCount(IReadOnlyCollection<FlexRule> rules)Parameters
rules IReadOnlyCollection<FlexRule>

