OpenVR 1.0.9 and Occulus Support (#779)

* Updated OpenVR implementation to 1.0.9

User can specify external OpenVR library to load with
openvr.library.path system property.
Usage: java -Dopenvr.library.name=my_path_to_library MyApp

Removed reference to OCCULUS VR and OpenVR from VRAppstate as this class
is generic and does not have to be linked to specific implementation.

VRMouseManager can be buggous using OSVR or Occulus VR. 

Refactored VR implementation packages in order to separate all available
implementation. Modifying or adding implementation should no more impact
other ones. 

Renamed some classes in order to be uniform
empirephoenix-patch-1
Julien Seinturier 7 years ago committed by Rémy Bouquet
parent 96836de6e8
commit 58a9211879
  1. 28
      jme3-vr/src/main/java/com/jme3/app/VRAppState.java
  2. 24
      jme3-vr/src/main/java/com/jme3/app/VRApplication.java
  3. 24
      jme3-vr/src/main/java/com/jme3/app/VRConstants.java
  4. 58
      jme3-vr/src/main/java/com/jme3/app/VREnvironment.java
  5. 2
      jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwKeyInputVR.java
  6. 2
      jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwMouseInputVR.java
  7. 179
      jme3-vr/src/main/java/com/jme3/input/vr/AbstractVRMouseManager.java
  8. 8
      jme3-vr/src/main/java/com/jme3/input/vr/AbstractVRViewManager.java
  9. 2
      jme3-vr/src/main/java/com/jme3/input/vr/HmdType.java
  10. 6
      jme3-vr/src/main/java/com/jme3/input/vr/VRAPI.java
  11. 58
      jme3-vr/src/main/java/com/jme3/input/vr/VRBounds.java
  12. 2
      jme3-vr/src/main/java/com/jme3/input/vr/VRInputAPI.java
  13. 26
      jme3-vr/src/main/java/com/jme3/input/vr/VRInputType.java
  14. 107
      jme3-vr/src/main/java/com/jme3/input/vr/VRMouseManager.java
  15. 3
      jme3-vr/src/main/java/com/jme3/input/vr/VRTrackedController.java
  16. 10
      jme3-vr/src/main/java/com/jme3/input/vr/VRViewManager.java
  17. 108
      jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusMouseManager.java
  18. 4
      jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusVR.java
  19. 11
      jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusVRInput.java
  20. 14
      jme3-vr/src/main/java/com/jme3/input/vr/oculus/OculusViewManager.java
  21. 28
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java
  22. 59
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRBounds.java
  23. 12
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRInput.java
  24. 114
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRMouseManager.java
  25. 8
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRTrackedController.java
  26. 21
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVRViewManager.java
  27. 7
      jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVR.java
  28. 12
      jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRInput.java
  29. 108
      jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRMouseManager.java
  30. 25
      jme3-vr/src/main/java/com/jme3/input/vr/osvr/OSVRViewManager.java
  31. 2
      jme3-vr/src/main/java/com/jme3/post/CartoonSSAO.java
  32. 2
      jme3-vr/src/main/java/com/jme3/post/PreNormalCaching.java
  33. 2
      jme3-vr/src/main/java/com/jme3/shadow/AbstractShadowFilterVR.java
  34. 2
      jme3-vr/src/main/java/com/jme3/shadow/AbstractShadowRendererVR.java
  35. 2
      jme3-vr/src/main/java/com/jme3/shadow/DirectionalLightShadowFilterVR.java
  36. 2
      jme3-vr/src/main/java/com/jme3/shadow/DirectionalLightShadowRendererVR.java
  37. 2
      jme3-vr/src/main/java/com/jme3/shadow/InstancedDirectionalShadowFilter.java
  38. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/AppOverrideKeys_t.java
  39. 9
      jme3-vr/src/main/java/com/jme3/system/jopenvr/COpenVRContext.java
  40. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/CameraVideoStreamFrameHeader_t.java
  41. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_CumulativeStats.java
  42. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_FrameTiming.java
  43. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/Compositor_OverlaySettings.java
  44. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/D3D12TextureData_t.java
  45. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/DistortionCoordinates_t.java
  46. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HiddenAreaMesh_t.java
  47. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdColor_t.java
  48. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix34_t.java
  49. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdMatrix44_t.java
  50. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuad_t.java
  51. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdQuaternion_t.java
  52. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdRect2_t.java
  53. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector2_t.java
  54. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3_t.java
  55. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector3d_t.java
  56. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/HmdVector4_t.java
  57. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskCircle_t.java
  58. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/IntersectionMaskRectangle_t.java
  59. 1821
      jme3-vr/src/main/java/com/jme3/system/jopenvr/JOpenVRLibrary.java
  60. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/NotificationBitmap_t.java
  61. 8
      jme3-vr/src/main/java/com/jme3/system/jopenvr/OpenVRUtil.java
  62. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ComponentState_t.java
  63. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_ControllerMode_State_t.java
  64. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_TextureMap_t.java
  65. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_Vertex_t.java
  66. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/RenderModel_t.java
  67. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/Texture_t.java
  68. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/TrackedDevicePose_t.java
  69. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerAxis_t.java
  70. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VRControllerState_t.java
  71. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ApplicationLaunch_t.java
  72. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Chaperone_t.java
  73. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Controller_t.java
  74. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Data_t.java
  75. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_EditingCameraSurface_t.java
  76. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Ipd_t.java
  77. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Keyboard_t.java
  78. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_MessageOverlay_t.java
  79. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Mouse_t.java
  80. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Notification_t.java
  81. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Overlay_t.java
  82. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_PerformanceTest_t.java
  83. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Process_t.java
  84. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Property_t.java
  85. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Reserved_t.java
  86. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_ScreenshotProgress_t.java
  87. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Screenshot_t.java
  88. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Scroll_t.java
  89. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_SeatedZeroPoseReset_t.java
  90. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_Status_t.java
  91. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_TouchPadMove_t.java
  92. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VREvent_t.java
  93. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_Data_t.java
  94. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionMaskPrimitive_t.java
  95. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionParams_t.java
  96. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VROverlayIntersectionResults_t.java
  97. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VRTextureBounds_t.java
  98. 2
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VRVulkanTextureData_t.java
  99. 64
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRApplications_FnTable.java
  100. 42
      jme3-vr/src/main/java/com/jme3/system/jopenvr/VR_IVRChaperoneSetup_FnTable.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -34,10 +34,10 @@ package com.jme3.app;
import com.jme3.app.Application;
import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import com.jme3.input.vr.OculusVR;
import com.jme3.input.vr.OpenVR;
import com.jme3.input.vr.VRAPI;
import com.jme3.input.vr.VRInputAPI;
import com.jme3.input.vr.VRMouseManager;
import com.jme3.input.vr.VRViewManager;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
@ -48,8 +48,6 @@ import com.jme3.scene.Spatial;
import com.jme3.system.AppSettings;
import com.jme3.util.VRGUIPositioningMode;
import com.jme3.util.VRGuiManager;
import com.jme3.util.VRMouseManager;
import com.jme3.util.VRViewManager;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
@ -74,7 +72,7 @@ import java.util.logging.Logger;
* <li>To start the main {@link Application application}.
* </ul>
* Attaching an instance of this app state to an already started application may cause crashes.
* @author Julien Seinturier - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class VRAppState extends AbstractAppState {
@ -404,34 +402,32 @@ public class VRAppState extends AbstractAppState {
// it will get updated automatically in the viewmanager update otherwise
// TODO isn't this done by SimpleApplication?
for (Spatial spatial : application.getGuiViewPort().getScenes()) {
//spatial.updateLogicalState(tpf);
spatial.updateGeometricState();
}
}
// use the analog control on the first tracked controller to push around the mouse
// FIXME crashes on Rift/Touch (and probably OSVR), as it assumes the presence of the Vive touchpads
if(getVRHardware() instanceof OpenVR) {
environment.getVRMouseManager().updateAnalogAsMouse(0, null, null, null, tpf);
}
}
@Override
public void postRender() {
super.postRender();
public void render(RenderManager rm) {
super.render(rm);
// update compositor
if( environment.getVRViewManager() != null ) {
environment.getVRViewManager().postRender();
environment.getVRViewManager().render();
}
}
@Override
public void render(RenderManager rm) {
super.render(rm);
public void postRender() {
super.postRender();
// update compositor
if( environment.getVRViewManager() != null ) {
environment.getVRViewManager().render();
environment.getVRViewManager().postRender();
}
}
@ -601,12 +597,8 @@ public class VRAppState extends AbstractAppState {
settings.setFrequency(environment.getVRHardware().getDisplayFrequency());
settings.setFullscreen(false);
settings.setVSync(false); // stop vsyncing on primary monitor!
// TODO: Is this preventing desktop display on _ALL_ HMDs?
if(!(getVRHardware() instanceof OculusVR)) {
settings.setSwapBuffers(environment.isSwapBuffers());
}
}
// Updating application settings
stateManager.getApplication().setSettings(settings);

@ -18,10 +18,12 @@ import com.jme3.input.KeyInput;
import com.jme3.input.MouseInput;
import com.jme3.input.TouchInput;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.input.vr.OSVR;
import com.jme3.input.vr.OpenVR;
import com.jme3.input.vr.VRAPI;
import com.jme3.input.vr.VRInputAPI;
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;
@ -47,8 +49,6 @@ import com.jme3.system.lwjgl.LwjglDisplayVR;
import com.jme3.system.lwjgl.LwjglOffscreenBufferVR;
import com.jme3.util.VRGUIPositioningMode;
import com.jme3.util.VRGuiManager;
import com.jme3.util.VRMouseManager;
import com.jme3.util.VRViewManagerOpenVR;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
@ -72,7 +72,7 @@ import org.lwjgl.system.Platform;
* <p>
* <b>This class is no more functional and is deprecated. Please use {@link VRAppState VRAppState} instead.</b>
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
* @deprecated use {@link VRAppState VRAppState} instead.
*/
public abstract class VRApplication implements Application, SystemListener {
@ -171,8 +171,8 @@ public abstract class VRApplication implements Application, SystemListener {
private VRAPI VRhardware = null;
private VRGuiManager guiManager = null;
private VRMouseManager mouseManager = null;
private VRViewManagerOpenVR viewmanager = null;
private OpenVRMouseManager mouseManager = null;
private OpenVRViewManager viewmanager = null;
private String OS;
@ -259,10 +259,10 @@ public abstract class VRApplication implements Application, SystemListener {
guiManager = new VRGuiManager(null);
// Create a new view manager.
viewmanager = new VRViewManagerOpenVR(null);
viewmanager = new OpenVRViewManager(null);
// Create a new mouse manager.
mouseManager = new VRMouseManager(null);
mouseManager = new OpenVRMouseManager(null);
// we are going to use OpenVR now, not the Oculus Rift
// OpenVR does support the Rift
@ -311,7 +311,7 @@ public abstract class VRApplication implements Application, SystemListener {
* Get the VR view manager.
* @return the VR view manager.
*/
public VRViewManagerOpenVR getVRViewManager() {
public OpenVRViewManager getVRViewManager() {
return viewmanager;
}
@ -327,7 +327,7 @@ public abstract class VRApplication implements Application, SystemListener {
* Get the VR mouse manager attached to this application.
* @return the VR mouse manager attached to this application.
*/
public VRMouseManager getVRMouseManager(){
public OpenVRMouseManager getVRMouseManager(){
return mouseManager;
}
@ -1359,7 +1359,7 @@ public abstract class VRApplication implements Application, SystemListener {
}
//FIXME: WARNING !!
viewmanager = new VRViewManagerOpenVR(null);
viewmanager = new OpenVRViewManager(null);
viewmanager.setResolutionMultiplier(resMult);
inputManager.addMapping(RESET_HMD, new KeyTrigger(KeyInput.KEY_F9));
setLostFocusBehavior(LostFocusBehavior.Disabled);

@ -6,7 +6,7 @@ import com.jme3.system.AppSettings;
/**
* Some constants dedicated to the VR module.
* @author Julien Seinturier - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
* @since 3.1.0
*/
public class VRConstants {
@ -117,6 +117,7 @@ public class VRConstants {
* <li>{@link VRConstants#SETTING_VRAPI_OPENVR_VALUE SETTING_VRAPI_OPENVR_VALUE}: Use OpenVR binding.
* <li>{@link VRConstants#SETTING_VRAPI_OSVR_VALUE SETTING_VRAPI_OSVR_VALUE}: Use OSVR binding.
* <li>{@link VRConstants#SETTING_VRAPI_OPENVR_LWJGL_VALUE SETTING_VRAPI_OPENVR_LWJGL_VALUE}: Use OpenVR binding from LWJGL.
* <li>{@link VRConstants#SETTING_VRAPI_OCULUSVR_VALUE SETTING_VRAPI_OCULUSVR_VALUE}: Use Occulus Rift binding binding.
* </ul>
* <b>Type: </b><code>int</code><br>
* <b>Usage: </b><code>{@link AppSettings appSettings}.{@link HashMap#put(Object, Object) put}(VRConstants.SETTING_VRAPI, value)</code>
@ -126,29 +127,34 @@ public class VRConstants {
/**
* The identifier of the OpenVR system.
* @see #SETTING_VRAPI
* @see #SETTING_VRAPI_OSVR_VALUE
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
* @see #SETTING_VRAPI_OCULUSVR_VALUE
*/
public static final int SETTING_VRAPI_OPENVR_VALUE = 1;
/**
* The identifier of the OSVR system.
* @see #SETTING_VRAPI
* @see #SETTING_VRAPI_OPENVR_VALUE
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
* @see #SETTING_VRAPI_OCULUSVR_VALUE
*/
public static final int SETTING_VRAPI_OSVR_VALUE = 2;
/**
* The identifier of the OpenVR from LWJGL system.
* @see #SETTING_VRAPI
* @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;
/**
* The identifier of the LibOVR (Oculus) system.
*
* @see #SETTING_VRAPI
* The identifier of the Oculus Rift system.
* @see #SETTING_VRAPI_OPENVR_VALUE
* @see #SETTING_VRAPI_OSVR_VALUE
* @see #SETTING_VRAPI_OPENVR_LWJGL_VALUE
*/
public static final int SETTING_VRAPI_OCULUSVR_VALUE = 4;
}

@ -5,23 +5,30 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import com.jme3.app.state.AppState;
import com.jme3.input.vr.OSVR;
import com.jme3.input.vr.OpenVR;
import com.jme3.input.vr.OculusVR;
import com.jme3.input.vr.VRAPI;
import com.jme3.input.vr.VRBounds;
import com.jme3.input.vr.VRInputAPI;
import com.jme3.input.vr.VRMouseManager;
import com.jme3.input.vr.VRViewManager;
import com.jme3.input.vr.oculus.OculusMouseManager;
import com.jme3.input.vr.oculus.OculusVR;
import com.jme3.input.vr.oculus.OculusViewManager;
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;
import com.jme3.system.jopenvr.JOpenVRLibrary;
import com.jme3.util.VRGuiManager;
import com.jme3.util.VRMouseManager;
import com.jme3.util.VRViewManager;
import com.jme3.util.VRViewManagerOSVR;
import com.jme3.util.VRViewManagerOculus;
import com.jme3.util.VRViewManagerOpenVR;
/**
*
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class VREnvironment {
private static final Logger logger = Logger.getLogger(VREnvironment.class.getName());
@ -75,10 +82,7 @@ public class VREnvironment {
this.settings = settings;
guiManager = new VRGuiManager(this);
mouseManager = new VRMouseManager(this);
bounds = new VRBounds();
bounds = null;
processSettings();
}
@ -91,9 +95,19 @@ public class VREnvironment {
return hardware;
}
/**
* Set the VR bounds.
* @return the VR bounds.
* @see #getVRBounds()
*/
public void setVRBounds(VRBounds bounds){
this.bounds = bounds;
}
/**
* Get the VR bounds.
* @return the VR bounds.
* @see #setVRBounds(VRBounds)
*/
public VRBounds getVRBounds(){
return bounds;
@ -387,11 +401,11 @@ public class VREnvironment {
// Instanciate view manager
if (vrBinding == VRConstants.SETTING_VRAPI_OPENVR_VALUE){
viewmanager = new VRViewManagerOpenVR(this);
viewmanager = new OpenVRViewManager(this);
} else if (vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE){
viewmanager = new VRViewManagerOSVR(this);
viewmanager = new OSVRViewManager(this);
} else if (vrBinding == VRConstants.SETTING_VRAPI_OCULUSVR_VALUE) {
viewmanager = new VRViewManagerOculus(this);
viewmanager = new OculusViewManager(this);
} else {
logger.severe("Cannot instanciate view manager, unknown VRAPI type: "+vrBinding);
}
@ -416,17 +430,29 @@ public class VREnvironment {
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 ) {
guiManager = new VRGuiManager(this);
mouseManager = new OpenVRMouseManager(this);
hardware = new OpenVR(this);
initialized = true;
logger.config("Creating OpenVR wrapper [SUCCESS]");
} else if (vrBinding == VRConstants.SETTING_VRAPI_OCULUSVR_VALUE) {
guiManager = new VRGuiManager(this);
mouseManager = new OculusMouseManager(this);
hardware = new OculusVR(this);
initialized = true;
logger.config("Creating LibOVR wrapper [SUCCESS]");
logger.config("Creating Occulus Rift wrapper [SUCCESS]");
} else {
logger.config("Cannot create VR binding: "+vrBinding+" [FAILED]");
logger.log(Level.SEVERE, "Cannot initialize VR environment [FAILED]");

@ -48,7 +48,7 @@ import static org.lwjgl.glfw.GLFW.*;
/**
* A key input that wraps GLFW underlying components.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class GlfwKeyInputVR implements KeyInput {

@ -63,7 +63,7 @@ import org.lwjgl.system.MemoryUtil;
* This class support modifications dedicated to VR rendering.
* @author Daniel Johansson (dannyjo)
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a> * @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
*/
public class GlfwMouseInputVR implements MouseInput {

@ -1,9 +1,4 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.util;
package com.jme3.input.vr;
import java.util.logging.Logger;
@ -11,9 +6,7 @@ import org.lwjgl.glfw.GLFW;
import com.jme3.app.VREnvironment;
import com.jme3.input.MouseInput;
import com.jme3.input.controls.AnalogListener;
import com.jme3.input.lwjgl.GlfwMouseInputVR;
import com.jme3.input.vr.VRInputType;
import com.jme3.material.RenderState.BlendMode;
import com.jme3.math.Vector2f;
import com.jme3.scene.Node;
@ -24,46 +17,38 @@ import com.jme3.texture.Texture2D;
import com.jme3.ui.Picture;
/**
* A class dedicated to the handling of the mouse within VR environment.
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* An abstract implementation of a {@link VRMouseManager}. This class should be overrided by specific hardware implementation of VR devices.
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class VRMouseManager {
private static final Logger logger = Logger.getLogger(VRMouseManager.class.getName());
public abstract class AbstractVRMouseManager implements VRMouseManager {
private static final Logger logger = Logger.getLogger(AbstractVRMouseManager.class.getName());
private VREnvironment environment = null;
private final int AVERAGE_AMNT = 4;
private int avgCounter;
private Picture mouseImage;
private int recentCenterCount = 0;
private final Vector2f cursorPos = new Vector2f();
protected final Vector2f cursorPos = new Vector2f();
private float ySize, sensitivity = 8f, acceleration = 2f;
private final float[] lastXmv = new float[AVERAGE_AMNT], lastYmv = new float[AVERAGE_AMNT];
private boolean thumbstickMode;
private float moveScale = 1f;
private float avg(float[] arr) {
float amt = 0f;
for(float f : arr) amt += f;
return amt / arr.length;
}
/**
* Create a new VR mouse manager within the given {@link VREnvironment VR environment}.
* @param environment the VR environment of the mouse manager.
* Create a new AbstractVRMouseManager attached to the given {@link VREnvironment VR environment}.
* @param environment the {@link VREnvironment VR environment} that this manager is attached to.
*/
public VRMouseManager(VREnvironment environment){
public AbstractVRMouseManager(VREnvironment environment) {
this.environment = environment;
}
/**
* Initialize the VR mouse manager.
*/
protected void initialize() {
@Override
public void initialize() {
logger.config("Initializing VR mouse manager.");
@ -81,56 +66,48 @@ public class VRMouseManager {
logger.config("Initialized VR mouse manager [SUCCESS]");
}
@Override
public VREnvironment getVREnvironment() {
return environment;
}
@Override
public void setThumbstickMode(boolean set) {
thumbstickMode = set;
}
@Override
public boolean isThumbstickMode() {
return thumbstickMode;
}
/**
* Set the speed of the mouse.
* @param sensitivity the sensitivity of the mouse.
* @param acceleration the acceleration of the mouse.
* @see #getSpeedAcceleration()
* @see #getSpeedSensitivity()
*/
@Override
public void setSpeed(float sensitivity, float acceleration) {
this.sensitivity = sensitivity;
this.acceleration = acceleration;
}
/**
* Get the sensitivity of the mouse.
* @return the sensitivity of the mouse.
* @see #setSpeed(float, float)
*/
@Override
public float getSpeedSensitivity() {
return sensitivity;
}
/**
* Get the acceleration of the mouse.
* @return the acceleration of the mouse.
* @see #setSpeed(float, float)
*/
@Override
public float getSpeedAcceleration() {
return acceleration;
}
/**
* Set the mouse move scale.
* @param set the mouse move scale.
*/
@Override
public float getMouseMoveScale() {
return moveScale;
}
@Override
public void setMouseMoveScale(float set) {
moveScale = set;
}
/**
* Set the image to use as mouse cursor. The given string describe an asset that the underlying application asset manager has to load.
* @param texture the image to use as mouse cursor.
*/
@Override
public void setImage(String texture) {
if (environment != null){
@ -162,86 +139,8 @@ public class VRMouseManager {
}
}
/**
* Update analog controller as it was a mouse controller.
* @param inputIndex the index of the controller attached to the VR system.
* @param mouseListener the JMonkey mouse listener to trigger.
* @param mouseXName the mouseX identifier.
* @param mouseYName the mouseY identifier
* @param tpf the time per frame.
*/
public void updateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf) {
if (environment != null){
if (environment.getApplication() != null){
// got a tracked controller to use as the "mouse"
if( environment.isInVR() == false ||
environment.getVRinput() == null ||
environment.getVRinput().isInputDeviceTracking(inputIndex) == false ){
return;
}
Vector2f tpDelta;
// TODO option to use Touch joysticks
if( thumbstickMode ) {
tpDelta = environment.getVRinput().getAxis(inputIndex, VRInputType.ViveTrackpadAxis);
} else {
tpDelta = environment.getVRinput().getAxisDeltaSinceLastCall(inputIndex, VRInputType.ViveTrackpadAxis);
}
float Xamount = (float)Math.pow(Math.abs(tpDelta.x) * sensitivity, acceleration);
float Yamount = (float)Math.pow(Math.abs(tpDelta.y) * sensitivity, acceleration);
if( tpDelta.x < 0f ){
Xamount = -Xamount;
}
if( tpDelta.y < 0f ){
Yamount = -Yamount;
}
Xamount *= moveScale; Yamount *= moveScale;
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( environment.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 = environment.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.");
}
}
/**
* Get the actual cursor position.
* @return the actual cursor position.
*/
@Override
public Vector2f getCursorPosition() {
if (environment != null){
@ -259,9 +158,7 @@ public class VRMouseManager {
}
}
/**
* Center the mouse on the display.
*/
@Override
public void centerMouse() {
if (environment != null){
@ -285,12 +182,8 @@ public class VRMouseManager {
}
/**
* Update the mouse manager. This method should not be called manually.
* The standard behavior for this method is to be called from the {@link VRViewManager#update(float) update method} of the attached {@link VRViewManager VR view manager}.
* @param tpf the time per frame.
*/
protected void update(float tpf) {
@Override
public void update(float tpf) {
// if we are showing the cursor, add our picture as it
if( environment.getApplication().getInputManager().isCursorVisible() ) {

@ -1,4 +1,4 @@
package com.jme3.util;
package com.jme3.input.vr;
import com.jme3.app.VREnvironment;
import com.jme3.post.CartoonSSAO;
@ -18,7 +18,7 @@ import com.jme3.texture.Texture2D;
/**
* A VR view manager. This class holds methods that enable to submit 3D views to the VR compositor.
* System dependent classes should extends from this one.
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public abstract class AbstractVRViewManager implements VRViewManager {
@ -129,10 +129,6 @@ public abstract class AbstractVRViewManager implements VRViewManager {
return environment;
}
@Override
public void render() {
}
/**
* Handles moving filters from the main view to each eye
*/

@ -3,7 +3,7 @@ package com.jme3.input.vr;
/**
* The type of VR Head Mounted Device (HMD)
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public enum HmdType {

@ -14,7 +14,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, ...)
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public interface VRAPI {
@ -86,8 +86,8 @@ public interface VRAPI {
public boolean isInitialized();
/**
* Reset (recenter) the VR system. The current position of the HMD is
* now considered the origin (observer+[0,0,0]).
* Reset the VR system. After a call to this method, the current position of the HMD should be
* the origin (i-e the observer without any combined transformation).
*/
public void reset();

@ -1,61 +1,17 @@
package com.jme3.input.vr;
import com.jme3.math.Vector2f;
import com.jme3.system.jopenvr.JOpenVRLibrary;
import com.jme3.system.jopenvr.VR_IVRChaperone_FnTable;
import com.sun.jna.ptr.FloatByReference;
import java.util.logging.Logger;
/**
* A class that represents VR world bounds.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* This interface describe the VR playground bounds.
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class VRBounds {
private static Logger logger = Logger.getLogger(VRBounds.class.getName());
private VR_IVRChaperone_FnTable vrChaperone;
private Vector2f playSize;
public interface VRBounds {
/**
* Initialize the VR bounds.
* @return <code>true</code> if the initialization is a success and <code>false</code> otherwise.
* Get the size of the VR playground.
* @return the size of the VR playground.
*/
public boolean init(OpenVR api) {
logger.config("Initialize VR bounds...");
if( vrChaperone == null ) {
vrChaperone = new VR_IVRChaperone_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRChaperone_Version, api.hmdErrorStore).getPointer());
if( vrChaperone != null ) {
vrChaperone.setAutoSynch(false);
vrChaperone.read();
FloatByReference fbX = new FloatByReference();
FloatByReference fbZ = new FloatByReference();
vrChaperone.GetPlayAreaSize.apply(fbX, fbZ);
playSize = new Vector2f(fbX.getValue(), fbZ.getValue());
logger.config("Initialize VR bounds [SUCCESS]");
return true; // init success
}
logger.warning("Initialize VR bounds [FAILED].");
return false; // failed to init
public Vector2f getPlaySize();
}
logger.config("Initialize VR bounds already done.");
return true; // already initialized
}
/**
* Get the size of the VR world.
* @return the size of the VR world.
*/
public Vector2f getPlaySize() {
return playSize;
}
}

@ -12,7 +12,7 @@ import com.jme3.math.Vector3f;
/**
* An interface that represents a VR input (typically a VR device such as a controller).
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public interface VRInputAPI {

@ -1,11 +1,9 @@
package com.jme3.input.vr;
import static org.lwjgl.ovr.OVR.*; // For the button constants
/**
* The type of a VR input. This enumeration enables to determine which part of the VR device is involved within input callback.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public enum VRInputType {
@ -59,18 +57,18 @@ public enum VRInputType {
/**
* The upper buttons on the Oculus Touch controllers - B on the right controller, and Y on the left.
*/
OculusTopButton(ovrButton_B | ovrButton_Y),
OculusTopButton(org.lwjgl.ovr.OVR.ovrButton_B | org.lwjgl.ovr.OVR.ovrButton_Y),
/**
* The lower (not counting menu) buttons on the Oculus Touch
* controllers - A on the right controller, and X on the left.
*/
OculusBottomButton(ovrButton_A | ovrButton_X),
OculusBottomButton(org.lwjgl.ovr.OVR.ovrButton_A | org.lwjgl.ovr.OVR.ovrButton_X),
/**
* The 'click' button on the Oculus Touch thumbsticks.
*/
OculusThumbstickButton(ovrButton_LThumb | ovrButton_RThumb),
OculusThumbstickButton(org.lwjgl.ovr.OVR.ovrButton_LThumb | org.lwjgl.ovr.OVR.ovrButton_RThumb),
/**
* The game-usable menu button, under and to the left of the 'X' button on the left controller.
@ -78,22 +76,22 @@ public enum VRInputType {
* Most games use this to pause - it preferably should be used for at least that purpose, and is
* uncomfortable to rest your thumb on (in games where you suddenly have to pause/open a menu).
*/
OculusMenuButton(ovrButton_Enter),
OculusMenuButton(org.lwjgl.ovr.OVR.ovrButton_Enter),
/**
* The capacitive touch sensors on the top buttons (Y and B) of the Oculus Touch.
*/
OculusTopTouch(ovrTouch_B | ovrTouch_Y),
OculusTopTouch(org.lwjgl.ovr.OVR.ovrTouch_B | org.lwjgl.ovr.OVR.ovrTouch_Y),
/**
* The capacitive touch sensors on the lower buttons (X and A) of the Oculus Touch.
*/
OculusBottomTouch(ovrTouch_A | ovrTouch_X),
OculusBottomTouch(org.lwjgl.ovr.OVR.ovrTouch_A | org.lwjgl.ovr.OVR.ovrTouch_X),
/**
* The capacitive touch sensors on the thumbsticks of the Oculus Touch.
*/
OculusThumbstickTouch(ovrTouch_LThumb | ovrTouch_RThumb),
OculusThumbstickTouch(org.lwjgl.ovr.OVR.ovrTouch_LThumb | org.lwjgl.ovr.OVR.ovrTouch_RThumb),
/**
* The capacitive touch sensors on the thumbrests of the Oculus Touch - this is a textured pad
@ -102,7 +100,7 @@ public enum VRInputType {
* While it probably goes without saying, only use this for gesture support and do not bind game
* elements to it.
*/
OculusThumbrestTouch(ovrTouch_LThumbRest | ovrTouch_RThumbRest),
OculusThumbrestTouch(org.lwjgl.ovr.OVR.ovrTouch_LThumbRest | org.lwjgl.ovr.OVR.ovrTouch_RThumbRest),
/**
* The state of a software calculation based on the capacitive touch sensor values that determine if
@ -111,12 +109,12 @@ public enum VRInputType {
* This should be used instead of calculating this yourself based on the touch results of all the other
* parts of the controller.
*/
OculusThumbUp(ovrTouch_LThumbUp | ovrTouch_RThumbUp),
OculusThumbUp(org.lwjgl.ovr.OVR.ovrTouch_LThumbUp | org.lwjgl.ovr.OVR.ovrTouch_RThumbUp),
/**
* Is the user resting their finger on the trigger of an Oculus Touch controller?
*/
OculusIndexTouch(ovrTouch_LIndexPointing | ovrTouch_RIndexPointing),
OculusIndexTouch(org.lwjgl.ovr.OVR.ovrTouch_LIndexPointing | org.lwjgl.ovr.OVR.ovrTouch_RIndexPointing),
/**
* Is the user pointing their finger forwards, as if to press a button?
@ -124,7 +122,7 @@ public enum VRInputType {
* This is internally calculated from proximity and filtering is applied - it should be used rather
* than !OculusIndexTouch, as it will probably lead to better results.
*/
OculusIndexPointing(ovrTouch_LIndexPointing | ovrTouch_RIndexPointing);
OculusIndexPointing(org.lwjgl.ovr.OVR.ovrTouch_LIndexPointing | org.lwjgl.ovr.OVR.ovrTouch_RIndexPointing);
/**
* The value that codes the input type.

@ -0,0 +1,107 @@
package com.jme3.input.vr;
import com.jme3.app.VREnvironment;
import com.jme3.input.controls.AnalogListener;
import com.jme3.math.Vector2f;
/**
* A class dedicated to the handling of the mouse within VR environment.
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public interface VRMouseManager {
/**
* Initialize the VR mouse manager.
*/
public void initialize();
/**
* Get the {@link VREnvironment VR Environment} to which this manager is attached.
* @return the {@link VREnvironment VR Environment} to which this manager is attached.
*/
public VREnvironment getVREnvironment();
/**
* Set if the VR device controller is used within thumb stick mode.
* @param set <code>true</code> if the VR device controller is used within thumb stick mode and <code>false</code> otherwise.
*/
public void setThumbstickMode(boolean set);
/**
* Get if the VR device controller is used within thumb stick mode.
* @return <code>true</code> if the VR device controller is used within thumb stick mode and <code>false</code> otherwise.
*/
public boolean isThumbstickMode();
/**
* Set the speed of the mouse.
* @param sensitivity the sensitivity of the mouse.
* @param acceleration the acceleration of the mouse.
* @see #getSpeedAcceleration()
* @see #getSpeedSensitivity()
*/
public void setSpeed(float sensitivity, float acceleration);
/**
* Get the sensitivity of the mouse.
* @return the sensitivity of the mouse.
* @see #setSpeed(float, float)
*/
public float getSpeedSensitivity();
/**
* Get the acceleration of the mouse.
* @return the acceleration of the mouse.
* @see #setSpeed(float, float)
*/
public float getSpeedAcceleration();
/**
* Get the move scale.
* return the move scale.
* @see #setMouseMoveScale(float)
*/
public float getMouseMoveScale();
/**
* Set the mouse move scale.
* @param set the mouse move scale.
* @see #getMouseMoveScale()
*/
public void setMouseMoveScale(float set);
/**
* Set the image to use as mouse cursor. The given string describe an asset that the underlying application asset manager has to load.
* @param texture the image to use as mouse cursor.
*/
public void setImage(String texture);
/**
* Update analog controller as it was a mouse controller.
* @param inputIndex the index of the controller attached to the VR system.
* @param mouseListener the JMonkey mouse listener to trigger.
* @param mouseXName the mouseX identifier.
* @param mouseYName the mouseY identifier
* @param tpf the time per frame.
*/
public void updateAnalogAsMouse(int inputIndex, AnalogListener mouseListener, String mouseXName, String mouseYName, float tpf);
/**
* Get the actual cursor position.
* @return the actual cursor position.
*/
public Vector2f getCursorPosition();
/**
* Center the mouse on the display.
*/
public void centerMouse();
/**
* Update the mouse manager. This method should not be called manually.
* The standard behavior for this method is to be called from the {@link VRViewManager#update(float) update method} of the attached {@link VRViewManager VR view manager}.
* @param tpf the time per frame.
*/
public void update(float tpf);
}

@ -6,8 +6,7 @@ import com.jme3.math.Vector3f;
/**
* TODO
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
*
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public interface VRTrackedController {

@ -1,4 +1,4 @@
package com.jme3.util;
package com.jme3.input.vr;
import com.jme3.app.VRAppState;
import com.jme3.app.VREnvironment;
@ -11,7 +11,7 @@ import com.jme3.texture.Texture2D;
/**
* A VR view manager. This interface describes methods that enable to submit 3D views to the VR compositor.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public interface VRViewManager {
@ -151,8 +151,9 @@ public interface VRViewManager {
public void update(float tpf);
/**
* Set up the scene for rendering.
* This method should be called before any rendering takes place.
* This method contains action to be done during the rendering phase.
* This method should be called for example from the {@link com.jme3.app.state.AppState#render(com.jme3.renderer.RenderManager) render} method of an {@link com.jme3.app.state.AppState app state}.
* @see #postRender()
*/
public void render();
@ -160,6 +161,7 @@ public interface VRViewManager {
* Send the rendering result as textures to the two eyes.
* This method should be called after all the rendering operations
* (for example at the end of the {@link AppState#postRender() postRender()} method of the attached app state.)
* @see #preRender()
*/
public void postRender();

@ -0,0 +1,108 @@
package com.jme3.input.vr.oculus;
import com.jme3.app.VREnvironment;
import com.jme3.input.controls.AnalogListener;
import com.jme3.input.vr.AbstractVRMouseManager;
import com.jme3.input.vr.VRInputType;
import com.jme3.math.Vector2f;
/**
* A class dedicated to the mouse handling within Oculus Rift based VR experience.
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class OculusMouseManager 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 OculusMouseManager(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.OculusThumbstickAxis);
} else {
tpDelta = getVREnvironment().getVRinput().getAxisDeltaSinceLastCall(inputIndex, VRInputType.OculusThumbstickAxis);
}
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;
}
}

@ -3,9 +3,11 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.input.vr;
package com.jme3.input.vr.oculus;
import com.jme3.app.VREnvironment;
import com.jme3.input.vr.HmdType;
import com.jme3.input.vr.VRAPI;
import com.jme3.math.*;
import com.jme3.renderer.Camera;
import com.jme3.texture.*;

@ -1,10 +1,13 @@
package com.jme3.input.vr;
package com.jme3.input.vr.oculus;
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.*;
import com.jme3.renderer.Camera;
import com.jme3.scene.Spatial;
import com.jme3.util.VRViewManagerOculus;
import org.lwjgl.ovr.*;
import static org.lwjgl.ovr.OVR.*;
@ -129,7 +132,7 @@ public class OculusVRInput implements VRInputAPI {
// Copied from OpenVRInput
VREnvironment env = hardware.getEnvironment();
VRViewManagerOculus vrvm = (VRViewManagerOculus) hardware.getEnvironment().getVRViewManager();
OculusViewManager vrvm = (OculusViewManager) hardware.getEnvironment().getVRViewManager();
Object obs = env.getObserver();
Quaternion tempq = new Quaternion(); // TODO move to class scope?
@ -147,7 +150,7 @@ public class OculusVRInput implements VRInputAPI {
// Copied from OpenVRInput
VREnvironment env = hardware.getEnvironment();
VRViewManagerOculus vrvm = (VRViewManagerOculus) hardware.getEnvironment().getVRViewManager();
OculusViewManager vrvm = (OculusViewManager) hardware.getEnvironment().getVRViewManager();
Object obs = env.getObserver();
Vector3f pos = getPosition(index);

@ -29,16 +29,18 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.jme3.util;
package com.jme3.input.vr.oculus;
import com.jme3.app.VREnvironment;
import com.jme3.input.vr.OculusVR;
import com.jme3.input.vr.AbstractVRViewManager;
import com.jme3.input.vr.VRAPI;
import com.jme3.math.*;
import com.jme3.renderer.Camera;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Spatial;
import com.jme3.texture.*;
import com.jme3.util.BufferUtils;
import com.jme3.util.VRGUIPositioningMode;
import java.nio.IntBuffer;
import java.util.Iterator;
@ -55,9 +57,9 @@ import static org.lwjgl.ovr.OVRErrorCode.*;
*
* @author Campbell Suter <znix@znix.xyz>
*/
public class VRViewManagerOculus extends AbstractVRViewManager {
public class OculusViewManager extends AbstractVRViewManager {
private static final Logger LOG = Logger.getLogger(VRViewManagerOculus.class.getName());
private static final Logger LOG = Logger.getLogger(OculusViewManager.class.getName());
private final VREnvironment environment;
private final OculusVR hardware;
@ -69,7 +71,7 @@ public class VRViewManagerOculus extends AbstractVRViewManager {
private final Vector3f hmdPos = new Vector3f();
private final Quaternion hmdRot = new Quaternion();
public VRViewManagerOculus(VREnvironment environment) {
public OculusViewManager(VREnvironment environment) {
this.environment = environment;
VRAPI hardware = environment.getVRHardware();
@ -153,7 +155,7 @@ public class VRViewManagerOculus extends AbstractVRViewManager {
environment.getVRMouseManager().update(tpf);
// update GUI position?
if (environment.getVRGUIManager().wantsReposition || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL) {
if (environment.getVRGUIManager().isWantsReposition() || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL) {
environment.getVRGUIManager().positionGuiNow(tpf);
environment.getVRGUIManager().updateGuiQuadGeometricState();
}

@ -3,9 +3,11 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.input.vr;
package com.jme3.input.vr.openvr;
import com.jme3.app.VREnvironment;
import com.jme3.input.vr.HmdType;
import com.jme3.input.vr.VRAPI;
import com.jme3.math.Matrix4f;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector2f;
@ -35,15 +37,15 @@ import java.util.logging.Logger;
/**
* A class that wraps an <a href="https://github.com/ValveSoftware/openvr/wiki/API-Documentation">OpenVR</a> system.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OpenVR implements VRAPI {
private static final Logger logger = Logger.getLogger(OpenVR.class.getName());
private static VR_IVRCompositor_FnTable compositorFunctions;
private static VR_IVRTrackedCamera_FnTable cameraFunctions;
private static VR_IVRSystem_FnTable vrsystemFunctions;
private static VR_IVRTrackedCamera_FnTable cameraFunctions;
private static boolean initSuccess = false;
private static boolean flipEyes = false;
@ -145,7 +147,17 @@ public class OpenVR implements VRAPI {
hmdErrorStore = new IntByReference();
vrsystemFunctions = null;
// Init the native linking to the OpenVR library.
try{
JOpenVRLibrary.init();
} catch(Throwable t){
logger.log(Level.SEVERE, "Cannot link to OpenVR system library: "+t.getMessage(), t);
return false;
}
JOpenVRLibrary.VR_InitInternal(hmdErrorStore, JOpenVRLibrary.EVRApplicationType.EVRApplicationType_VRApplication_Scene);
if( hmdErrorStore.getValue() == 0 ) {
vrsystemFunctions = new VR_IVRSystem_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRSystem_Version, hmdErrorStore).getPointer());
}
@ -160,6 +172,7 @@ public class OpenVR implements VRAPI {
vrsystemFunctions.setAutoSynch(false);
vrsystemFunctions.read();
tlastVsync = new FloatByReference();
_tframeCount = new LongByReference();
@ -188,7 +201,9 @@ public class OpenVR implements VRAPI {
VRinput.updateConnectedControllers();
// init bounds & chaperone info
environment.getVRBounds().init(this);
OpenVRBounds bounds = new OpenVRBounds();
bounds.init(this);
environment.setVRBounds(bounds);
logger.config("Initializing OpenVR system [SUCCESS]");
initSuccess = true;
@ -242,8 +257,13 @@ public class OpenVR implements VRAPI {
return compositorFunctions != null;
}
/**
* Initialize the headset camera.
* @param allowed <code>true</code> is the use of the headset camera is allowed and <code>false</code> otherwise.
*/
public void initCamera(boolean allowed) {
hmdErrorStore.setValue(0); // clear the error store
if( allowed && vrsystemFunctions != null ) {
IntByReference intptr = JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRTrackedCamera_Version, hmdErrorStore);
if (intptr != null){

@ -0,0 +1,59 @@
package com.jme3.input.vr.openvr;
import com.jme3.input.vr.VRBounds;
import com.jme3.math.Vector2f;
import com.jme3.system.jopenvr.JOpenVRLibrary;
import com.jme3.system.jopenvr.VR_IVRChaperone_FnTable;
import com.sun.jna.ptr.FloatByReference;
import java.util.logging.Logger;
/**
* A class that represents VR world bounds.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OpenVRBounds implements VRBounds {
private static Logger logger = Logger.getLogger(OpenVRBounds.class.getName());
private VR_IVRChaperone_FnTable vrChaperone;
private Vector2f playSize;
/**
* Initialize the VR bounds.
* @return <code>true</code> if the initialization is a success and <code>false</code> otherwise.
*/
public boolean init(OpenVR api) {
logger.config("Initialize VR bounds...");
if( vrChaperone == null ) {
vrChaperone = new VR_IVRChaperone_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRChaperone_Version, api.hmdErrorStore).getPointer());
if( vrChaperone != null ) {
vrChaperone.setAutoSynch(false);
vrChaperone.read();
FloatByReference fbX = new FloatByReference();
FloatByReference fbZ = new FloatByReference();
vrChaperone.GetPlayAreaSize.apply(fbX, fbZ);
playSize = new Vector2f(fbX.getValue(), fbZ.getValue());
logger.config("Initialize VR bounds [SUCCESS]");
return true; // init success
}
logger.warning("Initialize VR bounds [FAILED].");
return false; // failed to init
}
logger.config("Initialize VR bounds already done.");
return true; // already initialized
}
@Override
public Vector2f getPlaySize() {
return playSize;
}
}

@ -3,7 +3,7 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.input.vr;
package com.jme3.input.vr.openvr;
import java.util.ArrayList;
import java.util.List;
@ -11,6 +11,9 @@ import java.util.logging.Level;
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;
@ -21,7 +24,6 @@ import com.jme3.system.jopenvr.OpenVRUtil;
import com.jme3.system.jopenvr.VRControllerState_t;
import com.jme3.system.jopenvr.VR_IVRSystem_FnTable;
import com.jme3.util.VRUtil;
import com.jme3.util.VRViewManagerOpenVR;
/*
make helper functions to pull the following easily from raw data (DONE)
@ -65,7 +67,7 @@ Button press: 2, touch: 2
* <code>null</code> values will be returned if no valid pose exists, or that input device isn't available
* user code should check for <code>null</code> values.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OpenVRInput implements VRInputAPI {
@ -393,7 +395,7 @@ public class OpenVRInput implements VRInputAPI {
public Quaternion getFinalObserverRotation(int index) {
if (environment != null){
VRViewManagerOpenVR vrvm = (VRViewManagerOpenVR)environment.getVRViewManager();
OpenVRViewManager vrvm = (OpenVRViewManager)environment.getVRViewManager();
if (vrvm != null){
if(isInputDeviceTracking(index) == false ){
@ -422,7 +424,7 @@ public class OpenVRInput implements VRInputAPI {
public Vector3f getFinalObserverPosition(int index) {
if (environment != null){
VRViewManagerOpenVR vrvm = (VRViewManagerOpenVR)environment.getVRViewManager();
OpenVRViewManager vrvm = (OpenVRViewManager)environment.getVRViewManager();
if (vrvm != null){
if(isInputDeviceTracking(index) == false ){

@ -0,0 +1,114 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.input.vr.openvr;
import com.jme3.app.VREnvironment;
import com.jme3.input.controls.AnalogListener;
import com.jme3.input.vr.AbstractVRMouseManager;
import com.jme3.input.vr.VRInputType;
import com.jme3.math.Vector2f;
/**
* A class dedicated to the handling of the mouse within VR environment.
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OpenVRMouseManager 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 OpenVRMouseManager(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;
}
}

@ -1,10 +1,16 @@
package com.jme3.input.vr;
package com.jme3.input.vr.openvr;
import com.jme3.app.VREnvironment;
import com.jme3.input.vr.VRTrackedController;
import com.jme3.math.Matrix4f;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
/**
*
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class OpenVRTrackedController implements VRTrackedController{
/**

@ -2,12 +2,11 @@
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.util;
package com.jme3.input.vr.openvr;
import com.jme3.app.VREnvironment;
import com.jme3.input.vr.OpenVR;
import com.jme3.input.vr.AbstractVRViewManager;
import com.jme3.input.vr.VRAPI;
import com.jme3.input.vr.VRTrackedController;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Quaternion;
@ -32,6 +31,7 @@ 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 java.util.Iterator;
import java.util.logging.Logger;
@ -39,11 +39,11 @@ import java.util.logging.Logger;
/**
* A VR view manager based on OpenVR. This class enable to submit 3D views to the VR compositor.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class VRViewManagerOpenVR extends AbstractVRViewManager {
public class OpenVRViewManager extends AbstractVRViewManager {
private static final Logger logger = Logger.getLogger(VRViewManagerOpenVR.class.getName());
private static final Logger logger = Logger.getLogger(OpenVRViewManager.class.getName());
// OpenVR values
private VRTextureBounds_t leftTextureBounds;
@ -64,7 +64,7 @@ public class VRViewManagerOpenVR extends AbstractVRViewManager {
* 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 VRViewManagerOpenVR(VREnvironment environment){
public OpenVRViewManager(VREnvironment environment){
this.environment = environment;
}
@ -168,6 +168,11 @@ public class VRViewManagerOpenVR extends AbstractVRViewManager {
}
}
@Override
public void render() {
}
@Override
public void postRender() {
@ -464,7 +469,7 @@ public class VRViewManagerOpenVR extends AbstractVRViewManager {
environment.getVRMouseManager().update(tpf);
// update GUI position?
if( environment.getVRGUIManager().wantsReposition || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL ) {
if( environment.getVRGUIManager().isWantsReposition() || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL ) {
environment.getVRGUIManager().positionGuiNow(tpf);
environment.getVRGUIManager().updateGuiQuadGeometricState();
}

@ -7,9 +7,12 @@ https://github.com/sensics/OSVR-RenderManager/blob/master/examples/RenderManager
- render manager looks good, but left eye seems stretched
*/
package com.jme3.input.vr;
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;
@ -35,7 +38,7 @@ import java.util.logging.Logger;
/**
* A class that wraps an <a href="http://www.osvr.org/">OSVR</a> system.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OSVR implements VRAPI {

@ -3,11 +3,14 @@
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.jme3.input.vr;
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;
@ -20,7 +23,6 @@ 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.jme3.util.VRViewManagerOSVR;
import com.sun.jna.Callback;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.PointerByReference;
@ -29,7 +31,7 @@ import com.sun.jna.ptr.PointerByReference;
/**
* A class that wraps an <a href="http://www.osvr.org/">OSVR</a> input.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OSVRInput implements VRInputAPI {
@ -301,7 +303,7 @@ public class OSVRInput implements VRInputAPI {
@Override
public Quaternion getFinalObserverRotation(int index) {
VRViewManagerOSVR vrvm = (VRViewManagerOSVR)environment.getVRViewManager();
OSVRViewManager vrvm = (OSVRViewManager)environment.getVRViewManager();
if( vrvm == null || isInputDeviceTracking(index) == false ) return null;
Object obs = environment.getObserver();
if( obs instanceof Camera ) {
@ -314,7 +316,7 @@ public class OSVRInput implements VRInputAPI {
@Override
public Vector3f getFinalObserverPosition(int index) {
VRViewManagerOSVR vrvm = (VRViewManagerOSVR) environment.getVRViewManager();
OSVRViewManager vrvm = (OSVRViewManager) environment.getVRViewManager();
if( vrvm == null || isInputDeviceTracking(index) == false ) return null;
Object obs = environment.getObserver();
Vector3f pos = getPosition(index);

@ -0,0 +1,108 @@
package com.jme3.input.vr.osvr;
import com.jme3.app.VREnvironment;
import com.jme3.input.controls.AnalogListener;
import com.jme3.input.vr.AbstractVRMouseManager;
import com.jme3.input.vr.VRInputType;
import com.jme3.math.Vector2f;
/**
* A class dedicated to the mouse handling within OSVR based VR experience.
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
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;
}
}

@ -1,12 +1,13 @@
package com.jme3.util;
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.OSVR;
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;
@ -44,11 +45,17 @@ 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;
public class VRViewManagerOSVR extends AbstractVRViewManager{
private static final Logger logger = Logger.getLogger(VRViewManagerOpenVR.class.getName());
/**
*
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class OSVRViewManager extends AbstractVRViewManager{
private static final Logger logger = Logger.getLogger(OpenVRViewManager.class.getName());
// OpenVR values
private Texture_t leftTextureType;
@ -75,7 +82,7 @@ public class VRViewManagerOSVR extends AbstractVRViewManager{
* 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 VRViewManagerOSVR(VREnvironment environment){
public OSVRViewManager(VREnvironment environment){
this.environment = environment;
}
@ -476,7 +483,7 @@ public class VRViewManagerOSVR extends AbstractVRViewManager{
environment.getVRMouseManager().update(tpf);
// update GUI position?
if( environment.getVRGUIManager().wantsReposition || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL ) {
if( environment.getVRGUIManager().isWantsReposition() || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL ) {
environment.getVRGUIManager().positionGuiNow(tpf);
environment.getVRGUIManager().updateGuiQuadGeometricState();
}
@ -865,4 +872,10 @@ public class VRViewManagerOSVR extends AbstractVRViewManager{
distortionMesh.setStatic();
return distortionMesh;
}
@Override
public void render() {
// TODO Auto-generated method stub
}
}

@ -17,7 +17,7 @@ import com.jme3.texture.Image.Format;
/**
* A Cartoon Screen Space Ambient Occlusion filter with instance rendering capabilities.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*
*/
public class CartoonSSAO extends Filter{

@ -15,7 +15,7 @@ import com.jme3.texture.FrameBuffer;
/**
* Pre normal caching class.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class PreNormalCaching {

@ -55,7 +55,7 @@ import java.io.IOException;
*
* @author Rémy Bouquet aka Nehon
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
* @param <T> the type of the underlying renderer (subclass of {@link AbstractShadowRendererVR}).
*/
public abstract class AbstractShadowFilterVR<T extends AbstractShadowRendererVR> extends Filter {

@ -71,7 +71,7 @@ import java.util.List;
*
* @author Rémy Bouquet aka Nehon
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public abstract class AbstractShadowRendererVR implements SceneProcessor, Savable {

@ -55,7 +55,7 @@ import java.io.IOException;
*
* @author Rémy Bouquet aka Nehon
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class DirectionalLightShadowFilterVR extends AbstractShadowFilterVR<DirectionalLightShadowRendererVR> {

@ -63,7 +63,7 @@ import java.io.IOException;
* <p/>
* @author Rémy Bouquet aka Nehon
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class DirectionalLightShadowRendererVR extends AbstractShadowRendererVR {

@ -13,7 +13,7 @@ import com.jme3.renderer.Camera;
/**
* An instanced version of the {@link DirectionalLightShadowFilterVR directional light shadow filter} dedi.
* @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class InstancedDirectionalShadowFilter extends DirectionalLightShadowFilterVR {

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1133</i><br>
* <i>native declaration : headers\openvr_capi.h:1160</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -5,7 +5,7 @@ import com.sun.jna.ptr.IntByReference;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1262</i><br>
* <i>native declaration : headers\openvr_capi.h:1291</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.
@ -71,11 +71,16 @@ public class COpenVRContext extends Structure {
* C type : intptr_t
*/
public IntByReference m_pVRScreenshots;
/**
* class vr::IVRDriverManager *<br>
* C type : intptr_t
*/
public IntByReference m_pVRDriverManager;
public COpenVRContext() {
super();
}
protected List<String> getFieldOrder() {
return Arrays.asList("m_pVRSystem", "m_pVRChaperone", "m_pVRChaperoneSetup", "m_pVRCompositor", "m_pVROverlay", "m_pVRResources", "m_pVRRenderModels", "m_pVRExtendedDisplay", "m_pVRSettings", "m_pVRApplications", "m_pVRTrackedCamera", "m_pVRScreenshots");
return Arrays.asList("m_pVRSystem", "m_pVRChaperone", "m_pVRChaperoneSetup", "m_pVRCompositor", "m_pVROverlay", "m_pVRResources", "m_pVRRenderModels", "m_pVRExtendedDisplay", "m_pVRSettings", "m_pVRApplications", "m_pVRTrackedCamera", "m_pVRScreenshots", "m_pVRDriverManager");
}
public COpenVRContext(Pointer peer) {
super(peer);

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1127</i><br>
* <i>native declaration : headers\openvr_capi.h:1154</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1176</i><br>
* <i>native declaration : headers\openvr_capi.h:1203</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1159</i><br>
* <i>native declaration : headers\openvr_capi.h:1186</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1117</i><br>
* <i>native declaration : headers\openvr_capi.h:1144</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -6,7 +6,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1003</i><br>
* <i>native declaration : headers\openvr_capi.h:1030</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:954</i><br>
* <i>native declaration : headers\openvr_capi.h:981</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1090</i><br>
* <i>native declaration : headers\openvr_capi.h:1117</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:938</i><br>
* <i>native declaration : headers\openvr_capi.h:965</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:906</i><br>
* <i>native declaration : headers\openvr_capi.h:933</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:910</i><br>
* <i>native declaration : headers\openvr_capi.h:937</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:942</i><br>
* <i>native declaration : headers\openvr_capi.h:969</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:932</i><br>
* <i>native declaration : headers\openvr_capi.h:959</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:946</i><br>
* <i>native declaration : headers\openvr_capi.h:973</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:926</i><br>
* <i>native declaration : headers\openvr_capi.h:953</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:914</i><br>
* <i>native declaration : headers\openvr_capi.h:941</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:922</i><br>
* <i>native declaration : headers\openvr_capi.h:949</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:918</i><br>
* <i>native declaration : headers\openvr_capi.h:945</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1200</i><br>
* <i>native declaration : headers\openvr_capi.h:1227</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1195</i><br>
* <i>native declaration : headers\openvr_capi.h:1222</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1236</i><br>
* <i>native declaration : headers\openvr_capi.h:1263</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -1,6 +1,6 @@
package com.jme3.system.jopenvr;
import com.jme3.input.vr.OpenVRInput;
import com.jme3.input.vr.openvr.OpenVRInput;
import com.jme3.system.jopenvr.JOpenVRLibrary.EColorSpace;
import com.jme3.system.jopenvr.JOpenVRLibrary.ETextureType;
import com.jme3.system.jopenvr.JOpenVRLibrary.ETrackedDeviceProperty;
@ -13,8 +13,7 @@ import com.sun.jna.ptr.IntByReference;
/**
* A utility class that provide helper methods for OpenVR system.
* @author Julien Seinturier - (c) 2016 - JOrigin project - <a href="http://www.jorigin.org">http:/www.jorigin.org</a>
*
* @author Julien Seinturier - 2017 - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/
public class OpenVRUtil {
@ -677,9 +676,6 @@ public class OpenVRUtil {
case ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_DisplayMCImageData_Binary:
str = "";
break;
case ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_UsesDriverDirectMode_Bool:
str = "";
break;
case ETrackedDeviceProperty.ETrackedDeviceProperty_Prop_AttachedDeviceId_String:
str = "";
break;

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1205</i><br>
* <i>native declaration : headers\openvr_capi.h:1232</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1229</i><br>
* <i>native declaration : headers\openvr_capi.h:1256</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1217</i><br>
* <i>native declaration : headers\openvr_capi.h:1244</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1211</i><br>
* <i>native declaration : headers\openvr_capi.h:1238</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -5,7 +5,7 @@ import com.sun.jna.ptr.ShortByReference;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1226</i><br>
* <i>native declaration : headers\openvr_capi.h:1253</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:964</i><br>
* <i>native declaration : headers\openvr_capi.h:991</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:974</i><br>
* <i>native declaration : headers\openvr_capi.h:1001</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1094</i><br>
* <i>native declaration : headers\openvr_capi.h:1121</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1101</i><br>
* <i>native declaration : headers\openvr_capi.h:1128</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1072</i><br>
* <i>native declaration : headers\openvr_capi.h:1099</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1051</i><br>
* <i>native declaration : headers\openvr_capi.h:1078</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1006</i><br>
* <i>native declaration : headers\openvr_capi.h:1033</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -2,7 +2,7 @@ package com.jme3.system.jopenvr;
import com.sun.jna.Pointer;
import com.sun.jna.Union;
/**
* <i>native declaration : headers\openvr_capi.h:1278</i><br>
* <i>native declaration : headers\openvr_capi.h:1307</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1076</i><br>
* <i>native declaration : headers\openvr_capi.h:1103</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1047</i><br>
* <i>native declaration : headers\openvr_capi.h:1074</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1044</i><br>
* <i>native declaration : headers\openvr_capi.h:1071</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1079</i><br>
* <i>native declaration : headers\openvr_capi.h:1106</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1011</i><br>
* <i>native declaration : headers\openvr_capi.h:1038</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1028</i><br>
* <i>native declaration : headers\openvr_capi.h:1055</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1036</i><br>
* <i>native declaration : headers\openvr_capi.h:1063</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1058</i><br>
* <i>native declaration : headers\openvr_capi.h:1085</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1033</i><br>
* <i>native declaration : headers\openvr_capi.h:1060</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1085</i><br>
* <i>native declaration : headers\openvr_capi.h:1112</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1055</i><br>
* <i>native declaration : headers\openvr_capi.h:1082</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1068</i><br>
* <i>native declaration : headers\openvr_capi.h:1095</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1065</i><br>
* <i>native declaration : headers\openvr_capi.h:1092</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1016</i><br>
* <i>native declaration : headers\openvr_capi.h:1043</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1061</i><br>
* <i>native declaration : headers\openvr_capi.h:1088</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1039</i><br>
* <i>native declaration : headers\openvr_capi.h:1066</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1024</i><br>
* <i>native declaration : headers\openvr_capi.h:1051</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -5,7 +5,7 @@ import java.util.Arrays;
import java.util.List;
/**
* An event posted by the server to all running applications<br>
* <i>native declaration : headers\openvr_capi.h:1286</i><br>
* <i>native declaration : headers\openvr_capi.h:1315</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -2,7 +2,7 @@ package com.jme3.system.jopenvr;
import com.sun.jna.Pointer;
import com.sun.jna.Union;
/**
* <i>native declaration : headers\openvr_capi.h:1290</i><br>
* <i>native declaration : headers\openvr_capi.h:1319</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1294</i><br>
* <i>native declaration : headers\openvr_capi.h:1323</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1183</i><br>
* <i>native declaration : headers\openvr_capi.h:1210</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1189</i><br>
* <i>native declaration : headers\openvr_capi.h:1216</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -4,7 +4,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:980</i><br>
* <i>native declaration : headers\openvr_capi.h:1007</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -8,7 +8,7 @@ import com.sun.jna.Structure;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:996</i><br>
* <i>native declaration : headers\openvr_capi.h:1023</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.

@ -6,7 +6,7 @@ import com.sun.jna.ptr.IntByReference;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1483</i><br>
* <i>native declaration : headers\openvr_capi.h:1514</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.
@ -74,127 +74,127 @@ public class VR_IVRApplications_FnTable extends Structure {
public VR_IVRApplications_FnTable.LaunchInternalProcess_callback LaunchInternalProcess;
/** C type : GetCurrentSceneProcessId_callback* */
public VR_IVRApplications_FnTable.GetCurrentSceneProcessId_callback GetCurrentSceneProcessId;
/** <i>native declaration : headers\openvr_capi.h:1452</i> */
/** <i>native declaration : headers\openvr_capi.h:1483</i> */
public interface AddApplicationManifest_callback extends Callback {
int apply(Pointer pchApplicationManifestFullPath, byte bTemporary);
};
/** <i>native declaration : headers\openvr_capi.h:1453</i> */
/** <i>native declaration : headers\openvr_capi.h:1484</i> */
public interface RemoveApplicationManifest_callback extends Callback {
int apply(Pointer pchApplicationManifestFullPath);
};
/** <i>native declaration : headers\openvr_capi.h:1454</i> */
/** <i>native declaration : headers\openvr_capi.h:1485</i> */
public interface IsApplicationInstalled_callback extends Callback {
byte apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1455</i> */
/** <i>native declaration : headers\openvr_capi.h:1486</i> */
public interface GetApplicationCount_callback extends Callback {
int apply();
};
/** <i>native declaration : headers\openvr_capi.h:1456</i> */
/** <i>native declaration : headers\openvr_capi.h:1487</i> */
public interface GetApplicationKeyByIndex_callback extends Callback {
int apply(int unApplicationIndex, Pointer pchAppKeyBuffer, int unAppKeyBufferLen);
};
/** <i>native declaration : headers\openvr_capi.h:1457</i> */
/** <i>native declaration : headers\openvr_capi.h:1488</i> */
public interface GetApplicationKeyByProcessId_callback extends Callback {
int apply(int unProcessId, Pointer pchAppKeyBuffer, int unAppKeyBufferLen);
};
/** <i>native declaration : headers\openvr_capi.h:1458</i> */
/** <i>native declaration : headers\openvr_capi.h:1489</i> */
public interface LaunchApplication_callback extends Callback {
int apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1459</i> */
/** <i>native declaration : headers\openvr_capi.h:1490</i> */
public interface LaunchTemplateApplication_callback extends Callback {
int apply(Pointer pchTemplateAppKey, Pointer pchNewAppKey, AppOverrideKeys_t pKeys, int unKeys);
};
/** <i>native declaration : headers\openvr_capi.h:1460</i> */
/** <i>native declaration : headers\openvr_capi.h:1491</i> */
public interface LaunchApplicationFromMimeType_callback extends Callback {
int apply(Pointer pchMimeType, Pointer pchArgs);
};
/** <i>native declaration : headers\openvr_capi.h:1461</i> */
/** <i>native declaration : headers\openvr_capi.h:1492</i> */
public interface LaunchDashboardOverlay_callback extends Callback {
int apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1462</i> */
/** <i>native declaration : headers\openvr_capi.h:1493</i> */
public interface CancelApplicationLaunch_callback extends Callback {
byte apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1463</i> */
/** <i>native declaration : headers\openvr_capi.h:1494</i> */
public interface IdentifyApplication_callback extends Callback {
int apply(int unProcessId, Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1464</i> */
/** <i>native declaration : headers\openvr_capi.h:1495</i> */
public interface GetApplicationProcessId_callback extends Callback {
int apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1465</i> */
/** <i>native declaration : headers\openvr_capi.h:1496</i> */
public interface GetApplicationsErrorNameFromEnum_callback extends Callback {
Pointer apply(int error);
};
/** <i>native declaration : headers\openvr_capi.h:1466</i> */
/** <i>native declaration : headers\openvr_capi.h:1497</i> */
public interface GetApplicationPropertyString_callback extends Callback {
int apply(Pointer pchAppKey, int eProperty, Pointer pchPropertyValueBuffer, int unPropertyValueBufferLen, IntByReference peError);
};
/** <i>native declaration : headers\openvr_capi.h:1467</i> */
/** <i>native declaration : headers\openvr_capi.h:1498</i> */
public interface GetApplicationPropertyBool_callback extends Callback {
byte apply(Pointer pchAppKey, int eProperty, IntByReference peError);
};
/** <i>native declaration : headers\openvr_capi.h:1468</i> */
/** <i>native declaration : headers\openvr_capi.h:1499</i> */
public interface GetApplicationPropertyUint64_callback extends Callback {
long apply(Pointer pchAppKey, int eProperty, IntByReference peError);
};
/** <i>native declaration : headers\openvr_capi.h:1469</i> */
/** <i>native declaration : headers\openvr_capi.h:1500</i> */
public interface SetApplicationAutoLaunch_callback extends Callback {
int apply(Pointer pchAppKey, byte bAutoLaunch);
};
/** <i>native declaration : headers\openvr_capi.h:1470</i> */
/** <i>native declaration : headers\openvr_capi.h:1501</i> */
public interface GetApplicationAutoLaunch_callback extends Callback {
byte apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1471</i> */
/** <i>native declaration : headers\openvr_capi.h:1502</i> */
public interface SetDefaultApplicationForMimeType_callback extends Callback {
int apply(Pointer pchAppKey, Pointer pchMimeType);
};
/** <i>native declaration : headers\openvr_capi.h:1472</i> */
/** <i>native declaration : headers\openvr_capi.h:1503</i> */
public interface GetDefaultApplicationForMimeType_callback extends Callback {
byte apply(Pointer pchMimeType, Pointer pchAppKeyBuffer, int unAppKeyBufferLen);
};
/** <i>native declaration : headers\openvr_capi.h:1473</i> */
/** <i>native declaration : headers\openvr_capi.h:1504</i> */
public interface GetApplicationSupportedMimeTypes_callback extends Callback {
byte apply(Pointer pchAppKey, Pointer pchMimeTypesBuffer, int unMimeTypesBuffer);
};
/** <i>native declaration : headers\openvr_capi.h:1474</i> */
/** <i>native declaration : headers\openvr_capi.h:1505</i> */
public interface GetApplicationsThatSupportMimeType_callback extends Callback {
int apply(Pointer pchMimeType, Pointer pchAppKeysThatSupportBuffer, int unAppKeysThatSupportBuffer);
};
/** <i>native declaration : headers\openvr_capi.h:1475</i> */
/** <i>native declaration : headers\openvr_capi.h:1506</i> */
public interface GetApplicationLaunchArguments_callback extends Callback {
int apply(int unHandle, Pointer pchArgs, int unArgs);
};
/** <i>native declaration : headers\openvr_capi.h:1476</i> */
/** <i>native declaration : headers\openvr_capi.h:1507</i> */
public interface GetStartingApplication_callback extends Callback {
int apply(Pointer pchAppKeyBuffer, int unAppKeyBufferLen);
};
/** <i>native declaration : headers\openvr_capi.h:1477</i> */
/** <i>native declaration : headers\openvr_capi.h:1508</i> */
public interface GetTransitionState_callback extends Callback {
int apply();
};
/** <i>native declaration : headers\openvr_capi.h:1478</i> */
/** <i>native declaration : headers\openvr_capi.h:1509</i> */
public interface PerformApplicationPrelaunchCheck_callback extends Callback {
int apply(Pointer pchAppKey);
};
/** <i>native declaration : headers\openvr_capi.h:1479</i> */
/** <i>native declaration : headers\openvr_capi.h:1510</i> */
public interface GetApplicationsTransitionStateNameFromEnum_callback extends Callback {
Pointer apply(int state);
};
/** <i>native declaration : headers\openvr_capi.h:1480</i> */
/** <i>native declaration : headers\openvr_capi.h:1511</i> */
public interface IsQuitUserPromptRequested_callback extends Callback {
byte apply();
};
/** <i>native declaration : headers\openvr_capi.h:1481</i> */
/** <i>native declaration : headers\openvr_capi.h:1512</i> */
public interface LaunchInternalProcess_callback extends Callback {
int apply(Pointer pchBinaryPath, Pointer pchArguments, Pointer pchWorkingDirectory);
};
/** <i>native declaration : headers\openvr_capi.h:1482</i> */
/** <i>native declaration : headers\openvr_capi.h:1513</i> */
public interface GetCurrentSceneProcessId_callback extends Callback {
int apply();
};

@ -7,7 +7,7 @@ import com.sun.jna.ptr.IntByReference;
import java.util.Arrays;
import java.util.List;
/**
* <i>native declaration : headers\openvr_capi.h:1543</i><br>
* <i>native declaration : headers\openvr_capi.h:1574</i><br>
* This file was autogenerated by <a href="http://jnaerator.googlecode.com/">JNAerator</a>,<br>
* a tool written by <a href="http://ochafik.com/">Olivier Chafik</a> that <a href="http://code.google.com/p/jnaerator/wiki/CreditsAndLicense">uses a few opensource projects.</a>.<br>
* For help, please visit <a href="http://nativelibs4java.googlecode.com/">NativeLibs4Java</a> , <a href="http://rococoa.dev.java.net/">Rococoa</a>, or <a href="http://jna.dev.java.net/">JNA</a>.
@ -53,83 +53,83 @@ public class VR_IVRChaperoneSetup_FnTable extends Structure {
public VR_IVRChaperoneSetup_FnTable.ExportLiveToBuffer_callback ExportLiveToBuffer;
/** C type : ImportFromBufferToWorking_callback* */
public VR_IVRChaperoneSetup_FnTable.ImportFromBufferToWorking_callback ImportFromBufferToWorking;
/** <i>native declaration : headers\openvr_capi.h:1523</i> */
/** <i>native declaration : headers\openvr_capi.h:1554</i> */
public interface CommitWorkingCopy_callback extends Callback {
byte apply(int configFile);
};
/** <i>native declaration : headers\openvr_capi.h:1524</i> */
/** <i>native declaration : headers\openvr_capi.h:1555</i> */
public interface RevertWorkingCopy_callback extends Callback {
void apply();
};
/** <i>native declaration : headers\openvr_capi.h:1525</i> */
/** <i>native declaration : headers\openvr_capi.h:1556</i> */
public interface GetWorkingPlayAreaSize_callback extends Callback {
byte apply(FloatByReference pSizeX, FloatByReference pSizeZ);
};
/** <i>native declaration : headers\openvr_capi.h:1526</i> */
/** <i>native declaration : headers\openvr_capi.h:1557</i> */
public interface GetWorkingPlayAreaRect_callback extends Callback {
byte apply(HmdQuad_t rect);
};
/** <i>native declaration : headers\openvr_capi.h:1527</i> */
/** <i>native declaration : headers\openvr_capi.h:1558</i> */
public interface GetWorkingCollisionBoundsInfo_callback extends Callback {
byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount);
};
/** <i>native declaration : headers\openvr_capi.h:1528</i> */
/** <i>native declaration : headers\openvr_capi.h:1559</i> */
public interface GetLiveCollisionBoundsInfo_callback extends Callback {
byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount);
};
/** <i>native declaration : headers\openvr_capi.h:1529</i> */
/** <i>native declaration : headers\openvr_capi.h:1560</i> */
public interface GetWorkingSeatedZeroPoseToRawTrackingPose_callback extends Callback {
byte apply(HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
};
/** <i>native declaration : headers\openvr_capi.h:1530</i> */
/** <i>native declaration : headers\openvr_capi.h:1561</i> */
public interface GetWorkingStandingZeroPoseToRawTrackingPose_callback extends Callback {
byte apply(HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose);
};
/** <i>native declaration : headers\openvr_capi.h:1531</i> */
/** <i>native declaration : headers\openvr_capi.h:1562</i> */
public interface SetWorkingPlayAreaSize_callback extends Callback {
void apply(float sizeX, float sizeZ);
};
/** <i>native declaration : headers\openvr_capi.h:1532</i> */
/** <i>native declaration : headers\openvr_capi.h:1563</i> */
public interface SetWorkingCollisionBoundsInfo_callback extends Callback {
void apply(HmdQuad_t pQuadsBuffer, int unQuadsCount);
};
/** <i>native declaration : headers\openvr_capi.h:1533</i> */
/** <i>native declaration : headers\openvr_capi.h:1564</i> */
public interface SetWorkingSeatedZeroPoseToRawTrackingPose_callback extends Callback {
void apply(HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose);
};
/** <i>native declaration : headers\openvr_capi.h:1534</i> */
/** <i>native declaration : headers\openvr_capi.h:1565</i> */
public interface SetWorkingStandingZeroPoseToRawTrackingPose_callback extends Callback {
void apply(HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose);
};
/** <i>native declaration : headers\openvr_capi.h:1535</i> */
/** <i>native declaration : headers\openvr_capi.h:1566</i> */
public interface ReloadFromDisk_callback extends Callback {
void apply(int configFile);
};
/** <i>native declaration : headers\openvr_capi.h:1536</i> */
/** <i>native declaration : headers\openvr_capi.h:1567</i> */
public interface GetLiveSeatedZeroPoseToRawTrackingPose_callback extends Callback {
byte apply(HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
};
/** <i>native declaration : headers\openvr_capi.h:1537</i> */
/** <i>native declaration : headers\openvr_capi.h:1568</i> */
public interface SetWorkingCollisionBoundsTagsInfo_callback extends Callback {
void apply(Pointer pTagsBuffer, int unTagCount);
};
/** <i>native declaration : headers\openvr_capi.h:1538</i> */
/** <i>native declaration : headers\openvr_capi.h:1569</i> */
public interface GetLiveCollisionBoundsTagsInfo_callback extends Callback {
byte apply(Pointer pTagsBuffer, IntByReference punTagCount);
};
/** <i>native declaration : headers\openvr_capi.h:1539</i> */
/** <i>native declaration : headers\openvr_capi.h:1570</i> */
public interface SetWorkingPhysicalBoundsInfo_callback extends Callback {
byte apply(HmdQuad_t pQuadsBuffer, int unQuadsCount);
};
/** <i>native declaration : headers\openvr_capi.h:1540</i> */
/** <i>native declaration : headers\openvr_capi.h:1571</i> */
public interface GetLivePhysicalBoundsInfo_callback extends Callback {
byte apply(HmdQuad_t pQuadsBuffer, IntByReference punQuadsCount);
};
/** <i>native declaration : headers\openvr_capi.h:1541</i> */
/** <i>native declaration : headers\openvr_capi.h:1572</i> */
public interface ExportLiveToBuffer_callback extends Callback {
byte apply(Pointer pBuffer, IntByReference pnBufferLength);
};
/** <i>native declaration : headers\openvr_capi.h:1542</i> */
/** <i>native declaration : headers\openvr_capi.h:1573</i> */
public interface ImportFromBufferToWorking_callback extends Callback {
byte apply(Pointer pBuffer, int nImportFlags);
};

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save