MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / render_actors

Method render_actors

PythonAPI/examples/no_rendering_mode.py:1235–1244  ·  view source on GitHub ↗

Renders all the actors

(self, surface, vehicles, traffic_lights, speed_limits, walkers)

Source from the content-addressed store, hash-verified

1233 pygame.draw.lines(surface, color, False, corners, int(math.ceil(4.0 * self.map_image.scale)))
1234
1235 def render_actors(self, surface, vehicles, traffic_lights, speed_limits, walkers):
1236 """Renders all the actors"""
1237 # Static actors
1238 self._render_traffic_lights(surface, [tl[0] for tl in traffic_lights], self.map_image.world_to_pixel)
1239 self._render_speed_limits(surface, [sl[0] for sl in speed_limits], self.map_image.world_to_pixel,
1240 self.map_image.world_to_pixel_width)
1241
1242 # Dynamic actors
1243 self._render_vehicles(surface, vehicles, self.map_image.world_to_pixel)
1244 self._render_walkers(surface, walkers, self.map_image.world_to_pixel)
1245
1246 def clip_surfaces(self, clipping_rect):
1247 """Used to improve perfomance. Clips the surfaces in order to render only the part of the surfaces that are going to be visible"""

Callers 1

renderMethod · 0.95

Calls 4

_render_speed_limitsMethod · 0.95
_render_vehiclesMethod · 0.95
_render_walkersMethod · 0.95

Tested by

no test coverage detected