Example #1
0
 def check_point(self, point):
     if not self.check_collisions: return True
     for territory in self.land_terrs:
         for tri in territory.triangles:
             if util.point_inside_polygon(point.x, point.y, tri):
                 return False
     return True
Example #2
0
 def point_inside(self, x, y):
     """Returns True if (x,y) is inside the territory."""
     for tri in self.triangles:
         if util.point_inside_polygon(x, y, tri):
             return True
     return False