The axis-aligned bounding box.

Constructor

new()

Creates an empty AABB. Minimum and maximum points are set to zero.

Methods

clone():Aabb

Returns a clone of the AABB.

inlinecombine(other:Aabb):Aabb

Combines other into this AABB and returns this.

inlinecombined(other:Aabb):Aabb

Returns the combined aabb of this and other.

copyFrom(aabb:Aabb):Aabb

Copies AABB from aabb to and returns this.

inlinegetCenter():Vec3

Returns the center of the AABB.

inlinegetCenterTo(center:Vec3):Void

Sets center to the center of the AABB.

This does not create a new instance of Vec3.

inlinegetExtents():Vec3

Returns the half extents of the AABB.

inlinegetExtentsTo(halfExtents:Vec3):Void

Sets halfExtents to the half extents of the AABB.

This does not create a new instance of Vec3.

inlinegetIntersection(other:Aabb):Aabb

Returns the intersection of this and other.

inlinegetIntersectionTo(other:Aabb, intersection:Aabb):Void

Sets intersection to the intersection of this and other.

This does not create a new instance of Aabb.

inlinegetMax():Vec3

Returns the maximum point of the axis-aligned bounding box.

inlinegetMaxTo(max:Vec3):Void

Sets the maximum point of the axis-aligned bounding box to max.

This does not create a new instance of Vec3.

inlinegetMin():Vec3

Returns the minimum point of the axis-aligned bounding box.

inlinegetMinTo(min:Vec3):Void

Sets the minimum point of the axis-aligned bounding box to min.

This does not create a new instance of Vec3.

inlineinit(min:Vec3, max:Vec3):Aabb

Sets the minimum and maximum point and returns this.

Equivallent to setMin(min).setMax(max).

inlineoverlap(other:Aabb):Bool

Returns whether this and other intersect.

inlinesetMax(max:Vec3):Aabb

Sets the maximum point of the axis-aligned bounding box to max and returns this.

inlinesetMin(min:Vec3):Aabb

Sets the minimum point of the axis-aligned bounding box to min and returns this.