예제 #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="anchor">Anchor points of curve.</param>
 public LinearBezierCurve(LinearBezierAnchor anchor)
 {
     this.anchor = anchor;
 }
예제 #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>
 public LinearBezierCurve()
 {
     anchor = new LinearBezierAnchor();
 }