C# Class Project290.Physics.Collision.DistanceProxy

A distance proxy is used by the GJK algorithm. It encapsulates any shape.
Show file Open project: scastle/Solitude Class Usage Examples

Public Methods

Method Description
GetSupport ( Vector2 direction ) : int

Get the supporting vertex index in the given direction.

GetSupportVertex ( Vector2 direction ) : Vector2

Get the supporting vertex in the given direction.

GetVertex ( int index ) : Vector2

Get a vertex by index. Used by b2Distance.

Set ( Shape shape, int index ) : void

Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.

Method Details

GetSupport() public method

Get the supporting vertex index in the given direction.
public GetSupport ( Vector2 direction ) : int
direction Vector2 The direction.
return int

GetSupportVertex() public method

Get the supporting vertex in the given direction.
public GetSupportVertex ( Vector2 direction ) : Vector2
direction Vector2 The direction.
return Vector2

GetVertex() public method

Get a vertex by index. Used by b2Distance.
public GetVertex ( int index ) : Vector2
index int The index.
return Vector2

Set() public method

Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.
public Set ( Shape shape, int index ) : void
shape Project290.Physics.Collision.Shapes.Shape The shape.
index int The index.
return void