Renders the walkers' bounding boxes
(self, surface, list_w, world_to_pixel)
| 1195 | surface.blit(font_surface, (x - radius / 2, y - radius / 2)) |
| 1196 | |
| 1197 | def _render_walkers(self, surface, list_w, world_to_pixel): |
| 1198 | """Renders the walkers' bounding boxes""" |
| 1199 | for w in list_w: |
| 1200 | color = COLOR_PLUM_0 |
| 1201 | |
| 1202 | # Compute bounding box points |
| 1203 | bb = w[0].bounding_box.extent |
| 1204 | corners = [ |
| 1205 | carla.Location(x=-bb.x, y=-bb.y), |
| 1206 | carla.Location(x=bb.x, y=-bb.y), |
| 1207 | carla.Location(x=bb.x, y=bb.y), |
| 1208 | carla.Location(x=-bb.x, y=bb.y)] |
| 1209 | |
| 1210 | w[1].transform(corners) |
| 1211 | corners = [world_to_pixel(p) for p in corners] |
| 1212 | pygame.draw.polygon(surface, color, corners) |
| 1213 | |
| 1214 | def _render_vehicles(self, surface, list_v, world_to_pixel): |
| 1215 | """Renders the vehicles' bounding boxes""" |