Package net.paulhertz.pixelaudio.curves
Class GestureTransformState
java.lang.Object
net.paulhertz.pixelaudio.curves.GestureTransformState
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
FieldsModifier and TypeFieldDescriptionbooleanbooleanMirror left/right around pivot (negates x scale).booleanMirror up/down around pivot (negates y scale).processing.core.PVectorOptional pivot for scale/flip/rotation.ArrayList<processing.core.PVector>Optional rest pose to avoid cumulative drift during animation.floatRotation in radians.floatScale factors before rotation.floatfloatTranslation in display units (pixels).float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureRestPoints(ArrayList<processing.core.PVector> points) copy()static ArrayList<processing.core.PVector>copyPoints(ArrayList<processing.core.PVector> points) floatfloatbooleanvoid
-
Field Details
-
enabled
public boolean enabled -
translateX
public float translateXTranslation in display units (pixels). -
translateY
public float translateY -
rotation
public float rotationRotation in radians. -
scaleX
public float scaleXScale factors before rotation. -
scaleY
public float scaleY -
flipHorizontal
public boolean flipHorizontalMirror left/right around pivot (negates x scale). -
flipVertical
public boolean flipVerticalMirror up/down around pivot (negates y scale). -
pivot
public processing.core.PVector pivotOptional pivot for scale/flip/rotation. If null, utilities may use the bounds center of restPoints. -
restPoints
Optional rest pose to avoid cumulative drift during animation. Use to recalculate derived points accurately.
-
-
Constructor Details
-
GestureTransformState
public GestureTransformState()
-
-
Method Details
-
copy
-
resetTransform
public void resetTransform() -
captureRestPoints
-
hasRestPoints
public boolean hasRestPoints() -
effectiveScaleX
public float effectiveScaleX() -
effectiveScaleY
public float effectiveScaleY() -
copyPoints
-