Bounds<T extends num> class

Rectangular bound delimited by orthogonal lines passing through two points.

Annotations

Constructors

Bounds.new(Point<T> a, Point<T> b)
Create a Bounds instance in a safe way.
factory
Bounds.unsafe(Point<T> min, Point<T> max)
Create a Bounds instance without checking if min is actually the minimum and max is actually the maximum.
const

Properties

bottomLeft Point<T>
Bottom-Left corner's point.
no setter
bottomRight Point<T>
Bottom-Right corner's point.
no setter
center Point<double>
This Bounds central point.
no setter
hashCode int
The hash code for this object.
no setterinherited
max Point<T>
The edge of the bounds with the maximum x and y coordinate
final
min Point<T>
The edge of the bounds with the minimum x and y coordinate
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Point<T>
A point that contains the difference between the point's axis projections.
no setter
topLeft Point<T>
Top-Left corner's point.
no setter
topRight Point<T>
Top-Right corner's point.
no setter

Methods

aabbContainsLine(double x1, double y1, double x2, double y2) bool
Checks if the line between the two coordinates is contained within the Bounds.
contains(Point<T> point) bool
Check if a Point is inside of the bounds.
containsBounds(Bounds<T> b) bool
Check if an other Bounds object is inside of the bounds.
containsPartialBounds(Bounds<T> b) bool
Checks if a part of the other Bounds is contained in this Bounds.
extend(Point<T> point) Bounds<T>
Creates a new Bounds obtained by expanding the current ones with a new point.
intersect(Bounds<T> b) Bounds<T>?
Calculates the intersection of two Bounds. The return value will be null if there is no intersection. The returned bounds may be zero size (bottomLeft == topRight).
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

containing(Iterable<Point<double>> points) Bounds<double>
Create a Bounds as bounding box of a list of points.