C# Class Box2D.Collision.AABB

An axis-aligned bounding box.
Show file Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
LowerBound Box2D.Common.Vec2
UpperBound Box2D.Common.Vec2

Public Methods

Method Description
AABB ( ) : System

Creates the default object, with vertices at 0,0 and 0,0.

AABB ( AABB copy ) : System

Copies from the given object

AABB ( Vec2 lowerVertex, Vec2 upperVertex ) : System

Creates an AABB object using the given bounding vertices.

Combine ( AABB aabb ) : void

Combines another aabb with this one

Combine ( AABB aabb1, AABB aab ) : void

Combine two AABBs into this one.

Contains ( AABB aabb ) : bool

Does this aabb contain the provided AABB.

GetCenterToOut ( Vec2 result ) : void
GetExtentsToOut ( Vec2 result ) : void
GetVertices ( Vec2 argRay ) : void
Raycast ( RayCastOutput output, RayCastInput input ) : bool
Raycast ( RayCastOutput output, RayCastInput input, IWorldPool argPool ) : bool

From Real-time Collision Detection, p179.

Set ( AABB aabb ) : void

Sets this object from the given object

TestOverlap ( AABB a, AABB b ) : bool
ToString ( ) : String

Method Details

AABB() public method

Creates the default object, with vertices at 0,0 and 0,0.
public AABB ( ) : System
return System

AABB() public method

Copies from the given object
public AABB ( AABB copy ) : System
copy AABB the object to copy from
return System

AABB() public method

Creates an AABB object using the given bounding vertices.
public AABB ( Vec2 lowerVertex, Vec2 upperVertex ) : System
lowerVertex Box2D.Common.Vec2 the bottom left vertex of the bounding box
upperVertex Box2D.Common.Vec2 the top right vertex of the bounding box
return System

Combine() public method

Combines another aabb with this one
public Combine ( AABB aabb ) : void
aabb AABB
return void

Combine() public method

Combine two AABBs into this one.
public Combine ( AABB aabb1, AABB aab ) : void
aabb1 AABB
aab AABB
return void

Contains() public method

Does this aabb contain the provided AABB.
public Contains ( AABB aabb ) : bool
aabb AABB
return bool

GetCenterToOut() public method

public GetCenterToOut ( Vec2 result ) : void
result Box2D.Common.Vec2
return void

GetExtentsToOut() public method

public GetExtentsToOut ( Vec2 result ) : void
result Box2D.Common.Vec2
return void

GetVertices() public method

public GetVertices ( Vec2 argRay ) : void
argRay Box2D.Common.Vec2
return void

Raycast() public method

public Raycast ( RayCastOutput output, RayCastInput input ) : bool
output RayCastOutput
input RayCastInput
return bool

Raycast() public method

From Real-time Collision Detection, p179.
public Raycast ( RayCastOutput output, RayCastInput input, IWorldPool argPool ) : bool
output RayCastOutput
input RayCastInput
argPool IWorldPool
return bool

Set() public method

Sets this object from the given object
public Set ( AABB aabb ) : void
aabb AABB the object to copy from
return void

TestOverlap() public static method

public static TestOverlap ( AABB a, AABB b ) : bool
a AABB
b AABB
return bool

ToString() public method

public ToString ( ) : String
return String

Property Details

LowerBound public property

Bottom left vertex of bounding box.
public Vec2,Box2D.Common LowerBound
return Box2D.Common.Vec2

UpperBound public property

Top right vertex of bounding box.
public Vec2,Box2D.Common UpperBound
return Box2D.Common.Vec2