Package org.jbox2d.collision
Class Distance.DistanceProxy
java.lang.Object
org.jbox2d.collision.Distance.DistanceProxy
- Enclosing class:
- Distance
A distance proxy is used by the GJK algorithm. It encapsulates any shape.
TODO: see if we can just do assignments with vertices, instead of copying
stuff over
- Author:
- Daniel Murphy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intgetSupport(Vec2 d) Get the supporting vertex index in the given direction.final Vec2Get the supporting vertex in the given direction.final Vec2getVertex(int index) Get a vertex by index.final intGet the vertex count.final voidInitialize the proxy using the given shape.
-
Field Details
-
vertices
-
count
public int count -
radius
public float radius -
buffer
-
-
Constructor Details
-
DistanceProxy
public DistanceProxy()
-
-
Method Details
-
set
Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use. -
getSupport
Get the supporting vertex index in the given direction. -
getSupportVertex
Get the supporting vertex in the given direction. -
getVertexCount
public final int getVertexCount()Get the vertex count. -
getVertex
Get a vertex by index. Used by Distance.
-