Esempio n. 1
0
        public void Test_GetAdjacentFaces()
        {
            DCEL dcel = new DCELTests().ClosedMesh();

            Vertex vertex = dcel.GetVertex(new Vector3(6, 4, 9));

            List <Face> expected = new List <Face>
            {
                dcel.GetFace(3),
                dcel.GetFace(1),
                dcel.GetFace(2)
            };

            ReadOnlyCollection <Face> actual = vertex.GetAdjacentFaces();

            Assert.That(actual, Is.EquivalentTo(expected));
        }
Esempio n. 2
0
        public void Test_GetAdjacentFaces_EdgesWithoutIncidentFaces()
        {
            DCEL dcel = new DCELTests().Triangle();

            Vertex vertex = dcel.GetVertex(new Vector3(2, 4, 4));

            List <Face> expected = new List <Face>
            {
                dcel.GetFace(0),
            };

            ReadOnlyCollection <Face> actual = vertex.GetAdjacentFaces();

            Assert.That(actual, Is.EquivalentTo(expected));
        }