|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.collision.collider.RectangleRectangleCollider
public class RectangleRectangleCollider
Ported from Phys2D The implementation of box to box collision. The create() method is used as a factory to produce the collider instance.
Currently the collider is stateless so a single instance is returned each time. TODO Quite alot of garbage production by this class
| Nested Class Summary | |
|---|---|
static class |
RectangleRectangleCollider.FeaturePair
ported from Phys2D, this class was not an inner class, but as only the RectangleCollider seems to use it extensively I have placed it here, though this may need to be moved when more funcionality is ported |
| Field Summary | |
|---|---|
static int |
EDGE1
The identifier indicating the first edge collides |
static int |
EDGE2
The identifier indicating the second edge collides |
static int |
EDGE3
The identifier indicating the third edge collides |
static int |
EDGE4
The identifier indicating the forth edge collides |
static int |
FACE_A_X
The identifier for the x coordinate of the first face |
static int |
FACE_A_Y
The identifier for the y coordinate of the first face |
static int |
FACE_B_X
The identifier for the x coordinate of the second face |
static int |
FACE_B_Y
The identifier for the y coordinate of the second face |
static Collider |
INSTANCE
|
static int |
NO_EDGE
The identifier indicating no edges collided |
| Method Summary | |
|---|---|
int |
collide(ContactGeom[] contacts,
int contactIndex,
Rectangle a,
Rectangle b)
|
int |
collide(Geom o1,
Geom o2,
int flags,
ContactGeom[] contact,
int contactIndex,
int skip)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FACE_A_X
public static final int FACE_A_Y
public static final int FACE_B_X
public static final int FACE_B_Y
public static final int NO_EDGE
public static final int EDGE1
public static final int EDGE2
public static final int EDGE3
public static final int EDGE4
public static final Collider INSTANCE
| Method Detail |
|---|
public int collide(Geom o1,
Geom o2,
int flags,
ContactGeom[] contact,
int contactIndex,
int skip)
collide in interface Collider
public int collide(ContactGeom[] contacts,
int contactIndex,
Rectangle a,
Rectangle b)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||