Class AxisConstraint

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

public class AxisConstraint extends Object implements ParticleConstraint2D
Constrains a particle's movement by locking a given axis to a fixed value.
  • Field Details

    • constraint

      public float constraint
    • axis

      public Vec2D.Axis axis
  • Constructor Details

    • AxisConstraint

      public AxisConstraint(Vec2D.Axis axis, float constraint)
      Parameters:
      axis - axis to lock
      constraint - constrain the axis to this value
  • Method Details