Class BoxConstraint

java.lang.Object
toxi.physics3d.constraints.BoxConstraint
All Implemented Interfaces:
ParticleConstraint3D

public class BoxConstraint extends Object implements ParticleConstraint3D
  • Constructor Details

    • BoxConstraint

      public BoxConstraint(AABB box)
    • BoxConstraint

      public BoxConstraint(Vec3D min, Vec3D max)
  • Method Details

    • apply

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

      public AABB getBox()
    • getRestitution

      public float getRestitution()
    • setBox

      public void setBox(AABB box)
    • setRestitution

      public void setRestitution(float restitution)