Box
- class Box()
Represents an axis-aligned bounding box. A box is represented by a minimum and maximum point which describe the extents of the box.
Constructors
Methods
Constructors
Properties
- Box.max
- Type
Point3
The point of maximum extent for the box.
- Box.min
- Type
Point3
The point of minimum extent for the box.
Methods
addBox
addPoint
center
- Box.center()
Gets the center point for the box.
- Returns
The center point of this box.
- Return type
Point3
copy
- Box.copy()
Creates a copy of the box.
- Returns
A copy of this box.
- Return type
Box
equals
extents
- Box.extents()
Gets the extents of the box.
- Returns
A point with members set to extent values for each corresponding axis.
- Return type
Point3
getCorners
- Box.getCorners()
Gets all eight corner points for the box.
- Returns
The corner points of this box.
- Return type
[Point3]
isDegenerate
- Box.isDegenerate()
Returns whether or not the box is degenerate.
- Returns
whether or not the box is degenerate.
- Return type
boolean
toJson
- Box.toJson()
Creates an object ready for JSON serialization.
- Returns
The prepared object.
- Return type
object
static fromJson
- Box.fromJson(objData)
- Arguments
objData (
unknown()
) – An object given by [[toJson]].
Creates a new [[Box]] from an object given by [[toJson]].
- Returns
The prepared object.
- Return type
Box
static invalid
- Box.invalid()
Creates and returns an invalid bounding box.
- Returns
an invalid bounding box.
- Return type
Box