PackageBox2D.Collision
Classpublic class b2AABB
Sourceb2AABB.as

An axis aligned bounding box.



Public Properties
 PropertyDefined by
  lowerBound : b2Vec2
The lower vertex
b2AABB
  upperBound : b2Vec2
The upper vertex
b2AABB
Public Methods
 MethodDefined by
  
Combine(aabb1:b2AABB, aabb2:b2AABB):b2AABB
[static] Combine two AABBs into one.
b2AABB
  
Contains(aabb:b2AABB):Boolean
Is an AABB contained within this one.
b2AABB
  
Get the center of the AABB.
b2AABB
  
Get the extents of the AABB (half-widths).
b2AABB
  
IsValid():Boolean
Verify that the bounds are sorted.
b2AABB
  
RayCast(output:b2RayCastOutput, input:b2RayCastInput):Boolean
Perform a precise raycast against the AABB.
b2AABB
  
TestOverlap(other:b2AABB):Boolean
Tests if another AABB overlaps this one.
b2AABB
Property detail
lowerBoundproperty
public var lowerBound:b2Vec2

The lower vertex

upperBoundproperty 
public var upperBound:b2Vec2

The upper vertex

Method detail
Combine()method
public static function Combine(aabb1:b2AABB, aabb2:b2AABB):b2AABB

Combine two AABBs into one.

Parameters
aabb1:b2AABB
 
aabb2:b2AABB

Returns
b2AABB
Contains()method 
public function Contains(aabb:b2AABB):Boolean

Is an AABB contained within this one.

Parameters
aabb:b2AABB

Returns
Boolean
GetCenter()method 
public function GetCenter():b2Vec2

Get the center of the AABB.

Returns
b2Vec2
GetExtents()method 
public function GetExtents():b2Vec2

Get the extents of the AABB (half-widths).

Returns
b2Vec2
IsValid()method 
public function IsValid():Boolean

Verify that the bounds are sorted.

Returns
Boolean
RayCast()method 
public function RayCast(output:b2RayCastOutput, input:b2RayCastInput):Boolean

Perform a precise raycast against the AABB.

Parameters
output:b2RayCastOutput
 
input:b2RayCastInput

Returns
Boolean
TestOverlap()method 
public function TestOverlap(other:b2AABB):Boolean

Tests if another AABB overlaps this one.

Parameters
other:b2AABB

Returns
Boolean