from .utils import debug_timer
-def screen_rays(pos):
+def screen_rays():
""" An iterable that returns ordered rays from pos to the edge of the
screen, starting with the edge point (0, 0) and continuing clockwise
in pymunk coordinates.
vertices = [position]
start, end = None, None
ray_polys = []
- for ray in screen_rays(position):
+ for ray in screen_rays():
info = space.segment_query_first(position, ray, 1, light_filter)
point = ray if info is None else info.point
vertices.append(point)
self._min_radius = value or 0.0
def reaches(self, position):
- distance = self.position.get_distance(self.position)
+ distance = self.position.get_distance(position)
return (self._min_radius <= distance <= self._max_radius)
def _set_radius_limits(self, radius_limits):