Class XrHapticPcmVibrationFB

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XrHapticPcmVibrationFB extends Struct<XrHapticPcmVibrationFB> implements NativeResource

 struct XrHapticPcmVibrationFB {
     XrStructureType type;
     void const * next;
     uint32_t bufferSize;
     float const * buffer;
     float sampleRate;
     XrBool32 append;
     uint32_t * samplesConsumed;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • TYPE

      public static final int TYPE
      The struct member offsets.
    • NEXT

      public static final int NEXT
      The struct member offsets.
    • BUFFERSIZE

      public static final int BUFFERSIZE
      The struct member offsets.
    • BUFFER

      public static final int BUFFER
      The struct member offsets.
    • SAMPLERATE

      public static final int SAMPLERATE
      The struct member offsets.
    • APPEND

      public static final int APPEND
      The struct member offsets.
    • SAMPLESCONSUMED

      public static final int SAMPLESCONSUMED
      The struct member offsets.
  • Constructor Details

    • XrHapticPcmVibrationFB

      public XrHapticPcmVibrationFB(ByteBuffer container)
      Creates a XrHapticPcmVibrationFB instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<XrHapticPcmVibrationFB>
    • type

      public int type()
      Returns:
      the value of the type field.
    • next

      public long next()
      Returns:
      the value of the next field.
    • bufferSize

      public int bufferSize()
      Returns:
      the value of the bufferSize field.
    • buffer

      public FloatBuffer buffer()
      Returns:
      a FloatBuffer view of the data pointed to by the buffer field.
    • sampleRate

      public float sampleRate()
      Returns:
      the value of the sampleRate field.
    • append

      public boolean append()
      Returns:
      the value of the append field.
    • samplesConsumed

      public IntBuffer samplesConsumed(int capacity)
      Returns:
      a IntBuffer view of the data pointed to by the samplesConsumed field.
    • type

      public XrHapticPcmVibrationFB type(int value)
      Sets the specified value to the type field.
    • type$Default

      public XrHapticPcmVibrationFB type$Default()
      Sets the TYPE_HAPTIC_PCM_VIBRATION_FB value to the type field.
    • next

      public XrHapticPcmVibrationFB next(long value)
      Sets the specified value to the next field.
    • buffer

      public XrHapticPcmVibrationFB buffer(FloatBuffer value)
      Sets the address of the specified FloatBuffer to the buffer field.
    • sampleRate

      public XrHapticPcmVibrationFB sampleRate(float value)
      Sets the specified value to the sampleRate field.
    • append

      public XrHapticPcmVibrationFB append(boolean value)
      Sets the specified value to the append field.
    • samplesConsumed

      public XrHapticPcmVibrationFB samplesConsumed(IntBuffer value)
      Sets the address of the specified IntBuffer to the samplesConsumed field.
    • set

      public XrHapticPcmVibrationFB set(int type, long next, FloatBuffer buffer, float sampleRate, boolean append, IntBuffer samplesConsumed)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static XrHapticPcmVibrationFB malloc()
      Returns a new XrHapticPcmVibrationFB instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static XrHapticPcmVibrationFB calloc()
      Returns a new XrHapticPcmVibrationFB instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static XrHapticPcmVibrationFB create()
      Returns a new XrHapticPcmVibrationFB instance allocated with BufferUtils.
    • create

      public static XrHapticPcmVibrationFB create(long address)
      Returns a new XrHapticPcmVibrationFB instance for the specified memory address.
    • createSafe

      public static @Nullable XrHapticPcmVibrationFB createSafe(long address)
      Like create, but returns null if address is NULL.
    • create

      public static XrHapticPcmVibrationFB create(XrHapticBaseHeader value)
      Downcasts the specified XrHapticBaseHeader instance to XrHapticPcmVibrationFB.
    • malloc

      public static XrHapticPcmVibrationFB.Buffer malloc(int capacity)
      Returns a new XrHapticPcmVibrationFB.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static XrHapticPcmVibrationFB.Buffer calloc(int capacity)
      Returns a new XrHapticPcmVibrationFB.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrHapticPcmVibrationFB.Buffer create(int capacity)
      Returns a new XrHapticPcmVibrationFB.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static XrHapticPcmVibrationFB.Buffer create(long address, int capacity)
      Create a XrHapticPcmVibrationFB.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable XrHapticPcmVibrationFB.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • create

      Downcasts the specified XrHapticBaseHeader.Buffer instance to XrHapticPcmVibrationFB.Buffer.
    • malloc

      public static XrHapticPcmVibrationFB malloc(MemoryStack stack)
      Returns a new XrHapticPcmVibrationFB instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static XrHapticPcmVibrationFB calloc(MemoryStack stack)
      Returns a new XrHapticPcmVibrationFB instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static XrHapticPcmVibrationFB.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new XrHapticPcmVibrationFB.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static XrHapticPcmVibrationFB.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XrHapticPcmVibrationFB.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ntype

      public static int ntype(long struct)
      Unsafe version of type().
    • nnext

      public static long nnext(long struct)
      Unsafe version of next().
    • nbufferSize

      public static int nbufferSize(long struct)
      Unsafe version of bufferSize().
    • nbuffer

      public static FloatBuffer nbuffer(long struct)
      Unsafe version of buffer.
    • nsampleRate

      public static float nsampleRate(long struct)
      Unsafe version of sampleRate().
    • nappend

      public static int nappend(long struct)
      Unsafe version of append().
    • nsamplesConsumed

      public static IntBuffer nsamplesConsumed(long struct, int capacity)
      Unsafe version of samplesConsumed.
    • ntype

      public static void ntype(long struct, int value)
      Unsafe version of type.
    • nnext

      public static void nnext(long struct, long value)
      Unsafe version of next.
    • nbufferSize

      public static void nbufferSize(long struct, int value)
      Sets the specified value to the bufferSize field of the specified struct.
    • nbuffer

      public static void nbuffer(long struct, FloatBuffer value)
      Unsafe version of buffer.
    • nsampleRate

      public static void nsampleRate(long struct, float value)
      Unsafe version of sampleRate.
    • nappend

      public static void nappend(long struct, int value)
      Unsafe version of append.
    • nsamplesConsumed

      public static void nsamplesConsumed(long struct, IntBuffer value)
      Unsafe version of samplesConsumed.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate