CurveTangent Enumeration
Specifies different tangent types to be calculated for CurveKey points in a Curve.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public enum CurveTangent
Members
Member name | Description | |
---|---|---|
Flat | A Flat tangent always has a value equal to zero. | |
Linear | A Linear tangent at a CurveKey is equal to the difference between its Value and the For example, in ( MyCurve.Keys[i].Value - MyCurve.Keys[i - 1].Value ) Similarly, the linear TangentOut is equal to: ( MyCurve.Keys[i + 1].Value - MyCurve.Keys[i].Value.) |
|
Smooth | A Smooth tangent smooths the inflection between a TangentIn and TangentOut by taking into account the values of both neighbors of the The smooth TangentIn of ( ( MyCurve.Keys[i + 1].Value - MyCurve.Keys[i - 1].Value ) * ( ( MyCurve.Keys[i].Position - MyCurve.Keys[i - 1].Position ) / ( MyCurve.Keys[i + 1].Position - MyCurve.Keys[i-1].Position ) ) ) Similarly, the smooth TangentOut is equal to: ( ( MyCurve.Keys[i + 1].Value - MyCurve.Keys[i - 1].Value ) * ( ( MyCurve.Keys[i + 1].Position - MyCurve.Keys[i].Position ) / ( MyCurve.Keys[i + 1].Position - MyCurve.Keys[i - 1].Position ) ) ) |
See Also
Reference
Microsoft.Xna.Framework Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista