コード例 #1
0
ファイル: Osub.cs プロジェクト: Zarkana/ufo-game-svg
 /// <summary>
 /// Find next subsegment in sequence. [next(ab) -> b*]
 /// </summary>
 /// <remarks>snext() finds the next subsegment (from the same segment) in
 /// sequence; one whose origin is the input subsegment's destination.
 /// </remarks>
 public void Next(ref Osub o2)
 {
     o2 = seg.subsegs[1 - orient];
     //sdecode(sptr, o2);
 }
コード例 #2
0
ファイル: Osub.cs プロジェクト: Zarkana/ufo-game-svg
 /// <summary>
 /// Find adjoining subsegment with the same origin. [pivot(ab) -> a*]
 /// </summary>
 /// <remarks>spivot() finds the other subsegment (from the same segment)
 /// that shares the same origin.
 /// </remarks>
 public void Pivot(ref Osub o2)
 {
     o2 = seg.subsegs[orient];
     //sdecode(sptr, o2);
 }
コード例 #3
0
ファイル: Osub.cs プロジェクト: Zarkana/ufo-game-svg
 /// <summary>
 /// Reverse the orientation of a subsegment. [sym(ab) -> ba]
 /// </summary>
 /// <remarks>ssym() toggles the orientation of a subsegment.
 /// </remarks>
 public void Sym(ref Osub o2)
 {
     o2.seg    = seg;
     o2.orient = 1 - orient;
 }
コード例 #4
0
ファイル: Osub.cs プロジェクト: Zarkana/ufo-game-svg
 /// <summary>
 /// Test for equality of subsegments.
 /// </summary>
 public bool Equal(Osub o2)
 {
     return((seg == o2.seg) && (orient == o2.orient));
 }
コード例 #5
0
ファイル: Osub.cs プロジェクト: Zarkana/ufo-game-svg
 /// <summary>
 /// Copy a subsegment.
 /// </summary>
 public void Copy(ref Osub o2)
 {
     o2.seg    = seg;
     o2.orient = orient;
 }
コード例 #6
0
ファイル: Osub.cs プロジェクト: Zarkana/ufo-game-svg
 /// <summary>
 /// Bond two subsegments together. [bond(abc, ba)]
 /// </summary>
 public void Bond(ref Osub o2)
 {
     seg.subsegs[orient]       = o2;
     o2.seg.subsegs[o2.orient] = this;
 }