public void MoveProxy() { for (int i = 0; i < e_actorCount; ++i) { int j = MathUtils.abs(rand.nextInt() % e_actorCount); Actor actor = m_actors[j]; if (actor.proxyId == -1) { continue; } AABB aabb0 = new AABB(actor.aabb); MoveAABB(actor.aabb); Vec2 displacement = actor.aabb.getCenter().sub(aabb0.getCenter()); m_tree.moveProxy(actor.proxyId, new AABB(actor.aabb), displacement); return; } }
public void MoveProxy() { for (int i = 0; i < e_actorCount; ++i) { int j = MathUtils.abs(rand.nextInt() % e_actorCount); Actor actor = m_actors[j]; if (actor.proxyId == -1) { continue; } AABB aabb0 = new AABB(actor.aabb); MoveAABB(actor.aabb); Vec2 displacement = actor.aabb.getCenter().sub(aabb0.getCenter()); m_tree.moveProxy(actor.proxyId, new AABB(actor.aabb), displacement); return; } }