Bounding Box
data class BoundingBox(val minX: Double, val minY: Double, val minZ: Double, val maxX: Double, val maxY: Double, val maxZ: Double) : Record
An area in 3D space defined by two sets of points, a minimum and a maximum.
This area forms a box, which can be used for collision detection. If a bounding box intersects with something, we know that the two objects are colliding.
This is immutable, and as such, any method that would alter the state of the bounding box returns a new instance with the requested changes.
Functions
Link copied to clipboard
Contracts this bounding box by the given amount and returns the result.
Link copied to clipboard
Expands this bounding box by the given amount and returns the result.
Link copied to clipboard
Intersects this bounding box with the given other box and returns the result.
Link copied to clipboard
Checks if this bounding box intersects with the given other box.
Link copied to clipboard
Moves this bounding box by the given amount and returns the result.