number of thrusters to create
the RigidBody which thrust is applied to
the overall multiplier applied to each thrust Force.
Private
active_flags indicating which thrusters are currently firing
Private
directions_Direction and magnitude of thrust force, in body coords.
Private
locations_Location on body where thrust force is applied, in body coords.
Private
magnitude_the overall multiplier applied to each thrust Force.
Private
rigidThe rigidBody which thrust is applied to.
Ensures this ForceLaw is not connected to anything and so can be garbage collected. For example, if this ForceLaw is an Observer, this will stop observing its Subject.
Returns list of MassObjects being affected by this ForceLaw.
list of MassObjects being affected by this ForceLaw
Returns direction and magnitude of thrust force, in body coords, for the given
thruster. Returns default value Vector.ORIGIN
if location not yet defined for that
thruster.
the index number of the desired thruster within the array of thrusters
direction and magnitude of thrust force, in body coords
Returns location on body where thrust force is applied for the given thruster.
Returns default value Vector.ORIGIN
if location not yet defined for that thruster.
the index number of the desired thruster within the array of thrusters
location on body where thrust force is applied, in body coords
Sets whether the given thruster is firing.
the index number of the thruster within the array of thrusters
whether the thruster should be firing.
this object for chaining setters
Sets an overall multiplier applied to each thrust Force.
the overall multiplier to apply to each thrust Force.
this object for chaining setters
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'}}
a minimal string representation of this object.
Generated using TypeDoc
Contains a set of thrust forces operating on a particular RigidBody; each thruster generates a Force at a specified location on the RigidBody with a specified direction. Thrusters can be turned on or off independently. Use setMagnitude to set an overall magnitude which multiplies all of the thrust forces.
Thrusters are set to a default location and direction of the zero vector, see Vector.ORIGIN. Use setThruster to set the actual location and direction.
See RigidBodyEventHandler for an example of how to control thrusters from key events.
TO DO be able to scale or rotate each Force independently?