Class CurveKey
Key point on the Curve.
[DataContract]
public class CurveKey : IEquatable<CurveKey>, IComparable<CurveKey>
- Inheritance
-
CurveKey
- Implements
- Inherited Members
Constructors
CurveKey()
Creates a new instance of CurveKey class with position: 0 and value: 0.
public CurveKey()
CurveKey(float, float)
Creates a new instance of CurveKey class.
public CurveKey(float position, float value)
Parameters
CurveKey(float, float, float, float)
Creates a new instance of CurveKey class.
public CurveKey(float position, float value, float tangentIn, float tangentOut)
Parameters
positionfloatPosition on the curve.
valuefloatValue of the control point.
tangentInfloatTangent approaching point from the previous point on the curve.
tangentOutfloatTangent leaving point toward next point on the curve.
CurveKey(float, float, float, float, CurveContinuity)
Creates a new instance of CurveKey class.
public CurveKey(float position, float value, float tangentIn, float tangentOut, CurveContinuity continuity)
Parameters
positionfloatPosition on the curve.
valuefloatValue of the control point.
tangentInfloatTangent approaching point from the previous point on the curve.
tangentOutfloatTangent leaving point toward next point on the curve.
continuityCurveContinuityIndicates whether the curve is discrete or continuous.
Properties
Continuity
Gets or sets the indicator whether the segment between this point and the next point on the curve is discrete or continuous.
[DataMember]
public CurveContinuity Continuity { get; set; }
Property Value
Position
Gets a position of the key on the curve.
[DataMember]
public float Position { get; }
Property Value
TangentIn
Gets or sets a tangent when approaching this point from the previous point on the curve.
[DataMember]
public float TangentIn { get; set; }
Property Value
TangentOut
Gets or sets a tangent when leaving this point to the next point on the curve.
[DataMember]
public float TangentOut { get; set; }
Property Value
Value
Gets a value of this point.
[DataMember]
public float Value { get; set; }
Property Value
Methods
Clone()
Creates a copy of this key.
public CurveKey Clone()
Returns
- CurveKey
A copy of this key.
CompareTo(CurveKey)
public int CompareTo(CurveKey other)
Parameters
otherCurveKey
Returns
Equals(CurveKey)
public bool Equals(CurveKey other)
Parameters
otherCurveKey
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(CurveKey, CurveKey)
Compares whether two CurveKey instances are equal.
public static bool operator ==(CurveKey value1, CurveKey value2)
Parameters
value1CurveKeyCurveKey instance on the left of the equal sign.
value2CurveKeyCurveKey instance on the right of the equal sign.
Returns
- bool
trueif the instances are equal;falseotherwise.
operator !=(CurveKey, CurveKey)
Compares whether two CurveKey instances are not equal.
public static bool operator !=(CurveKey value1, CurveKey value2)
Parameters
value1CurveKeyCurveKey instance on the left of the not equal sign.
value2CurveKeyCurveKey instance on the right of the not equal sign.
Returns
- bool
trueif the instances are not equal;falseotherwise.