public class Distance

  1. Object
  2. Distance
This is non-static for faster pooling. To get an instance, use the SingletonPool, don’t construct a distance object.

Nested types

class Distance.SimplexCacheUsed to warm start Distance.
class Distance.DistanceProxyA 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_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

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.