Beispiel #1
0
 def test_fits(self, bounds_A, bounds_B, should_fit, should_overlap):
     assert fits(bounds_A, bounds_B) == should_fit
     assert overlaps(bounds_A, bounds_B) == should_overlap
Beispiel #2
0
 def is_enclosed(cel):  # TODO: switch to quadtree
     return fits(cel.bounds, (x1, y1, x2, y2))
Beispiel #3
0
 def test_fits(self, bounds_A, bounds_B, should_fit, should_overlap):
     assert fits(bounds_A, bounds_B) == should_fit
     assert overlaps(bounds_A, bounds_B) == should_overlap