DistanceProxy
Declaration
public struct tainicom.Aether.Physics2D.Collision.DistanceProxy
A distance proxy is used by the GJK algorithm. It encapsulates any shape.
Constructors
DistanceProxy
Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use.
void DistanceProxy(Shape shape, int index)
Parameters:
| Name | Type | Description |
|---|---|---|
shape |
tainicom.Aether.Physics2D.Collision.Shapes.Shape |
The shape. |
index |
System.Int32 |
The index. |
Methods
GetSupport
Get the supporting vertex index in the given direction.
int GetSupport(Vector2 direction)
Parameters:
| Name | Type | Description |
|---|---|---|
direction |
Strawberry.Math.Vector2 |
The direction. |
GetSupportVertex
Get the supporting vertex in the given direction.
Vector2 GetSupportVertex(Vector2 direction)
Parameters:
| Name | Type | Description |
|---|---|---|
direction |
Strawberry.Math.Vector2 |
The direction. |