public Boolean call() throws Exception { pSpace.update(getPhysicsSpace().getAccuracy() * getSpeed()); pSpace.distributeEvents(); long update = System.currentTimeMillis() - detachedPhysicsLastUpdate; detachedPhysicsLastUpdate = System.currentTimeMillis(); executor.schedule(detachedPhysicsUpdate, Math.round(getPhysicsSpace().getAccuracy() * 1000000.0f) - (update * 1000), TimeUnit.MICROSECONDS); return true; } };
public Boolean call() throws Exception { pSpace.update(getPhysicsSpace().getAccuracy() * getSpeed()); pSpace.distributeEvents(); long update = System.currentTimeMillis() - detachedPhysicsLastUpdate; detachedPhysicsLastUpdate = System.currentTimeMillis(); executor.schedule(detachedPhysicsUpdate, Math.round(getPhysicsSpace().getAccuracy() * 1000000.0f) - (update * 1000), TimeUnit.MICROSECONDS); return true; } };
/** * 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) */ public void update(float tpf) { if (debugEnabled && debugAppState == null && pSpace != null) { debugAppState = new BulletDebugAppState(pSpace); stateManager.attach(debugAppState); } else if (!debugEnabled && debugAppState != null) { stateManager.detach(debugAppState); debugAppState = null; } if (!active) { return; } pSpace.distributeEvents(); this.tpf = tpf; }
/** * 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) */ public void update(float tpf) { if (debugEnabled && debugAppState == null && pSpace != null) { debugAppState = new BulletDebugAppState(pSpace); stateManager.attach(debugAppState); } else if (!debugEnabled && debugAppState != null) { stateManager.detach(debugAppState); debugAppState = null; } if (!active) { return; } pSpace.distributeEvents(); this.tpf = tpf; }
public void update(float tpf) { if (!active) { return; } // if (threadingType != ThreadingType.DETACHED) { pSpace.distributeEvents(); // } this.tpf = tpf; }
public Boolean call() throws Exception { pSpace.update(getPhysicsSpace().getAccuracy() * getSpeed()); pSpace.distributeEvents(); long update = System.currentTimeMillis() - detachedPhysicsLastUpdate; detachedPhysicsLastUpdate = System.currentTimeMillis(); executor.schedule(detachedPhysicsUpdate, Math.round(getPhysicsSpace().getAccuracy() * 1000000.0f) - (update * 1000), TimeUnit.MICROSECONDS); return true; } };
public Boolean call() throws Exception { pSpace.update(getPhysicsSpace().getAccuracy() * getSpeed()); pSpace.distributeEvents(); long update = System.currentTimeMillis() - detachedPhysicsLastUpdate; detachedPhysicsLastUpdate = System.currentTimeMillis(); executor.schedule(detachedPhysicsUpdate, Math.round(getPhysicsSpace().getAccuracy() * 1000000.0f) - (update * 1000), TimeUnit.MICROSECONDS); return true; } };
public Boolean call() throws Exception { pSpace.update(getPhysicsSpace().getAccuracy() * getSpeed()); pSpace.distributeEvents(); long update = System.currentTimeMillis() - detachedPhysicsLastUpdate; detachedPhysicsLastUpdate = System.currentTimeMillis(); executor.schedule(detachedPhysicsUpdate, Math.round(getPhysicsSpace().getAccuracy() * 1000000.0f) - (update * 1000), TimeUnit.MICROSECONDS); return true; } };
public void update(float tpf) { if (debugEnabled && debugAppState == null && pSpace != null) { debugAppState = new BulletDebugAppState(pSpace); stateManager.attach(debugAppState); } else if (!debugEnabled && debugAppState != null) { stateManager.detach(debugAppState); debugAppState = null; } if (!active) { return; } pSpace.distributeEvents(); this.tpf = tpf; }
/** * 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) */ public void update(float tpf) { if (debugEnabled && debugAppState == null && pSpace != null) { debugAppState = new BulletDebugAppState(pSpace); stateManager.attach(debugAppState); } else if (!debugEnabled && debugAppState != null) { stateManager.detach(debugAppState); debugAppState = null; } if (!active) { return; } pSpace.distributeEvents(); this.tpf = tpf; }
physicsControl.update(tpf); physicsControl.getWorld().applyResultToBone(); physicsControl.getWorld().getPhysicsSpace().distributeEvents(); } else { float accuracy2; physicsControl.update(tpf); physicsControl.getWorld().applyResultToBone(); physicsControl.getWorld().getPhysicsSpace().distributeEvents(); physicsControl.getWorld().setAccuracy(accuracy);