diff --git a/jme3-vr/src/main/java/com/jme3/app/VRApplication.java b/jme3-vr/src/main/java/com/jme3/app/VRApplication.java index 501567f902..2b20bae63e 100644 --- a/jme3-vr/src/main/java/com/jme3/app/VRApplication.java +++ b/jme3-vr/src/main/java/com/jme3/app/VRApplication.java @@ -23,7 +23,6 @@ import com.jme3.input.vr.openvr.OpenVR; import com.jme3.input.vr.openvr.OpenVRMouseManager; import com.jme3.input.vr.openvr.OpenVRViewManager; -import com.jme3.input.vr.osvr.OSVR; import com.jme3.math.ColorRGBA; import com.jme3.math.Quaternion; import com.jme3.math.Vector3f; @@ -88,11 +87,6 @@ public abstract class VRApplication implements Application, SystemListener { */ public float DEFAULT_ASPECT = 1f; - /** - * Is the application is based on OSVR (default is false). - */ - public boolean CONSTRUCT_WITH_OSVR = false; - /** * Is the application has not to start within VR mode (default is false). */ @@ -272,15 +266,9 @@ public VRApplication() { } else if( DISABLE_VR ) { logger.warning("VR disabled via code."); } else if( VRSupportedOS && DISABLE_VR == false ) { - if( CONSTRUCT_WITH_OSVR ) { - //FIXME: WARNING !! - vrHardware = new OSVR(null); - logger.config("Creating OSVR wrapper [SUCCESS]"); - } else { - //FIXME: WARNING !! - vrHardware = new OpenVR(null); - logger.config("Creating OpenVR wrapper [SUCCESS]"); - } + //FIXME: WARNING !! + vrHardware = new OpenVR(null); + logger.config("Creating OpenVR wrapper [SUCCESS]"); if( vrHardware.initialize() ) { setPauseOnLostFocus(false); } @@ -366,14 +354,6 @@ public boolean compositorAllowed() { return useCompositor && compositorOS; } - /** - * Get if the system currently support VR. - * @return true if the system currently support VR and false otherwise. - */ - public boolean isOSVRSupported() { - return VRSupportedOS; - } - /** * Simple update of the application, this method should contain {@link #getRootNode() root node} updates. * This method is called by the {@link #update() update()} method and should not be called manually. @@ -725,7 +705,7 @@ public void start() { settings.setFrequency(vrHardware.getDisplayFrequency()); settings.setFullscreen(false); settings.setVSync(false); // stop vsyncing on primary monitor! - settings.setSwapBuffers(!disableSwapBuffers || vrHardware instanceof OSVR); + settings.setSwapBuffers(!disableSwapBuffers); settings.setTitle("Put Headset On Now: " + settings.getTitle()); settings.setResizable(true); } diff --git a/jme3-vr/src/main/java/com/jme3/app/VRConstants.java b/jme3-vr/src/main/java/com/jme3/app/VRConstants.java index 68dc7201b3..0a4bf1fff5 100644 --- a/jme3-vr/src/main/java/com/jme3/app/VRConstants.java +++ b/jme3-vr/src/main/java/com/jme3/app/VRConstants.java @@ -131,30 +131,16 @@ public class VRConstants { * * Deprecated as only the lwjgl OpenVr version has been upgraded to modern action based inputs * - * @see #SETTING_VRAPI_OSVR_VALUE * @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE * @see #SETTING_VRAPI_OCULUSVR_VALUE */ @Deprecated public static final int SETTING_VRAPI_OPENVR_VALUE = 1; - /** - * The identifier of the OSVR system. - * - * Deprecated as an OpenVr system should be used instead for a non vender specific api - * - * @see #SETTING_VRAPI_OPENVR_VALUE - * @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE - * @see #SETTING_VRAPI_OCULUSVR_VALUE - */ - @Deprecated - public static final int SETTING_VRAPI_OSVR_VALUE = 2; - /** * The identifier of the OpenVR from LWJGL system. * * @see #SETTING_VRAPI_OPENVR_VALUE - * @see #SETTING_VRAPI_OSVR_VALUE * @see #SETTING_VRAPI_OCULUSVR_VALUE */ public static final int SETTING_VRAPI_OPENVR_LWJGL_VALUE = 3; @@ -165,7 +151,6 @@ public class VRConstants { * Deprecated as an OpenVr system should be used instead (and the rift itself is discontinued) * * @see #SETTING_VRAPI_OPENVR_VALUE - * @see #SETTING_VRAPI_OSVR_VALUE * @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE */ @Deprecated diff --git a/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java b/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java index 85b7a527a0..a44a358b1c 100644 --- a/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java +++ b/jme3-vr/src/main/java/com/jme3/app/VREnvironment.java @@ -19,8 +19,6 @@ import com.jme3.input.vr.openvr.OpenVR; import com.jme3.input.vr.openvr.OpenVRMouseManager; import com.jme3.input.vr.openvr.OpenVRViewManager; -import com.jme3.input.vr.osvr.OSVR; -import com.jme3.input.vr.osvr.OSVRViewManager; import com.jme3.renderer.Camera; import com.jme3.scene.Spatial; import com.jme3.system.AppSettings; @@ -405,8 +403,6 @@ public void atttach(AppState appState, Application application){ // Instantiate view manager if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE){ viewManager = new OpenVRViewManager(this); - } else if (vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE){ - viewManager = new OSVRViewManager(this); } else if (vrBinding == VRConstants.SETTING_VRAPI_OCULUSVR_VALUE) { viewManager = new OculusViewManager(this); } else if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE) { @@ -438,14 +434,7 @@ public boolean initialize(){ } if( vrSupportedOS) { - if( vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE ) { - guiManager = new VRGuiManager(this); - mouseManager = new OpenVRMouseManager(this); - - hardware = new OSVR(this); - initialized = true; - logger.config("Creating OSVR wrapper [SUCCESS]"); - } else if( vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE ) { + if( vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE ) { guiManager = new VRGuiManager(this); mouseManager = new OpenVRMouseManager(this); diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java b/jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java index e2afa0e789..2b0534d6a5 100644 --- a/jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java +++ b/jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java @@ -7,7 +7,7 @@ import com.jme3.renderer.Camera; /** - * An interface that represents a VR system. This interface has to be implemented in order to wrap underlying VR system (OpenVR, OSVR, ...) + * An interface that represents a VR system. This interface has to be implemented in order to wrap underlying VR system (OpenVR, OculusVR, ...) * @author reden - phr00t - https://github.com/phr00t * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr */ diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVR.java b/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVR.java deleted file mode 100644 index c8da65a4f1..0000000000 --- a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVR.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - -https://github.com/sensics/OSVR-RenderManager/blob/master/examples/RenderManagerOpenGLCAPIExample.cpp - -- JVM crashes often. Placing breakpoints during initialization clears it up most of the time (WHY!?) - - OSVR is just unstable. Any way to improve things? -- Render manager looks good, but left eye seems stretched. - - */ -package com.jme3.input.vr.osvr; - -import com.jme3.app.VREnvironment; -import com.jme3.input.vr.HmdType; -import com.jme3.input.vr.VRAPI; -import com.jme3.input.vr.VRInputAPI; -import com.jme3.math.Matrix4f; -import com.jme3.math.Quaternion; -import com.jme3.math.Vector2f; -import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; -import com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary; -import com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary; -import com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig; -import com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_OpenResultsOpenGL; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RenderBufferOpenGL; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RenderInfoOpenGL; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RenderParams; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ViewportDescription; -import com.jme3.system.osvr.osvrrendermanageropengl.OsvrRenderManagerOpenGLLibrary; -import com.ochafik.lang.jnaerator.runtime.NativeSize; -import com.ochafik.lang.jnaerator.runtime.NativeSizeByReference; -import com.sun.jna.Pointer; -import com.sun.jna.ptr.PointerByReference; -import java.nio.FloatBuffer; -import java.util.logging.Logger; - -/** - * A class that wraps an OSVR system. - * @author reden - phr00t - https://github.com/phr00t - * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr - */ -public class OSVR implements VRAPI { - private static final Logger logger = Logger.getLogger(OSVR.class.getName()); - - /** - * The first viewer index. - */ - public static final int FIRST_VIEWER = 0; - - /** - * The left eye index. - */ - public static final int EYE_LEFT = 0; - - /** - * The right eye index. - */ - public static final int EYE_RIGHT = 1; - - /** - * The size of the left eye. - */ - public static final NativeSize EYE_LEFT_SIZE = new NativeSize(EYE_LEFT); - - /** - * The size of the right eye. - */ - public static final NativeSize EYE_RIGHT_SIZE = new NativeSize(EYE_RIGHT); - - /** - * The default J String. - */ - public static byte[] defaultJString = { 'j', (byte)0 }; - - /** - * The default OpenGL String. - */ - public static byte[] OpenGLString = { 'O', 'p', 'e', 'n', 'G', 'L', (byte)0 }; - - private final Matrix4f[] eyeMatrix = new Matrix4f[2]; - - private PointerByReference grabRM; - private PointerByReference grabRMOGL; - private PointerByReference grabRIC; - - OSVR_RenderParams.ByValue renderParams; - OsvrClientKitLibrary.OSVR_ClientContext context; - com.jme3.system.osvr.osvrrendermanageropengl.OSVR_GraphicsLibraryOpenGL.ByValue graphicsLibrary; - Pointer renderManager, renderManagerOpenGL, renderInfoCollection, registerBufferState; - OSVRInput VRinput; - NativeSize numRenderInfo; - NativeSizeByReference grabNumInfo = new NativeSizeByReference(); - OSVR_RenderInfoOpenGL.ByValue eyeLeftInfo, eyeRightInfo; - Matrix4f hmdPoseLeftEye; - Matrix4f hmdPoseRightEye; - Vector3f hmdPoseLeftEyeVec, hmdPoseRightEyeVec, hmdSeatToStand; - OSVR_DisplayConfig displayConfig; - OSVR_Pose3 hmdPose = new OSVR_Pose3(); - Vector3f storePos = new Vector3f(); - Quaternion storeRot = new Quaternion(); - PointerByReference presentState = new PointerByReference(); - OSVR_OpenResultsOpenGL openResults = new OSVR_OpenResultsOpenGL(); - - long glfwContext; - long renderManagerContext; - long wglGLFW; - long wglRM; - - boolean initSuccess = false; - boolean flipEyes = false; - - private VREnvironment environment = null; - - /** - * Create a new OSVR system attached to the given {@link VREnvironment VR environment}. - * @param environment the {@link VREnvironment VR environment} to which the input is attached. - */ - public OSVR(VREnvironment environment){ - this.environment = environment; - } - - /** - * Access to the underlying OSVR structures. - * @param leftView the left viewport. - * @param rightView the right viewport. - * @param leftBuffer the left buffer. - * @param rightBuffer the right buffer. - * @return true if the structure are accessible and false otherwise. - */ - public boolean handleRenderBufferPresent(OSVR_ViewportDescription.ByValue leftView, OSVR_ViewportDescription.ByValue rightView, - OSVR_RenderBufferOpenGL.ByValue leftBuffer, OSVR_RenderBufferOpenGL.ByValue rightBuffer) { - if( eyeLeftInfo == null || eyeRightInfo == null ) return false; - byte retval; - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerStartPresentRenderBuffers(presentState); - getEyeInfo(); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerPresentRenderBufferOpenGL(presentState.getValue(), leftBuffer, eyeLeftInfo, leftView); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerPresentRenderBufferOpenGL(presentState.getValue(), rightBuffer, eyeRightInfo, rightView); - retval = OsvrRenderManagerOpenGLLibrary.osvrRenderManagerFinishPresentRenderBuffers(renderManager, presentState.getValue(), renderParams, (byte)0); - return retval == 0; // only check the last error, since if something errored above, the last call won't work & all calls will log to syserr - } - - @Override - public boolean initialize() { - logger.config("Initialize OSVR system."); - - hmdPose.setAutoSynch(false); - context = OsvrClientKitLibrary.osvrClientInit(defaultJString, 0); - VRinput = new OSVRInput(environment); - initSuccess = context != null && VRinput.init(); - if( initSuccess ) { - PointerByReference grabDisplay = new PointerByReference(); - byte retval = OsvrDisplayLibrary.osvrClientGetDisplay(context, grabDisplay); - if( retval != 0 ) { - System.out.println("OSVR Get Display Error: " + retval); - initSuccess = false; - return false; - } - displayConfig = new OSVR_DisplayConfig(grabDisplay.getValue()); - System.out.println("Waiting for the display to fully start up, including receiving initial pose update..."); - int i = 400; - while (OsvrDisplayLibrary.osvrClientCheckDisplayStartup(displayConfig) != 0) { - if( i-- < 0 ) { - System.out.println("Couldn't get display startup update in time, continuing anyway..."); - break; - } - OsvrClientKitLibrary.osvrClientUpdate(context); - try { - Thread.sleep(5); - } catch(Exception e) { } - } - System.out.println("OK, display startup status is good!"); - } - return initSuccess; - } - - - /** - * Grab the current GLFW context. - */ - public void grabGLFWContext() { - // get current context - wglGLFW = org.lwjgl.opengl.WGL.wglGetCurrentContext(); - glfwContext = org.lwjgl.glfw.GLFW.glfwGetCurrentContext(); - } - - /** - * Enable context sharing. - * @return true if the context is successfully shared and false otherwise. - */ - public boolean shareContext() { - if( org.lwjgl.opengl.WGL.wglShareLists(wglRM, wglGLFW)) { - System.out.println("Context sharing success!"); - return true; - } else { - System.out.println("Context sharing problem..."); - return false; - } - } - - @Override - public boolean initVRCompositor(boolean allowed) { - if( !allowed || renderManager != null ) return false; - grabGLFWContext(); - graphicsLibrary = new com.jme3.system.osvr.osvrrendermanageropengl.OSVR_GraphicsLibraryOpenGL.ByValue(); - graphicsLibrary.toolkit = null; - graphicsLibrary.setAutoSynch(false); - grabRM = new PointerByReference(); grabRMOGL = new PointerByReference(); - byte retval = OsvrRenderManagerOpenGLLibrary.osvrCreateRenderManagerOpenGL(context, OpenGLString, graphicsLibrary, grabRM, grabRMOGL); - if( retval == 0 ) { - renderManager = grabRM.getValue(); renderManagerOpenGL = grabRMOGL.getValue(); - if( renderManager == null || renderManagerOpenGL == null ) { - System.out.println("Render Manager Created NULL, error!"); - return false; - } - openResults.setAutoSynch(false); - retval = OsvrRenderManagerOpenGLLibrary.osvrRenderManagerOpenDisplayOpenGL(renderManager, openResults); - if( retval == 0 ) { - wglRM = org.lwjgl.opengl.WGL.wglGetCurrentContext(); - renderManagerContext = org.lwjgl.glfw.GLFW.glfwGetCurrentContext(); - shareContext(); - OsvrClientKitLibrary.osvrClientUpdate(context); - renderParams = new OSVR_RenderParams.ByValue(); - renderParams.setAutoSynch(false); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerGetDefaultRenderParams(renderParams); - grabRIC = new PointerByReference(); - retval = OsvrRenderManagerOpenGLLibrary.osvrRenderManagerGetRenderInfoCollection(renderManager, renderParams, grabRIC); - if( retval == 0 ) { - renderInfoCollection = grabRIC.getValue(); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerGetNumRenderInfoInCollection(renderInfoCollection, grabNumInfo); - numRenderInfo = grabNumInfo.getValue(); - eyeLeftInfo = new OSVR_RenderInfoOpenGL.ByValue(); - eyeRightInfo = new OSVR_RenderInfoOpenGL.ByValue(); - eyeLeftInfo.setAutoSynch(false); - eyeRightInfo.setAutoSynch(false); - return true; - } - OsvrRenderManagerOpenGLLibrary.osvrDestroyRenderManager(renderManager); - System.out.println("OSVR Render Manager Info Collection Error: " + retval); - return false; - } - OsvrRenderManagerOpenGLLibrary.osvrDestroyRenderManager(renderManager); - System.out.println("OSVR Open Render Manager Display Error: " + retval); - return false; - } - System.out.println("OSVR Create Render Manager Error: " + retval); - return false; - } - - @Override - public OsvrClientKitLibrary.OSVR_ClientContext getVRSystem() { - return context; - } - - @Override - public Pointer getCompositor() { - return renderManager; - } - - @Override - public String getName() { - return "OSVR"; - } - - @Override - public VRInputAPI getVRinput() { - return VRinput; - } - - @Override - public void setFlipEyes(boolean set) { - flipEyes = set; - } - - @Override - public void printLatencyInfoToConsole(boolean set) { - } - - @Override - public int getDisplayFrequency() { - return 60; //debug display frequency - } - - @Override - public void destroy() { - if( renderManager != null ) OsvrRenderManagerOpenGLLibrary.osvrDestroyRenderManager(renderManager); - if( displayConfig != null ) OsvrDisplayLibrary.osvrClientFreeDisplay(displayConfig); - } - - @Override - public boolean isInitialized() { - return initSuccess; - } - - @Override - public void reset() { - // TODO: no native OSVR reset function - // may need to take current position and negate it from future values - } - - @Override - public void getRenderSize(Vector2f store) { - if( eyeLeftInfo == null || eyeLeftInfo.viewport.width == 0.0 ) { - store.x = 1280f; store.y = 720f; - } else { - store.x = (float)eyeLeftInfo.viewport.width; - store.y = (float)eyeLeftInfo.viewport.height; - } - } - - /** - * Read and update the eye info from the underlying OSVR system. - */ - public void getEyeInfo() { - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerGetRenderInfoFromCollectionOpenGL(renderInfoCollection, EYE_LEFT_SIZE, eyeLeftInfo); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerGetRenderInfoFromCollectionOpenGL(renderInfoCollection, EYE_RIGHT_SIZE, eyeRightInfo); - eyeLeftInfo.read(); eyeRightInfo.read(); - } -/* - @Override - public float getFOV(int dir) { - return 105f; //default FOV - } -*/ - @Override - public float getInterpupillaryDistance() { - return 0.065f; //default IPD - } - - @Override - public Quaternion getOrientation() { - storeRot.set((float)-hmdPose.rotation.data[1], - (float)hmdPose.rotation.data[2], - (float)-hmdPose.rotation.data[3], - (float)hmdPose.rotation.data[0]); - if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z); - return storeRot; - } - - @Override - public Vector3f getPosition() { - storePos.x = (float)-hmdPose.translation.data[0]; - storePos.y = (float)hmdPose.translation.data[1]; - storePos.z = (float)-hmdPose.translation.data[2]; - return storePos; - } - - @Override - public void getPositionAndOrientation(Vector3f storePos, Quaternion storeRot) { - storePos.x = (float)-hmdPose.translation.data[0]; - storePos.y = (float)hmdPose.translation.data[1]; - storePos.z = (float)-hmdPose.translation.data[2]; - storeRot.set((float)-hmdPose.rotation.data[1], - (float)hmdPose.rotation.data[2], - (float)-hmdPose.rotation.data[3], - (float)hmdPose.rotation.data[0]); - if( storeRot.equals(Quaternion.ZERO) ) storeRot.set(Quaternion.DIRECTION_Z); - } - - @Override - public void updatePose() { - if( context == null || displayConfig == null ) return; - OsvrClientKitLibrary.osvrClientUpdate(context); - OsvrDisplayLibrary.osvrClientGetViewerPose(displayConfig, FIRST_VIEWER, hmdPose.getPointer()); - VRinput.updateControllerStates(); - hmdPose.read(); - } - - @Override - public Matrix4f getHMDMatrixProjectionLeftEye(Camera cam) { - if( eyeLeftInfo == null ) return cam.getProjectionMatrix(); - if( eyeMatrix[EYE_LEFT] == null ) { - FloatBuffer tfb = FloatBuffer.allocate(16); - com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.osvrClientGetViewerEyeSurfaceProjectionMatrixf(displayConfig, 0, (byte)EYE_LEFT, 0, cam.getFrustumNear(), cam.getFrustumFar(), (short)0, tfb); - eyeMatrix[EYE_LEFT] = new Matrix4f(); - eyeMatrix[EYE_LEFT].set(tfb.get(0), tfb.get(4), tfb.get(8), tfb.get(12), - tfb.get(1), tfb.get(5), tfb.get(9), tfb.get(13), - tfb.get(2), tfb.get(6), tfb.get(10), tfb.get(14), - tfb.get(3), tfb.get(7), tfb.get(11), tfb.get(15)); - } - return eyeMatrix[EYE_LEFT]; - } - - @Override - public Matrix4f getHMDMatrixProjectionRightEye(Camera cam) { - if( eyeRightInfo == null ) return cam.getProjectionMatrix(); - if( eyeMatrix[EYE_RIGHT] == null ) { - FloatBuffer tfb = FloatBuffer.allocate(16); - com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.osvrClientGetViewerEyeSurfaceProjectionMatrixf(displayConfig, 0, (byte)EYE_RIGHT, 0, cam.getFrustumNear(), cam.getFrustumFar(), (short)0, tfb); - eyeMatrix[EYE_RIGHT] = new Matrix4f(); - eyeMatrix[EYE_RIGHT].set(tfb.get(0), tfb.get(4), tfb.get(8), tfb.get(12), - tfb.get(1), tfb.get(5), tfb.get(9), tfb.get(13), - tfb.get(2), tfb.get(6), tfb.get(10), tfb.get(14), - tfb.get(3), tfb.get(7), tfb.get(11), tfb.get(15)); - } - return eyeMatrix[EYE_RIGHT]; - } - - @Override - public Vector3f getHMDVectorPoseLeftEye() { - if( hmdPoseLeftEyeVec == null ) { - hmdPoseLeftEyeVec = new Vector3f(); - hmdPoseLeftEyeVec.x = 0.065f * -0.5f; - if( flipEyes == false ) hmdPoseLeftEyeVec.x *= -1f; // it seems these need flipping - } - return hmdPoseLeftEyeVec; - } - - @Override - public Vector3f getHMDVectorPoseRightEye() { - if( hmdPoseRightEyeVec == null ) { - hmdPoseRightEyeVec = new Vector3f(); - hmdPoseRightEyeVec.x = 0.065f * 0.5f; - if( flipEyes == false ) hmdPoseRightEyeVec.x *= -1f; // it seems these need flipping - } - return hmdPoseRightEyeVec; - } - - @Override - public Vector3f getSeatedToAbsolutePosition() { - return Vector3f.ZERO; - } - - @Override - public Matrix4f getHMDMatrixPoseLeftEye() { - // not actually used internally... - /*if( hmdPoseLeftEye != null ) { - return hmdPoseLeftEye; - } else { - FloatBuffer mat = FloatBuffer.allocate(16); - OsvrDisplayLibrary.osvrClientGetViewerEyeViewMatrixf(displayConfig, FIRST_VIEWER, (byte)EYE_LEFT, - (short)(OsvrMatrixConventionsLibrary.OSVR_MatrixVectorFlags.OSVR_MATRIX_COLVECTORS | - OsvrMatrixConventionsLibrary.OSVR_MatrixOrderingFlags.OSVR_MATRIX_COLMAJOR), tempfb); - hmdPoseLeftEye = new Matrix4f(tempfb.array()); - return hmdPoseLeftEye; - }*/ - return null; - } - - @Override - public Matrix4f getHMDMatrixPoseRightEye() { - // not actually used internally... - /*if( hmdPoseRightEye != null ) { - return hmdPoseRightEye; - } else { - OsvrDisplayLibrary.osvrClientGetViewerEyeViewMatrixf(displayConfig, FIRST_VIEWER, (byte)EYE_RIGHT, - (short)(OsvrMatrixConventionsLibrary.OSVR_MatrixVectorFlags.OSVR_MATRIX_COLVECTORS | - OsvrMatrixConventionsLibrary.OSVR_MatrixOrderingFlags.OSVR_MATRIX_COLMAJOR), tempfb); - hmdPoseRightEye = new Matrix4f(tempfb.array()); - return hmdPoseRightEye; - }*/ - return null; - } - - @Override - public HmdType getType() { - return HmdType.OSVR; - } -} diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRInput.java b/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRInput.java deleted file mode 100644 index 44bdf97e10..0000000000 --- a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRInput.java +++ /dev/null @@ -1,347 +0,0 @@ -package com.jme3.input.vr.osvr; - -import java.util.logging.Logger; - -import com.jme3.app.VREnvironment; -import com.jme3.input.vr.VRInputAPI; -import com.jme3.input.vr.VRInputType; -import com.jme3.input.vr.VRTrackedController; -import com.jme3.math.Quaternion; -import com.jme3.math.Vector2f; -import com.jme3.math.Vector3f; -import com.jme3.renderer.Camera; -import com.jme3.scene.Spatial; -import com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary; -import com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientInterface; -import com.jme3.system.osvr.osvrclientreporttypes.OSVR_AnalogReport; -import com.jme3.system.osvr.osvrclientreporttypes.OSVR_ButtonReport; -import com.jme3.system.osvr.osvrclientreporttypes.OSVR_Pose3; -import com.jme3.system.osvr.osvrinterface.OsvrInterfaceLibrary; -import com.jme3.system.osvr.osvrtimevalue.OSVR_TimeValue; -import com.sun.jna.Callback; -import com.sun.jna.Pointer; -import com.sun.jna.ptr.PointerByReference; - - -/** - * A class that wraps an OSVR input. - * @author reden - phr00t - https://github.com/phr00t - * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr - */ -public class OSVRInput implements VRInputAPI { - private static final Logger logger = Logger.getLogger(OSVRInput.class.getName()); - - // position example: https://github.com/OSVR/OSVR-Core/blob/master/examples/clients/TrackerState.c - // button example: https://github.com/OSVR/OSVR-Core/blob/master/examples/clients/ButtonCallback.c - // analog example: https://github.com/OSVR/OSVR-Core/blob/master/examples/clients/AnalogCallback.c - - private static final int ANALOG_COUNT = 3, BUTTON_COUNT = 7, CHANNEL_COUNT = 3; - - OSVR_ClientInterface[][] buttons; - OSVR_ClientInterface[][][] analogs; - OSVR_ClientInterface[] hands; - - OSVR_Pose3[] handState; - Callback buttonHandler, analogHandler; - OSVR_TimeValue tv = new OSVR_TimeValue(); - boolean[] isHandTracked = new boolean[2]; - - private float[][][] analogState; - private float[][] buttonState; - - private final Quaternion tempq = new Quaternion(); - private final Vector3f tempv = new Vector3f(); - private final Vector2f temp2 = new Vector2f(); - private final boolean[][] buttonDown = new boolean[16][16]; - - private static final Vector2f temp2Axis = new Vector2f(); - private static final Vector2f lastCallAxis[] = new Vector2f[16]; - private static float axisMultiplier = 1f; - - private VREnvironment environment = null; - - /** - * Get the system String that identifies a controller. - * @param left is the controller is the left one (false if the right controller is needed). - * @param index the index of the controller. - * @return the system String that identifies the controller. - */ - public static byte[] getButtonString(boolean left, byte index) { - if( left ) { - return new byte[] { '/', 'c', 'o', 'n', 't', 'r', 'o', 'l', 'l', 'e', 'r', '/', 'l', 'e', 'f', 't', '/', index, (byte)0 }; - } - return new byte[] { '/', 'c', 'o', 'n', 't', 'r', 'o', 'l', 'l', 'e', 'r', '/', 'r', 'i', 'g', 'h', 't', '/', index, (byte)0 }; - } - - /** - * The left-hand system String. - */ - public static byte[] leftHand = { '/', 'm', 'e', '/', 'h', 'a', 'n', 'd', 's', '/', 'l', 'e', 'f', 't', (byte)0 }; - - /** - * The right-hand system String. - */ - public static byte[] rightHand = { '/', 'm', 'e', '/', 'h', 'a', 'n', 'd', 's', '/', 'r', 'i', 'g', 'h', 't', (byte)0 }; - - - /** - * Create a new OSVR input attached to the given {@link VREnvironment VR environment}. - * @param environment the {@link VREnvironment VR environment} to which the input is attached. - */ - public OSVRInput(VREnvironment environment){ - this.environment = environment; - } - - @Override - public boolean isButtonDown(int controllerIndex, VRInputType checkButton) { - return buttonState[controllerIndex][checkButton.getValue()] != 0f; - } - - @Override - public boolean wasButtonPressedSinceLastCall(int controllerIndex, VRInputType checkButton) { - boolean buttonDownNow = isButtonDown(controllerIndex, checkButton); - int checkButtonValue = checkButton.getValue(); - boolean retval = buttonDownNow == true && buttonDown[controllerIndex][checkButtonValue] == false; - buttonDown[controllerIndex][checkButtonValue] = buttonDownNow; - return retval; - } - - @Override - public void resetInputSinceLastCall() { - for(int i=0;ihttp://www.seinturier.fr - */ -public class OSVRMouseManager extends AbstractVRMouseManager { - private final int AVERAGE_AMNT = 4; - - private int avgCounter; - - private final float[] lastXmv = new float[AVERAGE_AMNT]; - - private final float[] lastYmv = new float[AVERAGE_AMNT]; - - /** - * Create a new VR mouse manager within the given {@link VREnvironment VR environment}. - * @param environment the VR environment of the mouse manager. - */ - public OSVRMouseManager(VREnvironment environment){ - super(environment); - } - - @Override - public void updateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf) { - - if (getVREnvironment() != null){ - if (getVREnvironment().getApplication() != null){ - // got a tracked controller to use as the "mouse" - if( getVREnvironment().isInVR() == false || - getVREnvironment().getVRinput() == null || - getVREnvironment().getVRinput().isInputDeviceTracking(inputIndex) == false ){ - return; - } - - Vector2f tpDelta; - // TODO option to use Touch joysticks - if( isThumbstickMode() ) { - tpDelta = getVREnvironment().getVRinput().getAxis(inputIndex, VRInputType.ViveTrackpadAxis); - } else { - tpDelta = getVREnvironment().getVRinput().getAxisDeltaSinceLastCall(inputIndex, VRInputType.ViveTrackpadAxis); - } - - float Xamount = (float)Math.pow(Math.abs(tpDelta.x) * getSpeedSensitivity(), getSpeedAcceleration()); - float Yamount = (float)Math.pow(Math.abs(tpDelta.y) * getSpeedSensitivity(), getSpeedAcceleration()); - - if( tpDelta.x < 0f ){ - Xamount = -Xamount; - } - - if( tpDelta.y < 0f ){ - Yamount = -Yamount; - } - - Xamount *= getMouseMoveScale(); - Yamount *= getMouseMoveScale(); - - if( mouseListener != null ) { - if( tpDelta.x != 0f && mouseXName != null ) mouseListener.onAnalog(mouseXName, Xamount * 0.2f, tpf); - if( tpDelta.y != 0f && mouseYName != null ) mouseListener.onAnalog(mouseYName, Yamount * 0.2f, tpf); - } - - if( getVREnvironment().getApplication().getInputManager().isCursorVisible() ) { - int index = (avgCounter+1) % AVERAGE_AMNT; - lastXmv[index] = Xamount * 133f; - lastYmv[index] = Yamount * 133f; - cursorPos.x -= avg(lastXmv); - cursorPos.y -= avg(lastYmv); - Vector2f maxsize = getVREnvironment().getVRGUIManager().getCanvasSize(); - - if( cursorPos.x > maxsize.x ){ - cursorPos.x = maxsize.x; - } - - if( cursorPos.x < 0f ){ - cursorPos.x = 0f; - } - - if( cursorPos.y > maxsize.y ){ - cursorPos.y = maxsize.y; - } - - if( cursorPos.y < 0f ){ - cursorPos.y = 0f; - } - } - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - private float avg(float[] arr) { - float amt = 0f; - for(float f : arr) amt += f; - return amt / arr.length; - } -} diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRViewManager.java b/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRViewManager.java deleted file mode 100644 index a3310c67e2..0000000000 --- a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRViewManager.java +++ /dev/null @@ -1,867 +0,0 @@ -package com.jme3.input.vr.osvr; - -import java.awt.GraphicsEnvironment; -import java.util.Iterator; -import java.util.logging.Logger; - -import com.jme3.app.VREnvironment; -import com.jme3.input.vr.AbstractVRViewManager; -import com.jme3.input.vr.VRAPI; -import com.jme3.input.vr.openvr.OpenVRViewManager; -import com.jme3.material.Material; -import com.jme3.math.ColorRGBA; -import com.jme3.math.Quaternion; -import com.jme3.math.Vector2f; -import com.jme3.math.Vector3f; -import com.jme3.post.CartoonSSAO; -import com.jme3.post.Filter; -import com.jme3.post.FilterPostProcessor; -import com.jme3.post.FilterUtil; -import com.jme3.post.SceneProcessor; -import com.jme3.post.filters.FogFilter; -import com.jme3.post.filters.TranslucentBucketFilter; -import com.jme3.post.ssao.SSAOFilter; -import com.jme3.renderer.Camera; -import com.jme3.renderer.ViewPort; -import com.jme3.renderer.queue.RenderQueue.Bucket; -import com.jme3.scene.Geometry; -import com.jme3.scene.Mesh; -import com.jme3.scene.Node; -import com.jme3.scene.Spatial; -import com.jme3.scene.VertexBuffer; -import com.jme3.shadow.DirectionalLightShadowFilter; -import com.jme3.shadow.VRDirectionalLightShadowRenderer; -import com.jme3.system.jopenvr.DistortionCoordinates_t; -import com.jme3.system.jopenvr.JOpenVRLibrary; -import com.jme3.system.jopenvr.OpenVRUtil; -import com.jme3.system.jopenvr.Texture_t; -import com.jme3.system.jopenvr.VR_IVRSystem_FnTable; -import com.jme3.system.lwjgl.LwjglWindow; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RenderBufferOpenGL; -import com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ViewportDescription; -import com.jme3.system.osvr.osvrrendermanageropengl.OsvrRenderManagerOpenGLLibrary; -import com.jme3.texture.FrameBuffer; -import com.jme3.texture.Image; -import com.jme3.texture.Texture; -import com.jme3.texture.Texture2D; -import com.jme3.ui.Picture; -import com.jme3.util.VRGUIPositioningMode; -import com.sun.jna.Pointer; -import com.sun.jna.ptr.PointerByReference; - -/** - * - * @author Julien Seinturier - COMEX SA - http://www.seinturier.fr - * - */ -public class OSVRViewManager extends AbstractVRViewManager{ - private static final Logger logger = Logger.getLogger(OpenVRViewManager.class.getName()); - - // OpenVR values - private Texture_t leftTextureType; - private Texture_t rightTextureType; - - // OSVR values - OSVR_RenderBufferOpenGL.ByValue[] osvr_renderBuffer; - OSVR_ViewportDescription.ByValue osvr_viewDescFull; - OSVR_ViewportDescription.ByValue osvr_viewDescLeft; - OSVR_ViewportDescription.ByValue osvr_viewDescRight; - Pointer osvr_rmBufferState; - - private Texture2D dualEyeTex; - - private final PointerByReference grabRBS = new PointerByReference(); - - //final & temp values for camera calculations - private final Vector3f finalPosition = new Vector3f(); - private final Quaternion finalRotation = new Quaternion(); - private final Vector3f hmdPos = new Vector3f(); - private final Quaternion hmdRot = new Quaternion(); - - /** - * Create a new VR view manager attached to the given {@link VREnvironment VR environment}. - * @param environment the {@link VREnvironment VR environment} to which this view manager is attached. - */ - public OSVRViewManager(VREnvironment environment){ - this.environment = environment; - } - - /** - * Get the identifier of the left eye texture. - * @return the identifier of the left eye texture. - * @see #getRightTexId() - * @see #getFullTexId() - */ - protected int getLeftTexId() { - return leftEyeTexture.getImage().getId(); - } - - /** - * Get the identifier of the right eye texture. - * @return the identifier of the right eye texture. - * @see #getLeftTexId() - * @see #getFullTexId() - */ - protected int getRightTexId() { - return rightEyeTexture.getImage().getId(); - } - - /** - * Get the identifier of the full (dual eye) texture. - * @return the identifier of the full (dual eye) texture. - * @see #getLeftTexId() - * @see #getRightTexId() - */ - private int getFullTexId() { - return dualEyeTex.getImage().getId(); - } - - /** - * Initialize the system binds of the textures. - */ - private void initTextureSubmitStructs() { - leftTextureType = new Texture_t(); - rightTextureType = new Texture_t(); - - // must be OSVR - osvr_renderBuffer = new OSVR_RenderBufferOpenGL.ByValue[2]; - osvr_renderBuffer[OSVR.EYE_LEFT] = new OSVR_RenderBufferOpenGL.ByValue(); - osvr_renderBuffer[OSVR.EYE_RIGHT] = new OSVR_RenderBufferOpenGL.ByValue(); - osvr_renderBuffer[OSVR.EYE_LEFT].setAutoSynch(false); - osvr_renderBuffer[OSVR.EYE_RIGHT].setAutoSynch(false); - osvr_viewDescFull = new OSVR_ViewportDescription.ByValue(); - osvr_viewDescFull.setAutoSynch(false); - osvr_viewDescFull.left = osvr_viewDescFull.lower = 0.0; - osvr_viewDescFull.width = osvr_viewDescFull.height = 1.0; - osvr_viewDescLeft = new OSVR_ViewportDescription.ByValue(); - osvr_viewDescLeft.setAutoSynch(false); - osvr_viewDescLeft.left = osvr_viewDescLeft.lower = 0.0; - osvr_viewDescLeft.width = 0.5; - osvr_viewDescLeft.height = 1.0; - osvr_viewDescRight = new OSVR_ViewportDescription.ByValue(); - osvr_viewDescRight.setAutoSynch(false); - osvr_viewDescRight.left = 0.5; - osvr_viewDescRight.lower = 0.0; - osvr_viewDescRight.width = 0.5; - osvr_viewDescRight.height = 1.0; - osvr_viewDescRight.write(); - osvr_viewDescLeft.write(); - osvr_viewDescFull.write(); - osvr_renderBuffer[OSVR.EYE_LEFT].depthStencilBufferName = -1; - osvr_renderBuffer[OSVR.EYE_LEFT].colorBufferName = -1; - osvr_renderBuffer[OSVR.EYE_RIGHT].depthStencilBufferName = -1; - osvr_renderBuffer[OSVR.EYE_RIGHT].colorBufferName = -1; - } - - /** - * Register the OSVR OpenGL buffer. - * @param buf the OSVR OpenGL buffer. - */ - private void registerOSVRBuffer(OSVR_RenderBufferOpenGL.ByValue buf) { - if (environment != null){ - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerStartRegisterRenderBuffers(grabRBS); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerRegisterRenderBufferOpenGL(grabRBS.getValue(), buf); - OsvrRenderManagerOpenGLLibrary.osvrRenderManagerFinishRegisterRenderBuffers(((OSVR)environment.getVRHardware()).getCompositor(), grabRBS.getValue(), (byte)0); - - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Send the textures to the two eyes. - */ - @Override - public void postRender() { - if (environment != null){ - if( environment.isInVR() ) { - VRAPI api = environment.getVRHardware(); - if( api.getCompositor() != null ) { - // using the compositor... - int errl = 0, errr = 0; - if( environment.isInstanceRendering() ) { - if( leftTextureType.handle == -1 || leftTextureType.handle != getFullTexId() ) { - leftTextureType.handle = getFullTexId(); - if( leftTextureType.handle != -1 ) { - leftTextureType.write(); - if( api instanceof OSVR ) { - osvr_renderBuffer[OSVR.EYE_LEFT].colorBufferName = leftTextureType.handle; - osvr_renderBuffer[OSVR.EYE_LEFT].depthStencilBufferName = dualEyeTex.getImage().getId(); - osvr_renderBuffer[OSVR.EYE_LEFT].write(); - registerOSVRBuffer(osvr_renderBuffer[OSVR.EYE_LEFT]); - } - } - } else { - if( api instanceof OSVR ) { - ((OSVR)api).handleRenderBufferPresent(osvr_viewDescLeft, osvr_viewDescRight, - osvr_renderBuffer[OSVR.EYE_LEFT], osvr_renderBuffer[OSVR.EYE_LEFT]); - } - } - } else if( leftTextureType.handle == -1 || rightTextureType.handle == -1 || - leftTextureType.handle != getLeftTexId() || rightTextureType.handle != getRightTexId() ) { - leftTextureType.handle = getLeftTexId(); - if( leftTextureType.handle != -1 ) { - logger.fine("Writing Left texture to native memory at " + leftTextureType.getPointer()); - leftTextureType.write(); - if( api instanceof OSVR ) { - osvr_renderBuffer[OSVR.EYE_LEFT].colorBufferName = leftTextureType.handle; - if( leftEyeDepth != null ) osvr_renderBuffer[OSVR.EYE_LEFT].depthStencilBufferName = leftEyeDepth.getImage().getId(); - osvr_renderBuffer[OSVR.EYE_LEFT].write(); - registerOSVRBuffer(osvr_renderBuffer[OSVR.EYE_LEFT]); - } - } - rightTextureType.handle = getRightTexId(); - if( rightTextureType.handle != -1 ) { - logger.fine("Writing Right texture to native memory at " + leftTextureType.getPointer()); - rightTextureType.write(); - if( api instanceof OSVR ) { - osvr_renderBuffer[OSVR.EYE_RIGHT].colorBufferName = rightTextureType.handle; - if( rightEyeDepth != null ) osvr_renderBuffer[OSVR.EYE_RIGHT].depthStencilBufferName = rightEyeDepth.getImage().getId(); - osvr_renderBuffer[OSVR.EYE_RIGHT].write(); - registerOSVRBuffer(osvr_renderBuffer[OSVR.EYE_RIGHT]); - } - } - } else { - if( api instanceof OSVR ) { - ((OSVR)api).handleRenderBufferPresent(osvr_viewDescFull, osvr_viewDescFull, - osvr_renderBuffer[OSVR.EYE_LEFT], osvr_renderBuffer[OSVR.EYE_RIGHT]); - } - } - - if( errl != 0 ){ - logger.severe("Submit to left compositor error: " + OpenVRUtil.getEVRCompositorErrorString(errl)+" ("+Integer.toString(errl)+")"); - logger.severe(" Texture color space: "+OpenVRUtil.getEColorSpaceString(leftTextureType.eColorSpace)); - logger.severe(" Texture type: "+OpenVRUtil.getETextureTypeString(leftTextureType.eType)); - logger.severe(" Texture handle: "+leftTextureType.handle); - - logger.severe(" Left eye texture "+leftEyeTexture.getName()+" ("+leftEyeTexture.getImage().getId()+")"); - logger.severe(" Type: "+leftEyeTexture.getType()); - logger.severe(" Size: "+leftEyeTexture.getImage().getWidth()+"x"+leftEyeTexture.getImage().getHeight()); - logger.severe(" Image depth: "+leftEyeTexture.getImage().getDepth()); - logger.severe(" Image format: "+leftEyeTexture.getImage().getFormat()); - logger.severe(" Image color space: "+leftEyeTexture.getImage().getColorSpace()); - } - - if( errr != 0 ){ - logger.severe("Submit to right compositor error: " + OpenVRUtil.getEVRCompositorErrorString(errl)+" ("+Integer.toString(errl)+")"); - logger.severe(" Texture color space: "+OpenVRUtil.getEColorSpaceString(rightTextureType.eColorSpace)); - logger.severe(" Texture type: "+OpenVRUtil.getETextureTypeString(rightTextureType.eType)); - logger.severe(" Texture handle: "+rightTextureType.handle); - - logger.severe(" Right eye texture "+rightEyeTexture.getName()+" ("+rightEyeTexture.getImage().getId()+")"); - logger.severe(" Type: "+rightEyeTexture.getType()); - logger.severe(" Size: "+rightEyeTexture.getImage().getWidth()+"x"+rightEyeTexture.getImage().getHeight()); - logger.severe(" Image depth: "+rightEyeTexture.getImage().getDepth()); - logger.severe(" Image format: "+rightEyeTexture.getImage().getFormat()); - logger.severe(" Image color space: "+rightEyeTexture.getImage().getColorSpace()); - } - } - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Initialize the VR view manager. - */ - @Override - public void initialize() { - logger.config("Initializing VR view manager."); - - if (environment != null){ - initTextureSubmitStructs(); - setupCamerasAndViews(); - setupVRScene(); - moveScreenProcessingToEyes(); - if( environment.hasTraditionalGUIOverlay() ) { - - environment.getVRMouseManager().initialize(); - - // update the pose to position the gui correctly on start - update(0f); - environment.getVRGUIManager().positionGui(); - } - - if (environment.getApplication() != null){ - // if we are OSVR, our primary mirror window needs to be the same size as the render manager's output... - if( environment.getVRHardware() instanceof OSVR ) { - int origWidth = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode().getWidth(); - int origHeight = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode().getHeight(); - long window = ((LwjglWindow)environment.getApplication().getContext()).getWindowHandle(); - Vector2f windowSize = new Vector2f(); - environment.getVRHardware().getRenderSize(windowSize); - windowSize.x = Math.max(windowSize.x * 2f, leftCamera.getWidth()); - org.lwjgl.glfw.GLFW.glfwSetWindowSize(window, (int)windowSize.x, (int)windowSize.y); - environment.getApplication().getContext().getSettings().setResolution((int)windowSize.x, (int)windowSize.y); - - if (environment.getApplication().getRenderManager() != null) { - environment.getApplication().getRenderManager().notifyReshape((int)windowSize.x, (int)windowSize.y); - } - - org.lwjgl.glfw.GLFW.glfwSetWindowPos(window, origWidth - (int)windowSize.x, 32); - - org.lwjgl.glfw.GLFW.glfwFocusWindow(window); - - org.lwjgl.glfw.GLFW.glfwSetCursorPos(window, origWidth / 2.0, origHeight / 2.0); - - logger.config("Initialized VR view manager [SUCCESS]"); - } else { - throw new IllegalStateException("Underlying VR hardware should be "+OSVR.class.getSimpleName()); - } - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Prepare the size of the given {@link Camera camera} to adapt it to the underlying rendering context. - * @param cam the {@link Camera camera} to prepare. - * @param xMult the camera width multiplier. - */ - private void prepareCameraSize(Camera cam, float xMult) { - if (environment != null){ - if (environment.getApplication() != null){ - - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - - Vector2f size = new Vector2f(); - VRAPI vrhmd = environment.getVRHardware(); - - if( vrhmd == null ) { - size.x = 1280f; - size.y = 720f; - } else { - vrhmd.getRenderSize(size); - } - - if( size.x < environment.getApplication().getContext().getSettings().getWidth() ) { - size.x = environment.getApplication().getContext().getSettings().getWidth(); - } - if( size.y < environment.getApplication().getContext().getSettings().getHeight() ) { - size.y = environment.getApplication().getContext().getSettings().getHeight(); - } - - if( environment.isInstanceRendering() ){ - size.x *= 2f; - } - - // other adjustments - size.x *= xMult; - size.x *= getResolutionMuliplier(); - size.y *= getResolutionMuliplier(); - - if( cam.getWidth() != size.x || cam.getHeight() != size.y ){ - cam.resize((int)size.x, (int)size.y, false); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Replaces rootNode with the distortion mesh as the main camera's scene. - */ - private void setupVRScene(){ - if (environment != null){ - if (environment.getApplication() != null){ - // no special scene to set up if we are doing instancing - if( environment.isInstanceRendering() ) { - // distortion has to be done with compositor here... we want only one pass on our end! - if( environment.getApplication().getContext().getSettings().isSwapBuffers() ) { - setupMirrorBuffers(environment.getCamera(), dualEyeTex, true); - } - return; - } - - leftEyeTexture = (Texture2D) getLeftViewPort().getOutputFrameBuffer().getColorBuffer().getTexture(); - rightEyeTexture = (Texture2D)getRightViewPort().getOutputFrameBuffer().getColorBuffer().getTexture(); - leftEyeDepth = (Texture2D) getLeftViewPort().getOutputFrameBuffer().getDepthBuffer().getTexture(); - rightEyeDepth = (Texture2D)getRightViewPort().getOutputFrameBuffer().getDepthBuffer().getTexture(); - - // main viewport is either going to be a distortion scene or nothing - // mirroring is handled by copying framebuffers - Iterator spatialIter = environment.getApplication().getViewPort().getScenes().iterator(); - while(spatialIter.hasNext()){ - environment.getApplication().getViewPort().detachScene(spatialIter.next()); - } - - spatialIter = environment.getApplication().getGuiViewPort().getScenes().iterator(); - while(spatialIter.hasNext()){ - environment.getApplication().getGuiViewPort().detachScene(spatialIter.next()); - } - - // only setup distortion scene if compositor isn't running (or using custom mesh distortion option) - if( environment.getVRHardware().getCompositor() == null ) { - Node distortionScene = new Node(); - Material leftMat = new Material(environment.getApplication().getAssetManager(), "Common/MatDefs/VR/OpenVR.j3md"); - leftMat.setTexture("Texture", leftEyeTexture); - Geometry leftEye = new Geometry("box", setupDistortionMesh(JOpenVRLibrary.EVREye.EVREye_Eye_Left, environment.getVRHardware())); - leftEye.setMaterial(leftMat); - distortionScene.attachChild(leftEye); - - Material rightMat = new Material(environment.getApplication().getAssetManager(), "Common/MatDefs/VR/OpenVR.j3md"); - rightMat.setTexture("Texture", rightEyeTexture); - Geometry rightEye = new Geometry("box", setupDistortionMesh(JOpenVRLibrary.EVREye.EVREye_Eye_Right, environment.getVRHardware())); - rightEye.setMaterial(rightMat); - distortionScene.attachChild(rightEye); - - distortionScene.updateGeometricState(); - - environment.getApplication().getViewPort().attachScene(distortionScene); - - //if( useCustomDistortion ) setupFinalFullTexture(app.getViewPort().getCamera()); - } - - if( environment.getApplication().getContext().getSettings().isSwapBuffers() ) { - setupMirrorBuffers(environment.getCamera(), leftEyeTexture, false); - } - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Update the VR view manager. - * This method is called by the attached VR application and should not be called manually. - * @param tpf the time per frame. - */ - @Override - public void update(float tpf) { - if (environment != null){ - // grab the observer - Object obs = environment.getObserver(); - Quaternion objRot; - Vector3f objPos; - if( obs instanceof Camera ) { - objRot = ((Camera)obs).getRotation(); - objPos = ((Camera)obs).getLocation(); - } else { - objRot = ((Spatial)obs).getWorldRotation(); - objPos = ((Spatial)obs).getWorldTranslation(); - } - // grab the hardware handle - VRAPI dev = environment.getVRHardware(); - if( dev != null ) { - // update the HMD's position & orientation - dev.updatePose(); - dev.getPositionAndOrientation(hmdPos, hmdRot); - if( obs != null ) { - // update hmdPos based on obs rotation - finalRotation.set(objRot); - finalRotation.mult(hmdPos, hmdPos); - finalRotation.multLocal(hmdRot); - } - - finalizeCamera(dev.getHMDVectorPoseLeftEye(), objPos, leftCamera); - finalizeCamera(dev.getHMDVectorPoseRightEye(), objPos, rightCamera); - } else { - leftCamera.setFrame(objPos, objRot); - rightCamera.setFrame(objPos, objRot); - } - - if( environment.hasTraditionalGUIOverlay() ) { - // update the mouse? - environment.getVRMouseManager().update(tpf); - - // update GUI position? - if( environment.getVRGUIManager().isWantsReposition() || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL ) { - environment.getVRGUIManager().positionGuiNow(tpf); - environment.getVRGUIManager().updateGuiQuadGeometricState(); - } - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Place the camera within the scene. - * @param eyePos the eye position. - * @param obsPosition the observer position. - * @param cam the camera to place. - */ - private void finalizeCamera(Vector3f eyePos, Vector3f obsPosition, Camera cam) { - finalRotation.mult(eyePos, finalPosition); - finalPosition.addLocal(hmdPos); - if( obsPosition != null ){ - finalPosition.addLocal(obsPosition); - } - finalPosition.y += getHeightAdjustment(); - cam.setFrame(finalPosition, finalRotation); - } - - /** - * Handles moving filters from the main view to each eye - */ - @Override - public void moveScreenProcessingToEyes() { - if( getRightViewPort() == null ){ - return; - } - - if (environment != null){ - if (environment.getApplication() != null){ - - syncScreenProcessing(environment.getApplication().getViewPort()); - environment.getApplication().getViewPort().clearProcessors(); - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Sets the two views to use the list of {@link SceneProcessor processors}. - * @param sourceViewport the {@link ViewPort viewport} that contains the processors to use. - */ - @Override - public void syncScreenProcessing(ViewPort sourceViewport) { - if( getRightViewPort() == null ){ - return; - } - - if (environment != null){ - if (environment.getApplication() != null){ - // set up post-processing filters - if( rightPostProcessor == null ) { - rightPostProcessor = new FilterPostProcessor(environment.getApplication().getAssetManager()); - leftPostProcessor = new FilterPostProcessor(environment.getApplication().getAssetManager()); - } - // clear out all filters & processors, to start from scratch - rightPostProcessor.removeAllFilters(); - leftPostProcessor.removeAllFilters(); - getLeftViewPort().clearProcessors(); - getRightViewPort().clearProcessors(); - // if we have no processors to sync, don't add the FilterPostProcessor - if( sourceViewport.getProcessors().isEmpty() ) return; - // add post processors we just made, which are empty - getLeftViewPort().addProcessor(leftPostProcessor); - getRightViewPort().addProcessor(rightPostProcessor); - // go through all of the filters in the processors list - // add them to the left viewport processor & clone them to the right - for(SceneProcessor sceneProcessor : sourceViewport.getProcessors()) { - if (sceneProcessor instanceof FilterPostProcessor) { - for(Filter f : ((FilterPostProcessor)sceneProcessor).getFilterList() ) { - if( f instanceof TranslucentBucketFilter ) { - // just remove this filter, we will add it at the end manually - ((FilterPostProcessor)sceneProcessor).removeFilter(f); - } else { - leftPostProcessor.addFilter(f); - // clone to the right - Filter f2; - if(f instanceof FogFilter){ - f2 = FilterUtil.cloneFogFilter((FogFilter)f); - } else if (f instanceof CartoonSSAO ) { - f2 = new CartoonSSAO((CartoonSSAO)f); - } else if (f instanceof SSAOFilter){ - f2 = FilterUtil.cloneSSAOFilter((SSAOFilter)f); - } else if (f instanceof DirectionalLightShadowFilter){ - f2 = FilterUtil.cloneDirectionalLightShadowFilter(environment.getApplication().getAssetManager(), (DirectionalLightShadowFilter)f); - } else { - f2 = f; // DoF, bloom, light scattering etc. - } - rightPostProcessor.addFilter(f2); - } - } - } else if (sceneProcessor instanceof VRDirectionalLightShadowRenderer) { - // shadow processing - // TODO: make right shadow processor use same left shadow maps for performance - VRDirectionalLightShadowRenderer dlsr = (VRDirectionalLightShadowRenderer) sceneProcessor; - VRDirectionalLightShadowRenderer dlsrRight = dlsr.clone(); - dlsrRight.setLight(dlsr.getLight()); - getRightViewPort().getProcessors().add(0, dlsrRight); - getLeftViewPort().getProcessors().add(0, sceneProcessor); - } - } - // make sure each has a translucent filter renderer - leftPostProcessor.addFilter(new TranslucentBucketFilter()); - rightPostProcessor.addFilter(new TranslucentBucketFilter()); - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - private void setupCamerasAndViews() { - if (environment != null){ - if (environment.getApplication() != null){ - // get desired frustum from original camera - Camera origCam = environment.getCamera(); - float fFar = origCam.getFrustumFar(); - float fNear = origCam.getFrustumNear(); - - // if we are using OSVR get the eye info here - if( environment.getVRHardware() instanceof OSVR ) { - ((OSVR)environment.getVRHardware()).getEyeInfo(); - } - - // restore frustum on distortion scene cam, if needed - if( environment.isInstanceRendering() ) { - leftCamera = origCam; - } else if( environment.compositorAllowed() == false ) { - origCam.setFrustumFar(100f); - origCam.setFrustumNear(1f); - leftCamera = origCam.clone(); - prepareCameraSize(origCam, 2f); - } else { - leftCamera = origCam.clone(); - } - - leftCamera.setFrustumPerspective(environment.getDefaultFOV(), environment.getDefaultAspect(), fNear, fFar); - - prepareCameraSize(leftCamera, 1f); - if( environment.getVRHardware() != null ) leftCamera.setProjectionMatrix(environment.getVRHardware().getHMDMatrixProjectionLeftEye(leftCamera)); - //org.lwjgl.opengl.GL11.glEnable(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER_SRGB); - - if( !environment.isInstanceRendering()) { - leftViewPort = setupViewBuffers(leftCamera, LEFT_VIEW_NAME); - rightCamera = leftCamera.clone(); - if( environment.getVRHardware() != null ){ - rightCamera.setProjectionMatrix(environment.getVRHardware().getHMDMatrixProjectionRightEye(rightCamera)); - } - rightViewPort = setupViewBuffers(rightCamera, RIGHT_VIEW_NAME); - } else { - System.err.println("[VRViewManager] THIS CODE NEED CHANGES !!!"); - leftViewPort = environment.getApplication().getViewPort(); - //leftViewport.attachScene(app.getRootNode()); - rightCamera = leftCamera.clone(); - if( environment.getVRHardware() != null ){ - rightCamera.setProjectionMatrix(environment.getVRHardware().getHMDMatrixProjectionRightEye(rightCamera)); - } - - org.lwjgl.opengl.GL11.glEnable(org.lwjgl.opengl.GL30.GL_CLIP_DISTANCE0); - - //FIXME: [jme-vr] Fix with JMonkey next release - //RenderManager._VRInstancing_RightCamProjection = camRight.getViewProjectionMatrix(); - setupFinalFullTexture(environment.getApplication().getViewPort().getCamera()); - } - - // setup gui - environment.getVRGUIManager().setupGui(leftCamera, rightCamera, getLeftViewPort(), getRightViewPort()); - - if( environment.getVRHardware() != null ) { - // call these to cache the results internally - environment.getVRHardware().getHMDMatrixPoseLeftEye(); - environment.getVRHardware().getHMDMatrixPoseRightEye(); - } - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - private ViewPort setupMirrorBuffers(Camera cam, Texture tex, boolean expand) { - if (environment != null){ - if (environment.getApplication() != null){ - Camera cloneCam = cam.clone(); - ViewPort viewPort = environment.getApplication().getRenderManager().createPostView("MirrorView", cloneCam); - cloneCam.setParallelProjection(true); - viewPort.setClearFlags(true, true, true); - viewPort.setBackgroundColor(ColorRGBA.Black); - Picture pic = new Picture("fullscene"); - pic.setLocalTranslation(-0.75f, -0.5f, 0f); - if( expand ) { - pic.setLocalScale(3f, 1f, 1f); - } else { - pic.setLocalScale(1.5f, 1f, 1f); - } - pic.setQueueBucket(Bucket.Opaque); - pic.setTexture(environment.getApplication().getAssetManager(), (Texture2D)tex, false); - viewPort.attachScene(pic); - viewPort.setOutputFrameBuffer(null); - - pic.updateGeometricState(); - - return viewPort; - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - private void setupFinalFullTexture(Camera cam) { - if (environment != null){ - if (environment.getApplication() != null){ - // create offscreen framebuffer - FrameBuffer out = new FrameBuffer(cam.getWidth(), cam.getHeight(), 1); - //offBuffer.setSrgb(true); - - //setup framebuffer's texture - dualEyeTex = new Texture2D(cam.getWidth(), cam.getHeight(), Image.Format.RGBA8); - dualEyeTex.setMinFilter(Texture.MinFilter.BilinearNoMipMaps); - dualEyeTex.setMagFilter(Texture.MagFilter.Bilinear); - - logger.config("Dual eye texture "+dualEyeTex.getName()+" ("+dualEyeTex.getImage().getId()+")"); - logger.config(" Type: "+dualEyeTex.getType()); - logger.config(" Size: "+dualEyeTex.getImage().getWidth()+"x"+dualEyeTex.getImage().getHeight()); - logger.config(" Image depth: "+dualEyeTex.getImage().getDepth()); - logger.config(" Image format: "+dualEyeTex.getImage().getFormat()); - logger.config(" Image color space: "+dualEyeTex.getImage().getColorSpace()); - - //setup framebuffer to use texture - out.setDepthBuffer(Image.Format.Depth); - out.setColorTexture(dualEyeTex); - - ViewPort viewPort = environment.getApplication().getViewPort(); - viewPort.setClearFlags(true, true, true); - viewPort.setBackgroundColor(ColorRGBA.Black); - viewPort.setOutputFrameBuffer(out); - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - private ViewPort setupViewBuffers(Camera cam, String viewName){ - if (environment != null){ - if (environment.getApplication() != null){ - // create offscreen framebuffer - FrameBuffer offBufferLeft = new FrameBuffer(cam.getWidth(), cam.getHeight(), 1); - //offBufferLeft.setSrgb(true); - - //setup framebuffer's texture - Texture2D offTex = new Texture2D(cam.getWidth(), cam.getHeight(), Image.Format.RGBA8); - offTex.setMinFilter(Texture.MinFilter.BilinearNoMipMaps); - offTex.setMagFilter(Texture.MagFilter.Bilinear); - - //setup framebuffer to use texture - offBufferLeft.setDepthBuffer(Image.Format.Depth); - offBufferLeft.setColorTexture(offTex); - - ViewPort viewPort = environment.getApplication().getRenderManager().createPreView(viewName, cam); - viewPort.setClearFlags(true, true, true); - viewPort.setBackgroundColor(ColorRGBA.Black); - - Iterator spatialIter = environment.getApplication().getViewPort().getScenes().iterator(); - while(spatialIter.hasNext()){ - viewPort.attachScene(spatialIter.next()); - } - - //set viewport to render to offscreen framebuffer - viewPort.setOutputFrameBuffer(offBufferLeft); - return viewPort; - } else { - throw new IllegalStateException("This VR environment is not attached to any application."); - } - } else { - throw new IllegalStateException("This VR view manager is not attached to any VR environment."); - } - } - - /** - * Set up a distortion mesh for the stereo view. - * @param eye the eye to apply. - * @param api the underlying VR api - * @return the distorted mesh. - */ - public static Mesh setupDistortionMesh(int eye, VRAPI api) { - Mesh distortionMesh = new Mesh(); - float m_iLensGridSegmentCountH = 43, m_iLensGridSegmentCountV = 43; - - float w = 1f / (m_iLensGridSegmentCountH - 1f); - float h = 1f / (m_iLensGridSegmentCountV - 1f); - - float u, v; - - float verts[] = new float[(int) (m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 3]; - - float texcoordR[] = new float[(int) (m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 2]; - float texcoordG[] = new float[(int) (m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 2]; - float texcoordB[] = new float[(int) (m_iLensGridSegmentCountV * m_iLensGridSegmentCountH) * 2]; - - int vertPos = 0, coordPos = 0; - - float Xoffset = eye == JOpenVRLibrary.EVREye.EVREye_Eye_Left ? -1f : 0; - for (int y = 0; y < m_iLensGridSegmentCountV; y++) { - for (int x = 0; x < m_iLensGridSegmentCountH; x++) { - u = x * w; - v = 1 - y * h; - verts[vertPos] = Xoffset + u; // x - verts[vertPos + 1] = -1 + 2 * y * h; // y - verts[vertPos + 2] = 0f; // z - vertPos += 3; - - DistortionCoordinates_t dc0 = new DistortionCoordinates_t(); - if( api.getVRSystem() == null ) { - // default to no distortion - texcoordR[coordPos] = u; - texcoordR[coordPos + 1] = 1 - v; - texcoordG[coordPos] = u; - texcoordG[coordPos + 1] = 1 - v; - texcoordB[coordPos] = u; - texcoordB[coordPos + 1] = 1 - v; - } else { - ((VR_IVRSystem_FnTable)api.getVRSystem()).ComputeDistortion.apply(eye, u, v, dc0); - - texcoordR[coordPos] = dc0.rfRed[0]; - texcoordR[coordPos + 1] = 1 - dc0.rfRed[1]; - texcoordG[coordPos] = dc0.rfGreen[0]; - texcoordG[coordPos + 1] = 1 - dc0.rfGreen[1]; - texcoordB[coordPos] = dc0.rfBlue[0]; - texcoordB[coordPos + 1] = 1 - dc0.rfBlue[1]; - } - - coordPos += 2; - } - } - - // have UV coordinates & positions, now set up indices - - int[] indices = new int[(int) ((m_iLensGridSegmentCountV - 1) * (m_iLensGridSegmentCountH - 1)) * 6]; - int indexPos = 0; - int a, b, c, d; - - int offset = 0; - for (int y = 0; y < m_iLensGridSegmentCountV - 1; y++) { - for (int x = 0; x < m_iLensGridSegmentCountH - 1; x++) { - a = (int) (m_iLensGridSegmentCountH * y + x + offset); - b = (int) (m_iLensGridSegmentCountH * y + x + 1 + offset); - c = (int) ((y + 1) * m_iLensGridSegmentCountH + x + 1 + offset); - d = (int) ((y + 1) * m_iLensGridSegmentCountH + x + offset); - - indices[indexPos] = a; - indices[indexPos + 1] = b; - indices[indexPos + 2] = c; - - indices[indexPos + 3] = a; - indices[indexPos + 4] = c; - indices[indexPos + 5] = d; - - indexPos += 6; - } - } - - // OK, create the mesh - distortionMesh.setBuffer(VertexBuffer.Type.Position, 3, verts); - distortionMesh.setBuffer(VertexBuffer.Type.Index, 1, indices); - distortionMesh.setBuffer(VertexBuffer.Type.TexCoord, 2, texcoordR); - distortionMesh.setBuffer(VertexBuffer.Type.TexCoord2, 2, texcoordG); - distortionMesh.setBuffer(VertexBuffer.Type.TexCoord3, 2, texcoordB); - distortionMesh.setStatic(); - return distortionMesh; - } - - @Override - public void render() { - // TODO Auto-generated method stub - } -} diff --git a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/package-info.java b/jme3-vr/src/main/java/com/jme3/input/vr/osvr/package-info.java deleted file mode 100644 index fb1c9ca58d..0000000000 --- a/jme3-vr/src/main/java/com/jme3/input/vr/osvr/package-info.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2021 jMonkeyEngine - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'jMonkeyEngine' nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/** - * user-input classes for devices that use the Open Source Virtual Reality - * (OSVR) API - */ -package com.jme3.input.vr.osvr; diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientkit/OsvrClientKitLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientkit/OsvrClientKitLibrary.java deleted file mode 100644 index dd8792e399..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientkit/OsvrClientKitLibrary.java +++ /dev/null @@ -1,380 +0,0 @@ -package com.jme3.system.osvr.osvrclientkit; -import com.sun.jna.Callback; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.Pointer; -import com.sun.jna.PointerType; -import com.sun.jna.ptr.PointerByReference; -/** - * JNA Wrapper for library osvrClientKit
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrClientKitLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrClientKit"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrClientKitLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrClientKitLibrary.class, OsvrClientKitLibrary.JNA_NATIVE_LIB); - } - /** - * Initialize the library. - * @param applicationIdentifier A null terminated string identifying your
- * application. Reverse DNS format strongly suggested.
- * @param flags initialization options (reserved) - pass 0 for now.
- * @return Client context - will be needed for subsequent calls
- * Original signature : OSVR_ClientContext osvrClientInit(const char[], uint32_t)
- * @deprecated use the safer method - * {@link #osvrClientInit(byte[], int)} - * instead - */ - @Deprecated - public static native OsvrClientKitLibrary.OSVR_ClientContext osvrClientInit(Pointer applicationIdentifier, int flags); - /** - * Initialize the library. - * @param applicationIdentifier A null terminated string identifying your
- * application. Reverse DNS format strongly suggested.
- * @param flags initialization options (reserved) - pass 0 for now.
- * @return Client context - will be needed for subsequent calls
- * Original signature : OSVR_ClientContext osvrClientInit(const char[], uint32_t) - */ - public static native OsvrClientKitLibrary.OSVR_ClientContext osvrClientInit(byte applicationIdentifier[], int flags); - /** - * Updates the state of the context - call regularly in your mainloop. - * @param ctx Client context
- * Original signature : OSVR_ReturnCode osvrClientUpdate(OSVR_ClientContext)
- * @deprecated use the safer method - * {@link #osvrClientUpdate(OsvrClientKitLibrary.OSVR_ClientContext)} - * instead - */ - @Deprecated - public static native byte osvrClientUpdate(Pointer ctx); - /** - * Updates the state of the context - call regularly in your mainloop. - * @param ctx Client context
- * Original signature : OSVR_ReturnCode osvrClientUpdate(OSVR_ClientContext) - */ - public static native byte osvrClientUpdate(OsvrClientKitLibrary.OSVR_ClientContext ctx); - /** - * Checks to see if the client context is fully started up and connected - * properly to a server.
- * If this reports that the client context is not OK, there may not be a server
- * running, or you may just have to call osvrClientUpdate() a few times to
- * permit startup to finish. The return value of this call will not change from
- * failure to success without calling osvrClientUpdate().
- * @param ctx Client context
- * @return OSVR_RETURN_FAILURE if not yet fully connected/initialized, or if
- * some other error (null context) occurs.
- * Original signature : OSVR_ReturnCode osvrClientCheckStatus(OSVR_ClientContext)
- * @deprecated use the safer method - * {@link #osvrClientCheckStatus(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientContext)} - * instead - */ - @Deprecated - public static native byte osvrClientCheckStatus(Pointer ctx); - /** - * Checks to see if the client context is fully started up and connected - * properly to a server.
- * If this reports that the client context is not OK, there may not be a server
- * running, or you may just have to call osvrClientUpdate() a few times to
- * permit startup to finish. The return value of this call will not change from
- * failure to success without calling osvrClientUpdate().
- * @param ctx Client context
- * @return OSVR_RETURN_FAILURE if not yet fully connected/initialized, or if
- * some other error (null context) occurs.
- * Original signature : OSVR_ReturnCode osvrClientCheckStatus(OSVR_ClientContext) - */ - public static native byte osvrClientCheckStatus(OsvrClientKitLibrary.OSVR_ClientContext ctx); - /** - * Shut down the library. - * @param ctx Client context
- * Original signature : OSVR_ReturnCode osvrClientShutdown(OSVR_ClientContext)
- * @deprecated use the safer method - * {@link #osvrClientShutdown(OsvrClientKitLibrary.OSVR_ClientContext)} - * instead - */ - @Deprecated - public static native byte osvrClientShutdown(Pointer ctx); - /** - * Shut down the library. - * @param ctx Client context
- * Original signature : OSVR_ReturnCode osvrClientShutdown(OSVR_ClientContext) - */ - public static native byte osvrClientShutdown(OsvrClientKitLibrary.OSVR_ClientContext ctx); - /** - * Log a message from the client. - * Original signature : void osvrClientLog(OSVR_ClientContext, OSVR_LogLevel, const char*)
- * @deprecated use the safer method - * {@link #osvrClientLog(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientContext, int, java.lang.String)} - * instead - */ - @Deprecated - public static native void osvrClientLog(Pointer ctx, int severity, Pointer message); - /** - * Log a message from the client. - * Original signature : void osvrClientLog(OSVR_ClientContext, OSVR_LogLevel, const char*) - */ - public static native void osvrClientLog(OsvrClientKitLibrary.OSVR_ClientContext ctx, int severity, String message); - /** - * Get the interface associated with the given path. - * @param ctx Client context
- * @param path A resource path (null-terminated string)
- * @param iface The interface object. May be freed when no longer needed,
- * otherwise it will be freed when the context is closed.
- * Original signature : OSVR_ReturnCode osvrClientGetInterface(OSVR_ClientContext, const char[], OSVR_ClientInterface*)
- * @deprecated use the safer method - * {@link #osvrClientGetInterface(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientContext, byte[], com.sun.jna.ptr.PointerByReference)} - * instead - */ - @Deprecated - public static native byte osvrClientGetInterface(Pointer ctx, Pointer path, Pointer iface); - /** - * Get the interface associated with the given path. - * @param ctx Client context
- * @param path A resource path (null-terminated string)
- * @param iface The interface object. May be freed when no longer needed,
- * otherwise it will be freed when the context is closed.
- * Original signature : OSVR_ReturnCode osvrClientGetInterface(OSVR_ClientContext, const char[], OSVR_ClientInterface*) - */ - public static native byte osvrClientGetInterface(OsvrClientKitLibrary.OSVR_ClientContext ctx, byte path[], PointerByReference iface); - /** - * Get the interface associated with the given path. - * @param ctx Client context
- * @param path A resource path (null-terminated string)
- * @param iface The interface object. May be freed when no longer needed,
- * otherwise it will be freed when the context is closed.
- * Original signature : OSVR_ReturnCode osvrClientGetInterface(OSVR_ClientContext, const char[], OSVR_ClientInterface*) - */ - public static native byte osvrClientGetInterface(Pointer ctx, Pointer path, PointerByReference iface); - /** - * Free an interface object before context closure. - * @param ctx Client context
- * @param iface The interface object
- * @return OSVR_RETURN_SUCCESS unless a null context or interface was passed
- * or the given interface was not found in the context (i.e. had already been
- * freed)
- * Original signature : OSVR_ReturnCode osvrClientFreeInterface(OSVR_ClientContext, OSVR_ClientInterface)
- * @deprecated use the safer method - * {@link #osvrClientFreeInterface(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientContext, com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientInterface)} - * instead - */ - @Deprecated - public static native byte osvrClientFreeInterface(Pointer ctx, Pointer iface); - /** - * Free an interface object before context closure. - * @param ctx Client context
- * @param iface The interface object
- * @return OSVR_RETURN_SUCCESS unless a null context or interface was passed
- * or the given interface was not found in the context (i.e. had already been
- * freed)
- * Original signature : OSVR_ReturnCode osvrClientFreeInterface(OSVR_ClientContext, OSVR_ClientInterface) - */ - public static native byte osvrClientFreeInterface(OsvrClientKitLibrary.OSVR_ClientContext ctx, OsvrClientKitLibrary.OSVR_ClientInterface iface); - /** - * Original signature : OSVR_ReturnCode osvrRegisterPoseCallback(OSVR_ClientInterface, OSVR_PoseCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterPoseCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterPoseCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterPoseCallback(OSVR_ClientInterface, OSVR_PoseCallback, void*) */ - public static native byte osvrRegisterPoseCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterPositionCallback(OSVR_ClientInterface, OSVR_PositionCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterPositionCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterPositionCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterPositionCallback(OSVR_ClientInterface, OSVR_PositionCallback, void*) */ - public static native byte osvrRegisterPositionCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterOrientationCallback(OSVR_ClientInterface, OSVR_OrientationCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterOrientationCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterOrientationCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterOrientationCallback(OSVR_ClientInterface, OSVR_OrientationCallback, void*) */ - public static native byte osvrRegisterOrientationCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterVelocityCallback(OSVR_ClientInterface, OSVR_VelocityCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterVelocityCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterVelocityCallback(OSVR_ClientInterface, OSVR_VelocityCallback, void*) */ - public static native byte osvrRegisterVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterLinearVelocityCallback(OSVR_ClientInterface, OSVR_LinearVelocityCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterLinearVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterLinearVelocityCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterLinearVelocityCallback(OSVR_ClientInterface, OSVR_LinearVelocityCallback, void*) */ - public static native byte osvrRegisterLinearVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterAngularVelocityCallback(OSVR_ClientInterface, OSVR_AngularVelocityCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterAngularVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterAngularVelocityCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterAngularVelocityCallback(OSVR_ClientInterface, OSVR_AngularVelocityCallback, void*) */ - public static native byte osvrRegisterAngularVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterAccelerationCallback(OSVR_ClientInterface, OSVR_AccelerationCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterAccelerationCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterAccelerationCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterAccelerationCallback(OSVR_ClientInterface, OSVR_AccelerationCallback, void*) */ - public static native byte osvrRegisterAccelerationCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterLinearAccelerationCallback(OSVR_ClientInterface, OSVR_LinearAccelerationCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterLinearAccelerationCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterLinearAccelerationCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterLinearAccelerationCallback(OSVR_ClientInterface, OSVR_LinearAccelerationCallback, void*) */ - public static native byte osvrRegisterLinearAccelerationCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterAngularAccelerationCallback(OSVR_ClientInterface, OSVR_AngularAccelerationCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterAngularAccelerationCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterAngularAccelerationCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterAngularAccelerationCallback(OSVR_ClientInterface, OSVR_AngularAccelerationCallback, void*) */ - public static native byte osvrRegisterAngularAccelerationCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterButtonCallback(OSVR_ClientInterface, OSVR_ButtonCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterButtonCallback(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Callback, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterButtonCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterButtonCallback(OSVR_ClientInterface, OSVR_ButtonCallback, void*) */ - public static native byte osvrRegisterButtonCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Callback cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterAnalogCallback(OSVR_ClientInterface, OSVR_AnalogCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterAnalogCallback(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Callback, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterAnalogCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterAnalogCallback(OSVR_ClientInterface, OSVR_AnalogCallback, void*) */ - public static native byte osvrRegisterAnalogCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Callback cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterImagingCallback(OSVR_ClientInterface, OSVR_ImagingCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterImagingCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterImagingCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterImagingCallback(OSVR_ClientInterface, OSVR_ImagingCallback, void*) */ - public static native byte osvrRegisterImagingCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterLocation2DCallback(OSVR_ClientInterface, OSVR_Location2DCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterLocation2DCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterLocation2DCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterLocation2DCallback(OSVR_ClientInterface, OSVR_Location2DCallback, void*) */ - public static native byte osvrRegisterLocation2DCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterDirectionCallback(OSVR_ClientInterface, OSVR_DirectionCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterDirectionCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterDirectionCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterDirectionCallback(OSVR_ClientInterface, OSVR_DirectionCallback, void*) */ - public static native byte osvrRegisterDirectionCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterEyeTracker2DCallback(OSVR_ClientInterface, OSVR_EyeTracker2DCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterEyeTracker2DCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterEyeTracker2DCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterEyeTracker2DCallback(OSVR_ClientInterface, OSVR_EyeTracker2DCallback, void*) */ - public static native byte osvrRegisterEyeTracker2DCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterEyeTracker3DCallback(OSVR_ClientInterface, OSVR_EyeTracker3DCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterEyeTracker3DCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterEyeTracker3DCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterEyeTracker3DCallback(OSVR_ClientInterface, OSVR_EyeTracker3DCallback, void*) */ - public static native byte osvrRegisterEyeTracker3DCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterEyeTrackerBlinkCallback(OSVR_ClientInterface, OSVR_EyeTrackerBlinkCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterEyeTrackerBlinkCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterEyeTrackerBlinkCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterEyeTrackerBlinkCallback(OSVR_ClientInterface, OSVR_EyeTrackerBlinkCallback, void*) */ - public static native byte osvrRegisterEyeTrackerBlinkCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterNaviVelocityCallback(OSVR_ClientInterface, OSVR_NaviVelocityCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterNaviVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterNaviVelocityCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterNaviVelocityCallback(OSVR_ClientInterface, OSVR_NaviVelocityCallback, void*) */ - public static native byte osvrRegisterNaviVelocityCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - /** - * Original signature : OSVR_ReturnCode osvrRegisterNaviPositionCallback(OSVR_ClientInterface, OSVR_NaviPositionCallback, void*)
- * @deprecated use the safer method - * {@link #osvrRegisterNaviPositionCallback(OsvrClientKitLibrary.OSVR_ClientInterface, com.sun.jna.Pointer, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrRegisterNaviPositionCallback(Pointer iface, Pointer cb, Pointer userdata); - /** Original signature : OSVR_ReturnCode osvrRegisterNaviPositionCallback(OSVR_ClientInterface, OSVR_NaviPositionCallback, void*) */ - public static native byte osvrRegisterNaviPositionCallback(OsvrClientKitLibrary.OSVR_ClientInterface iface, Pointer cb, Pointer userdata); - public static class OSVR_ClientContext extends PointerType { - public OSVR_ClientContext(Pointer address) { - super(address); - } - public OSVR_ClientContext() { - super(); - } - }; - public static class OSVR_ClientInterface extends PointerType { - public OSVR_ClientInterface(Pointer address) { - super(address); - } - public OSVR_ClientInterface() { - super(); - } - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AccelerationReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AccelerationReport.java deleted file mode 100644 index c6ba614d1d..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AccelerationReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_AccelerationReport extends Structure { - public int sensor; - /** C type : OSVR_AccelerationState */ - public OSVR_AccelerationState state; - public OSVR_AccelerationReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_AccelerationState */ - public OSVR_AccelerationReport(int sensor, OSVR_AccelerationState state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_AccelerationReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_AccelerationReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_AccelerationReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AccelerationState.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AccelerationState.java deleted file mode 100644 index 379a7972b4..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AccelerationState.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_AccelerationState extends Structure { - /** C type : OSVR_LinearAccelerationState */ - public OSVR_Vec3 linearAcceleration; - /** C type : OSVR_CBool */ - public byte linearAccelerationValid; - /** C type : OSVR_AngularAccelerationState */ - public OSVR_IncrementalQuaternion angularAcceleration; - /** C type : OSVR_CBool */ - public byte angularAccelerationValid; - public OSVR_AccelerationState() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("linearAcceleration", "linearAccelerationValid", "angularAcceleration", "angularAccelerationValid"); - } - /** - * @param linearAcceleration C type : OSVR_LinearAccelerationState
- * @param linearAccelerationValid C type : OSVR_CBool
- * @param angularAcceleration C type : OSVR_AngularAccelerationState
- * @param angularAccelerationValid C type : OSVR_CBool - */ - public OSVR_AccelerationState(OSVR_Vec3 linearAcceleration, byte linearAccelerationValid, OSVR_IncrementalQuaternion angularAcceleration, byte angularAccelerationValid) { - super(); - this.linearAcceleration = linearAcceleration; - this.linearAccelerationValid = linearAccelerationValid; - this.angularAcceleration = angularAcceleration; - this.angularAccelerationValid = angularAccelerationValid; - } - public OSVR_AccelerationState(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_AccelerationState implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_AccelerationState implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AnalogReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AnalogReport.java deleted file mode 100644 index 8b5aca7d1c..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AnalogReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_AnalogReport extends Structure { - public int sensor; - /** C type : OSVR_AnalogState */ - public double state; - public OSVR_AnalogReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_AnalogState */ - public OSVR_AnalogReport(int sensor, double state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_AnalogReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_AnalogReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_AnalogReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AngularAccelerationReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AngularAccelerationReport.java deleted file mode 100644 index c7a3821dd7..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AngularAccelerationReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_AngularAccelerationReport extends Structure { - public int sensor; - /** C type : OSVR_AngularAccelerationState */ - public OSVR_IncrementalQuaternion state; - public OSVR_AngularAccelerationReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_AngularAccelerationState */ - public OSVR_AngularAccelerationReport(int sensor, OSVR_IncrementalQuaternion state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_AngularAccelerationReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_AngularAccelerationReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_AngularAccelerationReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AngularVelocityReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AngularVelocityReport.java deleted file mode 100644 index bb526b7b1c..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_AngularVelocityReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_AngularVelocityReport extends Structure { - public int sensor; - /** C type : OSVR_AngularVelocityState */ - public OSVR_IncrementalQuaternion state; - public OSVR_AngularVelocityReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_AngularVelocityState */ - public OSVR_AngularVelocityReport(int sensor, OSVR_IncrementalQuaternion state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_AngularVelocityReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_AngularVelocityReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_AngularVelocityReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_ButtonReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_ButtonReport.java deleted file mode 100644 index 4988433679..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_ButtonReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_ButtonReport extends Structure { - public int sensor; - /** C type : OSVR_ButtonState */ - public byte state; - public OSVR_ButtonReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_ButtonState */ - public OSVR_ButtonReport(int sensor, byte state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_ButtonReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_ButtonReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_ButtonReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_DirectionReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_DirectionReport.java deleted file mode 100644 index 70af9a36ba..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_DirectionReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_DirectionReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_DirectionState */ - public OSVR_Vec3 direction; - public OSVR_DirectionReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "direction"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param direction C type : OSVR_DirectionState - */ - public OSVR_DirectionReport(int sensor, OSVR_Vec3 direction) { - super(); - this.sensor = sensor; - this.direction = direction; - } - public OSVR_DirectionReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_DirectionReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_DirectionReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker2DReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker2DReport.java deleted file mode 100644 index f72a176f70..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker2DReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_EyeTracker2DReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_EyeTracker2DState */ - public OSVR_Vec2 state; - public OSVR_EyeTracker2DReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param state C type : OSVR_EyeTracker2DState - */ - public OSVR_EyeTracker2DReport(int sensor, OSVR_Vec2 state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_EyeTracker2DReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_EyeTracker2DReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_EyeTracker2DReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker3DReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker3DReport.java deleted file mode 100644 index 93af317c37..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker3DReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_EyeTracker3DReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_EyeTracker3DState */ - public OSVR_EyeTracker3DState state; - public OSVR_EyeTracker3DReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param state C type : OSVR_EyeTracker3DState - */ - public OSVR_EyeTracker3DReport(int sensor, OSVR_EyeTracker3DState state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_EyeTracker3DReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_EyeTracker3DReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_EyeTracker3DReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker3DState.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker3DState.java deleted file mode 100644 index 29da57b206..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTracker3DState.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_EyeTracker3DState extends Structure { - /** C type : OSVR_CBool */ - public byte directionValid; - /** C type : OSVR_DirectionState */ - public OSVR_Vec3 direction; - /** C type : OSVR_CBool */ - public byte basePointValid; - /** C type : OSVR_PositionState */ - public OSVR_Vec3 basePoint; - public OSVR_EyeTracker3DState() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("directionValid", "direction", "basePointValid", "basePoint"); - } - /** - * @param directionValid C type : OSVR_CBool
- * @param direction C type : OSVR_DirectionState
- * @param basePointValid C type : OSVR_CBool
- * @param basePoint C type : OSVR_PositionState - */ - public OSVR_EyeTracker3DState(byte directionValid, OSVR_Vec3 direction, byte basePointValid, OSVR_Vec3 basePoint) { - super(); - this.directionValid = directionValid; - this.direction = direction; - this.basePointValid = basePointValid; - this.basePoint = basePoint; - } - public OSVR_EyeTracker3DState(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_EyeTracker3DState implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_EyeTracker3DState implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTrackerBlinkReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTrackerBlinkReport.java deleted file mode 100644 index 0ad5f64361..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_EyeTrackerBlinkReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_EyeTrackerBlinkReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_EyeTrackerBlinkState */ - public byte state; - public OSVR_EyeTrackerBlinkReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param state C type : OSVR_EyeTrackerBlinkState - */ - public OSVR_EyeTrackerBlinkReport(int sensor, byte state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_EyeTrackerBlinkReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_EyeTrackerBlinkReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_EyeTrackerBlinkReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_IncrementalQuaternion.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_IncrementalQuaternion.java deleted file mode 100644 index 07cb64c949..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_IncrementalQuaternion.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_IncrementalQuaternion extends Structure { - /** C type : OSVR_Quaternion */ - public OSVR_Quaternion incrementalRotation; - public double dt; - public OSVR_IncrementalQuaternion() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("incrementalRotation", "dt"); - } - /** @param incrementalRotation C type : OSVR_Quaternion */ - public OSVR_IncrementalQuaternion(OSVR_Quaternion incrementalRotation, double dt) { - super(); - this.incrementalRotation = incrementalRotation; - this.dt = dt; - } - public OSVR_IncrementalQuaternion(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_IncrementalQuaternion implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_IncrementalQuaternion implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_LinearAccelerationReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_LinearAccelerationReport.java deleted file mode 100644 index 4baffbd65d..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_LinearAccelerationReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_LinearAccelerationReport extends Structure { - public int sensor; - /** C type : OSVR_LinearAccelerationState */ - public OSVR_Vec3 state; - public OSVR_LinearAccelerationReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_LinearAccelerationState */ - public OSVR_LinearAccelerationReport(int sensor, OSVR_Vec3 state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_LinearAccelerationReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_LinearAccelerationReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_LinearAccelerationReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_LinearVelocityReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_LinearVelocityReport.java deleted file mode 100644 index c40b3e74ae..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_LinearVelocityReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_LinearVelocityReport extends Structure { - public int sensor; - /** C type : OSVR_LinearVelocityState */ - public OSVR_Vec3 state; - public OSVR_LinearVelocityReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_LinearVelocityState */ - public OSVR_LinearVelocityReport(int sensor, OSVR_Vec3 state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_LinearVelocityReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_LinearVelocityReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_LinearVelocityReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Location2DReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Location2DReport.java deleted file mode 100644 index 8c05d755a8..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Location2DReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Location2DReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_Location2DState */ - public OSVR_Vec2 location; - public OSVR_Location2DReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "location"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param location C type : OSVR_Location2DState - */ - public OSVR_Location2DReport(int sensor, OSVR_Vec2 location) { - super(); - this.sensor = sensor; - this.location = location; - } - public OSVR_Location2DReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Location2DReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Location2DReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_NaviPositionReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_NaviPositionReport.java deleted file mode 100644 index 47cb3d563a..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_NaviPositionReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_NaviPositionReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_NaviPositionState */ - public OSVR_Vec2 state; - public OSVR_NaviPositionReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param state C type : OSVR_NaviPositionState - */ - public OSVR_NaviPositionReport(int sensor, OSVR_Vec2 state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_NaviPositionReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_NaviPositionReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_NaviPositionReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_NaviVelocityReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_NaviVelocityReport.java deleted file mode 100644 index ff07a8a0a2..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_NaviVelocityReport.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_NaviVelocityReport extends Structure { - /** C type : OSVR_ChannelCount */ - public int sensor; - /** C type : OSVR_NaviVelocityState */ - public OSVR_Vec2 state; - public OSVR_NaviVelocityReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** - * @param sensor C type : OSVR_ChannelCount
- * @param state C type : OSVR_NaviVelocityState - */ - public OSVR_NaviVelocityReport(int sensor, OSVR_Vec2 state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_NaviVelocityReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_NaviVelocityReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_NaviVelocityReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_OrientationReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_OrientationReport.java deleted file mode 100644 index 7b8dc7bde0..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_OrientationReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_OrientationReport extends Structure { - public int sensor; - /** C type : OSVR_OrientationState */ - public OSVR_Quaternion rotation; - public OSVR_OrientationReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "rotation"); - } - /** @param rotation C type : OSVR_OrientationState */ - public OSVR_OrientationReport(int sensor, OSVR_Quaternion rotation) { - super(); - this.sensor = sensor; - this.rotation = rotation; - } - public OSVR_OrientationReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_OrientationReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_OrientationReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Pose3.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Pose3.java deleted file mode 100644 index 5dacd27388..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Pose3.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Pose3 extends Structure { - /** C type : OSVR_Vec3 */ - public OSVR_Vec3 translation; - /** C type : OSVR_Quaternion */ - public OSVR_Quaternion rotation; - public OSVR_Pose3() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("translation", "rotation"); - } - /** - * @param translation C type : OSVR_Vec3
- * @param rotation C type : OSVR_Quaternion - */ - public OSVR_Pose3(OSVR_Vec3 translation, OSVR_Quaternion rotation) { - super(); - this.translation = translation; - this.rotation = rotation; - } - public OSVR_Pose3(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Pose3 implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Pose3 implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_PoseReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_PoseReport.java deleted file mode 100644 index e39eea50f6..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_PoseReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_PoseReport extends Structure { - public int sensor; - /** C type : OSVR_PoseState */ - public OSVR_Pose3 pose; - public OSVR_PoseReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "pose"); - } - /** @param pose C type : OSVR_PoseState */ - public OSVR_PoseReport(int sensor, OSVR_Pose3 pose) { - super(); - this.sensor = sensor; - this.pose = pose; - } - public OSVR_PoseReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_PoseReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_PoseReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_PositionReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_PositionReport.java deleted file mode 100644 index d93fc4a1fe..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_PositionReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_PositionReport extends Structure { - public int sensor; - /** C type : OSVR_PositionState */ - public OSVR_Vec3 xyz; - public OSVR_PositionReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "xyz"); - } - /** @param xyz C type : OSVR_PositionState */ - public OSVR_PositionReport(int sensor, OSVR_Vec3 xyz) { - super(); - this.sensor = sensor; - this.xyz = xyz; - } - public OSVR_PositionReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_PositionReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_PositionReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Quaternion.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Quaternion.java deleted file mode 100644 index 72952297a1..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Quaternion.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Quaternion extends Structure { - /** C type : double[4] */ - public double[] data = new double[4]; - public OSVR_Quaternion() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("data"); - } - /** @param data C type : double[4] */ - public OSVR_Quaternion(double data[]) { - super(); - if ((data.length != this.data.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.data = data; - } - public OSVR_Quaternion(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Quaternion implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Quaternion implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Vec2.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Vec2.java deleted file mode 100644 index 7427d14461..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Vec2.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Vec2 extends Structure { - /** C type : double[2] */ - public double[] data = new double[2]; - public OSVR_Vec2() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("data"); - } - /** @param data C type : double[2] */ - public OSVR_Vec2(double data[]) { - super(); - if ((data.length != this.data.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.data = data; - } - public OSVR_Vec2(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Vec2 implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Vec2 implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Vec3.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Vec3.java deleted file mode 100644 index b3b2ed8893..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_Vec3.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Vec3 extends Structure { - /** C type : double[3] */ - public double[] data = new double[3]; - public OSVR_Vec3() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("data"); - } - /** @param data C type : double[3] */ - public OSVR_Vec3(double data[]) { - super(); - if ((data.length != this.data.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.data = data; - } - public OSVR_Vec3(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Vec3 implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Vec3 implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_VelocityReport.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_VelocityReport.java deleted file mode 100644 index da65aaf62c..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_VelocityReport.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_VelocityReport extends Structure { - public int sensor; - /** C type : OSVR_VelocityState */ - public OSVR_VelocityState state; - public OSVR_VelocityReport() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("sensor", "state"); - } - /** @param state C type : OSVR_VelocityState */ - public OSVR_VelocityReport(int sensor, OSVR_VelocityState state) { - super(); - this.sensor = sensor; - this.state = state; - } - public OSVR_VelocityReport(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_VelocityReport implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_VelocityReport implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_VelocityState.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_VelocityState.java deleted file mode 100644 index 4a4589a077..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OSVR_VelocityState.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_VelocityState extends Structure { - /** C type : OSVR_LinearVelocityState */ - public OSVR_Vec3 linearVelocity; - /** C type : OSVR_CBool */ - public byte linearVelocityValid; - /** C type : OSVR_AngularVelocityState */ - public OSVR_IncrementalQuaternion angularVelocity; - /** C type : OSVR_CBool */ - public byte angularVelocityValid; - public OSVR_VelocityState() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("linearVelocity", "linearVelocityValid", "angularVelocity", "angularVelocityValid"); - } - /** - * @param linearVelocity C type : OSVR_LinearVelocityState
- * @param linearVelocityValid C type : OSVR_CBool
- * @param angularVelocity C type : OSVR_AngularVelocityState
- * @param angularVelocityValid C type : OSVR_CBool - */ - public OSVR_VelocityState(OSVR_Vec3 linearVelocity, byte linearVelocityValid, OSVR_IncrementalQuaternion angularVelocity, byte angularVelocityValid) { - super(); - this.linearVelocity = linearVelocity; - this.linearVelocityValid = linearVelocityValid; - this.angularVelocity = angularVelocity; - this.angularVelocityValid = angularVelocityValid; - } - public OSVR_VelocityState(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_VelocityState implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_VelocityState implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OsvrClientReportTypesLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OsvrClientReportTypesLibrary.java deleted file mode 100644 index 4289cb200f..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrclientreporttypes/OsvrClientReportTypesLibrary.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.jme3.system.osvr.osvrclientreporttypes; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -/** - * JNA Wrapper for library osvrClientReportTypes
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrClientReportTypesLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrClientKit"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrClientReportTypesLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrClientReportTypesLibrary.class, OsvrClientReportTypesLibrary.JNA_NATIVE_LIB); - } - public static final int OSVR_TRUE = 1; - public static final int OSVR_FALSE = 0; - public static final int OSVR_BUTTON_PRESSED = 1; - public static final int OSVR_BUTTON_NOT_PRESSED = 0; - public static final int OSVR_EYE_BLINK = 1; - public static final int OSVR_EYE_NO_BLINK = 0; - /** Original signature : double osvrVec3GetX(const OSVR_Vec3*) */ - public static native double osvrVec3GetX(OSVR_Vec3 v); - /** Original signature : void osvrVec3SetX(OSVR_Vec3*, double) */ - public static native void osvrVec3SetX(OSVR_Vec3 v, double val); - /** Original signature : double osvrVec3GetY(const OSVR_Vec3*) */ - public static native double osvrVec3GetY(OSVR_Vec3 v); - /** Original signature : void osvrVec3SetY(OSVR_Vec3*, double) */ - public static native void osvrVec3SetY(OSVR_Vec3 v, double val); - /** Original signature : double osvrVec3GetZ(const OSVR_Vec3*) */ - public static native double osvrVec3GetZ(OSVR_Vec3 v); - /** Original signature : void osvrVec3SetZ(OSVR_Vec3*, double) */ - public static native void osvrVec3SetZ(OSVR_Vec3 v, double val); - /** - * Set a Vec3 to the zero vector. - * Original signature : void osvrVec3Zero(OSVR_Vec3*) - */ - public static native void osvrVec3Zero(OSVR_Vec3 v); - /** Original signature : double osvrQuatGetW(const OSVR_Quaternion*) */ - public static native double osvrQuatGetW(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetW(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetW(OSVR_Quaternion q, double val); - /** Original signature : double osvrQuatGetX(const OSVR_Quaternion*) */ - public static native double osvrQuatGetX(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetX(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetX(OSVR_Quaternion q, double val); - /** Original signature : double osvrQuatGetY(const OSVR_Quaternion*) */ - public static native double osvrQuatGetY(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetY(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetY(OSVR_Quaternion q, double val); - /** Original signature : double osvrQuatGetZ(const OSVR_Quaternion*) */ - public static native double osvrQuatGetZ(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetZ(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetZ(OSVR_Quaternion q, double val); - /** - * Set a quaternion to the identity rotation. - * Original signature : void osvrQuatSetIdentity(OSVR_Quaternion*) - */ - public static native void osvrQuatSetIdentity(OSVR_Quaternion q); - /** - * Set a pose to identity. - * Original signature : void osvrPose3SetIdentity(OSVR_Pose3*) - */ - public static native void osvrPose3SetIdentity(OSVR_Pose3 pose); - /** Original signature : double osvrVec2GetX(const OSVR_Vec2*) */ - public static native double osvrVec2GetX(OSVR_Vec2 v); - /** Original signature : void osvrVec2SetX(OSVR_Vec2*, double) */ - public static native void osvrVec2SetX(OSVR_Vec2 v, double val); - /** Original signature : double osvrVec2GetY(const OSVR_Vec2*) */ - public static native double osvrVec2GetY(OSVR_Vec2 v); - /** Original signature : void osvrVec2SetY(OSVR_Vec2*, double) */ - public static native void osvrVec2SetY(OSVR_Vec2 v, double val); - /** - * Set a Vec2 to the zero vector. - * Original signature : void osvrVec2Zero(OSVR_Vec2*) - */ - public static native void osvrVec2Zero(OSVR_Vec2 v); -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrdisplay/OsvrDisplayLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrdisplay/OsvrDisplayLibrary.java deleted file mode 100644 index de59467448..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrdisplay/OsvrDisplayLibrary.java +++ /dev/null @@ -1,851 +0,0 @@ -package com.jme3.system.osvr.osvrdisplay; -import com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.Pointer; -import com.sun.jna.PointerType; -import com.sun.jna.ptr.DoubleByReference; -import com.sun.jna.ptr.FloatByReference; -import com.sun.jna.ptr.IntByReference; -import com.sun.jna.ptr.PointerByReference; -import java.nio.ByteBuffer; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - -/** - * JNA Wrapper for library osvrDisplay
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrDisplayLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrClientKit"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrDisplayLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrDisplayLibrary.class, OsvrDisplayLibrary.JNA_NATIVE_LIB); - } - /** - * Allocates a display configuration object populated with data from the
- * OSVR system.
- * Before this call will succeed, your application will need to be correctly
- * and fully connected to an OSVR server. You may consider putting this call in
- * a loop alternating with osvrClientUpdate() until this call succeeds.
- * Data provided by a display configuration object:
- * - The logical display topology (number and relationship of viewers, eyes,
- * and surfaces), which remains constant throughout the life of the
- * configuration object. (A method of notification of change here is TBD).
- * - Pose data for viewers (not required for rendering) and pose/view data for
- * eyes (used for rendering) which is based on tracker data: if used, these
- * should be queried every frame.
- * - Projection matrix data for surfaces, which while in current practice may
- * be relatively unchanging, we are not guaranteeing them to be constant:
- * these should be queried every frame.
- * - Video-input-relative viewport size/location for a surface: would like this
- * to be variable, but probably not feasible. If you have input, please
- * comment on the dev mailing list.
- * - Per-surface distortion strategy priorities/availabilities: constant. Note
- * the following, though...
- * - Per-surface distortion strategy parameters: variable, request each frame.
- * (Could make constant with a notification if needed?)
- * Important note: While most of this data is immediately available if you are
- * successful in getting a display config object, the pose-based data (viewer
- * pose, eye pose, eye view matrix) needs tracker state, so at least one (and in
- * practice, typically more) osvrClientUpdate() must be performed before a new
- * tracker report is available to populate that state. See
- * osvrClientCheckDisplayStartup() to query if all startup data is available.
- * todo Decide if relative viewport should be constant in a display config,
- * and update docs accordingly.
- * todo Decide if distortion params should be constant in a display config,
- * and update docs accordingly.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or some other
- * error occurred, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetDisplay(OSVR_ClientContext, OSVR_DisplayConfig*)
- * @deprecated use the safer method - * {@link #osvrClientGetDisplay(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientContext, com.sun.jna.ptr.PointerByReference)} - * instead - */ - @Deprecated - public static native byte osvrClientGetDisplay(Pointer ctx, Pointer disp); - /** - * Allocates a display configuration object populated with data from the
- * OSVR system.
- * Before this call will succeed, your application will need to be correctly
- * and fully connected to an OSVR server. You may consider putting this call in
- * a loop alternating with osvrClientUpdate() until this call succeeds.
- * Data provided by a display configuration object:
- * - The logical display topology (number and relationship of viewers, eyes,
- * and surfaces), which remains constant throughout the life of the
- * configuration object. (A method of notification of change here is TBD).
- * - Pose data for viewers (not required for rendering) and pose/view data for
- * eyes (used for rendering) which is based on tracker data: if used, these
- * should be queried every frame.
- * - Projection matrix data for surfaces, which while in current practice may
- * be relatively unchanging, we are not guaranteeing them to be constant:
- * these should be queried every frame.
- * - Video-input-relative viewport size/location for a surface: would like this
- * to be variable, but probably not feasible. If you have input, please
- * comment on the dev mailing list.
- * - Per-surface distortion strategy priorities/availabilities: constant. Note
- * the following, though...
- * - Per-surface distortion strategy parameters: variable, request each frame.
- * (Could make constant with a notification if needed?)
- * Important note: While most of this data is immediately available if you are
- * successful in getting a display config object, the pose-based data (viewer
- * pose, eye pose, eye view matrix) needs tracker state, so at least one (and in
- * practice, typically more) osvrClientUpdate() must be performed before a new
- * tracker report is available to populate that state. See
- * osvrClientCheckDisplayStartup() to query if all startup data is available.
- * todo Decide if relative viewport should be constant in a display config,
- * and update docs accordingly.
- * todo Decide if distortion params should be constant in a display config,
- * and update docs accordingly.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or some other
- * error occurred, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetDisplay(OSVR_ClientContext, OSVR_DisplayConfig*) - */ - public static native byte osvrClientGetDisplay(OsvrClientKitLibrary.OSVR_ClientContext ctx, PointerByReference disp); - /** - * Allocates a display configuration object populated with data from the
- * OSVR system.
- * Before this call will succeed, your application will need to be correctly
- * and fully connected to an OSVR server. You may consider putting this call in
- * a loop alternating with osvrClientUpdate() until this call succeeds.
- * Data provided by a display configuration object:
- * - The logical display topology (number and relationship of viewers, eyes,
- * and surfaces), which remains constant throughout the life of the
- * configuration object. (A method of notification of change here is TBD).
- * - Pose data for viewers (not required for rendering) and pose/view data for
- * eyes (used for rendering) which is based on tracker data: if used, these
- * should be queried every frame.
- * - Projection matrix data for surfaces, which while in current practice may
- * be relatively unchanging, we are not guaranteeing them to be constant:
- * these should be queried every frame.
- * - Video-input-relative viewport size/location for a surface: would like this
- * to be variable, but probably not feasible. If you have input, please
- * comment on the dev mailing list.
- * - Per-surface distortion strategy priorities/availabilities: constant. Note
- * the following, though...
- * - Per-surface distortion strategy parameters: variable, request each frame.
- * (Could make constant with a notification if needed?)
- * Important note: While most of this data is immediately available if you are
- * successful in getting a display config object, the pose-based data (viewer
- * pose, eye pose, eye view matrix) needs tracker state, so at least one (and in
- * practice, typically more) osvrClientUpdate() must be performed before a new
- * tracker report is available to populate that state. See
- * osvrClientCheckDisplayStartup() to query if all startup data is available.
- * todo Decide if relative viewport should be constant in a display config,
- * and update docs accordingly.
- * todo Decide if distortion params should be constant in a display config,
- * and update docs accordingly.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or some other
- * error occurred, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetDisplay(OSVR_ClientContext, OSVR_DisplayConfig*) - */ - public static native byte osvrClientGetDisplay(Pointer ctx, PointerByReference disp); - /** - * Frees a display configuration object. The corresponding context must
- * still be open.
- * If you fail to call this, it will be automatically called as part of
- * clean-up when the corresponding context is closed.
- * @return OSVR_RETURN_FAILURE if a null config was passed, or if the given
- * display object was already freed.
- * Original signature : OSVR_ReturnCode osvrClientFreeDisplay(OSVR_DisplayConfig)
- * @deprecated use the safer method - * {@link #osvrClientFreeDisplay(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig)} - * instead - */ - @Deprecated - public static native byte osvrClientFreeDisplay(Pointer disp); - /** - * Frees a display configuration object. The corresponding context must
- * still be open.
- * If you fail to call this, it will be automatically called as part of
- * clean-up when the corresponding context is closed.
- * @return OSVR_RETURN_FAILURE if a null config was passed, or if the given
- * display object was already freed.
- * Original signature : OSVR_ReturnCode osvrClientFreeDisplay(OSVR_DisplayConfig) - */ - public static native byte osvrClientFreeDisplay(OsvrDisplayLibrary.OSVR_DisplayConfig disp); - /** - * Checks to see if a display is fully configured and ready, including
- * having received its first pose update.
- * Once this first succeeds, it will continue to succeed for the lifetime of
- * the display config object, so it is not necessary to keep calling once you
- * get a successful result.
- * @return OSVR_RETURN_FAILURE if a null config was passed, or if the given
- * display config object was otherwise not ready for full use.
- * Original signature : OSVR_ReturnCode osvrClientCheckDisplayStartup(OSVR_DisplayConfig)
- * @deprecated use the safer method - * {@link #osvrClientCheckDisplayStartup(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig)} - * instead - */ - @Deprecated - public static native byte osvrClientCheckDisplayStartup(Pointer disp); - /** - * Checks to see if a display is fully configured and ready, including
- * having received its first pose update.
- * Once this first succeeds, it will continue to succeed for the lifetime of
- * the display config object, so it is not necessary to keep calling once you
- * get a successful result.
- * @return OSVR_RETURN_FAILURE if a null config was passed, or if the given
- * display config object was otherwise not ready for full use.
- * Original signature : OSVR_ReturnCode osvrClientCheckDisplayStartup(OSVR_DisplayConfig) - */ - public static native byte osvrClientCheckDisplayStartup(OsvrDisplayLibrary.OSVR_DisplayConfig disp); - /** - * A display config can have one or more display inputs to pass pixels
- * over (HDMI/DVI connections, etcetera): retrieve the number of display inputs in
- * the current configuration.
- * @param disp Display config object.
- * @param numDisplayInputs Number of display inputs in the logical display
- * topology, **constant** throughout the active, valid lifetime of a display
- * config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in
- * which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumDisplayInputs(OSVR_DisplayConfig, OSVR_DisplayInputCount*)
- * @deprecated use the safer method - * {@link #osvrClientGetNumDisplayInputs(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, java.nio.ByteBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetNumDisplayInputs(Pointer disp, Pointer numDisplayInputs); - /** - * A display config can have one or more display inputs to pass pixels
- * over (HDMI/DVI connections, etcetera): retrieve the number of display inputs in
- * the current configuration.
- * @param disp Display config object.
- * @param numDisplayInputs Number of display inputs in the logical display
- * topology, **constant** throughout the active, valid lifetime of a display
- * config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in
- * which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumDisplayInputs(OSVR_DisplayConfig, OSVR_DisplayInputCount*) - */ - public static native byte osvrClientGetNumDisplayInputs(OsvrDisplayLibrary.OSVR_DisplayConfig disp, ByteBuffer numDisplayInputs); - /** - * Retrieve the pixel dimensions of a given display input for a display
- * config
- * @param disp Display config object.
- * @param displayInputIndex The zero-based index of the display input.
- * @param width Width (in pixels) of the display input.
- * @param height Height (in pixels) of the display input.
- * The out parameters are **constant** throughout the active, valid lifetime of
- * a display config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in
- * which case the output arguments are unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetDisplayDimensions(OSVR_DisplayConfig, OSVR_DisplayInputCount, OSVR_DisplayDimension*, OSVR_DisplayDimension*)
- * @deprecated use the safer method - * {@link #osvrClientGetDisplayDimensions(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, byte, java.nio.IntBuffer, java.nio.IntBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetDisplayDimensions(Pointer disp, byte displayInputIndex, IntByReference width, IntByReference height); - /** - * Retrieve the pixel dimensions of a given display input for a display
- * config
- * @param disp Display config object.
- * @param displayInputIndex The zero-based index of the display input.
- * @param width Width (in pixels) of the display input.
- * @param height Height (in pixels) of the display input.
- * The out parameters are **constant** throughout the active, valid lifetime of
- * a display config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in
- * which case the output arguments are unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetDisplayDimensions(OSVR_DisplayConfig, OSVR_DisplayInputCount, OSVR_DisplayDimension*, OSVR_DisplayDimension*) - */ - public static native byte osvrClientGetDisplayDimensions(OsvrDisplayLibrary.OSVR_DisplayConfig disp, byte displayInputIndex, IntBuffer width, IntBuffer height); - /** - * A display config can have one (or theoretically more) viewers:
- * retrieve the viewer count.
- * @param disp Display config object.
- * @param viewers Number of viewers in the logical display topology,
- * *constant** throughout the active, valid lifetime of a display config
- * object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumViewers(OSVR_DisplayConfig, OSVR_ViewerCount*)
- * @deprecated use the safer method - * {@link #osvrClientGetNumViewers(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, java.nio.IntBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetNumViewers(Pointer disp, IntByReference viewers); - /** - * A display config can have one (or theoretically more) viewers:
- * retrieve the viewer count.
- * @param disp Display config object.
- * @param viewers Number of viewers in the logical display topology,
- * *constant** throughout the active, valid lifetime of a display config
- * object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumViewers(OSVR_DisplayConfig, OSVR_ViewerCount*) - */ - public static native byte osvrClientGetNumViewers(OsvrDisplayLibrary.OSVR_DisplayConfig disp, IntBuffer viewers); - /** - * Get the pose of a viewer in a display config.
- * Note that there may not necessarily be any surfaces rendered from this pose
- * (it's the unused "center" eye in a stereo configuration, for instance) so
- * only use this if it makes integration into your engine or existing
- * applications (not originally designed for stereo) easier.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the pose argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerPose(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_Pose3*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerPose(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerPose(Pointer disp, int viewer, Pointer pose); - /** - * Get the pose of a viewer in a display config.
- * Note that there may not necessarily be any surfaces rendered from this pose
- * (it's the unused "center" eye in a stereo configuration, for instance) so
- * only use this if it makes integration into your engine or existing
- * applications (not originally designed for stereo) easier.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the pose argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerPose(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_Pose3*) - */ - public static native byte osvrClientGetViewerPose(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, Pointer pose); - /** - * Each viewer in a display config can have one or more "eyes" which
- * have a substantially similar pose: get the count.
- * @param disp Display config object.
- * @param viewer Viewer ID
- * @param eyes Number of eyes for this viewer in the logical display
- * topology, **constant** throughout the active, valid lifetime of a display
- * config object
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumEyesForViewer(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount*)
- * @deprecated use the safer method - * {@link #osvrClientGetNumEyesForViewer(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, java.nio.ByteBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetNumEyesForViewer(Pointer disp, int viewer, Pointer eyes); - /** - * Each viewer in a display config can have one or more "eyes" which
- * have a substantially similar pose: get the count.
- * @param disp Display config object.
- * @param viewer Viewer ID
- * @param eyes Number of eyes for this viewer in the logical display
- * topology, **constant** throughout the active, valid lifetime of a display
- * config object
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumEyesForViewer(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount*) - */ - public static native byte osvrClientGetNumEyesForViewer(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, ByteBuffer eyes); - /** - * Get the "viewpoint" for the given eye of a viewer in a display
- * config.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param pose Room-space pose (not relative to pose of the viewer)
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the pose argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyePose(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_Pose3*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyePose(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyePose(Pointer disp, int viewer, byte eye, Pointer pose); - /** - * Get the "viewpoint" for the given eye of a viewer in a display
- * config.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param pose Room-space pose (not relative to pose of the viewer)
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the pose argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyePose(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_Pose3*) - */ - public static native byte osvrClientGetViewerEyePose(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, Pointer pose); - /** - * Get the view matrix (inverse of pose) for the given eye of a
- * viewer in a display config - matrix of **doubles**.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param mat Pass a double[::OSVR_MATRIX_SIZE] to get the transformation
- * matrix from room space to eye space (not relative to pose of the viewer)
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixd(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_MatrixConventions, double*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeViewMatrixd(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, short, java.nio.DoubleBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeViewMatrixd(Pointer disp, int viewer, byte eye, short flags, DoubleByReference mat); - /** - * Get the view matrix (inverse of pose) for the given eye of a
- * viewer in a display config - matrix of **doubles**.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param mat Pass a double[::OSVR_MATRIX_SIZE] to get the transformation
- * matrix from room space to eye space (not relative to pose of the viewer)
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixd(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_MatrixConventions, double*) - */ - public static native byte osvrClientGetViewerEyeViewMatrixd(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, short flags, DoubleBuffer mat); - /** - * Get the view matrix (inverse of pose) for the given eye of a
- * viewer in a display config - matrix of **floats**.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param mat Pass a float[::OSVR_MATRIX_SIZE] to get the transformation
- * matrix from room space to eye space (not relative to pose of the viewer)
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixf(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_MatrixConventions, float*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeViewMatrixf(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, short, java.nio.FloatBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeViewMatrixf(Pointer disp, int viewer, byte eye, short flags, FloatByReference mat); - /** - * Get the view matrix (inverse of pose) for the given eye of a
- * viewer in a display config - matrix of **floats**.
- * Will only succeed if osvrClientCheckDisplayStartup() succeeds.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param mat Pass a float[::OSVR_MATRIX_SIZE] to get the transformation
- * matrix from room space to eye space (not relative to pose of the viewer)
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed or no pose was
- * yet available, in which case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeViewMatrixf(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_MatrixConventions, float*) - */ - public static native byte osvrClientGetViewerEyeViewMatrixf(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, short flags, FloatBuffer mat); - /** - * Each eye of each viewer in a display config has one or more surfaces
- * (aka "screens") on which content should be rendered.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surfaces Number of surfaces (numbered [0, surfaces - 1]) for the
- * given viewer and eye. **Constant** throughout the active, valid lifetime of
- * a display config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumSurfacesForViewerEye(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount*)
- * @deprecated use the safer method - * {@link #osvrClientGetNumSurfacesForViewerEye(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, java.nio.IntBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetNumSurfacesForViewerEye(Pointer disp, int viewer, byte eye, IntByReference surfaces); - /** - * Each eye of each viewer in a display config has one or more surfaces
- * (aka "screens") on which content should be rendered.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surfaces Number of surfaces (numbered [0, surfaces - 1]) for the
- * given viewer and eye. **Constant** throughout the active, valid lifetime of
- * a display config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetNumSurfacesForViewerEye(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount*) - */ - public static native byte osvrClientGetNumSurfacesForViewerEye(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, IntBuffer surfaces); - /** - * Get the dimensions/location of the viewport **within the display
- * input** for a surface seen by an eye of a viewer in a display config. (This
- * does not include other video inputs that may be on a single virtual desktop,
- * etc. or explicitly account for display configurations that use multiple
- * video inputs. It does not necessarily indicate that a viewport in the sense
- * of glViewport must be created with these parameters, though the parameter
- * order matches for convenience.)
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param left Output: Distance in pixels from the left of the video input
- * to the left of the viewport.
- * @param bottom Output: Distance in pixels from the bottom of the video
- * input to the bottom of the viewport.
- * @param width Output: Width of viewport in pixels.
- * @param height Output: Height of viewport in pixels.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output arguments are unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetRelativeViewportForViewerEyeSurface(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_ViewportDimension*, OSVR_ViewportDimension*, OSVR_ViewportDimension*, OSVR_ViewportDimension*)
- * @deprecated use the safer method - * {@link #osvrClientGetRelativeViewportForViewerEyeSurface(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetRelativeViewportForViewerEyeSurface(Pointer disp, int viewer, byte eye, int surface, IntByReference left, IntByReference bottom, IntByReference width, IntByReference height); - /** - * Get the dimensions/location of the viewport **within the display
- * input** for a surface seen by an eye of a viewer in a display config. (This
- * does not include other video inputs that may be on a single virtual desktop,
- * etc. or explicitly account for display configurations that use multiple
- * video inputs. It does not necessarily indicate that a viewport in the sense
- * of glViewport must be created with these parameters, though the parameter
- * order matches for convenience.)
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param left Output: Distance in pixels from the left of the video input
- * to the left of the viewport.
- * @param bottom Output: Distance in pixels from the bottom of the video
- * input to the bottom of the viewport.
- * @param width Output: Width of viewport in pixels.
- * @param height Output: Height of viewport in pixels.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output arguments are unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetRelativeViewportForViewerEyeSurface(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_ViewportDimension*, OSVR_ViewportDimension*, OSVR_ViewportDimension*, OSVR_ViewportDimension*) - */ - public static native byte osvrClientGetRelativeViewportForViewerEyeSurface(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, IntBuffer left, IntBuffer bottom, IntBuffer width, IntBuffer height); - /** - * Get the index of the display input for a surface seen by an eye of a
- * viewer in a display config.
- * This is the OSVR-assigned display input: it may not (and in practice,
- * usually will not) match any platform-specific display indices. This function
- * exists to associate surfaces with video inputs as enumerated by
- * osvrClientGetNumDisplayInputs().
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param displayInput Zero-based index of the display input pixels for
- * this surface are transmitted over.
- * This association is **constant** throughout the active, valid lifetime of a
- * display config object.
- * @see #osvrClientGetNumDisplayInputs(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, java.nio.ByteBuffer) - * @see #osvrClientGetRelativeViewportForViewerEyeSurface(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer) - * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which
- * case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceDisplayInputIndex(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_DisplayInputCount*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeSurfaceDisplayInputIndex(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.ByteBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeSurfaceDisplayInputIndex(Pointer disp, int viewer, byte eye, int surface, Pointer displayInput); - /** - * Get the index of the display input for a surface seen by an eye of a
- * viewer in a display config.
- * This is the OSVR-assigned display input: it may not (and in practice,
- * usually will not) match any platform-specific display indices. This function
- * exists to associate surfaces with video inputs as enumerated by
- * osvrClientGetNumDisplayInputs().
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param displayInput Zero-based index of the display input pixels for
- * this surface are transmitted over.
- * This association is **constant** throughout the active, valid lifetime of a
- * display config object.
- * @see #osvrClientGetNumDisplayInputs(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, java.nio.ByteBuffer) - * @see #osvrClientGetRelativeViewportForViewerEyeSurface(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer) - * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which
- * case the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceDisplayInputIndex(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_DisplayInputCount*) - */ - public static native byte osvrClientGetViewerEyeSurfaceDisplayInputIndex(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, ByteBuffer displayInput); - /** - * Get the projection matrix for a surface seen by an eye of a viewer
- * in a display config. (double version)
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param near Distance from viewpoint to near clipping plane - must be
- * positive.
- * @param far Distance from viewpoint to far clipping plane - must be positive
- * and not equal to near, typically greater than near.
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param matrix Output projection matrix: supply an array of 16
- * (::OSVR_MATRIX_SIZE) doubles.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionMatrixd(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, double, double, OSVR_MatrixConventions, double*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeSurfaceProjectionMatrixd(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, double, double, short, java.nio.DoubleBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeSurfaceProjectionMatrixd(Pointer disp, int viewer, byte eye, int surface, double near, double far, short flags, DoubleByReference matrix); - /** - * Get the projection matrix for a surface seen by an eye of a viewer
- * in a display config. (double version)
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param near Distance from viewpoint to near clipping plane - must be
- * positive.
- * @param far Distance from viewpoint to far clipping plane - must be positive
- * and not equal to near, typically greater than near.
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param matrix Output projection matrix: supply an array of 16
- * (::OSVR_MATRIX_SIZE) doubles.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionMatrixd(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, double, double, OSVR_MatrixConventions, double*) - */ - public static native byte osvrClientGetViewerEyeSurfaceProjectionMatrixd(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, double near, double far, short flags, DoubleBuffer matrix); - /** - * Get the projection matrix for a surface seen by an eye of a viewer
- * in a display config. (float version)
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param near Distance to near clipping plane - must be nonzero, typically
- * positive.
- * @param far Distance to far clipping plane - must be nonzero, typically
- * positive and greater than near.
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param matrix Output projection matrix: supply an array of 16
- * (::OSVR_MATRIX_SIZE) floats.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionMatrixf(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, float, float, OSVR_MatrixConventions, float*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeSurfaceProjectionMatrixf(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, float, float, short, java.nio.FloatBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeSurfaceProjectionMatrixf(Pointer disp, int viewer, byte eye, int surface, float near, float far, short flags, FloatByReference matrix); - /** - * Get the projection matrix for a surface seen by an eye of a viewer
- * in a display config. (float version)
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param near Distance to near clipping plane - must be nonzero, typically
- * positive.
- * @param far Distance to far clipping plane - must be nonzero, typically
- * positive and greater than near.
- * @param flags Bitwise OR of matrix convention flags (see @ref MatrixFlags)
- * @param matrix Output projection matrix: supply an array of 16
- * (::OSVR_MATRIX_SIZE) floats.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionMatrixf(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, float, float, OSVR_MatrixConventions, float*) - */ - public static native byte osvrClientGetViewerEyeSurfaceProjectionMatrixf(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, float near, float far, short flags, FloatBuffer matrix); - /** - * Get the clipping planes (positions at unit distance) for a surface
- * seen by an eye of a viewer
- * in a display config.
- * This is only for use in integrations that cannot accept a fully-formulated
- * projection matrix as returned by
- * osvrClientGetViewerEyeSurfaceProjectionMatrixf() or
- * osvrClientGetViewerEyeSurfaceProjectionMatrixd(), and may not necessarily
- * provide the same optimizations.
- * As all the planes are given at unit (1) distance, before passing these
- * planes to a consuming function in your application/engine, you will typically
- * divide them by your near clipping plane distance.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param left Distance to left clipping plane
- * @param right Distance to right clipping plane
- * @param bottom Distance to bottom clipping plane
- * @param top Distance to top clipping plane
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output arguments are unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionClippingPlanes(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, double*, double*, double*, double*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeSurfaceProjectionClippingPlanes(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.DoubleBuffer, java.nio.DoubleBuffer, java.nio.DoubleBuffer, java.nio.DoubleBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeSurfaceProjectionClippingPlanes(Pointer disp, int viewer, byte eye, int surface, DoubleByReference left, DoubleByReference right, DoubleByReference bottom, DoubleByReference top); - /** - * Get the clipping planes (positions at unit distance) for a surface
- * seen by an eye of a viewer
- * in a display config.
- * This is only for use in integrations that cannot accept a fully-formulated
- * projection matrix as returned by
- * osvrClientGetViewerEyeSurfaceProjectionMatrixf() or
- * osvrClientGetViewerEyeSurfaceProjectionMatrixd(), and may not necessarily
- * provide the same optimizations.
- * As all the planes are given at unit (1) distance, before passing these
- * planes to a consuming function in your application/engine, you will typically
- * divide them by your near clipping plane distance.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param left Distance to left clipping plane
- * @param right Distance to right clipping plane
- * @param bottom Distance to bottom clipping plane
- * @param top Distance to top clipping plane
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output arguments are unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceProjectionClippingPlanes(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, double*, double*, double*, double*) - */ - public static native byte osvrClientGetViewerEyeSurfaceProjectionClippingPlanes(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, DoubleBuffer left, DoubleBuffer right, DoubleBuffer bottom, DoubleBuffer top); - /** - * Determines if a surface seen by an eye of a viewer in a display
- * config requests some distortion to be performed.
- * This simply reports true or false, and does not specify which kind of
- * distortion implementations have been parameterized for this display. For
- * each distortion implementation your application supports, you'll want to
- * call the corresponding priority function to find out if it is available.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param distortionRequested Output parameter: whether distortion is
- * requested. **Constant** throughout the active, valid lifetime of a display
- * config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientDoesViewerEyeSurfaceWantDistortion(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_CBool*)
- * @deprecated use the safer method - * {@link #osvrClientDoesViewerEyeSurfaceWantDistortion(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.ByteBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientDoesViewerEyeSurfaceWantDistortion(Pointer disp, int viewer, byte eye, int surface, Pointer distortionRequested); - /** - * Determines if a surface seen by an eye of a viewer in a display
- * config requests some distortion to be performed.
- * This simply reports true or false, and does not specify which kind of
- * distortion implementations have been parameterized for this display. For
- * each distortion implementation your application supports, you'll want to
- * call the corresponding priority function to find out if it is available.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param distortionRequested Output parameter: whether distortion is
- * requested. **Constant** throughout the active, valid lifetime of a display
- * config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientDoesViewerEyeSurfaceWantDistortion(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_CBool*) - */ - public static native byte osvrClientDoesViewerEyeSurfaceWantDistortion(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, ByteBuffer distortionRequested); - /** - * Returns the priority/availability of radial distortion parameters for
- * a surface seen by an eye of a viewer in a display config.
- * If osvrClientDoesViewerEyeSurfaceWantDistortion() reports false, then the
- * display does not request distortion of any sort, and thus neither this nor
- * any other distortion strategy priority function will report an "available"
- * priority.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param priority Output: the priority level. Negative values
- * (canonically OSVR_DISTORTION_PRIORITY_UNAVAILABLE) indicate this technique
- * not available, higher values indicate higher preference for the given
- * technique based on the device's description. **Constant** throughout the
- * active, valid lifetime of a display config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceRadialDistortionPriority(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_DistortionPriority*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeSurfaceRadialDistortionPriority(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, java.nio.IntBuffer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeSurfaceRadialDistortionPriority(Pointer disp, int viewer, byte eye, int surface, IntByReference priority); - /** - * Returns the priority/availability of radial distortion parameters for
- * a surface seen by an eye of a viewer in a display config.
- * If osvrClientDoesViewerEyeSurfaceWantDistortion() reports false, then the
- * display does not request distortion of any sort, and thus neither this nor
- * any other distortion strategy priority function will report an "available"
- * priority.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param priority Output: the priority level. Negative values
- * (canonically OSVR_DISTORTION_PRIORITY_UNAVAILABLE) indicate this technique
- * not available, higher values indicate higher preference for the given
- * technique based on the device's description. **Constant** throughout the
- * active, valid lifetime of a display config object.
- * @return OSVR_RETURN_FAILURE if invalid parameters were passed, in which case
- * the output argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceRadialDistortionPriority(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_DistortionPriority*) - */ - public static native byte osvrClientGetViewerEyeSurfaceRadialDistortionPriority(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, IntBuffer priority); - /** - * Returns the radial distortion parameters, if known/requested, for a
- * surface seen by an eye of a viewer in a display config.
- * Will only succeed if osvrClientGetViewerEyeSurfaceRadialDistortionPriority()
- * reports a non-negative priority.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param params Output: the parameters for radial distortion
- * @return OSVR_RETURN_FAILURE if this surface does not have these parameters
- * described, or if invalid parameters were passed, in which case the output
- * argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceRadialDistortion(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_RadialDistortionParameters*)
- * @deprecated use the safer method - * {@link #osvrClientGetViewerEyeSurfaceRadialDistortion(com.jme3.system.osvr.osvrdisplay.OsvrDisplayLibrary.OSVR_DisplayConfig, int, byte, int, com.sun.jna.Pointer)} - * instead - */ - @Deprecated - public static native byte osvrClientGetViewerEyeSurfaceRadialDistortion(Pointer disp, int viewer, byte eye, int surface, Pointer params); - /** - * Returns the radial distortion parameters, if known/requested, for a
- * surface seen by an eye of a viewer in a display config.
- * Will only succeed if osvrClientGetViewerEyeSurfaceRadialDistortionPriority()
- * reports a non-negative priority.
- * @param disp Display config object
- * @param viewer Viewer ID
- * @param eye Eye ID
- * @param surface Surface ID
- * @param params Output: the parameters for radial distortion
- * @return OSVR_RETURN_FAILURE if this surface does not have these parameters
- * described, or if invalid parameters were passed, in which case the output
- * argument is unmodified.
- * Original signature : OSVR_ReturnCode osvrClientGetViewerEyeSurfaceRadialDistortion(OSVR_DisplayConfig, OSVR_ViewerCount, OSVR_EyeCount, OSVR_SurfaceCount, OSVR_RadialDistortionParameters*) - */ - public static native byte osvrClientGetViewerEyeSurfaceRadialDistortion(OsvrDisplayLibrary.OSVR_DisplayConfig disp, int viewer, byte eye, int surface, Pointer params); - public static class OSVR_ClientContext extends PointerType { - public OSVR_ClientContext(Pointer address) { - super(address); - } - public OSVR_ClientContext() { - super(); - } - }; - public static class OSVR_DisplayConfig extends PointerType { - public OSVR_DisplayConfig(Pointer address) { - super(address); - } - public OSVR_DisplayConfig() { - super(); - } - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrinterface/OsvrInterfaceLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrinterface/OsvrInterfaceLibrary.java deleted file mode 100644 index 2a1c69476f..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrinterface/OsvrInterfaceLibrary.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.jme3.system.osvr.osvrinterface; -import com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientInterface; -import com.jme3.system.osvr.osvrclientreporttypes.OSVR_Pose3; -import com.jme3.system.osvr.osvrtimevalue.OSVR_TimeValue; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -/** - * JNA Wrapper for library osvrInterface
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrInterfaceLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrClientKit"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrInterfaceLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrInterfaceLibrary.class, OsvrInterfaceLibrary.JNA_NATIVE_LIB); - } - - /** Manually added */ - public static native byte osvrGetPoseState(OSVR_ClientInterface iface, OSVR_TimeValue timestamp, OSVR_Pose3 state); - -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Pose3.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Pose3.java deleted file mode 100644 index 8ec8f7cfa4..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Pose3.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrmatrixconventions; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Pose3 extends Structure { - /** C type : OSVR_Vec3 */ - public OSVR_Vec3 translation; - /** C type : OSVR_Quaternion */ - public OSVR_Quaternion rotation; - public OSVR_Pose3() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("translation", "rotation"); - } - /** - * @param translation C type : OSVR_Vec3
- * @param rotation C type : OSVR_Quaternion - */ - public OSVR_Pose3(OSVR_Vec3 translation, OSVR_Quaternion rotation) { - super(); - this.translation = translation; - this.rotation = rotation; - } - public OSVR_Pose3(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Pose3 implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Pose3 implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Quaternion.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Quaternion.java deleted file mode 100644 index 4627040206..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Quaternion.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrmatrixconventions; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Quaternion extends Structure { - /** C type : double[4] */ - public double[] data = new double[4]; - public OSVR_Quaternion() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("data"); - } - /** @param data C type : double[4] */ - public OSVR_Quaternion(double data[]) { - super(); - if ((data.length != this.data.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.data = data; - } - public OSVR_Quaternion(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Quaternion implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Quaternion implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Vec3.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Vec3.java deleted file mode 100644 index 7aa44a9793..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OSVR_Vec3.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrmatrixconventions; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_Vec3 extends Structure { - /** C type : double[3] */ - public double[] data = new double[3]; - public OSVR_Vec3() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("data"); - } - /** @param data C type : double[3] */ - public OSVR_Vec3(double data[]) { - super(); - if ((data.length != this.data.length)) - throw new IllegalArgumentException("Wrong array size !"); - this.data = data; - } - public OSVR_Vec3(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_Vec3 implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_Vec3 implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OsvrMatrixConventionsLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OsvrMatrixConventionsLibrary.java deleted file mode 100644 index 384dd827ce..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrmatrixconventions/OsvrMatrixConventionsLibrary.java +++ /dev/null @@ -1,192 +0,0 @@ -package com.jme3.system.osvr.osvrmatrixconventions; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.Pointer; -import com.sun.jna.PointerType; -import com.sun.jna.ptr.DoubleByReference; -import com.sun.jna.ptr.FloatByReference; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -/** - * JNA Wrapper for library osvrMatrixConventions
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrMatrixConventionsLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrUtil"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrMatrixConventionsLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrMatrixConventionsLibrary.class, OsvrMatrixConventionsLibrary.JNA_NATIVE_LIB); - } - /** enum values */ - public static interface OSVR_MatrixMasks { - public static final int OSVR_MATRIX_MASK_ROWMAJOR = 0x1; - public static final int OSVR_MATRIX_MASK_ROWVECTORS = 0x2; - public static final int OSVR_MATRIX_MASK_LHINPUT = 0x4; - public static final int OSVR_MATRIX_MASK_UNSIGNEDZ = 0x8; - }; - /** enum values */ - public static interface OSVR_MatrixOrderingFlags { - public static final int OSVR_MATRIX_COLMAJOR = 0x0; - public static final int OSVR_MATRIX_ROWMAJOR = OsvrMatrixConventionsLibrary.OSVR_MatrixMasks.OSVR_MATRIX_MASK_ROWMAJOR; - }; - /** enum values */ - public static interface OSVR_MatrixVectorFlags { - public static final int OSVR_MATRIX_COLVECTORS = 0x0; - public static final int OSVR_MATRIX_ROWVECTORS = OsvrMatrixConventionsLibrary.OSVR_MatrixMasks.OSVR_MATRIX_MASK_ROWVECTORS; - }; - /** enum values */ - public static interface OSVR_ProjectionMatrixInputFlags { - public static final int OSVR_MATRIX_RHINPUT = 0x0; - public static final int OSVR_MATRIX_LHINPUT = OsvrMatrixConventionsLibrary.OSVR_MatrixMasks.OSVR_MATRIX_MASK_LHINPUT; - }; - /** enum values */ - public static interface OSVR_ProjectionMatrixZFlags { - public static final int OSVR_MATRIX_SIGNEDZ = 0x0; - public static final int OSVR_MATRIX_UNSIGNEDZ = OsvrMatrixConventionsLibrary.OSVR_MatrixMasks.OSVR_MATRIX_MASK_UNSIGNEDZ; - }; - public static final int OSVR_MATRIX_SIZE = 16; - public static final int OSVR_RETURN_SUCCESS = 0; - public static final int OSVR_RETURN_FAILURE = 1; - /** Original signature : double osvrVec3GetX(const OSVR_Vec3*) */ - public static native double osvrVec3GetX(OSVR_Vec3 v); - /** Original signature : void osvrVec3SetX(OSVR_Vec3*, double) */ - public static native void osvrVec3SetX(OSVR_Vec3 v, double val); - /** Original signature : double osvrVec3GetY(const OSVR_Vec3*) */ - public static native double osvrVec3GetY(OSVR_Vec3 v); - /** Original signature : void osvrVec3SetY(OSVR_Vec3*, double) */ - public static native void osvrVec3SetY(OSVR_Vec3 v, double val); - /** Original signature : double osvrVec3GetZ(const OSVR_Vec3*) */ - public static native double osvrVec3GetZ(OSVR_Vec3 v); - /** Original signature : void osvrVec3SetZ(OSVR_Vec3*, double) */ - public static native void osvrVec3SetZ(OSVR_Vec3 v, double val); - /** - * Set a Vec3 to the zero vector
- * Original signature : void osvrVec3Zero(OSVR_Vec3*) - */ - public static native void osvrVec3Zero(OSVR_Vec3 v); - /** Original signature : double osvrQuatGetW(const OSVR_Quaternion*) */ - public static native double osvrQuatGetW(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetW(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetW(OSVR_Quaternion q, double val); - /** Original signature : double osvrQuatGetX(const OSVR_Quaternion*) */ - public static native double osvrQuatGetX(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetX(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetX(OSVR_Quaternion q, double val); - /** Original signature : double osvrQuatGetY(const OSVR_Quaternion*) */ - public static native double osvrQuatGetY(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetY(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetY(OSVR_Quaternion q, double val); - /** Original signature : double osvrQuatGetZ(const OSVR_Quaternion*) */ - public static native double osvrQuatGetZ(OSVR_Quaternion q); - /** Original signature : void osvrQuatSetZ(OSVR_Quaternion*, double) */ - public static native void osvrQuatSetZ(OSVR_Quaternion q, double val); - /** - * Set a quaternion to the identity rotation
- * Original signature : void osvrQuatSetIdentity(OSVR_Quaternion*) - */ - public static native void osvrQuatSetIdentity(OSVR_Quaternion q); - /** - * Set a pose to identity
- * Original signature : void osvrPose3SetIdentity(OSVR_Pose3*) - */ - public static native void osvrPose3SetIdentity(OSVR_Pose3 pose); - /** - * Set a matrix of doubles based on a Pose3.
- * @param pose The Pose3 to convert
- * @param flags Memory ordering flag - see @ref MatrixFlags
- * @param mat an array of 16 doubles
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrixd(const OSVR_Pose3*, OSVR_MatrixConventions, double*)
- * @deprecated use the safer method - * {@link #osvrPose3ToMatrixd(com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3, short, java.nio.DoubleBuffer)} - * instead - */ - @Deprecated - public static native byte osvrPose3ToMatrixd(OSVR_Pose3 pose, short flags, DoubleByReference mat); - /** - * Set a matrix of doubles based on a Pose3.
- * @param pose The Pose3 to convert
- * @param flags Memory ordering flag - see @ref MatrixFlags
- * @param mat an array of 16 doubles
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrixd(const OSVR_Pose3*, OSVR_MatrixConventions, double*) - */ - public static native byte osvrPose3ToMatrixd(OSVR_Pose3 pose, short flags, DoubleBuffer mat); - /** - * Set a matrix of floats based on a Pose3.
- * @param pose The Pose3 to convert
- * @param flags Memory ordering flag - see @ref MatrixFlags
- * @param mat an array of 16 floats
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrixf(const OSVR_Pose3*, OSVR_MatrixConventions, float*)
- * @deprecated use the safer method - * {@link #osvrPose3ToMatrixf(com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3, short, java.nio.FloatBuffer)} - * instead - */ - @Deprecated - public static native byte osvrPose3ToMatrixf(OSVR_Pose3 pose, short flags, FloatByReference mat); - /** - * Set a matrix of floats based on a Pose3.
- * @param pose The Pose3 to convert
- * @param flags Memory ordering flag - see @ref MatrixFlags
- * @param mat an array of 16 floats
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrixf(const OSVR_Pose3*, OSVR_MatrixConventions, float*) - */ - public static native byte osvrPose3ToMatrixf(OSVR_Pose3 pose, short flags, FloatBuffer mat); - /** - * Set a matrix based on a Pose3. (C++-only overload - detecting scalar
- * type)
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrix(const OSVR_Pose3*, OSVR_MatrixConventions, double*)
- * @deprecated use the safer method - * {@link #osvrPose3ToMatrix(com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3, short, java.nio.DoubleBuffer)} - * instead - */ - @Deprecated - public static native byte osvrPose3ToMatrix(OSVR_Pose3 pose, short flags, DoubleByReference mat); - /** - * Set a matrix based on a Pose3. (C++-only overload - detecting scalar
- * type)
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrix(const OSVR_Pose3*, OSVR_MatrixConventions, double*) - */ - public static native byte osvrPose3ToMatrix(OSVR_Pose3 pose, short flags, DoubleBuffer mat); - /** - * Set a matrix based on a Pose3. (C++-only overload - detecting scalar
- * type)
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrix(const OSVR_Pose3*, OSVR_MatrixConventions, float*)
- * @deprecated use the safer method - * {@link #osvrPose3ToMatrix(com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3, short, java.nio.FloatBuffer)} - * instead - */ - @Deprecated - public static native byte osvrPose3ToMatrix(OSVR_Pose3 pose, short flags, FloatByReference mat); - /** - * Set a matrix based on a Pose3. (C++-only overload - detecting scalar
- * type)
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrix(const OSVR_Pose3*, OSVR_MatrixConventions, float*) - */ - public static native byte osvrPose3ToMatrix(OSVR_Pose3 pose, short flags, FloatBuffer mat); - /** - * Set a matrix based on a Pose3. (C++-only overload - detects scalar
- * and takes array rather than pointer)
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrix(const OSVR_Pose3*, OSVR_MatrixConventions, Scalar[OSVR_MATRIX_SIZE])
- * @deprecated use the safer method - * {@link #osvrPose3ToMatrix(com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3, short, java.nio.DoubleBuffer)} - * instead - */ - @Deprecated - public static native byte osvrPose3ToMatrix(OSVR_Pose3 pose, short flags, Pointer mat); - /** - * Set a matrix based on a Pose3. (C++-only overload - detects scalar
- * and takes array rather than pointer)
- * Original signature : OSVR_ReturnCode osvrPose3ToMatrix(const OSVR_Pose3*, OSVR_MatrixConventions, Scalar[OSVR_MATRIX_SIZE]) - */ - public static native byte osvrPose3ToMatrix(OSVR_Pose3 pose, short flags, OsvrMatrixConventionsLibrary.Scalar mat[]); - public static class Scalar extends PointerType { - public Scalar(Pointer address) { - super(address); - } - public Scalar() { - super(); - } - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_ProjectionMatrix.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_ProjectionMatrix.java deleted file mode 100644 index 2ebeb8f2fe..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_ProjectionMatrix.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanager; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_ProjectionMatrix extends Structure { - public double left; - public double right; - public double top; - public double bottom; - /** Cannot name "near" because Visual Studio keyword */ - public double nearClip; - public double farClip; - public OSVR_ProjectionMatrix() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("left", "right", "top", "bottom", "nearClip", "farClip"); - } - /** @param nearClip Cannot name "near" because Visual Studio keyword */ - public OSVR_ProjectionMatrix(double left, double right, double top, double bottom, double nearClip, double farClip) { - super(); - this.left = left; - this.right = right; - this.top = top; - this.bottom = bottom; - this.nearClip = nearClip; - this.farClip = farClip; - } - public OSVR_ProjectionMatrix(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_ProjectionMatrix implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_ProjectionMatrix implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_RGB.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_RGB.java deleted file mode 100644 index 4fca69fc4c..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_RGB.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanager; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_RGB extends Structure { - public float r; - public float g; - public float b; - public OSVR_RGB() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("r", "g", "b"); - } - public OSVR_RGB(float r, float g, float b) { - super(); - this.r = r; - this.g = g; - this.b = b; - } - public OSVR_RGB(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_RGB implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_RGB implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_RenderParams.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_RenderParams.java deleted file mode 100644 index ea094d4f3e..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_RenderParams.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanager; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_RenderParams extends Structure { - /** - * Room space to insert
- * C type : OSVR_PoseState* - */ - public Pointer worldFromRoomAppend; - /** - * Overrides head space
- * C type : OSVR_PoseState* - */ - public Pointer roomFromHeadReplace; - public double nearClipDistanceMeters; - public double farClipDistanceMeters; - public OSVR_RenderParams() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("worldFromRoomAppend", "roomFromHeadReplace", "nearClipDistanceMeters", "farClipDistanceMeters"); - } - /** - * @param worldFromRoomAppend Room space to insert
- * C type : OSVR_PoseState*
- * @param roomFromHeadReplace Overrides head space
- * C type : OSVR_PoseState* - */ - public OSVR_RenderParams(Pointer worldFromRoomAppend, Pointer roomFromHeadReplace, double nearClipDistanceMeters, double farClipDistanceMeters) { - super(); - this.worldFromRoomAppend = worldFromRoomAppend; - this.roomFromHeadReplace = roomFromHeadReplace; - this.nearClipDistanceMeters = nearClipDistanceMeters; - this.farClipDistanceMeters = farClipDistanceMeters; - } - public OSVR_RenderParams(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_RenderParams implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_RenderParams implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_ViewportDescription.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_ViewportDescription.java deleted file mode 100644 index 2e38658290..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OSVR_ViewportDescription.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanager; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_ViewportDescription extends Structure { - /** Left side of the viewport in pixels */ - public double left; - /** First pixel in the viewport at the bottom. */ - public double lower; - /** Last pixel in the viewport at the top */ - public double width; - /** Last pixel on the right of the viewport in pixels */ - public double height; - public OSVR_ViewportDescription() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("left", "lower", "width", "height"); - } - /** - * @param left Left side of the viewport in pixels
- * @param lower First pixel in the viewport at the bottom.
- * @param width Last pixel in the viewport at the top
- * @param height Last pixel on the right of the viewport in pixels - */ - public OSVR_ViewportDescription(double left, double lower, double width, double height) { - super(); - this.left = left; - this.lower = lower; - this.width = width; - this.height = height; - } - public OSVR_ViewportDescription(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_ViewportDescription implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_ViewportDescription implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OsvrRenderManagerLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OsvrRenderManagerLibrary.java deleted file mode 100644 index 649c222d26..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanager/OsvrRenderManagerLibrary.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanager; -import com.ochafik.lang.jnaerator.runtime.NativeSizeByReference; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.Pointer; -import com.sun.jna.ptr.DoubleByReference; -import com.sun.jna.ptr.FloatByReference; -import com.sun.jna.ptr.PointerByReference; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -/** - * JNA Wrapper for library osvrRenderManager
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrRenderManagerLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrRenderManager"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrRenderManagerLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrRenderManagerLibrary.class, OsvrRenderManagerLibrary.JNA_NATIVE_LIB); - } - /** enum values */ - public static interface OSVR_OpenStatus { - public static final int OSVR_OPEN_STATUS_FAILURE = 0; - public static final int OSVR_OPEN_STATUS_PARTIAL = 1; - public static final int OSVR_OPEN_STATUS_COMPLETE = 2; - }; - /** - * todo OSVR_RenderTimingInfo. - * Original signature : OSVR_ReturnCode osvrDestroyRenderManager(OSVR_RenderManager) - */ - public static native byte osvrDestroyRenderManager(Pointer renderManager); - /** - * todo Make this actually cache, for now it does not.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetNumRenderInfo(OSVR_RenderManager, OSVR_RenderParams, OSVR_RenderInfoCount*) - */ - public static native byte osvrRenderManagerGetNumRenderInfo(Pointer renderManager, OSVR_RenderParams.ByValue renderParams, NativeSizeByReference numRenderInfoOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerGetDoingOkay(OSVR_RenderManager) */ - public static native byte osvrRenderManagerGetDoingOkay(Pointer renderManager); - /** Original signature : OSVR_ReturnCode osvrRenderManagerGetDefaultRenderParams(OSVR_RenderParams*) */ - public static native byte osvrRenderManagerGetDefaultRenderParams(OSVR_RenderParams renderParamsOut); - /** - * must be registered before they are presented.
- * Original signature : OSVR_ReturnCode osvrRenderManagerStartPresentRenderBuffers(OSVR_RenderManagerPresentState*) - */ - public static native byte osvrRenderManagerStartPresentRenderBuffers(PointerByReference presentStateOut); - /** - * buffers for a single frame. This sequence starts with the Start function.
- * Original signature : OSVR_ReturnCode osvrRenderManagerFinishPresentRenderBuffers(OSVR_RenderManager, OSVR_RenderManagerPresentState, OSVR_RenderParams, OSVR_CBool) - */ - public static native byte osvrRenderManagerFinishPresentRenderBuffers(Pointer renderManager, Pointer presentState, OSVR_RenderParams.ByValue renderParams, byte shouldFlipY); - /** - * must be registered before they are presented.
- * Original signature : OSVR_ReturnCode osvrRenderManagerStartRegisterRenderBuffers(OSVR_RenderManagerRegisterBufferState*) - */ - public static native byte osvrRenderManagerStartRegisterRenderBuffers(PointerByReference registerBufferStateOut); - /** - * buffers for a single frame. This sequence starts with the Start function.
- * Original signature : OSVR_ReturnCode osvrRenderManagerFinishRegisterRenderBuffers(OSVR_RenderManager, OSVR_RenderManagerRegisterBufferState, OSVR_CBool) - */ - public static native byte osvrRenderManagerFinishRegisterRenderBuffers(Pointer renderManager, Pointer registerBufferState, byte appWillNotOverwriteBeforeNewPresent); - /** Original signature : OSVR_ReturnCode osvrRenderManagerPresentSolidColorf(OSVR_RenderManager, OSVR_RGB_FLOAT) */ - public static native byte osvrRenderManagerPresentSolidColorf(Pointer renderManager, com.jme3.system.osvr.osvrrendermanager.OSVR_RGB.ByValue rgb); - /** - * when you're done.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetRenderInfoCollection(OSVR_RenderManager, OSVR_RenderParams, OSVR_RenderInfoCollection*) - */ - public static native byte osvrRenderManagerGetRenderInfoCollection(Pointer renderManager, OSVR_RenderParams.ByValue renderParams, PointerByReference renderInfoCollectionOut); - /** - * Releases the OSVR_RenderInfoCollection.
- * Original signature : OSVR_ReturnCode osvrRenderManagerReleaseRenderInfoCollection(OSVR_RenderInfoCollection) - */ - public static native byte osvrRenderManagerReleaseRenderInfoCollection(Pointer renderInfoCollection); - /** - * Get the size of the OSVR_RenderInfoCollection.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetNumRenderInfoInCollection(OSVR_RenderInfoCollection, OSVR_RenderInfoCount*) - */ - public static native byte osvrRenderManagerGetNumRenderInfoInCollection(Pointer renderInfoCollection, NativeSizeByReference countOut); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_OpenGL(double*, OSVR_ProjectionMatrix)
- * @deprecated use the safer methods {@link #OSVR_Projection_to_OpenGL(java.nio.DoubleBuffer, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue)} and {@link #OSVR_Projection_to_OpenGL(com.sun.jna.ptr.DoubleByReference, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue)} instead - */ - @Deprecated - public static native byte OSVR_Projection_to_OpenGL(DoubleByReference OpenGL_out, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_OpenGL(double*, OSVR_ProjectionMatrix) - */ - public static native byte OSVR_Projection_to_OpenGL(DoubleBuffer OpenGL_out, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_D3D(float[16], OSVR_ProjectionMatrix)
- * @deprecated use the safer methods {@link #OSVR_Projection_to_D3D(java.nio.FloatBuffer, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue)} and {@link #OSVR_Projection_to_D3D(com.sun.jna.ptr.FloatByReference, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue)} instead - */ - @Deprecated - public static native byte OSVR_Projection_to_D3D(FloatByReference D3D_out, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_D3D(float[16], OSVR_ProjectionMatrix) - */ - public static native byte OSVR_Projection_to_D3D(FloatBuffer D3D_out, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_Unreal(float[16], OSVR_ProjectionMatrix)
- * @deprecated use the safer methods {@link #OSVR_Projection_to_Unreal(java.nio.FloatBuffer, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue)} and {@link #OSVR_Projection_to_Unreal(com.sun.jna.ptr.FloatByReference, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue)} instead - */ - @Deprecated - public static native byte OSVR_Projection_to_Unreal(FloatByReference Unreal_out, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_Unreal(float[16], OSVR_ProjectionMatrix) - */ - public static native byte OSVR_Projection_to_Unreal(FloatBuffer Unreal_out, com.jme3.system.osvr.osvrrendermanager.OSVR_ProjectionMatrix.ByValue projection_in); -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_GraphicsLibraryOpenGL.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_GraphicsLibraryOpenGL.java deleted file mode 100644 index f52a83387b..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_GraphicsLibraryOpenGL.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_GraphicsLibraryOpenGL extends Structure { - /** C type : const OSVR_OpenGLToolkitFunctions* */ - public com.jme3.system.osvr.osvrrendermanageropengl.OSVR_OpenGLToolkitFunctions.ByReference toolkit; - public OSVR_GraphicsLibraryOpenGL() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("toolkit"); - } - /** @param toolkit C type : const OSVR_OpenGLToolkitFunctions* */ - public OSVR_GraphicsLibraryOpenGL(com.jme3.system.osvr.osvrrendermanageropengl.OSVR_OpenGLToolkitFunctions.ByReference toolkit) { - super(); - this.toolkit = toolkit; - } - public OSVR_GraphicsLibraryOpenGL(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_GraphicsLibraryOpenGL implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_GraphicsLibraryOpenGL implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenGLContextParams.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenGLContextParams.java deleted file mode 100644 index 185a2d5bb8..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenGLContextParams.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_OpenGLContextParams extends Structure { - /** C type : const char* */ - public Pointer windowTitle; - /** C type : OSVR_CBool */ - public byte fullScreen; - public int width; - public int height; - public int xPos; - public int yPos; - public int bitsPerPixel; - public int numBuffers; - /** C type : OSVR_CBool */ - public byte visible; - public OSVR_OpenGLContextParams() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("windowTitle", "fullScreen", "width", "height", "xPos", "yPos", "bitsPerPixel", "numBuffers", "visible"); - } - /** - * @param windowTitle C type : const char*
- * @param fullScreen C type : OSVR_CBool
- * @param visible C type : OSVR_CBool - */ - public OSVR_OpenGLContextParams(Pointer windowTitle, byte fullScreen, int width, int height, int xPos, int yPos, int bitsPerPixel, int numBuffers, byte visible) { - super(); - this.windowTitle = windowTitle; - this.fullScreen = fullScreen; - this.width = width; - this.height = height; - this.xPos = xPos; - this.yPos = yPos; - this.bitsPerPixel = bitsPerPixel; - this.numBuffers = numBuffers; - this.visible = visible; - } - public OSVR_OpenGLContextParams(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_OpenGLContextParams implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_OpenGLContextParams implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenGLToolkitFunctions.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenGLToolkitFunctions.java deleted file mode 100644 index e32b3901f3..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenGLToolkitFunctions.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.ochafik.lang.jnaerator.runtime.NativeSize; -import com.sun.jna.Callback; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import com.sun.jna.ptr.IntByReference; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_OpenGLToolkitFunctions extends Structure { - public NativeSize size; - /** C type : void* */ - public Pointer data; - /** C type : create_callback* */ - public OSVR_OpenGLToolkitFunctions.create_callback create; - /** C type : destroy_callback* */ - public OSVR_OpenGLToolkitFunctions.destroy_callback destroy; - /** C type : handleEvents_callback* */ - public OSVR_OpenGLToolkitFunctions.handleEvents_callback handleEvents; - /** C type : getDisplayFrameBuffer_callback* */ - public OSVR_OpenGLToolkitFunctions.getDisplayFrameBuffer_callback getDisplayFrameBuffer; - /** C type : getDisplaySizeOverride_callback* */ - public OSVR_OpenGLToolkitFunctions.getDisplaySizeOverride_callback getDisplaySizeOverride; - public interface create_callback extends Callback { - void apply(Pointer data); - }; - public interface destroy_callback extends Callback { - void apply(Pointer data); - }; - public interface OSVR_CBool_callback extends Callback { - int apply(Pointer data, OSVR_OpenGLContextParams p); - }; - public interface OSVR_CBool_callback2 extends Callback { - int apply(Pointer data); - }; - public interface OSVR_CBool_callback3 extends Callback { - int apply(Pointer data, NativeSize display); - }; - public interface OSVR_CBool_callback4 extends Callback { - int apply(Pointer data, NativeSize display); - }; - public interface OSVR_CBool_callback5 extends Callback { - int apply(Pointer data, byte verticalSync); - }; - public interface handleEvents_callback extends Callback { - byte apply(Pointer data); - }; - public interface getDisplayFrameBuffer_callback extends Callback { - byte apply(Pointer data, NativeSize display, IntByReference frameBufferOut); - }; - public interface getDisplaySizeOverride_callback extends Callback { - byte apply(Pointer data, NativeSize display, IntByReference width, IntByReference height); - }; - public OSVR_OpenGLToolkitFunctions() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("size", "data", "create", "destroy", "handleEvents", "getDisplayFrameBuffer", "getDisplaySizeOverride"); - } - /** - * @param data C type : void*
- * @param create C type : create_callback*
- * @param destroy C type : destroy_callback*
- * @param handleEvents C type : handleEvents_callback*
- * @param getDisplayFrameBuffer C type : getDisplayFrameBuffer_callback*
- * @param getDisplaySizeOverride C type : getDisplaySizeOverride_callback* - */ - public OSVR_OpenGLToolkitFunctions(NativeSize size, Pointer data, OSVR_OpenGLToolkitFunctions.create_callback create, OSVR_OpenGLToolkitFunctions.destroy_callback destroy, OSVR_OpenGLToolkitFunctions.handleEvents_callback handleEvents, OSVR_OpenGLToolkitFunctions.getDisplayFrameBuffer_callback getDisplayFrameBuffer, OSVR_OpenGLToolkitFunctions.getDisplaySizeOverride_callback getDisplaySizeOverride) { - super(); - this.size = size; - this.data = data; - this.create = create; - this.destroy = destroy; - this.handleEvents = handleEvents; - this.getDisplayFrameBuffer = getDisplayFrameBuffer; - this.getDisplaySizeOverride = getDisplaySizeOverride; - } - public OSVR_OpenGLToolkitFunctions(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_OpenGLToolkitFunctions implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_OpenGLToolkitFunctions implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenResultsOpenGL.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenResultsOpenGL.java deleted file mode 100644 index 85e020f6e7..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_OpenResultsOpenGL.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_OpenResultsOpenGL extends Structure { - /** - * C type : OSVR_OpenStatus - */ - public int status; - /** C type : OSVR_GraphicsLibraryOpenGL */ - public OSVR_GraphicsLibraryOpenGL library; - /** C type : OSVR_RenderBufferOpenGL */ - public OSVR_RenderBufferOpenGL buffers; - public OSVR_OpenResultsOpenGL() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("status", "library", "buffers"); - } - /** - * @param status @see OsvrRenderManagerOpenGLLibrary.OSVR_OpenStatus
- * C type : OSVR_OpenStatus
- * @param library C type : OSVR_GraphicsLibraryOpenGL
- * @param buffers C type : OSVR_RenderBufferOpenGL - */ - public OSVR_OpenResultsOpenGL(int status, OSVR_GraphicsLibraryOpenGL library, OSVR_RenderBufferOpenGL buffers) { - super(); - this.status = status; - this.library = library; - this.buffers = buffers; - } - public OSVR_OpenResultsOpenGL(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_OpenResultsOpenGL implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_OpenResultsOpenGL implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_ProjectionMatrix.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_ProjectionMatrix.java deleted file mode 100644 index 94d2248543..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_ProjectionMatrix.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_ProjectionMatrix extends Structure { - public double left; - public double right; - public double top; - public double bottom; - /** Cannot name "near" because Visual Studio keyword */ - public double nearClip; - public double farClip; - public OSVR_ProjectionMatrix() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("left", "right", "top", "bottom", "nearClip", "farClip"); - } - /** @param nearClip Cannot name "near" because Visual Studio keyword */ - public OSVR_ProjectionMatrix(double left, double right, double top, double bottom, double nearClip, double farClip) { - super(); - this.left = left; - this.right = right; - this.top = top; - this.bottom = bottom; - this.nearClip = nearClip; - this.farClip = farClip; - } - public OSVR_ProjectionMatrix(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_ProjectionMatrix implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_ProjectionMatrix implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RGB.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RGB.java deleted file mode 100644 index c74e15643b..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RGB.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_RGB extends Structure { - public float r; - public float g; - public float b; - public OSVR_RGB() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("r", "g", "b"); - } - public OSVR_RGB(float r, float g, float b) { - super(); - this.r = r; - this.g = g; - this.b = b; - } - public OSVR_RGB(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_RGB implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_RGB implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderBufferOpenGL.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderBufferOpenGL.java deleted file mode 100644 index 7f502dd053..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderBufferOpenGL.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_RenderBufferOpenGL extends Structure { - public int colorBufferName; - public int depthStencilBufferName; - public OSVR_RenderBufferOpenGL() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("colorBufferName", "depthStencilBufferName"); - } - public OSVR_RenderBufferOpenGL(int colorBufferName, int depthStencilBufferName) { - super(); - this.colorBufferName = colorBufferName; - this.depthStencilBufferName = depthStencilBufferName; - } - public OSVR_RenderBufferOpenGL(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_RenderBufferOpenGL implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_RenderBufferOpenGL implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderInfoOpenGL.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderInfoOpenGL.java deleted file mode 100644 index 997215f3cb..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderInfoOpenGL.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.jme3.system.osvr.osvrmatrixconventions.OSVR_Pose3; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public /*abstract*/ class OSVR_RenderInfoOpenGL extends Structure { - /** C type : OSVR_GraphicsLibraryOpenGL */ - public OSVR_GraphicsLibraryOpenGL library; - /** C type : OSVR_ViewportDescription */ - public OSVR_ViewportDescription viewport; - public OSVR_Pose3 pose; - /** C type : OSVR_ProjectionMatrix */ - public OSVR_ProjectionMatrix projection; - public OSVR_RenderInfoOpenGL() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("library", "viewport", "pose", "projection"); - } - /** - * @param library C type : OSVR_GraphicsLibraryOpenGL
- * @param viewport C type : OSVR_ViewportDescription
- * @param projection C type : OSVR_ProjectionMatrix - */ - public OSVR_RenderInfoOpenGL(OSVR_GraphicsLibraryOpenGL library, OSVR_ViewportDescription viewport, OSVR_Pose3 pose, OSVR_ProjectionMatrix projection) { - super(); - this.library = library; - this.viewport = viewport; - this.pose = pose; - this.projection = projection; - } - public OSVR_RenderInfoOpenGL(Pointer peer) { - super(peer); - } - public static /*abstract*/ class ByReference extends OSVR_RenderInfoOpenGL implements Structure.ByReference { - - }; - public static /*abstract*/ class ByValue extends OSVR_RenderInfoOpenGL implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderParams.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderParams.java deleted file mode 100644 index 6df55bdc88..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_RenderParams.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_RenderParams extends Structure { - /** - * Room space to insert
- * C type : OSVR_PoseState* - */ - public Pointer worldFromRoomAppend; - /** - * Overrides head space
- * C type : OSVR_PoseState* - */ - public Pointer roomFromHeadReplace; - public double nearClipDistanceMeters; - public double farClipDistanceMeters; - public OSVR_RenderParams() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("worldFromRoomAppend", "roomFromHeadReplace", "nearClipDistanceMeters", "farClipDistanceMeters"); - } - /** - * @param worldFromRoomAppend Room space to insert
- * C type : OSVR_PoseState*
- * @param roomFromHeadReplace Overrides head space
- * C type : OSVR_PoseState* - */ - public OSVR_RenderParams(Pointer worldFromRoomAppend, Pointer roomFromHeadReplace, double nearClipDistanceMeters, double farClipDistanceMeters) { - super(); - this.worldFromRoomAppend = worldFromRoomAppend; - this.roomFromHeadReplace = roomFromHeadReplace; - this.nearClipDistanceMeters = nearClipDistanceMeters; - this.farClipDistanceMeters = farClipDistanceMeters; - } - public OSVR_RenderParams(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_RenderParams implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_RenderParams implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_ViewportDescription.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_ViewportDescription.java deleted file mode 100644 index f504476e4c..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OSVR_ViewportDescription.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_ViewportDescription extends Structure { - /** Left side of the viewport in pixels */ - public double left; - /** First pixel in the viewport at the bottom. */ - public double lower; - /** Last pixel in the viewport at the top */ - public double width; - /** Last pixel on the right of the viewport in pixels */ - public double height; - public OSVR_ViewportDescription() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("left", "lower", "width", "height"); - } - /** - * @param left Left side of the viewport in pixels
- * @param lower First pixel in the viewport at the bottom.
- * @param width Last pixel in the viewport at the top
- * @param height Last pixel on the right of the viewport in pixels - */ - public OSVR_ViewportDescription(double left, double lower, double width, double height) { - super(); - this.left = left; - this.lower = lower; - this.width = width; - this.height = height; - } - public OSVR_ViewportDescription(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_ViewportDescription implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_ViewportDescription implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OsvrRenderManagerOpenGLLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OsvrRenderManagerOpenGLLibrary.java deleted file mode 100644 index 6b3a02f065..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrrendermanageropengl/OsvrRenderManagerOpenGLLibrary.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.jme3.system.osvr.osvrrendermanageropengl; -import com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary; -import com.ochafik.lang.jnaerator.runtime.NativeSize; -import com.ochafik.lang.jnaerator.runtime.NativeSizeByReference; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.Pointer; -import com.sun.jna.PointerType; -import com.sun.jna.ptr.DoubleByReference; -import com.sun.jna.ptr.FloatByReference; -import com.sun.jna.ptr.IntByReference; -import com.sun.jna.ptr.PointerByReference; -import java.nio.DoubleBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -/** - * JNA Wrapper for library osvrRenderManagerOpenGL
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrRenderManagerOpenGLLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrRenderManager"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrRenderManagerOpenGLLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrRenderManagerOpenGLLibrary.class, OsvrRenderManagerOpenGLLibrary.JNA_NATIVE_LIB); - } - /** enum values */ - public static interface OSVR_OpenStatus { - public static final int OSVR_OPEN_STATUS_FAILURE = 0; - public static final int OSVR_OPEN_STATUS_PARTIAL = 1; - public static final int OSVR_OPEN_STATUS_COMPLETE = 2; - }; - /** - * todo OSVR_RenderTimingInfo
- * Original signature : OSVR_ReturnCode osvrDestroyRenderManager(OSVR_RenderManager) - */ - public static native byte osvrDestroyRenderManager(Pointer renderManager); - /** - * todo Make this actually cache, for now it does not.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetNumRenderInfo(OSVR_RenderManager, OSVR_RenderParams, OSVR_RenderInfoCount*) - */ - public static native byte osvrRenderManagerGetNumRenderInfo(Pointer renderManager, OSVR_RenderParams.ByValue renderParams, NativeSizeByReference numRenderInfoOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerGetDoingOkay(OSVR_RenderManager) */ - public static native byte osvrRenderManagerGetDoingOkay(Pointer renderManager); - /** Original signature : OSVR_ReturnCode osvrRenderManagerGetDefaultRenderParams(OSVR_RenderParams*) */ - public static native byte osvrRenderManagerGetDefaultRenderParams(OSVR_RenderParams renderParamsOut); - /** - * must be registered before they are presented.
- * Original signature : OSVR_ReturnCode osvrRenderManagerStartPresentRenderBuffers(OSVR_RenderManagerPresentState*) - */ - public static native byte osvrRenderManagerStartPresentRenderBuffers(PointerByReference presentStateOut); - /** - * buffers for a single frame. This sequence starts with the Start function.
- * Original signature : OSVR_ReturnCode osvrRenderManagerFinishPresentRenderBuffers(OSVR_RenderManager, OSVR_RenderManagerPresentState, OSVR_RenderParams, OSVR_CBool) - */ - public static native byte osvrRenderManagerFinishPresentRenderBuffers(Pointer renderManager, Pointer presentState, OSVR_RenderParams.ByValue renderParams, byte shouldFlipY); - /** - * must be registered before they are presented.
- * Original signature : OSVR_ReturnCode osvrRenderManagerStartRegisterRenderBuffers(OSVR_RenderManagerRegisterBufferState*) - */ - public static native byte osvrRenderManagerStartRegisterRenderBuffers(PointerByReference registerBufferStateOut); - /** - * buffers for a single frame. This sequence starts with the Start function.
- * Original signature : OSVR_ReturnCode osvrRenderManagerFinishRegisterRenderBuffers(OSVR_RenderManager, OSVR_RenderManagerRegisterBufferState, OSVR_CBool) - */ - public static native byte osvrRenderManagerFinishRegisterRenderBuffers(Pointer renderManager, Pointer registerBufferState, byte appWillNotOverwriteBeforeNewPresent); - /** Original signature : OSVR_ReturnCode osvrRenderManagerPresentSolidColorf(OSVR_RenderManager, OSVR_RGB_FLOAT) */ - public static native byte osvrRenderManagerPresentSolidColorf(Pointer renderManager, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RGB.ByValue rgb); - /** - * when you're done.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetRenderInfoCollection(OSVR_RenderManager, OSVR_RenderParams, OSVR_RenderInfoCollection*) - */ - public static native byte osvrRenderManagerGetRenderInfoCollection(Pointer renderManager, OSVR_RenderParams.ByValue renderParams, PointerByReference renderInfoCollectionOut); - /** - * Releases the OSVR_RenderInfoCollection.
- * Original signature : OSVR_ReturnCode osvrRenderManagerReleaseRenderInfoCollection(OSVR_RenderInfoCollection) - */ - public static native byte osvrRenderManagerReleaseRenderInfoCollection(Pointer renderInfoCollection); - /** - * Get the size of the OSVR_RenderInfoCollection.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetNumRenderInfoInCollection(OSVR_RenderInfoCollection, OSVR_RenderInfoCount*) - */ - public static native byte osvrRenderManagerGetNumRenderInfoInCollection(Pointer renderInfoCollection, NativeSizeByReference countOut); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_OpenGL(double*, OSVR_ProjectionMatrix)
- * @deprecated use the safer methods {@link #OSVR_Projection_to_OpenGL(java.nio.DoubleBuffer, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue)} and {@link #OSVR_Projection_to_OpenGL(com.sun.jna.ptr.DoubleByReference, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue)} instead - */ - @Deprecated - public static native byte OSVR_Projection_to_OpenGL(DoubleByReference OpenGL_out, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_OpenGL(double*, OSVR_ProjectionMatrix) - */ - public static native byte OSVR_Projection_to_OpenGL(DoubleBuffer OpenGL_out, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_D3D(float[16], OSVR_ProjectionMatrix)
- * @deprecated use the safer methods {@link #OSVR_Projection_to_D3D(java.nio.FloatBuffer, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue)} and {@link #OSVR_Projection_to_D3D(com.sun.jna.ptr.FloatByReference, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue)} instead - */ - @Deprecated - public static native byte OSVR_Projection_to_D3D(FloatByReference D3D_out, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_D3D(float[16], OSVR_ProjectionMatrix) - */ - public static native byte OSVR_Projection_to_D3D(FloatBuffer D3D_out, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_Unreal(float[16], OSVR_ProjectionMatrix)
- * @deprecated use the safer methods {@link #OSVR_Projection_to_Unreal(java.nio.FloatBuffer, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue)} and {@link #OSVR_Projection_to_Unreal(com.sun.jna.ptr.FloatByReference, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue)} instead - */ - @Deprecated - public static native byte OSVR_Projection_to_Unreal(FloatByReference Unreal_out, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * @return True on success, false on failure (null pointer).
- * Original signature : OSVR_ReturnCode OSVR_Projection_to_Unreal(float[16], OSVR_ProjectionMatrix) - */ - public static native byte OSVR_Projection_to_Unreal(FloatBuffer Unreal_out, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ProjectionMatrix.ByValue projection_in); - /** - * Original signature : OSVR_ReturnCode osvrCreateRenderManagerOpenGL(OSVR_ClientContext, const char[], OSVR_GraphicsLibraryOpenGL, OSVR_RenderManager*, OSVR_RenderManagerOpenGL*)
- * @deprecated use the safer method - * {@link #osvrCreateRenderManagerOpenGL(com.jme3.system.osvr.osvrclientkit.OsvrClientKitLibrary.OSVR_ClientContext, byte[], com.jme3.system.osvr.osvrrendermanageropengl.OSVR_GraphicsLibraryOpenGL.ByValue, com.sun.jna.ptr.PointerByReference, com.sun.jna.ptr.PointerByReference)} - * instead - */ - @Deprecated - public static native byte osvrCreateRenderManagerOpenGL(Pointer clientContext, Pointer graphicsLibraryName, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_GraphicsLibraryOpenGL.ByValue graphicsLibrary, PointerByReference renderManagerOut, PointerByReference renderManagerOpenGLOut); - /** Original signature : OSVR_ReturnCode osvrCreateRenderManagerOpenGL(OSVR_ClientContext, const char[], OSVR_GraphicsLibraryOpenGL, OSVR_RenderManager*, OSVR_RenderManagerOpenGL*) */ - public static native byte osvrCreateRenderManagerOpenGL(OsvrClientKitLibrary.OSVR_ClientContext clientContext, byte graphicsLibraryName[], com.jme3.system.osvr.osvrrendermanageropengl.OSVR_GraphicsLibraryOpenGL.ByValue graphicsLibrary, PointerByReference renderManagerOut, PointerByReference renderManagerOpenGLOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerGetRenderInfoOpenGL(OSVR_RenderManagerOpenGL, OSVR_RenderInfoCount, OSVR_RenderParams, OSVR_RenderInfoOpenGL*) */ - public static native byte osvrRenderManagerGetRenderInfoOpenGL(Pointer renderManager, NativeSize renderInfoIndex, OSVR_RenderParams.ByValue renderParams, OSVR_RenderInfoOpenGL renderInfoOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerOpenDisplayOpenGL(OSVR_RenderManagerOpenGL, OSVR_OpenResultsOpenGL*) */ - public static native byte osvrRenderManagerOpenDisplayOpenGL(Pointer renderManager, OSVR_OpenResultsOpenGL openResultsOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerPresentRenderBufferOpenGL(OSVR_RenderManagerPresentState, OSVR_RenderBufferOpenGL, OSVR_RenderInfoOpenGL, OSVR_ViewportDescription) */ - public static native byte osvrRenderManagerPresentRenderBufferOpenGL(Pointer presentState, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RenderBufferOpenGL.ByValue buffer, OSVR_RenderInfoOpenGL.ByValue renderInfoUsed, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_ViewportDescription.ByValue normalizedCroppingViewport); - /** Original signature : OSVR_ReturnCode osvrRenderManagerRegisterRenderBufferOpenGL(OSVR_RenderManagerRegisterBufferState, OSVR_RenderBufferOpenGL) */ - public static native byte osvrRenderManagerRegisterRenderBufferOpenGL(Pointer registerBufferState, com.jme3.system.osvr.osvrrendermanageropengl.OSVR_RenderBufferOpenGL.ByValue renderBuffer); - /** - * Gets a given OSVR_RenderInfoOpenGL from an OSVR_RenderInfoCollection.
- * Original signature : OSVR_ReturnCode osvrRenderManagerGetRenderInfoFromCollectionOpenGL(OSVR_RenderInfoCollection, OSVR_RenderInfoCount, OSVR_RenderInfoOpenGL*) - */ - public static native byte osvrRenderManagerGetRenderInfoFromCollectionOpenGL(Pointer renderInfoCollection, NativeSize index, OSVR_RenderInfoOpenGL renderInfoOut); - /** - * Original signature : OSVR_ReturnCode osvrRenderManagerCreateColorBufferOpenGL(GLsizei, GLsizei, GLenum, GLuint*)
- * @deprecated use the safer methods {@link #osvrRenderManagerCreateColorBufferOpenGL(int, int, int, java.nio.IntBuffer)} and {@link #osvrRenderManagerCreateColorBufferOpenGL(int, int, int, com.sun.jna.ptr.IntByReference)} instead - */ - @Deprecated - public static native byte osvrRenderManagerCreateColorBufferOpenGL(int width, int height, int format, IntByReference colorBufferNameOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerCreateColorBufferOpenGL(GLsizei, GLsizei, GLenum, GLuint*) */ - public static native byte osvrRenderManagerCreateColorBufferOpenGL(int width, int height, int format, IntBuffer colorBufferNameOut); - /** - * Original signature : OSVR_ReturnCode osvrRenderManagerCreateDepthBufferOpenGL(GLsizei, GLsizei, GLuint*)
- * @deprecated use the safer methods {@link #osvrRenderManagerCreateDepthBufferOpenGL(int, int, java.nio.IntBuffer)} and {@link #osvrRenderManagerCreateDepthBufferOpenGL(int, int, com.sun.jna.ptr.IntByReference)} instead - */ - @Deprecated - public static native byte osvrRenderManagerCreateDepthBufferOpenGL(int width, int height, IntByReference depthBufferNameOut); - /** Original signature : OSVR_ReturnCode osvrRenderManagerCreateDepthBufferOpenGL(GLsizei, GLsizei, GLuint*) */ - public static native byte osvrRenderManagerCreateDepthBufferOpenGL(int width, int height, IntBuffer depthBufferNameOut); - public static class OSVR_ClientContext extends PointerType { - public OSVR_ClientContext(Pointer address) { - super(address); - } - public OSVR_ClientContext() { - super(); - } - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrtimevalue/OSVR_TimeValue.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrtimevalue/OSVR_TimeValue.java deleted file mode 100644 index e500f89b17..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrtimevalue/OSVR_TimeValue.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.jme3.system.osvr.osvrtimevalue; -import com.sun.jna.Pointer; -import com.sun.jna.Structure; -import java.util.Arrays; -import java.util.List; -/** - * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OSVR_TimeValue extends Structure { - /** C type : OSVR_TimeValue_Seconds */ - public long seconds; - /** C type : OSVR_TimeValue_Microseconds */ - public int microseconds; - public OSVR_TimeValue() { - super(); - } - @Override - protected List getFieldOrder() { - return Arrays.asList("seconds", "microseconds"); - } - /** - * @param seconds C type : OSVR_TimeValue_Seconds
- * @param microseconds C type : OSVR_TimeValue_Microseconds - */ - public OSVR_TimeValue(long seconds, int microseconds) { - super(); - this.seconds = seconds; - this.microseconds = microseconds; - } - public OSVR_TimeValue(Pointer peer) { - super(peer); - } - public static class ByReference extends OSVR_TimeValue implements Structure.ByReference { - - }; - public static class ByValue extends OSVR_TimeValue implements Structure.ByValue { - - }; -} diff --git a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrtimevalue/OsvrTimeValueLibrary.java b/jme3-vr/src/main/java/com/jme3/system/osvr/osvrtimevalue/OsvrTimeValueLibrary.java deleted file mode 100644 index eb2731b5c0..0000000000 --- a/jme3-vr/src/main/java/com/jme3/system/osvr/osvrtimevalue/OsvrTimeValueLibrary.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.jme3.system.osvr.osvrtimevalue; -import com.sun.jna.Library; -import com.sun.jna.Native; -import com.sun.jna.NativeLibrary; -import com.sun.jna.Pointer; -import com.sun.jna.PointerType; -/** - * JNA Wrapper for library osvrTimeValue
- * This file was autogenerated by JNAerator,
- * a tool written by Olivier Chafik that uses a few opensource projects..
- * For help, please visit NativeLibs4Java , Rococoa, or JNA. - */ -public class OsvrTimeValueLibrary implements Library { - public static final String JNA_LIBRARY_NAME = "osvrClientKit"; - public static final NativeLibrary JNA_NATIVE_LIB = NativeLibrary.getInstance(OsvrTimeValueLibrary.JNA_LIBRARY_NAME); - static { - Native.register(OsvrTimeValueLibrary.class, OsvrTimeValueLibrary.JNA_NATIVE_LIB); - } - public static final int OSVR_TRUE = 1; - public static final int OSVR_FALSE = 0; - /** - * Gets the current time in the TimeValue. Parallel to gettimeofday. - * Original signature : void osvrTimeValueGetNow(OSVR_TimeValue*) - */ - public static native void osvrTimeValueGetNow(OSVR_TimeValue dest); - /** - * Converts from a TimeValue struct to your system's struct timeval. - * @param dest Pointer to an empty struct timeval for your platform.
- * @param src A pointer to an OSVR_TimeValue you'd like to convert from.
- * If either parameter is NULL, the function will return without doing
- * anything.
- * Original signature : void osvrTimeValueToStructTimeval(timeval*, const OSVR_TimeValue*) - */ - public static native void osvrTimeValueToStructTimeval(OsvrTimeValueLibrary.timeval dest, OSVR_TimeValue src); - /** - * Converts from a TimeValue struct to your system's struct timeval. - * @param dest An OSVR_TimeValue destination pointer.
- * @param src Pointer to a struct timeval you'd like to convert from.
- * The result is normalized.
- * If either parameter is NULL, the function will return without doing
- * anything.
- * Original signature : void osvrStructTimevalToTimeValue(OSVR_TimeValue*, timeval*) - */ - public static native void osvrStructTimevalToTimeValue(OSVR_TimeValue dest, OsvrTimeValueLibrary.timeval src); - /** - * "Normalizes" a time value so that the absolute number of microseconds - * is less than 1,000,000, and that the sign of both components is the same.
- * @param tv Address of a struct TimeValue to normalize in place.
- * If the given pointer is NULL, this function returns without doing anything.
- * Original signature : void osvrTimeValueNormalize(OSVR_TimeValue*) - */ - public static native void osvrTimeValueNormalize(OSVR_TimeValue tv); - /** - * Sums two time values, replacing the first with the result. - * @param tvA Destination and first source.
- * @param tvB second source
- * If a given pointer is NULL, this function returns without doing anything.
- * Both parameters are expected to be in normalized form.
- * Original signature : void osvrTimeValueSum(OSVR_TimeValue*, const OSVR_TimeValue*) - */ - public static native void osvrTimeValueSum(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - /** - * Computes the difference between two time values, replacing the first - * with the result.
- * Effectively, `*tvA = *tvA - *tvB`
- * @param tvA Destination and first source.
- * @param tvB second source
- * If a given pointer is NULL, this function returns without doing anything.
- * Both parameters are expected to be in normalized form.
- * Original signature : void osvrTimeValueDifference(OSVR_TimeValue*, const OSVR_TimeValue*) - */ - public static native void osvrTimeValueDifference(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - /** - * Compares two time values (assumed to be normalized), returning - * the same values as strcmp
- * @return <0 if A is earlier than B, 0 if they are the same, and >0 if A
- * is later than B.
- * Original signature : int osvrTimeValueCmp(const OSVR_TimeValue*, const OSVR_TimeValue*) - */ - public static native int osvrTimeValueCmp(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - /** - * Compute the difference between the two time values, returning the - * duration as a double-precision floating-point number of seconds.
- * Effectively, `ret = *tvA - *tvB`
- * @param tvA first source.
- * @param tvB second source
- * @return Duration of timespan in seconds (floating-point)
- * Original signature : double osvrTimeValueDurationSeconds(const OSVR_TimeValue*, const OSVR_TimeValue*) - */ - public static native double osvrTimeValueDurationSeconds(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - /** - * True if A is later than B. - * Original signature : OSVR_CBool osvrTimeValueGreater(const OSVR_TimeValue*, const OSVR_TimeValue*) - */ - public static native byte osvrTimeValueGreater(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - /** - * Returns true if the time value is normalized. Typically used in assertions.
- * Original signature : bool osvrTimeValueIsNormalized(const OSVR_TimeValue&) - */ - public static native byte osvrTimeValueIsNormalized(OSVR_TimeValue tv); - /** - * Operator > overload for time values
- * Original signature : bool operator>(const OSVR_TimeValue&, const OSVR_TimeValue&) - */ - public static native byte operatorGreater(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - /** - * Operator == overload for time values
- * Original signature : bool operator==(const OSVR_TimeValue&, const OSVR_TimeValue&) - */ - public static native byte operatorIsEqual(OSVR_TimeValue tvA, OSVR_TimeValue tvB); - public static class timeval extends PointerType { - public timeval(Pointer address) { - super(address); - } - public timeval() { - super(); - } - }; -}