|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbox2d.collision.Distance
public class Distance
Implements the GJK algorithm for computing distance between shapes.
Field Summary | |
---|---|
static int |
g_GJK_Iterations
|
Method Summary | |
---|---|
static float |
distance(Vec2 x1,
Vec2 x2,
Shape shape1,
XForm xf1,
Shape shape2,
XForm xf2)
Find the closest distance between shapes shape1 and shape2, and load the closest points into x1 and x2. |
static float |
DistanceCC(Vec2 x1,
Vec2 x2,
CircleShape circle1,
XForm xf1,
CircleShape circle2,
XForm xf2)
distance between two circle shapes |
static float |
DistanceCirclePoint(Vec2 x1,
Vec2 x2,
CircleShape circle1,
XForm xf1,
PointShape pt2,
XForm xf2)
Distance between a circle and a point |
static float |
DistanceEdgeCircle(Vec2 x1,
Vec2 x2,
EdgeShape edge,
XForm xf1,
CircleShape circle,
XForm xf2)
Distance bewteen an edge and a circle |
static float |
DistanceGeneric(Vec2 x1,
Vec2 x2,
SupportsGenericDistance shape1,
XForm xf1,
SupportsGenericDistance shape2,
XForm xf2)
Distance between any two objects that implement SupportsGenericDistance. |
static float |
DistancePC(Vec2 x1,
Vec2 x2,
PolygonShape polygon,
XForm xf1,
CircleShape circle,
XForm xf2)
Distance between a polygon and a circle |
static float |
DistancePolygonPoint(Vec2 x1,
Vec2 x2,
PolygonShape polygon,
XForm xf1,
PointShape pt,
XForm xf2)
Distance between a polygon and a point |
static boolean |
InPoints(Vec2 w,
Vec2[] points,
int pointCount)
|
protected static int |
ProcessThree(Vec2 x1,
Vec2 x2,
Vec2[] p1s,
Vec2[] p2s,
Vec2[] points)
|
protected static int |
ProcessTwo(Vec2 x1,
Vec2 x2,
Vec2[] p1s,
Vec2[] p2s,
Vec2[] points)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int g_GJK_Iterations
Method Detail |
---|
protected static final int ProcessTwo(Vec2 x1, Vec2 x2, Vec2[] p1s, Vec2[] p2s, Vec2[] points)
protected static final int ProcessThree(Vec2 x1, Vec2 x2, Vec2[] p1s, Vec2[] p2s, Vec2[] points)
public static final boolean InPoints(Vec2 w, Vec2[] points, int pointCount)
public static final float DistanceGeneric(Vec2 x1, Vec2 x2, SupportsGenericDistance shape1, XForm xf1, SupportsGenericDistance shape2, XForm xf2)
x1
- Set to closest point on shape1 (result parameter)x2
- Set to closest point on shape2 (result parameter)shape1
- Shape to testxf1
- Transform of shape1shape2
- Shape to testxf2
- Transform of shape2
public static final float DistanceCC(Vec2 x1, Vec2 x2, CircleShape circle1, XForm xf1, CircleShape circle2, XForm xf2)
x1
- Closest point on shape1 is put here (result parameter)x2
- Closest point on shape2 is put here (result parameter)circle1
- xf1
- Transform of first shapecircle2
- xf2
- Transform of second shape
public static final float DistanceEdgeCircle(Vec2 x1, Vec2 x2, EdgeShape edge, XForm xf1, CircleShape circle, XForm xf2)
x1
- Closest point on shape1 is put here (result parameter)x2
- Closest point on shape2 is put here (result parameter)edge
- xf1
- xform of edgecircle
- xf2
- xform of circle
public static final float DistancePC(Vec2 x1, Vec2 x2, PolygonShape polygon, XForm xf1, CircleShape circle, XForm xf2)
x1
- Closest point on shape1 is put here (result parameter)x2
- Closest point on shape2 is put here (result parameter)polygon
- xf1
- xform of polygoncircle
- xf2
- xform of circle
public static final float DistancePolygonPoint(Vec2 x1, Vec2 x2, PolygonShape polygon, XForm xf1, PointShape pt, XForm xf2)
x1
- Closest point on shape1 is put here (result parameter)x2
- Closest point on shape2 is put here (result parameter)polygon
- xf1
- xform of polygonpt
- xf2
- xform of point
public static final float DistanceCirclePoint(Vec2 x1, Vec2 x2, CircleShape circle1, XForm xf1, PointShape pt2, XForm xf2)
x1
- Closest point on shape1 is put here (result parameter)x2
- Closest point on shape2 is put here (result parameter)circle1
- xf1
- xform of circlept2
- xf2
- xform of point
public static final float distance(Vec2 x1, Vec2 x2, Shape shape1, XForm xf1, Shape shape2, XForm xf2)
x1
- Closest point on shape1 is put here (result parameter)x2
- Closest point on shape2 is put here (result parameter)shape1
- First shape to testxf1
- Transform of first shapeshape2
- Second shape to testxf2
- Transform of second shape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |