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
rectin x/y andminZ..maxZin 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
pis inside (on the surface counts). -
intersects(
Aabb3 other) → bool -
Whether this and
otheroverlap (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
rectin x/y,minZ..maxZin 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
outto the box around this one transformed by the affinem(Arvo's method — exact for the transformed corners). Safe whenout == this.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited