protected void resetZoom() { testRoot.setLocalScale(1, 1, 1); }
public Node getRootNode() { if (rootNode == null) { rootNode = new Node("ZoomLevel"); if (parent != null) { rootNode.setLocalScale(1.0f / poiRadius); } } return rootNode; }
node.setLocalRotation(parseQuat(attribs)); } else if (qName.equals("scale")) { node.setLocalScale(SAXUtil.parseVector3(attribs)); } else if (qName.equals("light")) { parseLight(attribs);
public void setupRobotGuy(){ Node model = (Node) assetManager.loadModel("Models/Oto/Oto.mesh.xml"); Material mat = assetManager.loadMaterial("Models/Oto/Oto.j3m"); model.getChild(0).setMaterial(mat); // model.setAnimation("Walk"); model.setLocalTranslation(30, 10.5f, 30); model.setLocalScale(2); model.setShadowMode(ShadowMode.CastAndReceive); rootNode.attachChild(model); }
public void simpleUpdate( float tpf ) { if( scroll.lengthSquared() != 0 ) { scrollRoot.move(scroll.mult(tpf)); } if( zoom.lengthSquared() != 0 ) { Vector3f current = testRoot.getLocalScale(); testRoot.setLocalScale(current.add(zoom.mult(tpf))); } }
public WorldOfInception() { //base level vector position hash == seed super(new InceptionLevel(null, Vector3f.ZERO)); currentLevel = super.getStateManager().getState(InceptionLevel.class); currentLevel.takeOverParent(); currentLevel.getRootNode().setLocalScale(Vector3f.UNIT_XYZ); currentLevel.getRootNode().setLocalTranslation(Vector3f.ZERO); }
private void scaleAsChild(float percent, Vector3f dist) { float childScale = mapValue(percent, 1.0f / poiRadius, 1); Vector3f distToHorizon = dist.normalize(); Vector3f scaledDistToHorizon = distToHorizon.mult(childScale * poiRadius); Vector3f rootOff = dist.add(scaledDistToHorizon); debugTools.setBlueArrow(Vector3f.ZERO, rootOff); getRootNode().setLocalScale(childScale); getRootNode().setLocalTranslation(rootOff); //prepare player position already Vector3f playerPosition = dist.normalize().mult(-poiRadius); setPlayerPosition(playerPosition); }
private void scaleAsParent(float percent, Vector3f playerPos, Vector3f dist) { float scale = mapValue(percent, 1.0f, poiRadius); Vector3f distToHorizon = dist.subtract(dist.normalize()); Vector3f offLocation = playerPos.add(distToHorizon); Vector3f rootOff = offLocation.mult(scale).negate(); rootOff.addLocal(dist); debugTools.setGreenArrow(Vector3f.ZERO, offLocation); getRootNode().setLocalScale(scale); getRootNode().setLocalTranslation(rootOff); }
@Override public void simpleInitApp() { createFlame(); createFlash(); createSpark(); createRoundSpark(); createSmokeTrail(); createDebris(); createShockwave(); explosionEffect.setLocalScale(0.5f); renderManager.preloadScene(explosionEffect); cam.setLocation(new Vector3f(0, 3.5135868f, 10)); cam.setRotation(new Quaternion(1.5714673E-4f, 0.98696727f, -0.16091813f, 9.6381607E-4f)); rootNode.attachChild(explosionEffect); }
@Override public void simpleInitApp() { viewPort.setBackgroundColor(ColorRGBA.LightGray); initKeys(); /** Add a light source so we can see the model */ DirectionalLight dl = new DirectionalLight(); dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal()); rootNode.addLight(dl); /** Load a model that contains animation */ player = (Node) assetManager.loadModel("Models/Oto/OtoOldAnim.j3o"); player.setLocalScale(0.5f); rootNode.attachChild(player); /** Create a controller and channels. */ control = player.getControl(AnimControl.class); control.addListener(this); channel = control.createChannel(); channel.setAnim("stand"); }
attachNode.setLocalScale(modelScale); attachNode.setLocalScale(modelScale); attachNode.getLocalTransform().combineWithParent(attachNode.getParent().getWorldTransform().invert());
rootNode.setLocalScale(1); rootNode.setLocalTranslation(playerPos.negate()); debugTools.setRedArrow(Vector3f.ZERO, Vector3f.ZERO);
guiQuadNode.setLocalScale(guiDistance * guiScale * 4f, 4f * guiDistance * guiScale, 1f);
n.setLocalScale(ratio); return n;
model.setLocalScale(1.50f); characterNode.attachChild(model);
model.setLocalScale(1.2f / (b.getYExtent() * 2));
OgreMeshKey key = new OgreMeshKey("main.meshxml", matList); gameLevel = (Node) assetManager.loadAsset(key); gameLevel.setLocalScale(0.1f);
n.setLocalScale(ratio); return n;
ln.setLocalRotation(new Quaternion(-0.18826798f, -0.38304946f, -0.12780227f, 0.895261f)); ln.attachChild(areaGeom); ln.setLocalScale(4,8,5); rootNode.attachChild(ln);
private void initRoot() { this.rootNode.attachChild(this.staticNode); monkeyApp_Grid gridHandler = new monkeyApp_Grid(appSize, spaceSize, assetManager, isGrid); this.gridNode = gridHandler.getGrid(); this.staticgeo.setLocalScale(appScaled); this.staticbatchgeo.setLocalScale(appScaled); this.staticNode.setLocalScale(appScaled); this.rootNode.attachChild(staticgeo); this.rootNode.attachChild(staticbatchgeo); }