def check_point(self, point): if not self.check_collisions: return True for territory in self.lm.land_terrs: for tri in territory.triangles: if util.point_inside_triangle(point.x, point.y, tri): return False return True
def check_point(lm, point): for tri in lm.triangles_colliding_with(point.x, point.y): if util.point_inside_triangle(point.x, point.y, tri): return False return True
def point_inside(self, x, y): """Returns True if (x,y) is inside the territory.""" for tri in self.triangles: if util.point_inside_triangle(x, y, tri): return True return False