Class GestureTransformState

java.lang.Object
net.paulhertz.pixelaudio.curves.GestureTransformState

public class GestureTransformState extends Object
Stores optional affine-transform state for a gesture/curve. See net.paulhertz.pixelaudio.example.Bagatelle or Bagatelle skatch in Processing examples. Transform order: 1) flip/scale about pivot 2) rotate about pivot 3) translate
  • Field Details

    • enabled

      public boolean enabled
    • translateX

      public float translateX
      Translation in display units (pixels).
    • translateY

      public float translateY
    • rotation

      public float rotation
      Rotation in radians.
    • scaleX

      public float scaleX
      Scale factors before rotation.
    • scaleY

      public float scaleY
    • flipHorizontal

      public boolean flipHorizontal
      Mirror left/right around pivot (negates x scale).
    • flipVertical

      public boolean flipVertical
      Mirror up/down around pivot (negates y scale).
    • pivot

      public processing.core.PVector pivot
      Optional pivot for scale/flip/rotation. If null, utilities may use the bounds center of restPoints.
    • restPoints

      public ArrayList<processing.core.PVector> restPoints
      Optional rest pose to avoid cumulative drift during animation. Use to recalculate derived points accurately.
  • Constructor Details

    • GestureTransformState

      public GestureTransformState()
  • Method Details

    • copy

      public GestureTransformState copy()
    • resetTransform

      public void resetTransform()
    • captureRestPoints

      public void captureRestPoints(ArrayList<processing.core.PVector> points)
    • hasRestPoints

      public boolean hasRestPoints()
    • effectiveScaleX

      public float effectiveScaleX()
    • effectiveScaleY

      public float effectiveScaleY()
    • copyPoints

      public static ArrayList<processing.core.PVector> copyPoints(ArrayList<processing.core.PVector> points)