BoundingBox
BoundingBox
A simple axis-aligned bounding box. A representation of a 2D Bounding Box. Used to keep track of area used by component(s).
Constructor
public BoundingBox
Properties
No publicly accessible properties on BoundingBox
Methods
public getMin
getMin() => Vector
Returns the (x,y) value of bottom left corner of Bounding Box.
Returns
-
Vector
– Coordinates of bottom left corner of Bounding Box.
public getMax
getMax() => Vector
Returns the (x,y) value of top right corner of Bounding Box.
Returns
-
Vector
– Coordinates of top right corner of Bounding Box.
public setMin
setMin(min) => void
Sets new coordinates for bottom left corner of Bounding Box.
Parameters
-
min: Vector
– Coordinates of new bottom left corner of Bounding Box.
public setMax
setMax(max) => void
Sets new corrdinates for top right corner of Bounding Box.
Parameters
-
max: Vector
– Coordinates of new top right corner of Bounding Box.
public getWidth
getWidth() => number
Calculates coordinate length of the width of Bounding Box.
Returns
-
number
– Coordinate length of the width of Bounding Box.
public getHeight
getHeight() => number
Calculates coordinate length of the height of Bounding Box.
Returns
-
number
– Coordinate length of the height of Bounding Box.
public getArea
getArea() => number
Calculates coordinate area of Bounding Box.
Returns
-
number
– Coordinate area of Bounding Box.
public getCenter
getCenter() => Vector
Calculates the coordinates of the center of Bounding Box.
Returns
-
Vector
– Coordinates of the center of Bounding Box.
Static Methods
No static methods for BoundingBox