Esempio n. 1
0
        public void EnumerateEdges()
        {
            var mesh   = CreateTestMesh.CreateCross();
            var vertex = mesh.Vertices[4];
            var edges  = new List <HBEdge>();

            foreach (var edge in vertex.EnumerateEdges(true))
            {
                edges.Add(edge);
            }

            Assert.AreEqual(4, edges.Count);
            Assert.AreEqual(mesh.Edges[0], edges[0]);
            Assert.AreEqual(mesh.Edges[6], edges[1]);
            Assert.AreEqual(mesh.Edges[4], edges[2]);
            Assert.AreEqual(mesh.Edges[2], edges[3]);

            mesh   = CreateTestMesh.CreateCross();
            vertex = mesh.Vertices[4];
            edges  = new List <HBEdge>();

            foreach (var edge in vertex.EnumerateEdges(false))
            {
                edges.Add(edge);
            }

            Assert.AreEqual(4, edges.Count);
            Assert.AreEqual(mesh.Edges[0], edges[0]);
            Assert.AreEqual(mesh.Edges[2], edges[1]);
            Assert.AreEqual(mesh.Edges[4], edges[2]);
            Assert.AreEqual(mesh.Edges[6], edges[3]);
        }
Esempio n. 2
0
        public void EdgeCount()
        {
            var mesh   = CreateTestMesh.CreateCross();
            var vertex = mesh.Vertices[4];

            Assert.AreEqual(4, vertex.EdgeCount);
        }