Class SDL_HapticCustom


  • @FieldOrder({"type","direction","length","delay","button","interval","channels","period","samples","data","attackLength","attackLevel","fadeLength","fadeLevel"})
    public final class SDL_HapticCustom
    extends com.sun.jna.Structure
    A structure containing a template for the SDL_HAPTIC_CUSTOM effect.

    This struct is exclusively for the SDL_HAPTIC_CUSTOM effect.

    A custom force feedback effect is much like a periodic effect, where the application can define its exact shape. You will have to allocate the data yourself. Data should consist of channels * samples Uint16 samples.

    If channels is one, the effect is rotated using the defined direction. Otherwise it uses the samples in data for the different axes.

    See Also:
    SDL_HapticEffectType.SDL_HAPTIC_CUSTOM, SDL_HapticEffect
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.sun.jna.Structure

        com.sun.jna.Structure.ByReference, com.sun.jna.Structure.ByValue, com.sun.jna.Structure.FieldOrder, com.sun.jna.Structure.StructField
    • Field Summary

      Fields 
      Modifier and Type Field Description
      short attackLength
      Duration of the attack.
      short attackLevel
      Level at the start of the attack.
      short button
      Button that triggers the effect.
      byte channels
      Axes to use, minimum of one.
      com.sun.jna.Pointer data
      Should contain channels*samples items.
      short delay
      Delay before starting the effect.
      SDL_HapticDirection direction
      Direction of the effect.
      short fadeLength
      Duration of the fade.
      short fadeLevel
      Level at the end of the fade.
      short interval
      How soon it can be triggered again after button.
      int length
      Duration of the effect.
      short period
      Sample periods.
      short samples
      Amount of samples.
      short type
      • Fields inherited from class com.sun.jna.Structure

        ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE
    • Method Summary

      • Methods inherited from class com.sun.jna.Structure

        allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, read, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, write, writeField, writeField, writeField
    • Field Detail

      • length

        public int length
        Duration of the effect.
      • delay

        public short delay
        Delay before starting the effect.
      • button

        public short button
        Button that triggers the effect.
      • interval

        public short interval
        How soon it can be triggered again after button.
      • channels

        public byte channels
        Axes to use, minimum of one.
      • period

        public short period
        Sample periods.
      • samples

        public short samples
        Amount of samples.
      • data

        public com.sun.jna.Pointer data
        Should contain channels*samples items.
      • attackLength

        public short attackLength
        Duration of the attack.
      • attackLevel

        public short attackLevel
        Level at the start of the attack.
      • fadeLength

        public short fadeLength
        Duration of the fade.
      • fadeLevel

        public short fadeLevel
        Level at the end of the fade.
    • Constructor Detail

      • SDL_HapticCustom

        public SDL_HapticCustom()
      • SDL_HapticCustom

        public SDL_HapticCustom​(com.sun.jna.Pointer p)