Class SDL_HapticCustom
- java.lang.Object
-
- com.sun.jna.Structure
-
- io.github.libsdl4j.api.haptic.effect.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 theSDL_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.
-
-
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
-
Constructor Summary
Constructors Constructor Description SDL_HapticCustom()
SDL_HapticCustom(com.sun.jna.Pointer p)
-
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
-
type
public short type
-
direction
public SDL_HapticDirection direction
Direction of the effect.
-
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.
-
-