Aabb3 class

A mutable axis-aligned box [min, max].

A fresh box is empty (min = +∞, max = −∞) so points and boxes can be accumulated into it with addPoint / addBox.

Constructors

Aabb3()
An empty box.
Aabb3.copy(Aabb3 other)
Copy constructor.
Aabb3.fromRect(Rect rect, {double minZ = 0.0, double maxZ = 0.0})
A box covering rect in x/y and minZ..maxZ in z — how a flat 2-D thing is seen in 3-D.
Aabb3.minMax(Vector3 min, Vector3 max)
A box from its corners (copied).

Properties

hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
Whether nothing has been added (any max below its min).
no setter
max → Vector3
Largest corner.
final
min → Vector3
Smallest corner.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addBox(Aabb3 other) → void
Grow to contain other.
addPoint(Vector3 p) → void
Grow to contain p.
addXYZ(double x, double y, double z) → void
Grow to contain the point (x, y, z).
centerInto(Vector3 out) → void
Write the centre into out.
containsPoint(Vector3 p) → bool
Whether p is inside (on the surface counts).
intersects(Aabb3 other) → bool
Whether this and other overlap (touching counts).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setEmpty() → void
Reset to empty.
setFrom(Aabb3 other) → void
Set to other.
setFromRect(Rect rect, {double minZ = 0.0, double maxZ = 0.0}) → void
Set to rect in x/y, minZ..maxZ in z.
setValues(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) → void
Set from raw corners.
sizeInto(Vector3 out) → void
Write the size into out.
toRect() → Rect
The x/y footprint as a Rect (z dropped).
toString() → String
A string representation of this object.
override
transformInto(Matrix4 m, Aabb3 out) → void
Set out to the box around this one transformed by the affine m (Arvo's method — exact for the transformed corners). Safe when out == this.

Operators

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