Interface GestureMapping

All Known Implementing Classes:
GestureMapping.DefaultMapping

public interface GestureMapping
Maps gesture points to indices into a mappingSnapshot array. mappingSnapshot is assumed to be a dense array of sample indices indexed by a raster address (x,y)->i, or any other scheme defined by the implementation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Default: interpret p as pixel coordinates and mappingSnapshot as width*height raster.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    pointToSnapshotIndex(processing.core.PVector p, int[] mappingSnapshot)
     
  • Method Details

    • pointToSnapshotIndex

      int pointToSnapshotIndex(processing.core.PVector p, int[] mappingSnapshot)
      Parameters:
      p - gesture point (typically in pixel coordinates)
      mappingSnapshot - array of mapped buffer indices (immutable snapshot)
      Returns:
      an index into mappingSnapshot (NOT the sample value), or -1 if invalid