Class ConstantForceBehavior3D

java.lang.Object
toxi.physics3d.behaviors.ConstantForceBehavior3D
All Implemented Interfaces:
ParticleBehavior3D
Direct Known Subclasses:
GravityBehavior3D

public class ConstantForceBehavior3D extends Object implements ParticleBehavior3D
  • Constructor Details

    • ConstantForceBehavior3D

      public ConstantForceBehavior3D(Vec3D force)
  • Method Details

    • apply

      public void apply(VerletParticle3D p)
      Description copied from interface: ParticleBehavior3D
      Applies the constraint to the passed in particle. The method is assumed to manipulate the given instance directly.
      Specified by:
      apply in interface ParticleBehavior3D
      Parameters:
      p - particle
    • configure

      public void configure(float timeStep)
      Specified by:
      configure in interface ParticleBehavior3D
    • getForce

      public Vec3D getForce()
      Returns:
      the force
    • setForce

      public void setForce(Vec3D force)
      Parameters:
      force - the force to set