Class Curve
Contains a collection of CurveKey points in 2D space and provides methods for evaluating features of the curve they define.
[DataContract]
public class Curve : ICurveEvaluator<float>
- Inheritance
-
Curve
- Implements
- Inherited Members
Constructors
Curve()
Constructs a curve.
public Curve()
Properties
IsConstant
Returns true
if this curve is constant (has zero or one points); false
otherwise.
[DataMember]
public bool IsConstant { get; }
Property Value
Keys
The collection of curve keys.
[DataMember]
public CurveKeyCollection Keys { get; }
Property Value
PostLoop
Defines how to handle weighting values that are greater than the last control point in the curve.
[DataMember]
public CurveLoopType PostLoop { get; set; }
Property Value
PreLoop
Defines how to handle weighting values that are less than the first control point in the curve.
[DataMember]
public CurveLoopType PreLoop { get; set; }
Property Value
Methods
Clone()
Creates a copy of this curve.
public Curve Clone()
Returns
- Curve
A copy of this curve.
ComputeTangent(int, CurveTangent)
Computes tangent for the specific key in the collection.
public void ComputeTangent(int keyIndex, CurveTangent tangentType)
Parameters
keyIndex
intThe index of a key in the collection.
tangentType
CurveTangentThe tangent type for both in and out.
ComputeTangent(int, CurveTangent, CurveTangent)
Computes tangent for the specific key in the collection.
public void ComputeTangent(int keyIndex, CurveTangent tangentInType, CurveTangent tangentOutType)
Parameters
keyIndex
intThe index of key in the collection.
tangentInType
CurveTangentThe tangent in-type. TangentIn for more details.
tangentOutType
CurveTangentThe tangent out-type. TangentOut for more details.
ComputeTangents(CurveTangent)
Computes tangents for all keys in the collection.
public void ComputeTangents(CurveTangent tangentType)
Parameters
tangentType
CurveTangentThe tangent type for both in and out.
ComputeTangents(CurveTangent, CurveTangent)
Computes tangents for all keys in the collection.
public void ComputeTangents(CurveTangent tangentInType, CurveTangent tangentOutType)
Parameters
tangentInType
CurveTangentThe tangent in-type. TangentIn for more details.
tangentOutType
CurveTangentThe tangent out-type. TangentOut for more details.
Evaluate(float)
Evaluate the value at a position of this Curve.
public float Evaluate(float position)