Package org.lwjgl.ovr

Class OVRTouchHapticsDesc

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class OVRTouchHapticsDesc
    extends Struct
    implements NativeResource
    Describes the Touch Haptics engine.

    Member documentation

    • SampleRateHz – Haptics engine frequency/sample-rate, sample time in seconds equals 1.0/sampleRateHz
    • SampleSizeInBytes – Size of each Haptics sample, sample value range is [0, 2^(Bytes*8)-1]
    • 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 – Minimum number of samples that can be sent to Haptics through SubmitControllerVibration
    • SubmitMaxSamples – Maximum number of samples that can be sent to Haptics through SubmitControllerVibration
    • SubmitOptimalSamples – Optimal number of samples that can be sent to Haptics through SubmitControllerVibration

    Layout

    
     struct ovrTouchHapticsDesc {
         int SampleRateHz;
         int SampleSizeInBytes;
         int QueueMinSizeToAvoidStarvation;
         int SubmitMinSamples;
         int SubmitMaxSamples;
         int SubmitOptimalSamples;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • SAMPLERATEHZ, SAMPLESIZEINBYTES, QUEUEMINSIZETOAVOIDSTARVATION, SUBMITMINSAMPLES, SUBMITMAXSAMPLES, SUBMITOPTIMALSAMPLES

        The struct member offsets.
    • Constructor Detail

      • OVRTouchHapticsDesc

        public OVRTouchHapticsDesc​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • SampleRateHz

        public int SampleRateHz()
        Returns the value of the SampleRateHz field.
      • SampleSizeInBytes

        public int SampleSizeInBytes()
        Returns the value of the SampleSizeInBytes field.
      • QueueMinSizeToAvoidStarvation

        public int QueueMinSizeToAvoidStarvation()
        Returns the value of the QueueMinSizeToAvoidStarvation field.
      • SubmitMinSamples

        public int SubmitMinSamples()
        Returns the value of the SubmitMinSamples field.
      • SubmitMaxSamples

        public int SubmitMaxSamples()
        Returns the value of the SubmitMaxSamples field.
      • SubmitOptimalSamples

        public int SubmitOptimalSamples()
        Returns the value of the SubmitOptimalSamples field.
      • 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​(long address)
        Returns a new OVRTouchHapticsDesc instance for the specified memory address.
      • createSafe

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

        public static OVRTouchHapticsDesc callocStack()
        Returns a new OVRTouchHapticsDesc instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static OVRTouchHapticsDesc mallocStack​(MemoryStack stack)
        Returns a new OVRTouchHapticsDesc instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static OVRTouchHapticsDesc callocStack​(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
      • nSampleRateHz

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

        public static int nSampleSizeInBytes​(long struct)
        Unsafe version of SampleSizeInBytes().
      • 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().