+ self._space = None # space the rays form part of
+
+ def set_space(self, space):
+ self._space = space
+ self._rays = calculate_ray_polys(
+ self._space, self._position, self._ray_filter)
+ self._poly_cache = None
+
+ def update_shapes(self):
+ if self._old_poly_cache:
+ self._space.remove(*self._old_poly_cache)
+ new_polys = self._old_poly_cache = self.polys()
+ self._space.add(*new_polys)
+
+ @property
+ def position(self):
+ return self._position
+
+ @property
+ def max_radius(self):
+ return self._max_radius
+
+ @max_radius.setter
+ def max_radius_setter(self, value):
+ self._max_radius = value or 0.0