public void UpdateWorldOneStaticBoxTest()
 {
     Unity.Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld(1);
     BroadPhaseTests.addStaticBoxToWorld(world, 0, Vector3.zero, quaternion.identity, new Vector3(10, .1f, 10));
     world.CollisionWorld.UpdateDynamicTree(ref world, 1 / 60, -9.81f * math.up());
     world.Dispose();
 }
 public void UpdateWorldOneHundredDynamicBoxesTest()
 {
     Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld(0, 100);
     for (int i = 0; i < 100; ++i)
     {
         BroadPhaseTests.addDynamicBoxToWorld(world, i, new Vector3(11 * i, 0, 0), quaternion.identity, new Vector3(10, .1f, 10));
     }
     world.CollisionWorld.UpdateDynamicTree(ref world, 1 / 60, -9.81f * math.up());
     world.Dispose();
 }
 public void SheduleUpdateJobsOneStaticBoxTest()
 {
     Unity.Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld(1);
     BroadPhaseTests.addStaticBoxToWorld(world, 0, Vector3.zero, quaternion.identity, new Vector3(10, .1f, 10));
     Unity.Jobs.JobHandle handle         = new Unity.Jobs.JobHandle();
     Unity.Jobs.JobHandle worldJobHandle = world.CollisionWorld.ScheduleUpdateDynamicLayer(ref world, 1 / 60, 1, handle);
     worldJobHandle.Complete();
     Assert.IsTrue(worldJobHandle.IsCompleted);
     world.Dispose();
 }
 public void SheduleUpdateJobsEmptyWorldTest()
 {
     for (int numThreads = 0; numThreads <= 8; numThreads++)
     {
         Physics.PhysicsWorld world          = BroadPhaseTests.createTestWorld();
         Unity.Jobs.JobHandle handle         = new Unity.Jobs.JobHandle();
         Unity.Jobs.JobHandle worldJobHandle = world.CollisionWorld.ScheduleUpdateDynamicTree(ref world, 1 / 60, -9.81f * math.up(), handle, numThreads);
         worldJobHandle.Complete();
         Assert.IsTrue(worldJobHandle.IsCompleted);
         world.Dispose();
     }
 }
 public void SheduleUpdateJobsOneStaticBoxTest()
 {
     for (int numThreads = 0; numThreads <= 8; numThreads++)
     {
         Unity.Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld(1);
         BroadPhaseTests.addStaticBoxToWorld(world, 0, Vector3.zero, quaternion.identity, new Vector3(10, .1f, 10));
         Unity.Jobs.JobHandle handle         = new Unity.Jobs.JobHandle();
         Unity.Jobs.JobHandle worldJobHandle = world.CollisionWorld.ScheduleUpdateDynamicTree(ref world, 1 / 60, -9.81f * math.up(), handle, numThreads);
         worldJobHandle.Complete();
         Assert.IsTrue(worldJobHandle.IsCompleted);
         world.Dispose();
     }
 }
 public void SheduleUpdateJobsOneHundredStaticBoxesTest()
 {
     Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld(100);
     for (int i = 0; i < 100; ++i)
     {
         BroadPhaseTests.addStaticBoxToWorld(world, i, new Vector3(11 * i, 0, 0), quaternion.identity, new Vector3(10, .1f, 10));
     }
     Unity.Jobs.JobHandle handle         = new Unity.Jobs.JobHandle();
     Unity.Jobs.JobHandle worldJobHandle = world.CollisionWorld.ScheduleUpdateDynamicLayer(ref world, 1 / 60, 1, handle);
     worldJobHandle.Complete();
     Assert.IsTrue(worldJobHandle.IsCompleted);
     world.Dispose();
 }
 public void SheduleUpdateJobsOneHundredDynamicBoxesTest()
 {
     for (int numThreads = 0; numThreads <= 8; numThreads++)
     {
         Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld(0, 100);
         for (int i = 0; i < 100; ++i)
         {
             BroadPhaseTests.addDynamicBoxToWorld(world, i, new Vector3(11 * i, 0, 0), quaternion.identity, new Vector3(10, .1f, 10));
         }
         Unity.Jobs.JobHandle handle         = new Unity.Jobs.JobHandle();
         Unity.Jobs.JobHandle worldJobHandle = world.CollisionWorld.ScheduleUpdateDynamicTree(ref world, 1 / 60, -9.81f * math.up(), handle, numThreads);
         worldJobHandle.Complete();
         Assert.IsTrue(worldJobHandle.IsCompleted);
         world.Dispose();
     }
 }
 public void UpdateEmptyWorldTest()
 {
     Physics.PhysicsWorld world = BroadPhaseTests.createTestWorld();
     world.CollisionWorld.UpdateDynamicTree(ref world, 1 / 60, -9.81f * math.up());
     world.Dispose();
 }