Class RectConstraint

java.lang.Object
toxi.physics2d.constraints.RectConstraint
All Implemented Interfaces:
ParticleConstraint2D

public class RectConstraint extends Object implements ParticleConstraint2D
  • Constructor Details

    • RectConstraint

      public RectConstraint(Rect rect)
    • RectConstraint

      public RectConstraint(Rect rect, boolean isContainer)
    • RectConstraint

      public RectConstraint(Vec2D min, Vec2D max)
  • Method Details

    • apply

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

      public Rect getBox()
    • setBox

      public void setBox(Rect rect)