Package org.lwjgl.ovr

Class OVRHapticsBuffer

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


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

    Member documentation

    Layout

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

      • SIZEOF

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

        public java.nio.ByteBuffer Samples(int capacity)
        Returns a ByteBuffer view of the data pointed to by the Samples field.
        Parameters:
        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.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • create

        public static OVRHapticsBuffer create(long address)
        Returns a new OVRHapticsBuffer instance for the specified memory address or null if the address is NULL.
      • callocStack

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

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

        public static OVRHapticsBuffer callocStack(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
      • callocStack

        public static OVRHapticsBuffer.Buffer callocStack(int capacity)
        Returns a new OVRHapticsBuffer.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

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

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

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

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