Class AxisAlignedBoundingBox
A rectangle is a box in 2d space
Because these rectangles are axis aligned, they don't have any rotation
class AxisAlignedBoundingBox(T, uint dimensions)
;
Constructors
Name | Description |
this
|
Creates an AABB from the same as the vector constructor, but as a varargs input
|
this
|
Creates an AABB from the initial point, and how much in each direction the box extends
|
this
|
Copy constructor for AABBs
|
Fields
Name | Type | Description |
extent
|
Vector!(T,dimensions) | The extent in each direction the AABB extends from the initial point (eg.)
|
initialPoint
|
Vector!(T,dimensions) | The initial or starting point of the AABB
|
Properties
Name | Type | Description |
bottomLeft [get]
|
Vector!(T,2) | Gives the AABB convenient 2d aliases
|
bottomRight [get]
|
Vector!(T,2) | Gives the AABB convenient 2d aliases
|
center [get]
|
Vector!(T,dimensions) | Gets the point that is the middle or center of the AABB
|
edges [get]
|
Segment!(T,dimensions)[] | Gets all the edges of the AABB
|
topLeft [get]
|
Vector!(T,2) | Gives the AABB convenient 2d aliases
|
topRight [get]
|
Vector!(T,2) | Gives the AABB convenient 2d aliases
|
vertices [get]
|
Vector!(T,dimensions)[] | Gets all the vertices of the AABB
|
Methods
Name | Description |
contains
|
Returns whether the box contains the given point
|