Exemple #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="bbox">Axis aligned bounding box</param>
        public CullingVolumeAABB(BoundingBox bbox)
        {
            this.bbox = bbox;

            this.Position = bbox.GetCenter();
        }
Exemple #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="min">Minimum point</param>
        /// <param name="max">Maximum point</param>
        public CullingVolumeAABB(Vector3 min, Vector3 max)
        {
            this.bbox = new BoundingBox(min, max);

            this.Position = bbox.GetCenter();
        }
Exemple #3
0
        /// <summary>
        /// Gets the bounding box extents
        /// </summary>
        /// <param name="bbox">Bounding box</param>
        /// <returns>Returns the bounding box extents</returns>
        public static Vector3 GetExtents(this BoundingBox bbox)
        {
            var center = bbox.GetCenter();

            return(bbox.Maximum - center);
        }