Package net.paulhertz.pixelaudio.curves

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `boolean`
  `enabled`
  `boolean`
  `flipHorizontal`
  Mirror left/right around pivot (negates x scale).
  `boolean`
  `flipVertical`
  Mirror up/down around pivot (negates y scale).
  `processing.core.PVector`
  `pivot`
  Optional pivot for scale/flip/rotation.
  `ArrayList<processing.core.PVector>`
  `restPoints`
  Optional rest pose to avoid cumulative drift during animation.
  `float`
  `rotation`
  Rotation in radians.
  `float`
  `scaleX`
  Scale factors before rotation.
  `float`
  `scaleY`
  `float`
  `translateX`
  Translation in display units (pixels).
  `float`
  `translateY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GestureTransformState()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `captureRestPoints(ArrayList<processing.core.PVector> points)`
  `GestureTransformState`
  `copy()`
  `static ArrayList<processing.core.PVector>`
  `copyPoints(ArrayList<processing.core.PVector> points)`
  `float`
  `effectiveScaleX()`
  `float`
  `effectiveScaleY()`
  `boolean`
  `hasRestPoints()`
  `void`
  `resetTransform()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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)