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.
read-only
max Vector2
The maximum point defining the AABB.
read-only
min Vector2
The minimum point defining the AABB.
read-only
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

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 halfExtends 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.
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.
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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