A ForceLaw that applies a single constant Force. The Force can be set to null, in which case this ForceLaw does nothing.

TO DO Be able to add several constant forces, and remove them.

TO DO Be able to specify a RigidBody and location on the RigidBody, see for example RotatingTestForce

Implements

Constructors

Methods

  • Returns the constant Force that this ForceLaw applies or null if there is no Force.

    Returns null | Force

    the constant Force that this ForceLaw applies or null

  • Sets the constant Force that this ForceLaw applies

    Parameters

    • force: null | Force

      the constant Force that this ForceLaw should apply, or null

    Returns void

  • Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.

    For an object whose main purpose is to represent another Printable object, it is recommended to include the result of calling toStringShort on that other object. For example, calling toStringShort() on a DisplayShape might return something like this:

    DisplayShape{polygon:Polygon{'chain3'}}
    

    Returns string

    a minimal string representation of this object.

Generated using TypeDoc