Represents a bezier curve with as many points as you want.
Ejemplo n.º 1
0
 /// <summary>
 /// Calculates the point on the given bezier curve with the specified t parameter.
 /// </summary>
 /// <param name="points">The points.</param>
 /// <param name="t">The t parameter, a value between 0.0f and 1.0f.</param>
 /// <returns>Resulting point.</returns>
 public static Vector2 CalculatePoint(IList <Vector2> points, float t)
 {
     return(BezierCurve.CalculatePoint(points, t, 0.0f));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Calculates the length of this bezier curve.
 /// </summary>
 /// <param name="precision">The precision.</param>
 /// <returns>Length of curve.</returns>
 /// <remarks>The precision gets better as the <paramref name="precision"/>
 /// value gets smaller.</remarks>
 public float CalculateLength(float precision)
 {
     return(BezierCurve.CalculateLength(points, precision, Parallel));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Calculates the length of the specified bezier curve.
 /// </summary>
 /// <param name="points">The points.</param>
 /// <param name="precision">The precision value.</param>
 /// <returns>The precision gets better as the <paramref name="precision"/>
 /// value gets smaller.</returns>
 public static float CalculateLength(IList <Vector2> points, float precision)
 {
     return(BezierCurve.CalculateLength(points, precision, 0.0f));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Calculates the point with the specified t.
 /// </summary>
 /// <param name="t">The t value, between 0.0f and 1.0f.</param>
 /// <returns>Resulting point.</returns>
 public Vector2 CalculatePoint(float t)
 {
     return(BezierCurve.CalculatePoint(points, t, Parallel));
 }