Package org.jbox2d.collision.broadphase

Examples of org.jbox2d.collision.broadphase.BroadPhase


      m_world.m_contactManager.destroy(ce0.contact);
    }
    m_contactList = null;

    // Touch the proxies so that new contacts will be created (when appropriate)
    BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
    for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
      int proxyCount = f.m_proxyCount;
      for (int i = 0; i < proxyCount; ++i) {
        broadPhase.touchProxy(f.m_proxies[i].proxyId);
      }
    }
  }
View Full Code Here


    if (flag) {
      m_flags |= e_activeFlag;

      // Create all proxies.
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
        f.createProxies(broadPhase, m_xf);
      }

      // Contacts are created the next time step.
    } else {
      m_flags &= ~e_activeFlag;

      // Destroy all proxies.
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
        f.destroyProxies(broadPhase);
      }

      // Destroy the attached contacts.
View Full Code Here

    // djm TODO from pool?
    Fixture fixture = new Fixture();
    fixture.create(this, def);
   
    if ((m_flags & e_activeFlag) == e_activeFlag) {
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      fixture.createProxy(broadPhase, m_xf);
    }
   
    fixture.m_next = m_fixtureList;
    m_fixtureList = fixture;
View Full Code Here

      }
    }
   
    if ((m_flags & e_activeFlag) == e_activeFlag) {
      assert (fixture.m_proxy != null);
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      fixture.destroyProxy(broadPhase);
    }
    else {
      assert (fixture.m_proxy == null);
    }
View Full Code Here

    Transform.mulToOut(m_xf, m_sweep.localCenter, m_sweep.c0);
    m_sweep.c.set(m_sweep.c0);
   
    m_sweep.a0 = m_sweep.a = angle;
   
    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();
View Full Code Here

   
    if (flag) {
      m_flags |= e_activeFlag;
     
      // Create all proxies.
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
        f.createProxy(broadPhase, m_xf);
      }
     
      // Contacts are created the next time step.
    }
    else {
      m_flags &= ~e_activeFlag;
     
      // Destroy all proxies.
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
        f.destroyProxy(broadPhase);
      }
     
      // Destroy the attached contacts.
View Full Code Here

    xf1.R.set(m_sweep.a0);
    // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter);
    Mat22.mulToOut(xf1.R, m_sweep.localCenter, xf1.position);
    xf1.position.mulLocal(-1).addLocal(m_sweep.c0);
   
    BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
    for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
      f.synchronize(broadPhase, xf1, m_xf);
    }
  }
View Full Code Here

  public ContactManager(World argPool) {
    m_contactList = null;
    m_contactCount = 0;
    m_contactFilter = new ContactFilter();
    m_contactListener = null;
    m_broadPhase = new BroadPhase();
    pool = argPool;
  }
View Full Code Here

    if (world == null) {
      return;
    }

    // Touch each proxy so that new pairs may be created
    BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
    for (int i = 0; i < m_proxyCount; ++i) {
      broadPhase.touchProxy(m_proxies[i].proxyId);
    }
  }
View Full Code Here

    Fixture fixture = new Fixture();
    fixture.create(this, def);

    if ((m_flags & e_activeFlag) == e_activeFlag) {
      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
      fixture.createProxies(broadPhase, m_xf);
    }

    fixture.m_next = m_fixtureList;
    m_fixtureList = fixture;
View Full Code Here

TOP

Related Classes of org.jbox2d.collision.broadphase.BroadPhase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.