public void TestDprev() { var triangles = CreateExampleMesh(); Otri t = default; // Start with the top triangle. t.tri = triangles[3]; // Start with edge 5 -> 3. t.orient = 2; // Make sure we're on the correct edge. Assert.AreEqual(5, t.Org().ID); Assert.AreEqual(3, t.Dest().ID); t.Dprev(); Assert.AreEqual(4, t.Org().ID); Assert.AreEqual(3, t.Dest().ID); Assert.AreEqual(1, t.tri.ID); t.Dprev(); Assert.AreEqual(1, t.Org().ID); Assert.AreEqual(3, t.Dest().ID); Assert.AreEqual(0, t.tri.ID); // Out of mesh. t.Dprev(); Assert.AreEqual(-1, t.tri.ID); }
private void InvokePrimitive(string name) { if (name == "sym") { current.Sym(); } else if (name == "lnext") { current.Lnext(); } else if (name == "lprev") { current.Lprev(); } else if (name == "onext") { current.Onext(); } else if (name == "oprev") { current.Oprev(); } else if (name == "dnext") { current.Dnext(); } else if (name == "dprev") { current.Dprev(); } else if (name == "rnext") { current.Rnext(); } else if (name == "rprev") { current.Rprev(); } renderControl.Update(current); topoControlView.SetTriangle(current.Triangle); }