BBox class

A closed axis-aligned bounding box in dims dimensions. The first dims entries of bounds are the per-axis minima and the next dims are the maxima.

Constructors

BBox(int dims, List<double> bounds)
BBox.fromMinMax(List<double> mins, List<double> maxs)
factory
BBox.point(List<double> coords)
factory

Properties

bounds List<double>
[min0..min{d-1}, max0..max{d-1}], length 2*dims.
final
dims int
Number of dimensions.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

area() double
Axis-wise area (product of side lengths). For dims=1 this is the 1-d extent.
enlarge(BBox other) BBox
Returns the smallest box enclosing both this and other.
intersects(BBox other) bool
Returns true when this and other share at least one point (closed-interval intersection).
maxOf(int axis) double
minOf(int axis) double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

enclose(Iterable<BBox> boxes) BBox
Returns the smallest box enclosing a non-empty iterable.