public World(Vec2 gravity, IWorldPool pool, BroadPhase broadPhase) { this.pool = pool; m_destructionListener = null; m_debugDraw = null; m_bodyList = null; m_jointList = null; m_bodyCount = 0; m_jointCount = 0; m_warmStarting = true; m_continuousPhysics = true; m_subStepping = false; m_stepComplete = true; m_allowSleep = true; m_gravity.set(gravity); m_flags = CLEAR_FORCES; m_inv_dt0 = 0f; m_contactManager = new ContactManager(this, broadPhase); m_profile = new Profile(); m_particleSystem = new ParticleSystem(this); initializeRegisters(); }
m_contactManager.findNewContacts(); m_flags &= ~NEW_FIXTURE; m_contactManager.collide(); m_profile.collide.record(tempTimer.getMilliseconds());
ContactEdge ce0 = ce; ce = ce.next; m_world.m_contactManager.destroy(ce0.contact);
m_contactManager.findNewContacts(); m_profile.broadphase.record(broadphaseTimer.getMilliseconds());
m_contactManager.findNewContacts();
m_contactManager.findNewContacts(); m_flags &= ~NEW_FIXTURE; m_contactManager.collide(); m_profile.collide.record(tempTimer.getMilliseconds());
m_contactManager.findNewContacts(); m_profile.broadphase.record(broadphaseTimer.getMilliseconds());
public World(Vec2 gravity, IWorldPool pool, BroadPhase broadPhase) { this.pool = pool; m_destructionListener = null; m_debugDraw = null; m_bodyList = null; m_jointList = null; m_bodyCount = 0; m_jointCount = 0; m_warmStarting = true; m_continuousPhysics = true; m_subStepping = false; m_stepComplete = true; m_allowSleep = true; m_gravity.set(gravity); m_flags = CLEAR_FORCES; m_inv_dt0 = 0f; m_contactManager = new ContactManager(this, broadPhase); m_profile = new Profile(); m_particleSystem = new ParticleSystem(this); initializeRegisters(); }
m_world.m_contactManager.destroy(c);
m_contactManager.findNewContacts(); m_flags &= ~NEW_FIXTURE; m_contactManager.collide(); m_profile.collide = tempTimer.getMilliseconds();
/** * 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(); }
ContactManager manager = new ContactManager(); Object b = null; for (Class<?> clazz : ContactManager.class.getDeclaredClasses()) { if (clazz.getSimpleName().equals("thehandler")){ for (Constructor<?> constructor : clazz.getDeclaredConstructors()) { constructor.setAccessible(true); b=constructor.newInstance(manager); break; } break; } }
ContactEdge ce0 = ce; ce = ce.next; m_contactManager.destroy(ce0.contact);
m_contactManager.findNewContacts(); m_flags &= ~NEW_FIXTURE; m_contactManager.collide(); m_profile.collide.record(tempTimer.getMilliseconds());
m_contactManager.findNewContacts();
ContactManager m = new ContactManager(); JFrame contact = m.new ViewContact();
ContactEdge ce0 = ce; ce = ce.next; m_world.m_contactManager.destroy(ce0.contact);
m_contactManager.findNewContacts(); newFixture = false; m_contactManager.collide(); profile.collide.record(tempTimer.getMilliseconds());
m_contactManager.findNewContacts(); m_profile.broadphase = broadphaseTimer.getMilliseconds();