simulation.utils.road.renderer.surface_markings module¶
Summary¶
Functions:
Draw a blocked area in the given frame. |
|
Draw white stripes onto the ground. |
|
Draw a crossing area for pedestrian, which is only marked by dashed lines, in the given frame. |
|
Draw two crossing lines (X) in the given frame to represent a blocked spot. |
|
Draw the checkerboard pattern to mark the beginning of a parking area in the given frame. |
|
Draw a blocked area, which splits the two lanes of the traffic island, in the given frame. |
|
Draw a zebra crossing in the given frame. |
Reference¶
-
draw(ctx, surface_marking: simulation.utils.road.sections.surface_marking.SurfaceMarking)[source]¶
-
draw_start_lane(ctx, frame: simulation.utils.geometry.polygon.Polygon)[source]¶ Draw the checkerboard pattern to mark the beginning of a parking area in the given frame.
- Parameters
frame – Frame of the start lane. Points of the frame must be given in the right order! first point : start on left line second point: end on left line third point : end on right line fourth point: start on right line
-
draw_blocked_area(ctx, frame: simulation.utils.geometry.polygon.Polygon)[source]¶ Draw a blocked area in the given frame.
- Parameters
frame –
Frame of the blocked area. Points of the frame must be given in the right order! first point : start on right line second point: left of first point, towards middle line third point : left of fourth point, towards middle line fourth point: end on right line
Line between second and third point has to be parallel to middle/right line.
-
draw_zebra_crossing(ctx, frame: simulation.utils.geometry.polygon.Polygon, stripe_width: float = 0.04, offset: float = 0.02)[source]¶ Draw a zebra crossing in the given frame.
- Parameters
frame – Frame of the zebra crossing. Points of the frame must be given in the right order! first point : start on left line second point: end on left line third point : end on right line fourth point: start on right line
-
draw_crossing_lines(ctx, frame: simulation.utils.geometry.polygon.Polygon)[source]¶ Draw a crossing area for pedestrian, which is only marked by dashed lines, in the given frame.
The dashed lines are perpendicular to the road.
- Parameters
frame – Frame of the crossing area. Points of the frame must be given in the right order! first point : start on left line second point: end on left line third point : end on right line fourth point: start on right line
-
draw_traffic_island_blocked(ctx, frame: simulation.utils.geometry.polygon.Polygon)[source]¶ Draw a blocked area, which splits the two lanes of the traffic island, in the given frame.
- Parameters
frame – Frame of the blocked area. Points of the frame must be given in the right order! first half of points: left border second half: right border
-
draw_parking_spot_x(ctx, frame: simulation.utils.geometry.polygon.Polygon)[source]¶ Draw two crossing lines (X) in the given frame to represent a blocked spot.
- Parameters
frame – Frame of the parking spot. Points of the frame must be given in the right order! first point : left lower corner of parking spot second point: left upper corner third point : right upper corner fourth point: right lower corner
-
draw_blocked_stripes(ctx, v: simulation.utils.geometry.vector.Vector, start: simulation.utils.geometry.point.Point, line: simulation.utils.geometry.line.Line, points: List[simulation.utils.geometry.point.Point], angle: float, gap: float)[source]¶ Draw white stripes onto the ground.
White stripes are e.g. used by to signal areas on the ground where the car is not allowed to drive.
- Parameters
v – Vector along the line where the stripes start points are located.
start – Start point on the line where the stripes start points are located.
line – End points of the stripes are on this line.
points – List of points of the polygon frame.
angle – Angle of the stripes.
gap – Gap between the stripes.