/** * Set up the GUI. * @param leftcam the left eye camera. * @param rightcam the right eye camera. * @param left the left eye viewport. * @param right the right eye viewport. */ public void setupGui(Camera leftcam, Camera rightcam, ViewPort left, ViewPort right) { if (environment != null){ if( environment.hasTraditionalGUIOverlay() ) { camLeft = leftcam; camRight = rightcam; Spatial guiScene = getGuiQuad(camLeft); left.attachScene(guiScene); if( right != null ) right.attachScene(guiScene); setPositioningMode(posMode); } } else { throw new IllegalStateException("VR GUI manager is not attached to any 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() { 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."); } }
setupVRScene(); moveScreenProcessingToEyes(); if( environment.hasTraditionalGUIOverlay() ) {
if( environment.hasTraditionalGUIOverlay() ) {
if (environment.hasTraditionalGUIOverlay()) {
if( environment.hasTraditionalGUIOverlay() ) {