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 @param copy the object to copy from
AABB.withVec2(Vector2 lowerVertex, Vector2 upperVertex)
Creates an AABB object using the given bounding vertices. @param lowerVertex the bottom left vertex of the bounding box @param maxVertex the top right vertex of the bounding box


hashCode int
The hash code for this object. [...]
read-only, inherited
lowerBound Vector2
Bottom left vertex of bounding box.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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.
getCenter() Vector2
Get the center of the AABB
getCenterToOut(Vector2 out) → void
getExtents() Vector2
Get the extents of the AABB (half-widths).
getExtentsToOut(Vector2 out) → void
getPerimeter() double
Gets the perimeter length
getVertices(List<Vector2> argRay) → void
isValid() bool
Verify that the bounds are sorted
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
raycast(RayCastOutput output, RayCastInput input) bool
@deprecated please use {@link #raycast(RayCastOutput, RayCastInput, IWorldPool)} for better performance
raycastWithPool(RayCastOutput output, RayCastInput input, IWorldPool argPool) bool
From Real-time Collision Detection, p179.
set(AABB aabb) → void
Sets this object from the given object @param aabb the object to copy from
toString() String
A string representation of this object. [...]


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

Static Methods

testOverlap(AABB a, AABB b) bool