Static methods

@:value({ height : 1, width : 1, y : 0, x : 0 })staticinlineget(x:Float = 0, y:Float = 0, width:Float = 1, height:Float = 1):AABB

Gets an AABB from the pool, or creates a new one if none are available. Call put() on the AABB to place it back in the pool.

Note - The X and Y positions represent the center of the AABB. To set the AABB from its Top-Left origin, AABB.get_from_min_max() is available.

Parameters:

x

The centered X position of the AABB.

y

The centered Y position of the AABB.

width

The width of the AABB.

height

The height of the AABB.

Returns:

AABB

staticinlineget_from_min_max(min_x:Float, min_y:Float, max_x:Float, max_y:Float):AABB

Gets an AABB from the pool, or creates a new one if none are available. Call put() on the AABB to place it back in the pool.

Parameters:

min_x
min_y
max_x
max_y

Returns:

AABB

staticget_pool():Pool<AABB>

Variables

read onlyheight:Float

@:value(false)read onlypooled:Bool = false

read onlywidth:Float

Methods

inlineadd(aabb:AABB):Void

Adds the bounds of an AABB into this AABB.

Parameters:

null

aabb

inlineclone():AABB

inlinecontains(point:Vector2):Bool

inlineload(aabb:AABB):AABB

inlineoverlaps(other:AABB):Bool

@:value({ height : 1, width : 1, y : 0, x : 0 })inlineset(x:Float = 0, y:Float = 0, width:Float = 1, height:Float = 1):AABB

Sets the values on this AABB.

Note - The X and Y positions represent the center of the AABB. To set the AABB from its Top-Left origin, AABB.set_from_min_max() is available.

Parameters:

x

The centered X position of the AABB.

y

The centered Y position of the AABB.

width

The width of the AABB.

height

The height of the AABB.

Returns:

AABB

inlineset_from_min_max(min_x:Float, min_y:Float, max_x:Float, max_y:Float):AABB

@:value({ put_self : false })inlineto_rect(put_self:Bool = false):Rect