コード例 #1
0
        private void Create()
        {
            if (_subdiv != null)
            {
                return;
            }

            Envelope siteEnv = DelaunayTriangulationBuilder.Envelope(_siteCoords);

            _diagramEnv = siteEnv;
            // add a buffer around the final envelope
            double expandBy = Math.Max(_diagramEnv.Width, _diagramEnv.Height);

            _diagramEnv.ExpandBy(expandBy);
            if (_clipEnv != null)
            {
                _diagramEnv.ExpandToInclude(_clipEnv);
            }

            var vertices = DelaunayTriangulationBuilder.ToVertices(_siteCoords);

            _subdiv = new QuadEdgeSubdivision(siteEnv, _tolerance);
            IncrementalDelaunayTriangulator triangulator = new IncrementalDelaunayTriangulator(_subdiv);

            triangulator.InsertSites(vertices);
        }
コード例 #2
0
        private void Create()
        {
            if (_subdiv != null)
            {
                return;
            }

            var siteEnv  = Envelope(_siteCoords);
            var vertices = ToVertices(_siteCoords);

            _subdiv = new QuadEdgeSubdivision(siteEnv, _tolerance);
            IncrementalDelaunayTriangulator triangulator = new IncrementalDelaunayTriangulator(_subdiv);

            triangulator.InsertSites(vertices);
        }
コード例 #3
0
        private void Create()
        {
            if (_subdiv != null) return;

            Envelope siteEnv = DelaunayTriangulationBuilder.Envelope(_siteCoords);
            _diagramEnv = siteEnv;
            // add a buffer around the final envelope
            double expandBy = Math.Max(_diagramEnv.Width, _diagramEnv.Height);
            _diagramEnv.ExpandBy(expandBy);
            if (_clipEnv != null)
                _diagramEnv.ExpandToInclude(_clipEnv);

            var vertices = DelaunayTriangulationBuilder.ToVertices(_siteCoords);
            _subdiv = new QuadEdgeSubdivision(siteEnv, _tolerance);
            IncrementalDelaunayTriangulator triangulator = new IncrementalDelaunayTriangulator(_subdiv);
            triangulator.InsertSites(vertices);
        }
コード例 #4
0
        private void Create()
        {
            if (_subdiv != null) return;

            var siteEnv = Envelope(_siteCoords);
            var vertices = ToVertices(_siteCoords);
            _subdiv = new QuadEdgeSubdivision(siteEnv, _tolerance);
            IncrementalDelaunayTriangulator triangulator = new IncrementalDelaunayTriangulator(_subdiv);
            triangulator.InsertSites(vertices);
        }