Aabb2 class

Defines a 2-dimensional axis-aligned bounding box between a min and a max position.

Constructors

Aabb2()
Create a new AABB with min and max set to the origin.
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.
Aabb2.fromBuffer(ByteBuffer buffer, int offset)
Constructs Aabb2 with a min/max storage that views given buffer starting at offset. offset has to be multiple of Float64List.bytesPerElement.
Aabb2.minMax(Vector2 min, Vector2 max)
Create a new AABB with a min and max.

Properties

center Vector2
The center of the AABB.
no setter
hashCode int
The hash code for this object.
no setterinherited
max Vector2
The maximum point defining the AABB.
no setter
min Vector2
The minimum point defining the AABB.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsAabb2(Aabb2 other) bool
Return if this contains other.
containsVector2(Vector2 other) bool
Return if this contains other.
copyCenterAndHalfExtents(Vector2 center, Vector2 halfExtents) → void
Copy the center and the halfExtents of this.
copyFrom(Aabb2 other) → void
Copy the min and max from other into this.
hull(Aabb2 other) → void
Set the min and max of this so that this is a hull of this and other.
hullPoint(Vector2 point) → void
Set the min and max of this so that this contains point.
intersectsWithAabb2(Aabb2 other) bool
Return if this intersects with other.
intersectsWithVector2(Vector2 other) bool
Return if this intersects with other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rotate(Matrix3 t) → void
Rotate this by the rotation matrix t.
rotated(Matrix3 t, Aabb2 out) Aabb2
Create a copy of this that is rotated by the rotation matrix t and store it in out.
setCenterAndHalfExtents(Vector2 center, Vector2 halfExtents) → void
Set the AABB by a center and halfExtents.
toString() String
A string representation of this object.
inherited
transform(Matrix3 t) → void
Transform this by the transform t.
transformed(Matrix3 t, Aabb2 out) Aabb2
Create a copy of this that is transformed by the transform t and store it in out.

Operators

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