toxi.physics.constraints
Class BoxConstraint
java.lang.Object
toxi.physics.constraints.BoxConstraint
- All Implemented Interfaces:
- ParticleConstraint
public class BoxConstraint
- extends java.lang.Object
- implements ParticleConstraint
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoxConstraint
public BoxConstraint(toxi.geom.AABB box)
BoxConstraint
public BoxConstraint(toxi.geom.Vec3D min,
toxi.geom.Vec3D max)
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)