Package org.lwjgl.ovr

Class OVRTouchHapticsDesc

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


    public class OVRTouchHapticsDesc
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.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

        public static final int SIZEOF
        The struct size in bytes.
    • 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()
        Specified by:
        sizeof in class org.lwjgl.system.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.
      • createSafe

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

        public static OVRTouchHapticsDesc mallocStack(org.lwjgl.system.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(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
      • mallocStack

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

        public static OVRTouchHapticsDesc.Buffer callocStack(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:
        stack - the stack from which to allocate
        capacity - the buffer capacity