示例#1
0
文件: LATests.py 项目: WeGlove/Engine
 def test_get_leaves(self):
     LA = Engine.shape_factory.LeastAddition([
         StdFactroy.AABB(numpy.array([0, 0]), 10, 10, identifier=i)
         for i in range(10)
     ])
     for leaf in LA.get_leaves():
         print(leaf)
示例#2
0
文件: LATests.py 项目: WeGlove/Engine
 def test_leaf_complex(self):
     LA = Engine.shape_factory.LeastAddition([
         StdFactroy.AABB(numpy.array([0, 0]), 10, 10, identifier=i)
         for i in range(Engine.shape_factory.LeastAddition.FILL + 1)
     ])
     LA.delete(Engine.shape_factory.LeastAddition.FILL)
     self.assertEqual(Engine.shape_factory.LeastAddition.FILL,
                      len(LA.get_leaves()))
示例#3
0
文件: LATests.py 项目: WeGlove/Engine
 def test_leaf_delete(self):
     LA = Engine.shape_factory.LeastAddition(
         [StdFactroy.AABB(numpy.array([0, 0]), 10, 10, identifier=1)])
     LA.delete(1)
     self.assertEqual(0, len(LA.nodes), "Nodes not empty")
示例#4
0
文件: LATests.py 项目: WeGlove/Engine
 def test_split_insert_p1(self):
     Engine.shape_factory.LeastAddition([
         StdFactroy.AABB(numpy.array([0, 0]), 10, 10, identifier=i)
         for i in range(Engine.shape_factory.LeastAddition.FILL + 2)
     ])