Class SwipeTracker

java.lang.Object
nl.colorize.multimedialib.scene.effect.SwipeTracker
All Implemented Interfaces:
Scene

public class SwipeTracker extends Object implements Scene
Sub-scene that can be used to track swipe gestures for both mouse pointers and touch controls. Instances need to be attached to the current scene in order to receive frame updates.

Swipe gestures are detected using a tolerance. This is necessary to prevent mis-identifying clicks and taps as swipe gestures.

  • Constructor Details

    • SwipeTracker

      public SwipeTracker(float tolerance)
  • Method Details

    • update

      public void update(SceneContext context, float deltaTime)
      Description copied from interface: Scene
      Called during every frame update for as long as the scene is active. deltaTime indicates the elapsed time since the last frame, in seconds.
      Specified by:
      update in interface Scene
    • getSwipes

      public Buffer<Line> getSwipes()