toxi.physics.constraints
Class SoftBoxConstraint

java.lang.Object
  extended by toxi.physics.constraints.SoftBoxConstraint
All Implemented Interfaces:
ParticleConstraint

public class SoftBoxConstraint
extends java.lang.Object
implements ParticleConstraint


Field Summary
 java.util.List<toxi.geom.Vec3D.Axis> axes
           
 toxi.geom.AABB box
           
 float smooth
           
 
Constructor Summary
SoftBoxConstraint(toxi.geom.AABB box, float smooth)
           
 
Method Summary
 SoftBoxConstraint addAxis(toxi.geom.Vec3D.Axis a)
           
 void apply(VerletParticle p)
          Applies the constraint to the passed in particle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

box

public toxi.geom.AABB box

axes

public java.util.List<toxi.geom.Vec3D.Axis> axes

smooth

public float smooth
Constructor Detail

SoftBoxConstraint

public SoftBoxConstraint(toxi.geom.AABB box,
                         float smooth)
Method Detail

addAxis

public SoftBoxConstraint addAxis(toxi.geom.Vec3D.Axis a)

apply

public void apply(VerletParticle p)
Description copied from interface: ParticleConstraint
Applies the constraint to the passed in particle. The method is assumed to manipulate the given instance directly.

Specified by:
apply in interface ParticleConstraint
Parameters:
p - particle