Package org.lwjgl.ovr

Class OVRHapticsBuffer

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<OVRHapticsBuffer>
org.lwjgl.ovr.OVRHapticsBuffer
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class OVRHapticsBuffer extends org.lwjgl.system.Struct<OVRHapticsBuffer> implements org.lwjgl.system.NativeResource
Haptics buffer descriptor, contains amplitude samples used for Touch vibration.

Layout


 struct ovrHapticsBuffer {
     void * Samples(int);
     int SamplesCount();
     ovrHapticsBufferSubmitMode SubmitMode();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int SAMPLES
      The struct member offsets.
    • SAMPLESCOUNT

      public static final int SAMPLESCOUNT
      The struct member offsets.
    • SUBMITMODE

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

    • OVRHapticsBuffer

      public OVRHapticsBuffer(ByteBuffer container)
      Creates a OVRHapticsBuffer 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()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<OVRHapticsBuffer>
    • Samples

      public ByteBuffer Samples(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      samples stored in opaque format
    • SamplesCount

      public int SamplesCount()
      number of samples (up to OVR.OVR_HAPTICS_BUFFER_SAMPLES_MAX)
    • SubmitMode

      public int SubmitMode()
      how samples are submitted to the hardware. Must be:
      HapticsBufferSubmit_Enqueue
    • Samples

      public OVRHapticsBuffer Samples(ByteBuffer value)
      Sets the address of the specified ByteBuffer to the Samples(int) field.
    • SamplesCount

      public OVRHapticsBuffer SamplesCount(int value)
      Sets the specified value to the SamplesCount() field.
    • SubmitMode

      public OVRHapticsBuffer SubmitMode(int value)
      Sets the specified value to the SubmitMode() field.
    • set

      public OVRHapticsBuffer set(ByteBuffer Samples, int SamplesCount, int SubmitMode)
      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 OVRHapticsBuffer malloc()
      Returns a new OVRHapticsBuffer instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

      @Deprecated public static OVRHapticsBuffer mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRHapticsBuffer callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRHapticsBuffer mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRHapticsBuffer callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRHapticsBuffer.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRHapticsBuffer.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static OVRHapticsBuffer.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static OVRHapticsBuffer.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

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

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

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

      public static OVRHapticsBuffer.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new OVRHapticsBuffer.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
    • nSamples

      public static ByteBuffer nSamples(long struct, int capacity)
      Unsafe version of Samples.
    • nSamplesCount

      public static int nSamplesCount(long struct)
      Unsafe version of SamplesCount().
    • nSubmitMode

      public static int nSubmitMode(long struct)
      Unsafe version of SubmitMode().
    • nSamples

      public static void nSamples(long struct, ByteBuffer value)
      Unsafe version of Samples.
    • nSamplesCount

      public static void nSamplesCount(long struct, int value)
      Unsafe version of SamplesCount.
    • nSubmitMode

      public static void nSubmitMode(long struct, int value)
      Unsafe version of SubmitMode.
    • validate

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