/** * Set the width in pixels of the picture, if the width * does not match the texture's width, then the texture will * be scaled to fit the picture. * * @param width the width to set. */ public void setWidth(float width){ this.width = width; setLocalScale(new Vector3f(width, height, 1f)); }
/** * Set the height in pixels of the picture, if the height * does not match the texture's height, then the texture will * be scaled to fit the picture. * * @param height the height to set. */ public void setHeight(float height){ this.height = height; setLocalScale(new Vector3f(width, height, 1f)); }
pic.setLocalTranslation(-0.75f, -0.5f, 0f); if( expand ) { pic.setLocalScale(3f, 1f, 1f); } else { pic.setLocalScale(1.5f, 1f, 1f);
private ViewPort setupMirrorBuffers(Camera cam, Texture2D tex, boolean expand) { if (environment != null) { if (environment.getApplication() != null) { Camera clonecam = cam.clone(); ViewPort viewPort = environment.getApplication().getRenderManager().createPostView("MirrorView", clonecam); clonecam.setParallelProjection(true); viewPort.setClearFlags(true, true, true); viewPort.setBackgroundColor(ColorRGBA.Black); Picture pic = new Picture("fullscene"); pic.setLocalTranslation(-0.75f, -0.5f, 0f); if (expand) { pic.setLocalScale(3f, 1f, 1f); } else { pic.setLocalScale(1.5f, 1f, 1f); } pic.setQueueBucket(Bucket.Opaque); pic.setTexture(environment.getApplication().getAssetManager(), (Texture2D) tex, false); viewPort.attachScene(pic); viewPort.setOutputFrameBuffer(null); pic.updateGeometricState(); return viewPort; } else { throw new IllegalStateException("This VR environment is not attached to any application."); } } else { throw new IllegalStateException("This VR view manager is not attached to any VR environment."); } }
pic.setLocalTranslation(-0.75f, -0.5f, 0f); if( expand ) { pic.setLocalScale(3f, 1f, 1f); } else { pic.setLocalScale(1.5f, 1f, 1f);
/** * Set the height in pixels of the picture, if the height * does not match the texture's height, then the texture will * be scaled to fit the picture. * * @param height the height to set. */ public void setHeight(float height){ this.height = height; setLocalScale(new Vector3f(width, height, 1f)); }
/** * Set the height in pixels of the picture, if the height * does not match the texture's height, then the texture will * be scaled to fit the picture. * * @param height the height to set. */ public void setHeight(float height){ this.height = height; setLocalScale(new Vector3f(width, height, 1f)); }
/** * Set the width in pixels of the picture, if the width * does not match the texture's width, then the texture will * be scaled to fit the picture. * * @param width the width to set. */ public void setWidth(float width){ this.width = width; setLocalScale(new Vector3f(width, height, 1f)); }
/** * Set the width in pixels of the picture, if the width * does not match the texture's width, then the texture will * be scaled to fit the picture. * * @param width the width to set. */ public void setWidth(float width){ this.width = width; setLocalScale(new Vector3f(width, height, 1f)); }