public Void call(){ if (app instanceof SimpleApplication){ SimpleApplication simpleApp = (SimpleApplication) app; simpleApp.getFlyByCamera().setDragToRotate(true); } return null; } });
@Override public void simpleInitApp() { inBetweenNode = new Node("In Between Node"); rootNode.attachChild(inBetweenNode); flyCam.setDragToRotate(true); } }
public Void call(){ if (app instanceof SimpleApplication){ SimpleApplication simpleApp = (SimpleApplication) app; simpleApp.getFlyByCamera().setDragToRotate(true); simpleApp.getInputManager().setCursorVisible(true); } return null; } });
@Override public void simpleInitApp() { flyCam.setDragToRotate(true); Box b = new Box(1, 1, 1); Geometry geom = new Geometry("Box", b); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg")); geom.setMaterial(mat); rootNode.attachChild(geom); } }
@Override public void simpleInitApp() { flyCam.setDragToRotate(true); Box b = new Box(1, 1, 1); Geometry geom = new Geometry("Box", b); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg")); geom.setMaterial(mat); rootNode.attachChild(geom); /* * Wait until both AWT panels are ready. */ try { panelsAreReady.await(); } catch (InterruptedException exception) { throw new RuntimeException("Interrupted while waiting for panels", exception); } panel.attachTo(true, viewPort); guiViewPort.setClearFlags(true, true, true); panel2.attachTo(false, guiViewPort); } }
@Override public void simpleInitApp() { initOpenCL1(); Box b = new Box(1, 1, 1); // create cube shape geom = new Geometry("Box", b); // create cube geometry from the shape Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); // create a simple material mat.setColor("Color", ColorRGBA.Blue); // set color of material to blue geom.setMaterial(mat); // set the cube's material rootNode.attachChild(geom); // make the cube appear in the scene initCounter = 0; time = 0; flyCam.setDragToRotate(true); }
public void simpleInitApp() { flyCam.setDragToRotate(true); Box b = new Box(1, 1, 1); Geometry geom = new Geometry("Box", b); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg")); geom.setMaterial(mat); rootNode.attachChild(geom); txt = new BitmapText(loadGuiFont(), false); txt.setText("Drag the corners of the application to resize it.\n" + "Current Size: " + settings.getWidth() + "x" + settings.getHeight()); txt.setLocalTranslation(0, settings.getHeight(), 0); guiNode.attachChild(txt); }
@Override public void simpleInitApp() { maxAniso = renderer.getLimits().get(Limits.TextureAnisotropy); flyCam.setDragToRotate(true); flyCam.setMoveSpeed(100); cam.setLocation(new Vector3f(197.02617f, 4.6769195f, -194.89545f)); cam.setRotation(new Quaternion(0.07921988f, 0.8992258f, -0.18292196f, 0.38943136f)); Quad q = new Quad(1000, 1000); q.scaleTextureCoordinates(new Vector2f(1000, 1000)); Geometry geom = new Geometry("quad", q); geom.rotate(-FastMath.HALF_PI, 0, 0); geom.setMaterial(createCheckerBoardMaterial(assetManager)); rootNode.attachChild(geom); inputManager.addMapping("higher", new KeyTrigger(KeyInput.KEY_1)); inputManager.addMapping("lower", new KeyTrigger(KeyInput.KEY_2)); inputManager.addListener(this, "higher"); inputManager.addListener(this, "lower"); }
@Override public void simpleInitApp() { flyCam.setMoveSpeed(10f); flyCam.setDragToRotate(true); setPauseOnLostFocus(false); cam.setLocation(new Vector3f(24.746134f, 13.081396f, 32.72753f)); cam.setRotation(new Quaternion(-0.06867662f, 0.92435044f, -0.19981281f, -0.31770203f)); makeHudText(); DirectionalLight dl = new DirectionalLight(); dl.setDirection(new Vector3f(-0.1f, -0.7f, -1).normalizeLocal()); dl.setColor(new ColorRGBA(1f, 1f, 1f, 1.0f)); rootNode.addLight(dl); for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { Spatial model = (Spatial) assetManager.loadModel("Models/Oto/OtoOldAnim.j3o"); model.setLocalScale(0.1f); model.setLocalTranslation(i - SIZE / 2, 0, j - SIZE / 2); control = model.getControl(AnimControl.class); channel = control.createChannel(); channel.setAnim(animNames[(i + j) % 4]); SkeletonControl skeletonControl = model.getControl(SkeletonControl.class); skeletonControl.setHardwareSkinningPreferred(hwSkinningEnable); skControls.add(skeletonControl); rootNode.attachChild(model); } } inputManager.addListener(this, "toggleHWS"); inputManager.addMapping("toggleHWS", new KeyTrigger(KeyInput.KEY_SPACE)); }
@Override public void simpleInitApp() { flyCam.setMoveSpeed(10f); flyCam.setDragToRotate(true); setPauseOnLostFocus(false); cam.setLocation(new Vector3f(38.76639f, 14.744472f, 45.097454f)); cam.setRotation(new Quaternion(-0.06086266f, 0.92303723f, -0.1639443f, -0.34266636f)); makeHudText(); DirectionalLight dl = new DirectionalLight(); dl.setDirection(new Vector3f(-0.1f, -0.7f, -1).normalizeLocal()); dl.setColor(new ColorRGBA(1f, 1f, 1f, 1.0f)); rootNode.addLight(dl); Spatial models[] = new Spatial[4]; for (int i = 0; i < 4; i++) { models[i] =loadModel(i); } for (int i = 0; i < SIZE; i++) { for (int j = 0; j < SIZE; j++) { Node model = (Node)models[(i + j) % 4]; Spatial s = model.getChild(0).clone(); model.attachChild(s); float x = (float)(i - SIZE / 2) / 0.1f; float z = (float)(j - SIZE / 2) / 0.1f; s.setLocalTranslation(x, 0, z); } } inputManager.addListener(this, "toggleHWS"); inputManager.addMapping("toggleHWS", new KeyTrigger(KeyInput.KEY_SPACE)); }
flyCam.setDragToRotate(true); flyCam.setEnabled(false); viewPort.setBackgroundColor(new ColorRGBA().setAsSrgb(0.2f, 0.2f, 0.2f, 1.0f));
flyCam.setDragToRotate(true); flyCam.setMoveSpeed(5); Spatial sc = assetManager.loadModel("Scenes/PBR/ref/scene.gltf");
rootNode.addLight(dl); flyCam.setDragToRotate(true); setPauseOnLostFocus(false);
stateManager.attach(debug); setPauseOnLostFocus(false); flyCam.setDragToRotate(true);
flyCam.setDragToRotate(true);
flyCam.setDragToRotate(true);
flyCam.setDragToRotate(true); flyCam.setMoveSpeed(50);
public Void call() { if(_app instanceof SimpleApplication) { SimpleApplication simpleApp = (SimpleApplication)_app; simpleApp.getFlyByCamera().setDragToRotate(true); } return null; } });
protected void createCameras() { flyCam.setMoveSpeed(10f); flyCam.setDragToRotate(true);// to prevent mouse capture cam.setLocation(new Vector3f(7.0357456f, 11.175021f, 5.927986f)); //cam.setRotation(new Quaternion(-0.3325067f, 0.6662985f, -0.44692048f, -0.49572945f)); cam.lookAt(rootNode.getWorldBound().getCenter(), Vector3f.UNIT_Y); }
@Override protected void createCameras() { flyCam.setMoveSpeed(1f); flyCam.setDragToRotate(true);// to prevent mouse capture //flyCam.setEnabled(false); cam.setFrustumPerspective(45f, (float) cam.getWidth() / cam.getHeight(), 0.01f, 1000f); Vector3f center = screen.getModelBound().getCenter(); center.multLocal(qrSize); screenLoc = screen.getWorldTranslation().add(center); initialPos(); }