From 0844c9da04514342adbb66ecfe728099ede5b65d Mon Sep 17 00:00:00 2001 From: Campbell Suter Date: Thu, 28 Sep 2017 22:37:09 +1300 Subject: [PATCH] Add getters to OculusVR input --- .../main/java/com/jme3/input/vr/OculusVR.java | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java b/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java index 7e178d65a..0dba2292b 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/OculusVR.java @@ -8,25 +8,15 @@ package com.jme3.input.vr; import com.jme3.app.VREnvironment; import com.jme3.math.*; import com.jme3.renderer.Camera; -import com.jme3.util.VRUtil; +import org.lwjgl.PointerBuffer; +import org.lwjgl.ovr.*; -import java.nio.IntBuffer; -import java.util.Locale; -import java.util.concurrent.TimeUnit; -import java.util.logging.Level; import java.util.logging.Logger; -import static org.lwjgl.opengl.GL11.*; import static org.lwjgl.ovr.OVR.*; - -import static org.lwjgl.ovr.OVRErrorCode.*; -import static org.lwjgl.system.MemoryUtil.*; +import static org.lwjgl.ovr.OVRErrorCode.ovrSuccess; import static org.lwjgl.ovr.OVRUtil.ovr_Detect; - -import org.lwjgl.BufferUtils; -import org.lwjgl.PointerBuffer; - -import org.lwjgl.ovr.*; +import static org.lwjgl.system.MemoryUtil.*; /** * Oculus VR (LibOVR 1.3.0) Native support. @@ -386,6 +376,19 @@ public class OculusVR implements VRAPI { return to; } + + // Getters, intended for VRViewManager. + public OVRHmdDesc getHmdDesc() { + return hmdDesc; + } + + public OVRFovPort[] getFovPorts() { + return fovPorts; + } + + public long getSessionPointer() { + return session; + } } /* vim: set ts=4 softtabstop=0 sw=4 expandtab: */