Class GuaranteedTriggerChannel

All Implemented Interfaces:
Savable

public class GuaranteedTriggerChannel extends TriggerChannel
An animation source channel consisting of keyword samples indicating when a specific trigger condition is met. Each channel can only be in one keyword "state" at a given moment in time. This channel guarantees that if we skip over a sample in this channel, we'll still arm it after that fact. This channel should only be used with non-looping, forward moving clips.
  • Constructor Details

    • GuaranteedTriggerChannel

      public GuaranteedTriggerChannel(String channelName, float[] times, String[] keys)
      Construct a new GuaranteedTriggerChannel.
      Parameters:
      channelName - the name of this channel.
      times - the time samples
      keys - our key samples. Entries may be null. Should have as many entries as the times array.
    • GuaranteedTriggerChannel

      protected GuaranteedTriggerChannel()
  • Method Details

    • setCurrentSample

      public void setCurrentSample(int sampleIndex, double progressPercent, Object applyTo)
      Description copied from class: AbstractAnimationChannel
      Sets data on the given applyTo Object for the given sampleIndex and a percent progress towards the sample following it.
      Overrides:
      setCurrentSample in class TriggerChannel
      Parameters:
      sampleIndex - the sample to pull information from.
      progressPercent - a value [0.0, 1.0] representing progress from sampleIndex to sampleIndex+1
      applyTo - the data object to apply this channel's information to.
    • getSubchannelBySample

      public AbstractAnimationChannel getSubchannelBySample(String name, int startSample, int endSample)
      Description copied from class: AbstractAnimationChannel
      Returns a new channel of the same content as this, but trimmed to just the times between start and end sample.
      Overrides:
      getSubchannelBySample in class TriggerChannel
      Parameters:
      name - the new name for our subchannel.
      startSample - the sample to start with (inclusive). Sample counting starts at 0.
      endSample - the sample to end with (inclusive). max is getSampleCount() - 1.
      Returns:
      the new channel.
    • getSubchannelByTime

      public AbstractAnimationChannel getSubchannelByTime(String name, float startTime, float endTime)
      Description copied from class: AbstractAnimationChannel
      Returns a new channel of the same content as this, but trimmed to just the times between start and end sample.
      Overrides:
      getSubchannelByTime in class TriggerChannel
      Parameters:
      name - the new name for our subchannel.
      startTime - the time to start with (inclusive)
      endTime - the time to end with (inclusive)
      Returns:
      the new channel.
    • getClassTag

      public Class<? extends GuaranteedTriggerChannel> getClassTag()
      Specified by:
      getClassTag in interface Savable
      Overrides:
      getClassTag in class TriggerChannel
    • initSavable

      public static GuaranteedTriggerChannel initSavable()