Class PiecewiseCurve
Namespace: ValveResourceFormat.Particles.Utils
Assembly: ValveResourceFormat.dll
A piecewise curve used in particle systems' dynamic parameters: cubic Hermite segments between keys whose slopes come from each key's tangent modes.
public class PiecewiseCurveInheritance
object ← PiecewiseCurve
Constructors
PiecewiseCurve(KVObject, bool)
Reads a piecewise curve from its compiled data.
public PiecewiseCurve(KVObject curveInfo, bool isLooped)Parameters
curveInfo KVObject
The curve data.
isLooped bool
Whether the input wraps with a period of the domain's upper X.
Properties
DomainMax
Gets the highest input (X) and output (Y) the curve is defined over.
public Vector2 DomainMax { get; }Property Value
DomainMin
Gets the lowest input (X) and output (Y) the curve is defined over.
public Vector2 DomainMin { get; }Property Value
Methods
Evaluate(float)
Evaluates the curve at the given input value. Inputs before the first key or after the last one hold that key's value, and the result is clamped to the domain's Y range.
public float Evaluate(float value)Parameters
value float
Returns
float
TryGetEnd(out float, out float)
Gets the end of the curve's domain and the value of its last key, which the curve holds from there on. Returns false for a curve with fewer than two keys.
public bool TryGetEnd(out float x, out float y)Parameters
x float
y float
Returns
bool

