@Override public void updateLogicalState(float tpf) { super.updateLogicalState(tpf); lastTpf = tpf; }
@Override public void update(float tpf) { if (clickDelay > -1) { clickDelay += tpf; } debugNode.updateLogicalState(tpf); debugNode.updateGeometricState(); }
@Override public void updateLogicalState(float tpf) { super.updateLogicalState(tpf); if (needRefresh) { assemble(); } }
@Override public void simpleUpdate(float tpf){ fbNode.updateLogicalState(tpf); fbNode.updateGeometricState(); }
@Override public void updateLogicalState(float tpf) { super.updateLogicalState(tpf); armatureNode.updateGeometry(); }
@Override public void simpleUpdate(float tpf){ fbNode.updateLogicalState(tpf); fbNode.updateGeometricState(); }
@Override public void simpleUpdate(float tpf) { leftScene.updateLogicalState(tpf); leftScene.updateGeometricState(); }
@Override public void update(float tpf) { super.update(tpf); rootNode.updateLogicalState(tpf); rootNode.updateGeometricState(); }
@Override public void update(float tpf) { super.update(tpf); rootNode.updateLogicalState(tpf); rootNode.updateGeometricState(); }
@Override public void updateLogicalState(float tpf) { super.updateLogicalState(tpf); wires.updateGeometry(); points.updateGeometry(); if(interBoneWires != null) { interBoneWires.updateGeometry(); } }
@Override public void update(float tpf) { if (spatial == null) { throw new IllegalArgumentException("The spatial to follow is null, please use the setTarget method"); } target.setLocalTranslation(spatial.getWorldTranslation()); camNode.lookAt(target.getWorldTranslation(), upVector); target.updateLogicalState(tpf); target.updateGeometricState(); }
@Override public void update(float tpf) { if(!isEnabled()){ return; } updateLights(scene); debugNode.updateLogicalState(tpf); debugNode.updateGeometricState(); cleanProbes(); }
/** * Render all the debug geometries to the specified view port. * * @param rm the render manager (not null) * @param vp the view port (not null) */ public void show(RenderManager rm, ViewPort vp) { if (!Vector3f.UNIT_X.equals(UNIT_X_CHECK) || !Vector3f.UNIT_Y.equals(UNIT_Y_CHECK) || !Vector3f.UNIT_Z.equals(UNIT_Z_CHECK) || !Vector3f.UNIT_XYZ.equals(UNIT_XYZ_CHECK) || !Vector3f.ZERO.equals(ZERO_CHECK)) { throw new IllegalStateException("Unit vectors compromised!" + "\nX: " + Vector3f.UNIT_X + "\nY: " + Vector3f.UNIT_Y + "\nZ: " + Vector3f.UNIT_Z + "\nXYZ: " + Vector3f.UNIT_XYZ + "\nZERO: " + Vector3f.ZERO); } debugNode.updateLogicalState(0); debugNode.updateGeometricState(); rm.renderScene(debugNode, vp); }
/** * Render all the debug geometries to the specified view port. * * @param rm the render manager (not null) * @param vp the view port (not null) */ public void show(RenderManager rm, ViewPort vp) { if (!Vector3f.UNIT_X.equals(UNIT_X_CHECK) || !Vector3f.UNIT_Y.equals(UNIT_Y_CHECK) || !Vector3f.UNIT_Z.equals(UNIT_Z_CHECK) || !Vector3f.UNIT_XYZ.equals(UNIT_XYZ_CHECK) || !Vector3f.ZERO.equals(ZERO_CHECK)) { throw new IllegalStateException("Unit vectors compromised!" + "\nX: " + Vector3f.UNIT_X + "\nY: " + Vector3f.UNIT_Y + "\nZ: " + Vector3f.UNIT_Z + "\nXYZ: " + Vector3f.UNIT_XYZ + "\nZERO: " + Vector3f.ZERO); } debugNode.updateLogicalState(0); debugNode.updateGeometricState(); rm.renderScene(debugNode, vp); }
@Test public void testIssue954() { rootNode = new Node(); rootNode.updateLogicalState(0.01f); rootNode.updateGeometricState(); assert rootNode.worldBound != null; } }
/** * Update this state prior to rendering. Should be invoked only by a * subclass or by the AppStateManager. Invoked once per frame, provided the * state is attached and enabled. * * @param tpf the time interval between frames (in seconds, ≥0) */ @Override public void update(float tpf) { super.update(tpf); //update all object links updateRigidBodies(); updateGhosts(); updateCharacters(); updateJoints(); updateVehicles(); //update our debug root node physicsDebugRootNode.updateLogicalState(tpf); physicsDebugRootNode.updateGeometricState(); }
/** * Update this state prior to rendering. Should be invoked only by a * subclass or by the AppStateManager. Invoked once per frame, provided the * state is attached and enabled. * * @param tpf the time interval between frames (in seconds, ≥0) */ @Override public void update(float tpf) { super.update(tpf); //update all object links updateRigidBodies(); updateGhosts(); updateCharacters(); updateJoints(); updateVehicles(); //update our debug root node physicsDebugRootNode.updateLogicalState(tpf); physicsDebugRootNode.updateGeometricState(); }
@Override public void update() { if (prof!=null) prof.appStep(AppStep.BeginFrame); super.update(); // makes sure to execute AppTasks if (speed == 0 || paused) { return; } float tpf = timer.getTimePerFrame() * speed; // update states if (prof!=null) prof.appStep(AppStep.StateManagerUpdate); stateManager.update(tpf); // simple update and root node simpleUpdate(tpf); if (prof!=null) prof.appStep(AppStep.SpatialUpdate); rootNode.updateLogicalState(tpf); guiNode.updateLogicalState(tpf); rootNode.updateGeometricState(); guiNode.updateGeometricState(); // render states if (prof!=null) prof.appStep(AppStep.StateManagerRender); stateManager.render(renderManager); if (prof!=null) prof.appStep(AppStep.RenderFrame); renderManager.render(tpf, context.isRenderable()); simpleRender(renderManager); stateManager.postRender(); if (prof!=null) prof.appStep(AppStep.EndFrame); }
@Test public void testPhantomTriangles() { assetManager = new DesktopAssetManager(); assetManager.registerLocator(null, ClasspathLocator.class); assetManager.registerLoader(J3MLoader.class, "j3m", "j3md"); rootNode = new Node(); createRedSquare(); createWhiteLines(); rootNode.updateLogicalState(0.01f); rootNode.updateGeometricState(); castRay(); } }
@Test public void testPhantomTriangles() { JmeSystem.setSystemDelegate(new MockJmeSystemDelegate()); assetManager = new DesktopAssetManager(); assetManager.registerLocator(null, ClasspathLocator.class); assetManager.registerLoader(J3MLoader.class, "j3m", "j3md"); rootNode = new Node(); createRedSquare(); rootNode.updateLogicalState(0.01f); rootNode.updateGeometricState(); /** * ray in the -Z direction, starting from (0.5, 0.6, 10) */ Ray ray1 = new Ray(/* origin */new Vector3f(0.5f, 0.6f, 10f), /* direction */ new Vector3f(0f, 0f, -1f)); castRay(ray1, 1); /** * ray in the -Z direction, starting from (0.5, 3, 10) */ Ray ray0 = new Ray(/* origin */new Vector3f(0.5f, 3f, 10f), /* direction */ new Vector3f(0f, 0f, -1f)); castRay(ray0, 0); } }