public void onAnalog(String name, float value, float tpf) { // Instead of moving closer/farther to object, we zoom in/out. if (name.equals("Size-")) frustumSize += 0.3f * tpf; else frustumSize -= 0.3f * tpf; float aspect = (float) cam.getWidth() / cam.getHeight(); cam.setFrustum(-1000, 1000, -aspect * frustumSize, aspect * frustumSize, frustumSize, -frustumSize); } }
public void initialize(RenderManager rm, ViewPort viewPort) { this.camera = viewPort.getCamera(); this.width = camera.getWidth(); this.height = camera.getHeight(); this.renderManager = rm; this.isInitilized = true; if (freeItems == null) { freeItems = new LinkedBlockingQueue<WorkItem>(); for (int i = 0; i < numCpus; i++) { freeItems.add(new WorkItem(width, height)); } } }
public void onAnalog(String name, float value, float tpf) { if (cam.isParallelProjection()) { // Instead of moving closer/farther to object, we zoom in/out. if (name.equals("Size-")) { frustumSize += 5f * tpf; } else { frustumSize -= 5f * tpf; } float aspect = (float) cam.getWidth() / cam.getHeight(); cam.setFrustum(-1000, 1000, -aspect * frustumSize, aspect * frustumSize, frustumSize, -frustumSize); } }
public void initialize(RenderManager rm, ViewPort vp) { renderManager = rm; viewPort = vp; reshape(vp, vp.getCamera().getWidth(), vp.getCamera().getHeight()); }
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Press T to toggle wireframe"); guiNode.attachChild(hintText); }
private void initialize( final AssetManager assetManager, final InputManager inputManager, final AudioRenderer audioRenderer, final ViewPort viewport) { this.assetManager = assetManager; this.inputManager = inputManager; this.w = viewport.getCamera().getWidth(); this.h = viewport.getCamera().getHeight(); this.soundDev = new SoundDeviceJme(assetManager, audioRenderer); this.inputSys = new InputSystemJme(inputManager); }
public void initialize(RenderManager rm, ViewPort vp) { renderer = rm.getRenderer(); this.rm = rm; reshape(vp, vp.getCamera().getWidth(), vp.getCamera().getHeight()); }
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Hit 1 to raise terrain, hit 2 to lower terrain"); guiNode.attachChild(hintText); }
private void makeHudText() { guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); hwsText = new BitmapText(guiFont, false); hwsText.setSize(guiFont.getCharSet().getRenderedSize()); hwsText.setText("HWS : " + hwSkinningEnable); hwsText.setLocalTranslation(0, cam.getHeight(), 0); guiNode.attachChild(hwsText); } }
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Hit T to switch to wireframe, P to switch to tri-planar texturing"); guiNode.attachChild(hintText); }
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Press T to toggle wireframe"); guiNode.attachChild(hintText); }
private void makeHudText() { guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); hwsText = new BitmapText(guiFont, false); hwsText.setSize(guiFont.getCharSet().getRenderedSize()); hwsText.setText("HWS : "+ hwSkinningEnable); hwsText.setLocalTranslation(0, cam.getHeight(), 0); guiNode.attachChild(hwsText); } }
protected void displayMap(Renderer r, Picture pic, int left) { Camera cam = vp.getCamera(); rm.setCamera(cam, true); int h = cam.getHeight(); pic.setPosition(left, h / 20f); pic.setWidth(128); pic.setHeight(128); pic.updateGeometricState(); rm.renderGeometry(pic); rm.setCamera(cam, false); }
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Hit T to save, and Y to load"); guiNode.attachChild(hintText); } private ActionListener saveActionListener = new ActionListener() {
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Hit T to switch to wireframe, P to switch to tri-planar texturing"); guiNode.attachChild(hintText); }
private void makeHudText() { guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt"); hwsText = new BitmapText(guiFont, false); hwsText.setSize(guiFont.getCharSet().getRenderedSize()); hwsText.setText("HWS : "+ hwSkinningEnable); hwsText.setLocalTranslation(0, cam.getHeight(), 0); guiNode.attachChild(hwsText); } }
public void loadHintText() { hintText = new BitmapText(guiFont, false); hintText.setSize(guiFont.getCharSet().getRenderedSize()); hintText.setLocalTranslation(0, getCamera().getHeight(), 0); hintText.setText("Hit T to switch to wireframe, P to switch to tri-planar texturing"); guiNode.attachChild(hintText); }
public void initialize(RenderManager rm, ViewPort vp) { reshape(vp, vp.getCamera().getWidth(), vp.getCamera().getHeight()); viewPort.setOutputFrameBuffer(fb); guiViewPort.setClearFlags(true, true, true); guiNode.attachChild(display); // guiNode.attachChild(display1); guiNode.attachChild(display2); // guiNode.attachChild(display3); // guiNode.attachChild(display4); guiNode.updateGeometricState(); }
public void onWayPointReach(MotionEvent control, int wayPointIndex) { if (path.getNbWayPoints() == wayPointIndex + 1) { wayPointsText.setText(control.getSpatial().getName() + " Finish!!! "); } else { wayPointsText.setText(control.getSpatial().getName() + " Reached way point " + wayPointIndex); } wayPointsText.setLocalTranslation((cam.getWidth() - wayPointsText.getLineWidth()) / 2, cam.getHeight(), 0); } });
public void onWayPointReach(MotionEvent control, int wayPointIndex) { if (path.getNbWayPoints() == wayPointIndex + 1) { wayPointsText.setText(control.getSpatial().getName() + "Finished!!! "); } else { wayPointsText.setText(control.getSpatial().getName() + " Reached way point " + wayPointIndex); } wayPointsText.setLocalTranslation((cam.getWidth() - wayPointsText.getLineWidth()) / 2, cam.getHeight(), 0); } });