Aabb2 class

Implementers

Constructors

Aabb2(Vector2 min, Vector2 max)
Create a new AABB with a min and max. Aliases them rather than copying, so both must already be immutable — this is checked with an assertion. Copy mutable corners with Vector2.copy first if needed.
const
Aabb2.centerAndHalfExtents(Vector2 center, Vector2 halfExtents)
Create a new AABB with a center and halfExtents.
factory
Aabb2.copy(Aabb2 other)
Create a new AABB as a copy of other.
factory

Properties

center Vector2
The center of the AABB. Allocates a new Vector2.
no setterinherited
centerX double
The x coordinate of the center of the AABB.
no setterinherited
centerY double
The y coordinate of the center of the AABB.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the AABB.
no setterinherited
max Vector2
The maximum point defining the AABB.
final
min Vector2
The minimum point defining the AABB.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width double
The width of the AABB.
no setterinherited

Methods

clone() Aabb2
Clone of this.
containsAabb2(Aabb2 other) bool
Return if this contains other.
inherited
containsVector2(Vector2 point) bool
Return if this contains point.
inherited
intersectsWithAabb2(Aabb2 other) bool
Return if this intersects with other.
inherited
intersectsWithVector2(Vector2 point) bool
Return if this intersects with point.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlapsX(Aabb2 other) bool
Return if this and other overlap on the x axis.
inherited
overlapsY(Aabb2 other) bool
Return if this and other overlap on the y axis.
inherited
toString() String
Returns a printable string.
inherited

Operators

operator ==(Object other) bool
Check if two AABBs are the same.
inherited

Constants

zero → const Aabb2
Canonical zero AABB.