/** * Get the VR mouse manager attached to this app state. * @return the VR mouse manager attached to this application. */ public VRMouseManager getVRMouseManager(){ return getVREnvironment().getVRMouseManager(); }
@Override public void initialize() { logger.config("Initializing VR view manager."); if (environment != null) { initTextureSubmitStructs(); setupCamerasAndViews(); setupVRScene(); moveScreenProcessingToEyes(); if (environment.hasTraditionalGUIOverlay()) { environment.getVRMouseManager().initialize(); // update the pose to position the gui correctly on start update(0f); environment.getVRGUIManager().positionGui(); } logger.config("Initialized VR view manager [SUCCESS]"); } else { throw new IllegalStateException("This VR view manager is not attached to any VR environment."); } }
@Override public void initialize() { logger.config("Initializing VR view manager."); if (environment != null){ initTextureSubmitStructs(); setupCamerasAndViews(); setupVRScene(); moveScreenProcessingToEyes(); if( environment.hasTraditionalGUIOverlay() ) { environment.getVRMouseManager().initialize(); // update the pose to position the gui correctly on start update(0f); environment.getVRGUIManager().positionGui(); } logger.config("Initialized VR view manager [SUCCESS]"); } else { throw new IllegalStateException("This VR view manager is not attached to any VR environment."); } }
@Override public void initialize() { setupCamerasAndViews(); if (environment.hasTraditionalGUIOverlay()) { environment.getVRMouseManager().initialize(); // update the pose to position the gui correctly on start update(0f); environment.getVRGUIManager().positionGui(); } }
@Override public void update(float tpf) { if (environment != null) { if (environment.hasTraditionalGUIOverlay()) { // update the mouse? environment.getVRMouseManager().update(tpf); // update GUI position? if (environment.getVRGUIManager().isWantsReposition() || environment.getVRGUIManager().getPositioningMode() != VRGUIPositioningMode.MANUAL) { environment.getVRGUIManager().positionGuiNow(tpf); environment.getVRGUIManager().updateGuiQuadGeometricState(); } } } else { throw new IllegalStateException("This VR view manager is not attached to any VR environment."); } }
if( environment.hasTraditionalGUIOverlay() ) { environment.getVRMouseManager().initialize();
@Override public void update(float tpf) { // update VR pose & cameras if( environment.getVRViewManager() != null ) { environment.getVRViewManager().update(tpf); } else if( environment.getObserver() != null ) { environment.getCamera().setFrame(((Spatial)environment.getObserver()).getWorldTranslation(), ((Spatial)environment.getObserver()).getWorldRotation()); } if( environment.isInVR() == false || environment.getVRGUIManager().getPositioningMode() == VRGUIPositioningMode.MANUAL ) { // only update geometric state here if GUI is in manual mode, or not in VR // 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 environment.getVRMouseManager().updateAnalogAsMouse(0, null, null, null, tpf); }
environment.getVRMouseManager().update(tpf);
environment.getVRMouseManager().update(tpf);
environment.getVRMouseManager().update(tpf);