BoundingBox
An immutable axis-aligned box, in the coordinates of the context it was measured in.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BoundingBox(
min,max):BoundingBox
Creates the box between two corners; min can’t exceed max along any axis.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”BoundingBox
Properties
Section titled “Properties”center
Section titled “center”
readonlycenter:Point3d
readonlydepth:number
Extent along Y, in meters.
diagonal
Section titled “diagonal”
readonlydiagonal:number
Distance between the corners, in meters.
height
Section titled “height”
readonlyheight:number
Extent along Z, in meters.
readonlymax:Point3d
The corner with the largest coordinates.
readonlymin:Point3d
The corner with the smallest coordinates.
readonlywidth:number
Extent along X, in meters.
Methods
Section titled “Methods”contains()
Section titled “contains()”contains(
point):boolean
Whether the point lies inside or on the box.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean
toJSON()
Section titled “toJSON()”toJSON():
object
JSON.stringify writes { min: [x, y, z], max: [x, y, z] }.
Returns
Section titled “Returns”object
max: [
number,number,number]
min: [
number,number,number]