C# Class Project290.Physics.Collision.AABB

An axis aligned bounding box.
Datei anzeigen Open project: scastle/Solitude Class Usage Examples

Public Properties

Property Type Description
LowerBound Vector2
UpperBound Vector2

Public Methods

Method Description
AABB ( Vector2 min, Vector2 max ) : System
AABB ( float width, float height, Vector2 position ) : System
Combine ( AABB &aabb ) : void

Combine an AABB into this one.

Combine ( AABB &aabb1, AABB &aabb2 ) : void

Combine two AABBs into this one.

Contains ( AABB &aabb ) : bool

Does this aabb contain the provided AABB.

Contains ( Vector2 &point ) : bool

Determines whether the AAABB contains the specified point.

IsValid ( ) : bool

Verify that the bounds are sorted.

RayCast ( RayCastOutput &output, RayCastInput &input ) : bool
TestOverlap ( AABB &a, AABB &b ) : bool
TestOverlap ( Shape shapeA, int indexA, Shape shapeB, int indexB, Transform &xfA, Transform &xfB ) : bool

Method Details

AABB() public method

public AABB ( Vector2 min, Vector2 max ) : System
min Vector2
max Vector2
return System

AABB() public method

public AABB ( float width, float height, Vector2 position ) : System
width float
height float
position Vector2
return System

Combine() public method

Combine an AABB into this one.
public Combine ( AABB &aabb ) : void
aabb AABB The aabb.
return void

Combine() public method

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

Contains() public method

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

Contains() public method

Determines whether the AAABB contains the specified point.
public Contains ( Vector2 &point ) : bool
point Vector2 The point.
return bool

IsValid() public method

Verify that the bounds are sorted.
public IsValid ( ) : bool
return bool

RayCast() public method

public RayCast ( RayCastOutput &output, RayCastInput &input ) : bool
output RayCastOutput
input RayCastInput
return bool

TestOverlap() public static method

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

TestOverlap() public static method

public static TestOverlap ( Shape shapeA, int indexA, Shape shapeB, int indexB, Transform &xfA, Transform &xfB ) : bool
shapeA Project290.Physics.Collision.Shapes.Shape
indexA int
shapeB Project290.Physics.Collision.Shapes.Shape
indexB int
xfA Transform
xfB Transform
return bool

Property Details

LowerBound public_oe property

The lower vertex
public Vector2 LowerBound
return Vector2

UpperBound public_oe property

The upper vertex
public Vector2 UpperBound
return Vector2