nape.geom.AABB

type
class
Axis Aligned Bounding Box (AABB)

Note that in many cases of an AABB object being returned by a Nape function the AABB object will be marked internally as an 'immutable' AABB. This will always be documented and trying to mutate such an AABB will result in an error being thrown.

Static Methods

static function fromRect(rect:flash.geom.Rectangle):AABB

+ Construct an AABB from an AS3 Rectangle object.

Constructor

function new(x:Float = 0, y:Float = 0, width:Float = 0, height:Float = 0)
+ Construct a new AABB.

Instance Properties

var height : Float = 0

+ height of AABB.

var max : Vec2 = (0, 0)

+ The maximum bounds for the AABB.

var min : Vec2 = (0, 0)

+ The minimum bounds for the AABB.

var width : Float = 0

+ width of AABB.

var x : Float = 0

+ The x coordinate of the AABB's top-left corner.

var y : Float = 0

+ The y coordinate of the AABB's top-left corner.

Instance Methods

function copy():AABB

+ Produce a copy of this AABB.

function toRect():flash.geom.Rectangle

+ Create an AS3 Rectangle object from AABB.