Region of space in a Space-Partitioning Tree. Represents an axis-aligned bounding box stored as a center with half-dimensions to represent the boundaries of this quad tree.
コード例 #1
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="SPTreeNode"/> class.
        /// </summary>
        ///
        /// <param name="owner">The tree that this node belongs to.</param>
        /// <param name="parent">The parent node for this node. Can be null if this node is the root.</param>
        /// <param name="corner">The starting point of the spatial cell.</param>
        /// <param name="width">The widths of the spatial cell.</param>
        /// <param name="index">The index of this node in the children collection of its parent node.</param>
        ///
        public SPTreeNode(SPTree owner, SPTreeNode parent, int index, double[] corner, double[] width)
            : base(index)
        {
            int D = owner.Dimension;

            this.owner     = owner;
            Parent         = parent;
            this.Index     = index;
            boundary       = new SPCell(corner, width);
            center_of_mass = new double[D];
            buff           = new double[D];
        }