API reference
API reference
Select your platform
No SDKs available
No versions available

Bound3D

Bound3D

data class Bound3D(var min: Vector3 = Vector3(0f, 0f, 0f), var max: Vector3 = Vector3(0f, 0f, 0f))
Represents a 3D bounding box with minimum and maximum coordinates.

Constructors

NameSummary
Bound3D
constructor(min: Vector3 = Vector3(0f, 0f, 0f), max: Vector3 = Vector3(0f, 0f, 0f))

Properties

NameSummary
max
var max: Vector3
min
var min: Vector3

Functions

NameSummary
center
fun center(): Vector3
Calculates the center of the bounding box.
contains
fun contains(v: Vector3): Boolean
Checks if a given vector is within the bounds of the bounding box.
encapsulate
fun encapsulate(bounds: Bound3D)
Encapsulates another bounding box within this one.
extents
fun extents(): Vector3
Calculates the extents of the bounding box.
getVolume
fun Bound3D.getVolume(): Float
size
fun size(): Vector3
Calculates the size of the bounding box.
toString
open override fun toString(): String
Returns a string representation of this object in the format (min, max).
Did you find this page helpful?
Thumbs up icon
Thumbs down icon