BoundingBox
- class cee.BoundingBox()
An axis-oriented bounding box storing the extent of an object.
All vertices of the object that the bounding box has been computed for will be within the box defined by the min and max corners.
Note that this class is immutable.
Constructors
Constructors
constructor
- cee.BoundingBox.constructor(minimum, maximum)
Creates a bounding box with the given min and max corners.
- Arguments
minimum (
cee.Vec3Like
) –maximum (
cee.Vec3Like
) –
- Return type
cee.BoundingBox
Properties
- cee.BoundingBox.maximum
The maximum values for x, y and z across all vertices in the object.
- cee.BoundingBox.minimum
The minimum values for x, y and z across all vertices in the object.
Methods
getCenter
- cee.BoundingBox.getCenter()
Returns the center of the bounding box
- Return type
cee.Vec3
getExtent
- cee.BoundingBox.getExtent()
Returns the extent for each component (x,y,z) of the bounding box (maximum - minimum).
- Return type
cee.Vec3
isValid
- cee.BoundingBox.isValid()
Returns true if the bounding box is valid, i.e. if minimum < maximum for x, y and z.
- Return type
boolean