Package net.paulhertz.pixelaudio.schedule

# Class GestureSchedule

java.lang.Object
net.paulhertz.pixelaudio.schedule.GestureSchedule

All Implemented Interfaces:
  `PAGesture`

public final class GestureSchedule extends Object implements PAGesture
Data container for a `PAGesture` with immutable points and times and an optional start time (in milliseconds).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final List<processing.core.PVector>`
  `points`
  `long`
  `startTimeMs`
  `final float[]`
  `timesMs`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GestureSchedule(List<processing.core.PVector> points, float[] timesMs)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `float`
  `durationMs()`
  `static void`
  `enforceNonDecreasing(float[] t)`
  `List<processing.core.PVector>`
  `getAllPoints()`
  Dense gesture points.
  `long`
  `getStartTimeMs()`
  Absolute start time (e.g.
  `float[]`
  `getTimeOffsetsMs()`
  Time offsets in ms, same length as getAllPoints(), first element typically 0.
  `boolean`
  `isEmpty()`
  `static float[]`
  `normalizeTimesToStartAtZero(float[] timesMs)`
  `void`
  `setStartTimeMs(long startTimeMs)`
  `int`
  `size()`

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

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

  ### Methods inherited from interface net.paulhertz.pixelaudio.curves.PAGesture

  `getAllPointsSchedule`

- ## Field Details

  - ### points

    public final List<processing.core.PVector> points

  - ### timesMs

    public final float[] timesMs

  - ### startTimeMs

    public long startTimeMs

- ## Constructor Details

  - ### GestureSchedule

    public GestureSchedule(List<processing.core.PVector> points, float[] timesMs)

- ## Method Details

  - ### getAllPoints

    public List<processing.core.PVector> getAllPoints()
    Description copied from interface: `PAGesture`
    Dense gesture points.
    Specified by:
      `getAllPoints` in interface `PAGesture`

  - ### getTimeOffsetsMs

    public float[] getTimeOffsetsMs()
    Description copied from interface: `PAGesture`
    Time offsets in ms, same length as getAllPoints(), first element typically 0.
    Specified by:
      `getTimeOffsetsMs` in interface `PAGesture`

  - ### getStartTimeMs

    public long getStartTimeMs()
    Description copied from interface: `PAGesture`
    Absolute start time (e.g. millis() when gesture began)
    Specified by:
      `getStartTimeMs` in interface `PAGesture`

  - ### setStartTimeMs

    public void setStartTimeMs(long startTimeMs)

  - ### size

    public int size()
    Specified by:
      `size` in interface `PAGesture`

  - ### durationMs

    public float durationMs()

  - ### isEmpty

    public boolean isEmpty()
    Specified by:
      `isEmpty` in interface `PAGesture`

  - ### normalizeTimesToStartAtZero

    public static float[] normalizeTimesToStartAtZero(float[] timesMs)

  - ### enforceNonDecreasing

    public static void enforceNonDecreasing(float[] t)