AABB class

Axis aligned bounding box class.

Constructors

AABB({Vec3? upperBound, Vec3? lowerBound})

Properties

hashCode int
The hash code for this object.
no setterinherited
lowerBound Vec3
The lower bound of the bounding box
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
upperBound Vec3
The upper bound of the bounding box
getter/setter pair

Methods

clone() AABB
Clone an AABB
contains(AABB aabb) bool
Returns true if the given AABB is fully contained in this AABB.
copy(AABB aabb) AABB
Copy bounds from an AABB to this AABB @param aabb Source to copy from @return The this object, for chainability
extend(AABB aabb) → void
Extend this AABB so that it covers the given AABB too.
getCorners(Vec3 a, Vec3 b, Vec3 c, Vec3 d, Vec3 e, Vec3 f, Vec3 g, Vec3 h) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
overlaps(AABB aabb) bool
Returns true if the given AABB overlaps this AABB.
overlapsRay(Ray ray) bool
Check if the AABB is hit by a ray.
setFromPoints(List<Vec3> points, [Vec3? position, Quaternion? quaternion, num? skinSize]) AABB
Set the AABB bounds from a set of points. points An array of Vec3's. return The self object
toLocalFrame(Transform frame, AABB target) AABB
Get the representation of an AABB in another frame. return The "target" AABB object.
toString() String
A string representation of this object.
inherited
toWorldFrame(Transform frame, AABB target) AABB
Get the representation of an AABB in the global frame. return The "target" AABB object.
volume() double

Operators

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