net.java.dev.joode.collision.collider
Class RectangleCircleCollider
java.lang.Object
net.java.dev.joode.collision.collider.RectangleCircleCollider
- All Implemented Interfaces:
- Collider
public class RectangleCircleCollider
- extends java.lang.Object
- implements Collider
A collider for boxes hitting circles. Box = bodyA, Circle = bodyB
The create() method is used as a factor although since this collider
is currently stateless a single instance is returned.
- Author:
- Kevin Glass, ported by Tom Larkworthy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pts
public static final float[][] pts
circPos
public static final Vector2 circPos
contactPoint
public static final Vector2 contactPoint
normal
public static final Vector2 normal
INSTANCE
public static final Collider INSTANCE
collideRectangleCircle
public int collideRectangleCircle(ContactGeom[] contacts,
Rectangle rect,
Circle circ,
int contactIndex)
- ported code from Phy2D
collide
public int collide(Geom o1,
Geom o2,
int flags,
ContactGeom[] contact,
int contactIndex,
int skip)
- Specified by:
collide in interface Collider