AABB class

An axis-aligned bounding box.

Constructors

AABB()
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. [...]

Properties

lowerBound Vector2
Bottom left vertex of bounding box.
final
upperBound Vector2
Top right vertex of bounding box.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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
raycast(RayCastOutput output, RayCastInput input) bool
@deprecated please use {@link #raycast(RayCastOutput, RayCastInput, IWorldPool)} for better performance @param output @param input @return
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 [...]
toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Methods

testOverlap(AABB a, AABB b) bool