|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExternalForce
Represents an external force applying to one or more bodies. The external force is applied at each step in the simulation.
Method Summary | |
---|---|
void |
applyForce(Body[] bodies,
int bodyCount,
float timestepFX)
Method to apply the external force. |
ExternalForce |
copy(Body[] bodyMapping)
Copy method for the force. |
Method Detail |
---|
void applyForce(Body[] bodies, int bodyCount, float timestepFX)
Body#applyForce(at.emini.physics2D.util.FXVector, int)
method.
bodies
- the caller supplies an array containing all bodies in the world.bodyCount
- the number of bodies in the world (not necessarily equal to length of the array)timestepFX
- the current simulation timestep is passedExternalForce copy(Body[] bodyMapping)
bodyMapping
- a vector containing a mapping from bodies in the original world to the new world.
This will only be used when the class depends on bodies. The reference to the copy of a body is found by bodyMapping[body.getId()].
|
Emini Physics Engine 1.3.5a API Documentation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |