BoundingBox

open class BoundingBox

Represents a bounding box in Cartesian coordinates. Typically used as a bounding volume.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The box's center point.

Link copied to clipboard

Indicates whether this bounding box is a unit box centered at the Cartesian origin (0, 0, 0).

Link copied to clipboard

The box's radius. (The half-length of its diagonal.)

Functions

Link copied to clipboard
Link copied to clipboard

Generates the 8 corner points of this bounding box in 3D space.

Link copied to clipboard

Indicates whether this bounding box intersects a specified frustum.

Link copied to clipboard
fun set(centerIn: Vec3, rIn: Vec3, sIn: Vec3, tIn: Vec3): BoundingBox
Link copied to clipboard
fun setToPoints(array: FloatArray, count: Int, stride: Int): BoundingBox

Sets this bounding box such that it minimally encloses a specified array of points.

Link copied to clipboard
fun setToSector(sector: Sector, globe: Globe, minHeight: Float, maxHeight: Float): BoundingBox

Sets this bounding box such that it contains a specified sector on a specified globe with min and max terrain height.
To create a bounding box that contains the sector at mean sea level, specify zero for the minimum and maximum height. To create a bounding box that contains the terrain surface in this sector, specify the actual minimum and maximum height values associated with the terrain in the sector, multiplied by the scene's vertical exaggeration.

Link copied to clipboard

Sets this bounding box to a unit box centered at the Cartesian origin (0, 0, 0).

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Translates this bounding box by specified components.