|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hermes.Interactor<MassedBeing,MassedBeing> hermes.physics.InverseSquareInteractor hermes.physics.GravityInteractor
public class GravityInteractor
An interactor for gravitational attractions using the standard inverse-square force model. F = G * m1 * m2 / r ^ 2
Constructor Summary | |
---|---|
GravityInteractor(float gravityConstant)
Sets up a gravity interactor with no range limit. |
|
GravityInteractor(float gravityConstant,
float maxRange)
Sets up the gravity interactor with a maximum interaction range. |
Method Summary | |
---|---|
protected float |
beingFactor(MassedBeing being)
The factor from each being used in the numerator of the Coloumb equation for example, charge for an electric force or mass for gravity. |
Methods inherited from class hermes.physics.InverseSquareInteractor |
---|
detect, handle |
Methods inherited from class hermes.Interactor |
---|
appliedImmediately, multisampled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GravityInteractor(float gravityConstant, float maxRange)
gravityConstant
- the gravity constant G (should be positive)maxRange
- the maximum range of gravitational interactionspublic GravityInteractor(float gravityConstant)
gravityConstant
- the gravity constant G (should be positive)Method Detail |
---|
protected float beingFactor(MassedBeing being)
InverseSquareInteractor
beingFactor
in class InverseSquareInteractor
being
- a being
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |