Class GestureSchedule
java.lang.Object
net.paulhertz.pixelaudio.schedule.GestureSchedule
- All Implemented Interfaces:
PAGesture
Data container for a
PAGesture with immutable points and times
and an optional start time (in milliseconds).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatstatic voidenforceNonDecreasing(float[] t) List<processing.core.PVector>Dense gesture points.longAbsolute start time (e.g.float[]Time offsets in ms, same length as getAllPoints(), first element typically 0.booleanisEmpty()static float[]normalizeTimesToStartAtZero(float[] timesMs) voidsetStartTimeMs(long startTimeMs) intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.paulhertz.pixelaudio.curves.PAGesture
getAllPointsSchedule
-
Field Details
-
points
-
timesMs
public final float[] timesMs -
startTimeMs
public long startTimeMs
-
-
Constructor Details
-
GestureSchedule
-
-
Method Details
-
getAllPoints
Description copied from interface:PAGestureDense gesture points.- Specified by:
getAllPointsin interfacePAGesture
-
getTimeOffsetsMs
public float[] getTimeOffsetsMs()Description copied from interface:PAGestureTime offsets in ms, same length as getAllPoints(), first element typically 0.- Specified by:
getTimeOffsetsMsin interfacePAGesture
-
getStartTimeMs
public long getStartTimeMs()Description copied from interface:PAGestureAbsolute start time (e.g. millis() when gesture began)- Specified by:
getStartTimeMsin interfacePAGesture
-
setStartTimeMs
public void setStartTimeMs(long startTimeMs) -
size
public int size() -
durationMs
public float durationMs() -
isEmpty
public boolean isEmpty() -
normalizeTimesToStartAtZero
public static float[] normalizeTimesToStartAtZero(float[] timesMs) -
enforceNonDecreasing
public static void enforceNonDecreasing(float[] t)
-