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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantForceBehavior
public ConstantForceBehavior(toxi.geom.Vec2D force)
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