Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.physics2d.behaviors
Class ConstantForceBehavior

    java.lang.Object
      toxi.physics2d.behaviors.ConstantForceBehavior

All Implemented Interfaces:
  ParticleBehavior2D

Direct Known Subclasses:
  GravityBehavior

    public class ConstantForceBehavior

extends java.lang.Object
implements ParticleBehavior2D

Constructor Summary
`ConstantForceBehavior(toxi.geom.Vec2D force)`

Method Summary
`void` | `apply(VerletParticle2D p)` Applies the constraint to the passed in particle.
`void` | `configure(float timeStep)`
`toxi.geom.Vec2D` | `getForce()`
`void` | `setForce(toxi.geom.Vec2D force)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConstantForceBehavior

    public ConstantForceBehavior(toxi.geom.Vec2D force)

Method Detail

### apply

    public void apply(VerletParticle2D p)

  Description copied from interface: `ParticleBehavior2D`
  Applies the constraint to the passed in particle. The method is assumed to manipulate the given instance directly.

  Specified by:
    `apply` in interface `ParticleBehavior2D`
  Parameters:
    `p` - particle

### configure

    public void configure(float timeStep)

  Specified by:
    `configure` in interface `ParticleBehavior2D`

### getForce

    public toxi.geom.Vec2D getForce()

  Returns:
    the force

### setForce

    public void setForce(toxi.geom.Vec2D force)

  Parameters:
    `force` - the force to set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD