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)
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()))
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")
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) ])