Record Class SDL_HapticRamp

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_HapticRamp
All Implemented Interfaces:
IPointer, ISDL_HapticRamp

@ValueBasedCandidate @UnsafeConstructor public record SDL_HapticRamp(@NotNull MemorySegment segment) extends Record implements ISDL_HapticRamp

A structure containing a template for a Ramp effect.

This struct is exclusively for the SDL_HAPTIC_RAMP effect.

The ramp effect starts at start strength and ends at end strength. It augments in linear fashion. If you use attack and fade with a ramp the effects get added to the ramp effect making the effect become quadratic instead of linear.

Since: This struct is available since SDL 3.2.0.

See also:

  • SDL_HAPTIC_RAMP
  • SDL_HapticEffect

Structure

typedef struct SDL_HapticRamp {
    Uint16 type;
    SDL_HapticDirection direction;
    Uint32 length;
    Uint16 delay;
    Uint16 button;
    Uint16 interval;
    Sint16 start;
    Sint16 end;
    Uint16 attack_length;
    Uint16 attack_level;
    Uint16 fade_length;
    Uint16 fade_level;
} SDL_HapticRamp;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.