Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class Distance
- Object
- Distance
This is non-static for faster pooling. To get an instance, use IWorldPool#getDistance(), don’t
construct a distance object.
Nested types
class Distance.SimplexCache | Used to warm start Distance. |
class Distance.DistanceProxy | A distance proxy is used by the GJK algorithm. |
Fields
public static int GJK_CALLS | |
public static int GJK_ITERS | |
public static int GJK_MAX_ITERS |
Constructors
public Distance() |
Methods
public final void distance(DistanceOutput output, Distance.SimplexCache cache, DistanceInput input) | Compute the closest points between two shapes. |
Inherited methods
Field details
GJK_CALLS
public static int GJK_CALLSGJK_ITERS
public static int GJK_ITERSGJK_MAX_ITERS
public static int GJK_MAX_ITERSConstructor details
Distance
public Distance()Method details
distance
public final void distance(DistanceOutput output, Distance.SimplexCache cache, DistanceInput input)Compute the closest points between two shapes. Supports any combination of: CircleShape and
PolygonShape. The simplex cache is input/output. On the first call set SimplexCache.count to
zero.