Package org.lwjgl.ovr

Class OVRHapticsBuffer

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

    public class OVRHapticsBuffer
    extends Struct
    implements NativeResource
    Haptics buffer descriptor, contains amplitude samples used for Touch vibration.

    Member documentation


     struct ovrHapticsBuffer {
         void * Samples;
         int SamplesCount;
         ovrHapticsBufferSubmitMode SubmitMode;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • OVRHapticsBuffer

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

      • sizeof

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

        public java.nio.ByteBuffer Samples​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the Samples field.
        capacity - the number of elements in the returned buffer
      • SamplesCount

        public int SamplesCount()
        Returns the value of the SamplesCount field.
      • SubmitMode

        public int SubmitMode()
        Returns the value of the SubmitMode field.
      • Samples

        public OVRHapticsBuffer Samples​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the Samples 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​(java.nio.ByteBuffer Samples,
                                    int SamplesCount,
                                    int SubmitMode)
        Initializes this struct with the specified values.
      • set

        public OVRHapticsBuffer set​(OVRHapticsBuffer src)
        Copies the specified struct data to this struct.
        src - the source struct
        this struct
      • createSafe

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

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

        public static java.nio.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,
                                    java.nio.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.
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        array - the struct array to validate
        count - the number of structs in array