MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / draw_arrow

Method draw_arrow

scenario_runner/no_rendering_mode.py:568–584  ·  view source on GitHub ↗
(surface, transform, color=COLOR_ALUMINIUM_2)

Source from the content-addressed store, hash-verified

566 draw_broken_line(surface, markings[1], False, markings[2], 2)
567
568 def draw_arrow(surface, transform, color=COLOR_ALUMINIUM_2):
569 transform.rotation.yaw += 180
570 forward = transform.get_forward_vector()
571 transform.rotation.yaw += 90
572 right_dir = transform.get_forward_vector()
573 end = transform.location
574 start = end - 2.0 * forward
575 right = start + 0.8 * forward + 0.4 * right_dir
576 left = start + 0.8 * forward - 0.4 * right_dir
577 pygame.draw.lines(
578 surface, color, False, [
579 world_to_pixel(x) for x in [
580 start, end]], 4)
581 pygame.draw.lines(
582 surface, color, False, [
583 world_to_pixel(x) for x in [
584 left, start, right]], 4)
585
586 def draw_traffic_signs(surface, font_surface, actor, color=COLOR_ALUMINIUM_2, trigger_color=COLOR_PLUM_0):
587 transform = actor.get_transform()

Callers 1

draw_waypointsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected