Example #1
0
        /// <summary>
        ///		Allows for merging two boxes together (combining).
        /// </summary>
        /// <param name="box">Source box.</param>
        public void Merge(AxisAlignedBox box)
        {
            if (box.IsNull)
            {
                // nothing to merge with in this case, just return
                return;
            }
            else if (box.IsInfinite)
            {
                this.IsInfinite = true;
            }
            else if (this.IsNull)
            {
                SetExtents(box.Minimum, box.Maximum);
            }
            else if (!this.IsInfinite)
            {
                minVector.Floor(box.Minimum);
                maxVector.Ceil(box.Maximum);

                UpdateCorners();
            }
        }