private World(Vec2 gravity, IWorldPool pool, BroadPhase broadPhase) { this.pool = pool; this.gravity.set(gravity); contactManager = new ContactManager(pool, broadPhase); particleSystem = new ParticleSystem(this); }
private void initializeRegisters() { addType(pool.getCircleContactStack(), ShapeType.CIRCLE, ShapeType.CIRCLE); addType(pool.getPolyCircleContactStack(), ShapeType.POLYGON, ShapeType.CIRCLE); addType(pool.getPolyContactStack(), ShapeType.POLYGON, ShapeType.POLYGON); addType(pool.getEdgeCircleContactStack(), ShapeType.EDGE, ShapeType.CIRCLE); addType(pool.getEdgePolyContactStack(), ShapeType.EDGE, ShapeType.POLYGON); addType(pool.getChainCircleContactStack(), ShapeType.CHAIN, ShapeType.CIRCLE); addType(pool.getChainPolyContactStack(), ShapeType.CHAIN, ShapeType.POLYGON); }
private void destroyAttachedContacts() { // Delete the attached contacts. ContactEdge ce = m_contactList; while (ce != null) { ContactEdge ce0 = ce; ce = ce.next; world.getContactManager().destroy(ce0.contact); } m_contactList = null; }
island.init(getBodyCount(), contactManager.contactCount, jointCount, contactManager.getContactListener()); contactManager.findNewContacts();
contactManager.findNewContacts(); newFixture = false; contactManager.collide();
ContactManager(IWorldPool pool, BroadPhase broadPhase) { this.pool = pool; this.broadPhase = broadPhase; initializeRegisters(); }
/** * Register a contact event listener. The listener is owned by you and must remain in scope. * * @param listener contact listener */ public void setContactListener(ContactListener listener) { contactManager.setContactListener(listener); }
pushContact(c); --contactCount;
Contact c = popContact(fixtureA, indexA, fixtureB, indexB); if (c == null) { return;
island.init(getBodyCount(), contactManager.contactCount, jointCount, contactManager.getContactListener()); contactManager.findNewContacts();
contactManager.findNewContacts(); newFixture = false; contactManager.collide();
ContactManager(IWorldPool pool, BroadPhase broadPhase) { this.pool = pool; this.broadPhase = broadPhase; initializeRegisters(); }
/** * Register a contact event listener. The listener is owned by you and must remain in scope. * * @param listener contact listener */ public void setContactListener(ContactListener listener) { contactManager.setContactListener(listener); }
pushContact(c); --contactCount;
Contact c = popContact(fixtureA, indexA, fixtureB, indexB); if (c == null) { return;
private void solveTOI(final TimeStep step) { island.init(2 * JBoxSettings.maxTOIContacts, JBoxSettings.maxTOIContacts, 0, contactManager.getContactListener()); minContact.update(contactManager.getContactListener()); minContact.m_flags &= ~Contact.TOI_FLAG; ++minContact.m_toiCount; contact.update(contactManager.getContactListener()); contactManager.findNewContacts();
private void destroyAttachedContacts() { // Delete the attached contacts. ContactEdge ce = m_contactList; while (ce != null) { ContactEdge ce0 = ce; ce = ce.next; world.getContactManager().destroy(ce0.contact); } m_contactList = null; }
private World(Vec2 gravity, IWorldPool pool, BroadPhase broadPhase) { this.pool = pool; this.gravity.set(gravity); contactManager = new ContactManager(pool, broadPhase); particleSystem = new ParticleSystem(this); }
private void initializeRegisters() { addType(pool.getCircleContactStack(), ShapeType.CIRCLE, ShapeType.CIRCLE); addType(pool.getPolyCircleContactStack(), ShapeType.POLYGON, ShapeType.CIRCLE); addType(pool.getPolyContactStack(), ShapeType.POLYGON, ShapeType.POLYGON); addType(pool.getEdgeCircleContactStack(), ShapeType.EDGE, ShapeType.CIRCLE); addType(pool.getEdgePolyContactStack(), ShapeType.EDGE, ShapeType.POLYGON); addType(pool.getChainCircleContactStack(), ShapeType.CHAIN, ShapeType.CIRCLE); addType(pool.getChainPolyContactStack(), ShapeType.CHAIN, ShapeType.POLYGON); }
private void solveTOI(final TimeStep step) { island.init(2 * JBoxSettings.maxTOIContacts, JBoxSettings.maxTOIContacts, 0, contactManager.getContactListener()); minContact.update(contactManager.getContactListener()); minContact.m_flags &= ~Contact.TOI_FLAG; ++minContact.m_toiCount; contact.update(contactManager.getContactListener()); contactManager.findNewContacts();