toxi.physics.constraints
Class BoxConstraint

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

public class BoxConstraint
extends java.lang.Object
implements ParticleConstraint


Constructor Summary
BoxConstraint(toxi.geom.AABB box)
           
BoxConstraint(toxi.geom.Vec3D min, toxi.geom.Vec3D max)
           
 
Method Summary
 void apply(VerletParticle p)
          Applies the constraint to the passed in particle.
 toxi.geom.AABB getBox()
           
 float getRestitution()
           
 void setBox(toxi.geom.AABB box)
           
 void setRestitution(float restitution)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxConstraint

public BoxConstraint(toxi.geom.AABB box)

BoxConstraint

public BoxConstraint(toxi.geom.Vec3D min,
                     toxi.geom.Vec3D max)
Method Detail

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

getBox

public toxi.geom.AABB getBox()

getRestitution

public float getRestitution()

setBox

public void setBox(toxi.geom.AABB box)

setRestitution

public void setRestitution(float restitution)