|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.eside.flingbox.physics.collisions.Contact
public class Contact
Class to handle contact between two bodies.
| Field Summary | |
|---|---|
PhysicBody |
collidedBody
Collided body in contact, this is the weighter body in contact |
PhysicBody |
collidingBody
Colliding body in contact, this is the body in contact |
Vector2D |
normal
Contact's normal. |
Vector2D |
position
Contact's absolute position |
Vector2D |
sense
Contact's sense. |
| Constructor Summary | |
|---|---|
Contact(PhysicBody bodyA,
PhysicBody bodyB,
Vector2D position,
Vector2D sense,
Intersect intersect)
Default constructor |
|
| Method Summary | |
|---|---|
boolean |
concerns(PhysicBody body)
|
Vector2D |
getBodysSide(PhysicBody body)
|
Intersect |
getIntersect()
|
Vector2D |
getPosition()
|
Vector2D |
getRelativeVelocity()
|
boolean |
isCollision()
|
PhysicBody |
otherBody(PhysicBody body)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final PhysicBody collidingBody
public final PhysicBody collidedBody
public final Vector2D position
public final Vector2D sense
public final Vector2D normal
| Constructor Detail |
|---|
public Contact(PhysicBody bodyA,
PhysicBody bodyB,
Vector2D position,
Vector2D sense,
Intersect intersect)
bodyA - bodyB - position - sense - intersect - | Method Detail |
|---|
public Vector2D getBodysSide(PhysicBody body)
public boolean concerns(PhysicBody body)
public PhysicBody otherBody(PhysicBody body)
public Vector2D getPosition()
getPosition in interface PositionComparator.Positionablepublic Vector2D getRelativeVelocity()
public Intersect getIntersect()
public boolean isCollision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||