|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.phys2d.raw.CollisionEvent
An event describing a collision between two bodies
Constructor Summary | |
CollisionEvent(float time,
Body body1,
Body body2,
ROVector2f point,
ROVector2f normal,
float depth)
Create a new event describing a contact |
Method Summary | |
Body |
getBodyA()
Get the first body in the collision |
Body |
getBodyB()
Get the second body in the collision |
ROVector2f |
getNormal()
Get the normal at the collision point |
float |
getPenetrationDepth()
Get the penetration depth caused by the collision |
ROVector2f |
getPoint()
Get the point where the collision occured |
float |
getTime()
Get the time of the collision |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CollisionEvent(float time, Body body1, Body body2, ROVector2f point, ROVector2f normal, float depth)
time
- The time of the collisionbody1
- The first body in the collisionbody2
- The second body in the collisionpoint
- The point of collision (not always perfect - accepts penetration)normal
- The normal of collisiondepth
- The penetration of of the contactMethod Detail |
public float getTime()
public Body getBodyA()
public Body getBodyB()
public ROVector2f getNormal()
public ROVector2f getPoint()
public float getPenetrationDepth()
public java.lang.String toString()
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |