/// <summary> /// Find the previous edge (clockwise) of the adjacent triangle. [rprev(abc) -> b**] /// </summary> /// <remarks>rprev() moves one edge clockwise about the adjacent triangle. /// (It's best understood by reading Guibas and Stolfi. It involves /// changing triangles twice.) /// </remarks> public void Rprev(ref Otri o2) { //Sym(ref o2); o2.triangle = triangle.neighbors[orient].triangle; o2.orient = triangle.neighbors[orient].orient; //o2.LprevSelf(); o2.orient = minus1Mod3[o2.orient]; //o2.SymSelf(); int tmp = o2.orient; o2.orient = o2.triangle.neighbors[tmp].orient; o2.triangle = o2.triangle.neighbors[tmp].triangle; }
/// <summary> /// Find the next edge (counterclockwise) of the adjacent triangle. [rnext(abc) -> *a*] /// </summary> /// <remarks>rnext() moves one edge counterclockwise about the adjacent /// triangle. (It's best understood by reading Guibas and Stolfi. It /// involves changing triangles twice.) /// </remarks> public void Rnext(ref Otri o2) { //Sym(ref o2); o2.triangle = triangle.neighbors[orient].triangle; o2.orient = triangle.neighbors[orient].orient; //o2.LnextSelf(); o2.orient = plus1Mod3[o2.orient]; //o2.SymSelf(); int tmp = o2.orient; o2.orient = o2.triangle.neighbors[tmp].orient; o2.triangle = o2.triangle.neighbors[tmp].triangle; }
/// <summary> /// Find the previous edge (clockwise) of a triangle. [lprev(abc) -> cab] /// </summary> public void Lprev(ref Otri o2) { o2.triangle = triangle; o2.orient = minus1Mod3[orient]; }
// lnext() finds the next edge (counterclockwise) of a triangle. /// <summary> /// Find the next edge (counterclockwise) of a triangle. [lnext(abc) -> bca] /// </summary> public void Lnext(ref Otri o2) { o2.triangle = triangle; o2.orient = plus1Mod3[orient]; }
/// <summary> /// Test for equality of oriented triangles. /// </summary> public bool Equal(Otri o2) { return((triangle == o2.triangle) && (orient == o2.orient)); }
/// <summary> /// Copy an oriented triangle. /// </summary> public void Copy(ref Otri o2) { o2.triangle = triangle; o2.orient = orient; }
/// <summary> /// Finds a triangle abutting a subsegment. /// </summary> public void TriPivot(ref Otri ot) { ot = seg.triangles[orient]; //decode(ptr, otri) }