def test_setDebugDrawer(self): """ An object can be specified as the debug drawer for a world. """ world = CollisionWorld() drawer = object() world.setDebugDrawer(drawer)
def test_addCollisionObject(self): world = CollisionWorld() obj = CollisionObject() shape = SphereShape(3) obj.setCollisionShape(shape) world.addCollisionObject(obj) self.assertEqual(world.getNumCollisionObjects(), 1)
def test_addBoxShape(self): world = CollisionWorld() obj = CollisionObject() shape = BoxShape(Vector3(2, 3, 4)) obj.setCollisionShape(shape) world.addCollisionObject(obj)
def test_empty(self): world = CollisionWorld() self.assertEqual(world.getNumCollisionObjects(), 0)