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