Renders a (bounded) Voronoi diagram.
Beispiel #1
0
        /// <summary>
        /// Updates the displayed input data.
        /// </summary>
        public void SetData(RenderData data)
        {
            this.data = data;

            meshRenderer = new MeshRenderer(data, renderColors);

            this.showVoronoi = data.VoronoiPoints != null;

            if (showVoronoi)
            {
                voronoiRenderer = new VoronoiRenderer(data);
            }

            // Reset the zoom on new data
            zoom.Initialize(this.ClientRectangle, data.Bounds);

            initialized = true;

            this.Render();
        }
Beispiel #2
0
        /// <summary>
        /// Updates the displayed input data.
        /// </summary>
        public void SetData(RenderData data)
        {
            this.data = data;

            meshRenderer = new MeshRenderer(data, renderColors);

            this.showVoronoi = data.VoronoiPoints != null;

            if (showVoronoi)
            {
                voronoiRenderer = new VoronoiRenderer(data);
            }

            // Reset the zoom on new data
            zoom.Initialize(this.ClientRectangle, data.Bounds);

            initialized = true;

            this.Render();
        }