Package org.jbox2d.collision
Class Distance
java.lang.Object
org.jbox2d.collision.Distance
This is non-static for faster pooling. To get an instance, use the
SingletonPool, don't construct a distance object.- Author:
- Daniel Murphy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA distance proxy is used by the GJK algorithm.static classUsed to warm start Distance. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intstatic intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddistance(DistanceOutput output, Distance.SimplexCache cache, DistanceInput input) Compute the closest points between two shapes.
-
Field Details
-
MAX_ITERS
public static final int MAX_ITERS- See Also:
-
GJK_CALLS
public static int GJK_CALLS -
GJK_ITERS
public static int GJK_ITERS -
GJK_MAX_ITERS
public static int GJK_MAX_ITERS
-
-
Constructor Details
-
Distance
public Distance()
-
-
Method Details
-
distance
Compute the closest points between two shapes. Supports any combination of: CircleShape and PolygonShape. The simplex cache is input/output. On the first call setSimplexCache.countto zero.
-