/// <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); }
/// <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; }
/// <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); }
/// <summary> /// Test for equality of subsegments. /// </summary> public bool Equal(Osub o2) { return((seg == o2.seg) && (orient == o2.orient)); }
/// <summary> /// Copy a subsegment. /// </summary> public void Copy(ref Osub o2) { o2.seg = seg; o2.orient = orient; }
/// <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; }
/// <summary> /// Bond a triangle to a subsegment. /// </summary> public void SegBond(ref Osub os) { triangle.subsegs[orient] = os; os.seg.triangles[os.orient] = this; }
/// <summary> /// Finds a subsegment abutting a triangle. /// </summary> public void SegPivot(ref Osub os) { os = triangle.subsegs[orient]; //sdecode(sptr, osub) }