spatialIter = environment.getApplication().getGuiViewPort().getScenes().iterator(); while (spatialIter.hasNext()) { environment.getApplication().getGuiViewPort().detachScene(spatialIter.next());
@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); }
spatialIter = environment.getApplication().getGuiViewPort().getScenes().iterator(); while(spatialIter.hasNext()){ environment.getApplication().getGuiViewPort().detachScene(spatialIter.next());
spatialIter = environment.getApplication().getGuiViewPort().getScenes().iterator(); while(spatialIter.hasNext()){ environment.getApplication().getGuiViewPort().detachScene(spatialIter.next());
Iterator<Spatial> spatialIter = environment.getApplication().getGuiViewPort().getScenes().iterator(); while(spatialIter.hasNext()){ offView.attachScene(spatialIter.next());
if( mouseImage.getParent() == null ) { environment.getApplication().getGuiViewPort().attachScene(mouseImage); centerMouse();
@Override protected void cleanup( Application app ) { if( includeDefaultNodes ) { removeCollisionRoot(app.getGuiViewPort()); removeCollisionRoot(app.getViewPort()); } }
@Override public void runCommand(Application app) { Logger.getLogger(getClass().getName()).info("Starting video recording"); VideoRenderAppState videoAppState = app.getStateManager() .getState(VideoRenderAppState.class); if (videoAppState == null) { videoAppState = new VideoRenderAppState(); app.getStateManager().attach(videoAppState); } // videoAppState.recordViewPort(app.getViewPort(), this.output); videoAppState.recordViewPort(app.getGuiViewPort(), this.output); setState(State.Success); }
@Override protected void initialize( Application app ) { if( includeDefaultNodes ) { addCollisionRoot(getApplication().getGuiViewPort(), PICK_LAYER_GUI); addCollisionRoot(getApplication().getViewPort(), PICK_LAYER_SCENE); } }
public void setIncludeDefaultCollisionRoots( boolean b ) { this.includeDefaultNodes = b; if( isInitialized() ) { if( b ) { addCollisionRoot(getApplication().getGuiViewPort(), PICK_LAYER_GUI); addCollisionRoot(getApplication().getViewPort(), PICK_LAYER_SCENE); } else { removeCollisionRoot(getApplication().getGuiViewPort()); removeCollisionRoot(getApplication().getViewPort()); } } }