| Package | org.MARS.dynamics.force |
| Class | public class Gravity |
| Inheritance | Gravity SimpleForceGenerator |
| Implements | IForceGenerator |
Gravity in simulation applies a mass-ignorant force.
See also
| Method | Defined by | ||
|---|---|---|---|
|
Constructs a new Gravity force generator
| Gravity | ||
|
generate(element:ISimulatable):void
Generates a gravitational force on the given element
Note that the force is scaled by the element's mass. | Gravity | ||
| Gravity | () | constructor |
public function Gravity(force:Vector)Constructs a new Gravity force generator
Parametersforce:Vector — vector representing gravitational force to apply to element(s)
|
| generate | () | method |
public override function generate(element:ISimulatable):voidGenerates a gravitational force on the given element
Note that the force is scaled by the element's mass. At the simplest level, this makes elements "fall at the same rate" regardless of mass.
Parameterselement:ISimulatable — element to apply gravity to
|