示例#1
0
 /// <summary>
 /// Get curve point base on anchor points and t.
 /// </summary>
 /// <param name="anchor">Anchor points of curve.</param>
 /// <param name="t">t is in the range(0~1).</param>
 /// <returns>Point on curve.</returns>
 public static Vector3 GetPointAt(LinearBezierAnchor anchor, float t)
 {
     return((1 - t) * anchor.start + t * anchor.end);
 }
示例#2
0
 /// <summary>
 /// Get curve point base on anchor points and key.
 /// </summary>
 /// <param name="anchor">Anchor points of curve.</param>
 /// <param name="key">Key is in the range(0~1).</param>
 /// <returns>Point on curve.</returns>
 public static Vector3 GetPointAt(LinearBezierAnchor anchor, float key)
 {
     return((1 - key) * anchor.start + key * anchor.end);
 }
示例#3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="anchor">Anchor points of curve.</param>
 public LinearBezierCurve(LinearBezierAnchor anchor)
 {
     this.anchor = anchor;
 }
示例#4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public LinearBezierCurve()
 {
     anchor = new LinearBezierAnchor();
 }