public void ContainsVertexTest() { Assert.IsTrue(m_squareWithHole.ContainsVertex(m_largeSquareVertices[0])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_largeSquareVertices[1])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_largeSquareVertices[2])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_largeSquareVertices[3])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_diamondVertices[0])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_diamondVertices[1])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_diamondVertices[2])); Assert.IsTrue(m_squareWithHole.ContainsVertex(m_diamondVertices[3])); Assert.IsFalse(m_squareWithHole.ContainsVertex(new Vector2(-99, 99))); }
public void RemoveLastTest() { var poly = new Polygon2DWithHoles(m_squareWithHole.Outside, m_squareWithHole.Holes); poly.RemoveLast(); Assert.AreEqual(7, poly.VertexCount); Assert.IsFalse(poly.ContainsVertex(m_largeSquareVertices[3])); }