public void RefineTriangles()
        {
            var mesh = new MeshData();

            mesh.Vertices.AddRange(Fixtures.TwitterBirdVertices);
            mesh.Edges.AddRange(Fixtures.TwitterBirdEdges);
            mesh.Triangles.AddRange(Fixtures.TwitterBirdMonotoneTriangles);

            var triangles = new Triangles(mesh);

            DelaunayRefine.RefineTriangles(triangles);

            triangles.Fill(mesh.Triangles);

            Assert.AreEqual(Fixtures.TwitterBirdDelaunayRefinedTriangles, mesh.Triangles);
        }
Esempio n. 2
0
        public void SetUp()
        {
            Mesh = new MeshData();
            Mesh.Vertices.AddRange(Fixtures.TwitterBirdVertices);
            Mesh.Edges.AddRange(Fixtures.TwitterBirdEdges);
            Mesh.Triangles.AddRange(Fixtures.TwitterBirdMonotoneTriangles);

            Triangles = new Triangles(Mesh);

            var delaunay = new DelaunayRefine();

            delaunay.WorkBufferPool = new WorkBufferPool();
            delaunay.RefineTriangles(Triangles);

            Filter = new Filter();
            Filter.WorkBufferPool = new WorkBufferPool();
        }