예제 #1
0
        /// <summary>
        /// Initializes quadtree object after all parameter values are known.
        /// </summary>
        private void InitQuadtree(double left, double top, double right, double bottom, Quadtree root)
        {
            this.Left = left;
            this.Top = top;
            this.Right = right;
            this.Bottom = bottom;
            this.Children = null;
            this.Neighbours = new Quadtree[4];
            this.Root = root;

            this.verticalHalf = (this.Left + this.Right) / 2;
            this.horizontalHalf = (this.Top + this.Bottom) / 2;
        }
예제 #2
0
 public Quadtree(double left, double top, double right, double bottom, Quadtree root)
 {
     InitQuadtree(left, top, right, bottom, root);
 }