Packageorg.generalrelativity.foam.dynamics.force
Classpublic class Gravity
InheritanceGravity Inheritance SimpleForceGenerator
ImplementsIForceGenerator



Protected Properties
 PropertyDefined by
 Inherited_force : Vector
force to apply to element(s)
SimpleForceGenerator
Public Methods
 MethodDefined by
  
Gravity(force:Vector)
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
Constructor detail
Gravity()constructor
public function Gravity(force:Vector)

Constructs a new Gravity force generator

Parameters
force:Vector — vector representing gravitational force to apply to element(s)
Method detail
generate()method
public override function generate(element:ISimulatable):void

Generates 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.

Parameters
element:ISimulatable — element to apply gravity to