C# Class Box2D.Collision.Distance.DistanceProxy

A distance proxy is used by the GJK algorithm. It encapsulates any shape. TODO: see if we can just do assignments with m_vertices, instead of copying stuff over
ファイルを表示 Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
Buffer Box2D.Common.Vec2[]
Radius float
Vertices Box2D.Common.Vec2[]

Public Methods

Method Description
DistanceProxy ( ) : System
GetSupport ( Vec2 d ) : int

Get the supporting vertex index in the given direction.

GetSupportVertex ( Vec2 d ) : Vec2

Get the supporting vertex in the given direction.

GetVertex ( int index ) : Vec2

Get a vertex by index. Used by Distance.

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

DistanceProxy() public method

public DistanceProxy ( ) : System
return System

GetSupport() public method

Get the supporting vertex index in the given direction.
public GetSupport ( Vec2 d ) : int
d Box2D.Common.Vec2
return int

GetSupportVertex() public method

Get the supporting vertex in the given direction.
public GetSupportVertex ( Vec2 d ) : Vec2
d Box2D.Common.Vec2
return Box2D.Common.Vec2

GetVertex() public method

Get a vertex by index. Used by Distance.
public GetVertex ( int index ) : Vec2
index int
return Box2D.Common.Vec2

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 Box2D.Collision.Shapes.Shape
index int
return void

Property Details

Buffer public_oe property

public Vec2[],Box2D.Common Buffer
return Box2D.Common.Vec2[]

Radius public_oe property

public float Radius
return float

Vertices public_oe property

public Vec2[],Box2D.Common Vertices
return Box2D.Common.Vec2[]