BoundingBox2D

BoundingBox2D class

The axis-aligned bounding box for Vector2

Properties

NameDescription
NULLThe null bounding box
INFINITEThe infinite bounding box

Methods

constructor

NameDescription
constructor()

Result:


constructor_overload

NameDescription
constructor_overload(minimum, maximum)Initialize a finite bounding box with given minimum and maximum corner

Parameters:

NameTypeDescription
minimumVector2The minimum corner
maximumVector2The maximum corner

Result:


getExtent

NameDescription
getExtent()Gets the extent of the bounding box. The value of the property is BoundingBoxExtent integer constant.

Result:


getMinimum

NameDescription
getMinimum()The minimum corner of the bounding box

Result:


getMaximum

NameDescription
getMaximum()The maximum corner of the bounding box

Result:


merge

NameDescription
merge(pt)Merges the new box into the current bounding box.

Parameters:

NameTypeDescription
pVector2null

Result:


merge

NameDescription
merge(bb)Merges the new box into the current bounding box.

Parameters:

NameTypeDescription
bBoundingBox2Dnull

Result:


toString

NameDescription
toString()Gets the string representation of the bounding box.

Result: String