Package org.lwjgl.ovr

Class OVRDetectResult

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

    public class OVRDetectResult
    extends Struct
    implements 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class 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​(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.
      • 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​(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​(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
      • nIsOculusServiceRunning

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

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