private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) { ContactRegister register = new ContactRegister(); register.creator = creator; register.primary = true; contactStacks[type1.ordinal()][type2.ordinal()] = register; if (type1 != type2) { ContactRegister register2 = new ContactRegister(); register2.creator = creator; register2.primary = false; contactStacks[type2.ordinal()][type1.ordinal()] = register2; } }
public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) { final ShapeType type1 = fixtureA.getType(); final ShapeType type2 = fixtureB.getType(); final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()]; if (reg != null) { if (reg.primary) { Contact c = reg.creator.pop(); c.init(fixtureA, indexA, fixtureB, indexB); return c; } else { Contact c = reg.creator.pop(); c.init(fixtureB, indexB, fixtureA, indexA); return c; } } else { return null; } }
public void pushContact(Contact contact) { Fixture fixtureA = contact.getFixtureA(); Fixture fixtureB = contact.getFixtureB(); if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) { fixtureA.getBody().setAwake(true); fixtureB.getBody().setAwake(true); } ShapeType type1 = fixtureA.getType(); ShapeType type2 = fixtureB.getType(); IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator; creator.push(contact); }
private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) { ContactRegister register = new ContactRegister(); register.creator = creator; register.primary = true; contactStacks[type1.ordinal()][type2.ordinal()] = register; if (type1 != type2) { ContactRegister register2 = new ContactRegister(); register2.creator = creator; register2.primary = false; contactStacks[type2.ordinal()][type1.ordinal()] = register2; } }
public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) { final ShapeType type1 = fixtureA.getType(); final ShapeType type2 = fixtureB.getType(); final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()]; if (reg != null) { if (reg.primary) { Contact c = reg.creator.pop(); c.init(fixtureA, indexA, fixtureB, indexB); return c; } else { Contact c = reg.creator.pop(); c.init(fixtureB, indexB, fixtureA, indexA); return c; } } else { return null; } }
public void pushContact(Contact contact) { Fixture fixtureA = contact.getFixtureA(); Fixture fixtureB = contact.getFixtureB(); if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) { fixtureA.getBody().setAwake(true); fixtureB.getBody().setAwake(true); } ShapeType type1 = fixtureA.getType(); ShapeType type2 = fixtureB.getType(); IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator; creator.push(contact); }
private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) { ContactRegister register = new ContactRegister(); register.creator = creator; register.primary = true; contactStacks[type1.ordinal()][type2.ordinal()] = register; if (type1 != type2) { ContactRegister register2 = new ContactRegister(); register2.creator = creator; register2.primary = false; contactStacks[type2.ordinal()][type1.ordinal()] = register2; } }
private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) { ContactRegister register = new ContactRegister(); register.creator = creator; register.primary = true; contactStacks[type1.ordinal()][type2.ordinal()] = register; if (type1 != type2) { ContactRegister register2 = new ContactRegister(); register2.creator = creator; register2.primary = false; contactStacks[type2.ordinal()][type1.ordinal()] = register2; } }
private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) { ContactRegister register = new ContactRegister(); register.creator = creator; register.primary = true; contactStacks[type1.ordinal()][type2.ordinal()] = register; if (type1 != type2) { ContactRegister register2 = new ContactRegister(); register2.creator = creator; register2.primary = false; contactStacks[type2.ordinal()][type1.ordinal()] = register2; } }
public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) { final ShapeType type1 = fixtureA.getType(); final ShapeType type2 = fixtureB.getType(); final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()]; if (reg != null) { if (reg.primary) { Contact c = reg.creator.pop(); c.init(fixtureA, indexA, fixtureB, indexB); return c; } else { Contact c = reg.creator.pop(); c.init(fixtureB, indexB, fixtureA, indexA); return c; } } else { return null; } }
public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) { final ShapeType type1 = fixtureA.getType(); final ShapeType type2 = fixtureB.getType(); final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()]; if (reg != null) { if (reg.primary) { Contact c = reg.creator.pop(); c.init(fixtureA, indexA, fixtureB, indexB); return c; } else { Contact c = reg.creator.pop(); c.init(fixtureB, indexB, fixtureA, indexA); return c; } } else { return null; } }
public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) { final ShapeType type1 = fixtureA.getType(); final ShapeType type2 = fixtureB.getType(); final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()]; final IDynamicStack<Contact> creator = reg.creator; if (creator != null) { if (reg.primary) { Contact c = creator.pop(); c.init(fixtureA, indexA, fixtureB, indexB); return c; } else { Contact c = creator.pop(); c.init(fixtureB, indexB, fixtureA, indexA); return c; } } else { return null; } }
public void pushContact(Contact contact) { Fixture fixtureA = contact.getFixtureA(); Fixture fixtureB = contact.getFixtureB(); if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) { fixtureA.getBody().setAwake(true); fixtureB.getBody().setAwake(true); } ShapeType type1 = fixtureA.getType(); ShapeType type2 = fixtureB.getType(); IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator; creator.push(contact); }
public void pushContact(Contact contact) { Fixture fixtureA = contact.getFixtureA(); Fixture fixtureB = contact.getFixtureB(); if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) { fixtureA.getBody().setAwake(true); fixtureB.getBody().setAwake(true); } ShapeType type1 = fixtureA.getType(); ShapeType type2 = fixtureB.getType(); IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator; creator.push(contact); }
public void pushContact(Contact contact) { Fixture fixtureA = contact.getFixtureA(); Fixture fixtureB = contact.getFixtureB(); if (contact.m_manifold.pointCount > 0 && !fixtureA.isSensor() && !fixtureB.isSensor()) { fixtureA.getBody().setAwake(true); fixtureB.getBody().setAwake(true); } ShapeType type1 = fixtureA.getType(); ShapeType type2 = fixtureB.getType(); IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator; creator.push(contact); }