|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.physicsEngine.Arbiter
public class Arbiter
A class representing contact between two physical bodies (
PhysicalParameters). This resolves the forces exerted by the two bodies. As a simplifying approximation, the Arbiter position is defined as the centroid of the points of intersection of the two bodies contact points. This class utilizesgeometry.intersections.Intersector
to find the points of intersection between two physical bodies.
Constructor Summary | |
---|---|
Arbiter(PhysicalParameters bodyA,
PhysicalParameters bodyB,
java.util.List<Vector2f> pointsOfContact,
Vector2f normalDirection)
Create an arbiter (representing contact) between bodyA and bodyB at idealized contact point pointOfContact. |
Method Summary | |
---|---|
void |
applyImpulse()
Apply the impulse accumulated at this arbiter back to the participatory bodies. |
PhysicalParameters |
getBody1()
|
PhysicalParameters |
getBody2()
|
Vector2f |
getNormal()
|
java.util.List<Vector2f> |
getPointsOfContact()
Get the list of intersection points detected that define the Arbiter |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Arbiter(PhysicalParameters bodyA, PhysicalParameters bodyB, java.util.List<Vector2f> pointsOfContact, Vector2f normalDirection)
bodyA
- bodyB
- normalDirection
- Method Detail |
---|
public java.util.List<Vector2f> getPointsOfContact()
public Vector2f getNormal()
public PhysicalParameters getBody1()
public PhysicalParameters getBody2()
public void applyImpulse()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |