예제 #1
0
 /// <summary>
 /// Transform anchor.
 /// </summary>
 /// <param name="anchor"></param>
 /// <returns></returns>
 protected HermiteAnchor TransformAnchor(HermiteAnchor anchor)
 {
     anchor.point      = transform.TransformPoint(anchor.point);
     anchor.inTangent  = transform.TransformVector(anchor.inTangent);
     anchor.outTangent = transform.TransformVector(anchor.outTangent);
     return(anchor);
 }
예제 #2
0
 /// <summary>
 /// Remove the anchor item.
 /// </summary>
 /// <param name="anchor">Anchor item.</param>
 public void RemoveAnchor(HermiteAnchor anchor)
 {
     anchors.Remove(anchor);
 }
예제 #3
0
 /// <summary>
 /// Insert Anchor item at index.
 /// </summary>
 /// <param name="index">Index of anchor.</param>
 /// <param name="anchor">Anchor item.</param>
 public void InsertAnchor(int index, HermiteAnchor anchor)
 {
     anchors.Insert(index, InverseTransformAnchor(anchor));
 }
예제 #4
0
 /// <summary>
 /// Set the anchor item at index.
 /// </summary>
 /// <param name="index">Index of anchor.</param>
 /// <param name="anchor">Anchor item.</param>
 public void SetAnchor(int index, HermiteAnchor anchor)
 {
     anchors[index] = InverseTransformAnchor(anchor);
 }
예제 #5
0
 /// <summary>
 /// Add anchor item.
 /// </summary>
 /// <param name="anchor">Anchor item.</param>
 public void AddAnchor(HermiteAnchor anchor)
 {
     anchors.Add(InverseTransformAnchor(anchor));
 }