Class SDL_HapticCondition
- java.lang.Object
-
- com.sun.jna.Structure
-
- io.github.libsdl4j.api.haptic.effect.SDL_HapticCondition
-
@FieldOrder({"type","direction","length","delay","button","interval","rightSat","leftSat","rightCoeff","leftCoeff","deadband","center"}) public final class SDL_HapticCondition extends com.sun.jna.Structure
A structure containing a template for a Condition effect.The struct handles the following effects:
SDL_HAPTIC_SPRING
: Effect based on axes position.SDL_HAPTIC_DAMPER
: Effect based on axes velocity.SDL_HAPTIC_INERTIA
: Effect based on axes acceleration.SDL_HAPTIC_FRICTION
: Effect based on axes movement.
Direction is handled by condition internals instead of a direction member. The condition effect specific members have three parameters. The first refers to the X axis, the second refers to the Y axis and the third refers to the Z axis. The right terms refer to the positive side of the axis and the left terms refer to the negative side of the axis. Please refer to the
SDL_HapticDirection
diagram for which side is positive and which is negative.
-
-
Field Summary
Fields Modifier and Type Field Description short
button
Button that triggers the effect.short[]
center
Position of the dead zone.short[]
deadband
Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered.short
delay
Delay before starting the effect.SDL_HapticDirection
direction
Direction of the effect - Not used ATM.short
interval
How soon it can be triggered again after button.short[]
leftCoeff
How fast to increase the force towards the negative side.short[]
leftSat
Level when joystick is to the negative side; max 0xFFFF.int
length
Duration of the effect.short[]
rightCoeff
How fast to increase the force towards the positive side.short[]
rightSat
Level when joystick is to the positive side; max 0xFFFF.short
type
-
Constructor Summary
Constructors Constructor Description SDL_HapticCondition()
SDL_HapticCondition(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 - Not used ATM.
-
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.
-
rightSat
public short[] rightSat
Level when joystick is to the positive side; max 0xFFFF.
-
leftSat
public short[] leftSat
Level when joystick is to the negative side; max 0xFFFF.
-
rightCoeff
public short[] rightCoeff
How fast to increase the force towards the positive side.
-
leftCoeff
public short[] leftCoeff
How fast to increase the force towards the negative side.
-
deadband
public short[] deadband
Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered.
-
center
public short[] center
Position of the dead zone.
-
-