Package org.lwjgl.ovr

Class OVRTouchHapticsDesc

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

public class OVRTouchHapticsDesc extends org.lwjgl.system.Struct<OVRTouchHapticsDesc> implements org.lwjgl.system.NativeResource
Describes the Touch Haptics engine.

Layout


 struct ovrTouchHapticsDesc {
     int SampleRateHz();
     int SampleSizeInBytes();
     int QueueMinSizeToAvoidStarvation();
     int SubmitMinSamples();
     int SubmitMaxSamples();
     int SubmitOptimalSamples();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int SAMPLERATEHZ
      The struct member offsets.
    • SAMPLESIZEINBYTES

      public static final int SAMPLESIZEINBYTES
      The struct member offsets.
    • QUEUEMINSIZETOAVOIDSTARVATION

      public static final int QUEUEMINSIZETOAVOIDSTARVATION
      The struct member offsets.
    • SUBMITMINSAMPLES

      public static final int SUBMITMINSAMPLES
      The struct member offsets.
    • SUBMITMAXSAMPLES

      public static final int SUBMITMAXSAMPLES
      The struct member offsets.
    • SUBMITOPTIMALSAMPLES

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

    • OVRTouchHapticsDesc

      public OVRTouchHapticsDesc(ByteBuffer container)
      Creates a OVRTouchHapticsDesc 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<OVRTouchHapticsDesc>
    • SampleRateHz

      public int SampleRateHz()
      Haptics engine frequency/sample-rate, sample time in seconds equals 1.0/sampleRateHz
    • SampleSizeInBytes

      public int SampleSizeInBytes()
      Size of each Haptics sample, sample value range is [0, 2^(Bytes*8)-1]
    • QueueMinSizeToAvoidStarvation

      public int QueueMinSizeToAvoidStarvation()
      Queue size that would guarantee Haptics engine would not starve for data. Make sure size doesn't drop below it for best results.
    • SubmitMinSamples

      public int SubmitMinSamples()
      Minimum number of samples that can be sent to Haptics through SubmitControllerVibration
    • SubmitMaxSamples

      public int SubmitMaxSamples()
      Maximum number of samples that can be sent to Haptics through SubmitControllerVibration
    • SubmitOptimalSamples

      public int SubmitOptimalSamples()
      Optimal number of samples that can be sent to Haptics through SubmitControllerVibration
    • malloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      @Deprecated public static OVRTouchHapticsDesc.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 OVRTouchHapticsDesc.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 OVRTouchHapticsDesc malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new OVRTouchHapticsDesc instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static int nSampleRateHz(long struct)
      Unsafe version of SampleRateHz().
    • nSampleSizeInBytes

      public static int nSampleSizeInBytes(long struct)
      Unsafe version of SampleSizeInBytes().
    • nQueueMinSizeToAvoidStarvation

      public static int nQueueMinSizeToAvoidStarvation(long struct)
    • nSubmitMinSamples

      public static int nSubmitMinSamples(long struct)
      Unsafe version of SubmitMinSamples().
    • nSubmitMaxSamples

      public static int nSubmitMaxSamples(long struct)
      Unsafe version of SubmitMaxSamples().
    • nSubmitOptimalSamples

      public static int nSubmitOptimalSamples(long struct)
      Unsafe version of SubmitOptimalSamples().