Package org.lwjgl.ovr

Class OVRDetectResult

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

    public class OVRDetectResult
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Return values for _Detect.

    Member documentation

    • IsOculusServiceRunning – is False when the Oculus Service is not running. This means that the Oculus Service is either uninstalled or stopped. IsOculusHMDConnected will be False in this case.

      is True when the Oculus Service is running. This means that the Oculus Service is installed and running. IsOculusHMDConnected will reflect the state of the HMD.

    • IsOculusHMDConnected – is False when an Oculus HMD is not detected. If the Oculus Service is not running, this will be False.

      is True when an Oculus HMD is detected. This implies that the Oculus Service is also installed and running.

    Layout

    
     struct ovrDetectResult {
         ovrBool IsOculusServiceRunning;
         ovrBool IsOculusHMDConnected;
         char[6];
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ISOCULUSSERVICERUNNING, ISOCULUSHMDCONNECTED

        The struct member offsets.
    • Constructor Detail

      • OVRDetectResult

        public OVRDetectResult​(java.nio.ByteBuffer container)
        Creates a OVRDetectResult 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
      • IsOculusServiceRunning

        public boolean IsOculusServiceRunning()
        Returns the value of the IsOculusServiceRunning field.
      • IsOculusHMDConnected

        public boolean IsOculusHMDConnected()
        Returns the value of the IsOculusHMDConnected field.
      • malloc

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

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

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

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

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

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

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

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

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

        public static OVRDetectResult mallocStack()
        Returns a new OVRDetectResult instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

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

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

        public static OVRDetectResult.Buffer callocStack​(int capacity,
                                                         org.lwjgl.system.MemoryStack stack)
        Returns a new OVRDetectResult.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
      • nIsOculusServiceRunning

        public static boolean nIsOculusServiceRunning​(long struct)
        Unsafe version of IsOculusServiceRunning().
      • nIsOculusHMDConnected

        public static boolean nIsOculusHMDConnected​(long struct)
        Unsafe version of IsOculusHMDConnected().