protected final void synchronizeFixtures() { final Transform xf1 = pxf; // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter); // xf1.q.set(m_sweep.a0); // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p); // xf1.p.mulLocal(-1).addLocal(m_sweep.c0); // inlined: xf1.q.s = MathUtils.sin(m_sweep.a0); xf1.q.c = MathUtils.cos(m_sweep.a0); xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y; xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y; // end inline for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(m_world.m_contactManager.m_broadPhase, xf1, m_xf); } }
/** * Set the position of the body's origin and rotation. This breaks any contacts and wakes the * other bodies. Manipulating a body's transform may cause non-physical behavior. Note: contacts * are updated on the next call to World.step(). * * @param position the world position of the body's local origin. * @param angle the world rotation in radians. */ public final void setTransform(Vec2 position, float angle) { assert (m_world.isLocked() == false); if (m_world.isLocked() == true) { return; } m_xf.q.set(angle); m_xf.p.set(position); // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter); Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c); m_sweep.a = angle; m_sweep.c0.set(m_sweep.c); m_sweep.a0 = m_sweep.a; BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase; for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(broadPhase, m_xf, m_xf); } }
protected final void synchronizeFixtures() { final Transform xf1 = pxf; // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter); // xf1.q.set(m_sweep.a0); // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p); // xf1.p.mulLocal(-1).addLocal(m_sweep.c0); // inlined: xf1.q.s = MathUtils.sin(m_sweep.a0); xf1.q.c = MathUtils.cos(m_sweep.a0); xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y; xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y; // end inline for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(m_world.m_contactManager.m_broadPhase, xf1, m_xf); } }
/** * Set the position of the body's origin and rotation. This breaks any contacts and wakes the * other bodies. Manipulating a body's transform may cause non-physical behavior. Note: contacts * are updated on the next call to World.step(). * * @param position the world position of the body's local origin. * @param angle the world rotation in radians. */ public final void setTransform(Vec2 position, float angle) { assert (m_world.isLocked() == false); if (m_world.isLocked() == true) { return; } m_xf.q.set(angle); m_xf.p.set(position); // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter); Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c); m_sweep.a = angle; m_sweep.c0.set(m_sweep.c); m_sweep.a0 = m_sweep.a; BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase; for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(broadPhase, m_xf, m_xf); } }
protected final void synchronizeFixtures() { final Transform xf1 = pxf; // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter); // xf1.q.set(m_sweep.a0); // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p); // xf1.p.mulLocal(-1).addLocal(m_sweep.c0); // inlined: xf1.q.s = MathUtils.sin(m_sweep.a0); xf1.q.c = MathUtils.cos(m_sweep.a0); xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y; xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y; // end inline for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(m_world.m_contactManager.m_broadPhase, xf1, m_xf); } }
protected final void synchronizeFixtures() { final Transform xf1 = pxf; // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter); // xf1.q.set(m_sweep.a0); // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p); // xf1.p.mulLocal(-1).addLocal(m_sweep.c0); // inlined: xf1.q.s = MathUtils.sin(m_sweep.a0); xf1.q.c = MathUtils.cos(m_sweep.a0); xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y; xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y; // end inline for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(m_world.m_contactManager.m_broadPhase, xf1, m_xf); } }
protected final void synchronizeFixtures() { final Transform xf1 = pxf; // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter); // xf1.q.set(m_sweep.a0); // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p); // xf1.p.mulLocal(-1).addLocal(m_sweep.c0); // inlined: xf1.q.s = JBoxUtils.sin(m_sweep.a0); xf1.q.c = JBoxUtils.cos(m_sweep.a0); xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y; xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y; // end inline for (Fixture f : fixtures) { f.synchronize(world.m_contactManager.m_broadPhase, xf1, m_xf); } }
/** * Set the position of the body's origin and rotation. This breaks any contacts and wakes the * other bodies. Manipulating a body's transform may cause non-physical behavior. Note: contacts * are updated on the next call to World.step(). * * @param position the world position of the body's local origin. * @param angle the world rotation in radians. */ public final void setTransform(Vec2 position, float angle) { world.assertNotLocked(); m_xf.q.set(angle); m_xf.p.set(position); // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter); Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c); m_sweep.a = angle; m_sweep.c0.set(m_sweep.c); m_sweep.a0 = m_sweep.a; BroadPhase broadPhase = world.m_contactManager.m_broadPhase; for (Fixture f : fixtures) { f.synchronize(broadPhase, m_xf, m_xf); } }
/** * Set the position of the body's origin and rotation. This breaks any contacts and wakes the * other bodies. Manipulating a body's transform may cause non-physical behavior. Note: contacts * are updated on the next call to World.step(). * * @param position the world position of the body's local origin. * @param angle the world rotation in radians. */ public final void setTransform(Vec2 position, float angle) { assert (m_world.isLocked() == false); if (m_world.isLocked() == true) { return; } m_xf.q.set(angle); m_xf.p.set(position); // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter); Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c); m_sweep.a = angle; m_sweep.c0.set(m_sweep.c); m_sweep.a0 = m_sweep.a; BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase; for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(broadPhase, m_xf, m_xf); } }
/** * Set the position of the body's origin and rotation. This breaks any contacts and wakes the * other bodies. Manipulating a body's transform may cause non-physical behavior. * * @param position the world position of the body's local origin. * @param angle the world rotation in radians. */ public final void setTransform(Vec2 position, float angle) { assert (m_world.isLocked() == false); if (m_world.isLocked() == true) { return; } m_xf.q.set(angle); m_xf.p.set(position); // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter); Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c); m_sweep.a = angle; m_sweep.c0.set(m_sweep.c); m_sweep.a0 = m_sweep.a; BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase; for (Fixture f = m_fixtureList; f != null; f = f.m_next) { f.synchronize(broadPhase, m_xf, m_xf); } m_world.m_contactManager.findNewContacts(); }