|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.emini.physics2D.Collision
public class Collision
Detects collisions of two bodies.
For both bodies (or body and landscape) each relevant projection direction is tested for overlap
(see also Shape.mUniqueAxesIndices
).
If one direction can be determined, where a gap is between both objects,
there is no intersection.
Otherwise the projection info can be used to find the collision point(s).
Only convex polygons are considered, so it is ensured that at most two relevant
collision points exist.
Constructor Summary | |
---|---|
Collision()
|
Method Summary | |
---|---|
static Contact |
detectCollision(Body b1,
Body b2)
Detects contacts between two bodies. |
protected static FXVector |
detectCollision(Body b1,
float xFX,
float yFX)
Detects contacts between a body and a particle. |
static Contact |
detectCollision(Body b1,
int index1,
Body b2,
int index2)
|
protected static Contact |
detectCollision(Body b1,
int index1,
Landscape landscape,
int index)
|
protected static Contact |
detectCollision(Body b1,
Landscape landscape,
int index)
Detects contacts between a body and a landscape segment. |
protected static FXVector |
detectCollision(Landscape landscape,
int index,
float xFX,
float yFX,
float xOldFX,
float yOldFX)
Detects collision of a landscape segment and a particle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Collision()
Method Detail |
---|
public static Contact detectCollision(Body b1, Body b2)
b1
- Body 1 of the collisionb2
- Body 2 of the collision
public static Contact detectCollision(Body b1, int index1, Body b2, int index2)
protected static Contact detectCollision(Body b1, Landscape landscape, int index)
b1
- Body 1 of the collisionlandscape
- the landscape objectindex
- the index of the line in the landscape
protected static Contact detectCollision(Body b1, int index1, Landscape landscape, int index)
protected static FXVector detectCollision(Landscape landscape, int index, float xFX, float yFX, float xOldFX, float yOldFX)
landscape
- index
- xFX
- yFX
- xOldFX
- yOldFX
-
protected static FXVector detectCollision(Body b1, float xFX, float yFX)
b1
- xFX
- yFX
-
|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |