AABB class

An axis-aligned bounding box.


Creates the default object, with vertices at 0,0 and 0,0.
AABB.copy(AABB copy)
Copies from the given object.
AABB.withVec2(Vector2 lowerVertex, Vector2 upperVertex)
Creates an AABB object using the given bounding vertices. lowerVertex should be the bottom left vertex of the bounding box. upperVertex should be the top right vertex of the bounding box.


center Vector2
Get the center of the AABB
no setter
extents Vector2
Get the extents of the AABB (half-widths).
no setter
hashCode int
The hash code for this object.
no setterinherited
lowerBound Vector2
Bottom left vertex of bounding box.
perimeter double
Gets the perimeter length
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
upperBound Vector2
Top right vertex of bounding box.


combine(AABB aabb) → void
Combines another aabb with this one
combine2(AABB aabb1, AABB aab) → void
Combine two AABBs into this one.
contains(AABB aabb) bool
Does this aabb contain the provided AABB.
extentsToOut(Vector2 out) → void
getVertices(List<Vector2> argRay) → void
isValid() bool
Verify that the bounds are sorted
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
raycastWithPool(RayCastOutput output, RayCastInput input) bool
From Real-time Collision Detection, p179.
set(AABB aabb) → void
Sets this object from the given object.
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

testOverlap(AABB a, AABB b) bool