public ContactManager(World argPool, BroadPhaseStrategy strategy) { m_contactList = null; m_contactCount = 0; m_contactFilter = new ContactFilter(); m_contactListener = null; m_broadPhase = new BroadPhase(strategy); pool = argPool; }
public DefaultBroadPhaseBuffer(BroadPhaseStrategy strategy) { m_proxyCount = 0; m_pairCapacity = 16; m_pairCount = 0; m_pairBuffer = new Pair[m_pairCapacity]; for (int i = 0; i < m_pairCapacity; i++) { m_pairBuffer[i] = new Pair(); } m_moveCapacity = 16; m_moveCount = 0; m_moveBuffer = new int[m_moveCapacity]; m_tree = strategy; m_queryProxyId = (int) BroadPhaseProxy.Null; }
public BroadPhase(BroadPhaseStrategy strategy) { m_proxyCount = 0; m_pairCapacity = 16; m_pairCount = 0; m_pairBuffer = new Pair[m_pairCapacity]; for (int i = 0; i < m_pairCapacity; i++) { m_pairBuffer[i] = new Pair(); } m_moveCapacity = 16; m_moveCount = 0; m_moveBuffer = new int[m_moveCapacity]; m_tree = strategy; m_queryProxyId = NULL_PROXY; }
public World(Vec2 gravity, IWorldPool pool, BroadPhaseStrategy strategy) : this(gravity, pool, new DefaultBroadPhaseBuffer(strategy)) { }
public override void initTest(bool argDeserialized) { worldExtent = 15.0f; m_proxyExtent = 0.5f; m_tree = new DynamicTree(); for (int i = 0; i < _e_actorCount; ++i) { Actor actor = m_actors[i] = new Actor(); GetRandomAABB(actor.aabb); actor.proxyId = m_tree.createProxy(actor.aabb, actor); } m_stepCount = 0; float h = worldExtent; m_queryAABB = new AABB(); m_queryAABB.lowerBound.set(-3.0f, -4.0f + h); m_queryAABB.upperBound.set(5.0f, 6.0f + h); m_rayCastInput = new RayCastInput(); m_rayCastInput.p1.set(-5.0f, 5.0f + h); m_rayCastInput.p2.set(7.0f, -4.0f + h); // m_rayCastInput.p1.set(0.0f, 2.0f + h); // m_rayCastInput.p2.set(0.0f, -2.0f + h); m_rayCastInput.maxFraction = 1.0f; m_rayCastOutput = new RayCastOutput(); m_automated = false; }