PyANGKernel.GKPedestrianCrossing¶
- class GKPedestrianCrossing¶
Area where pedestrians can cross a section
Details
A pedestrian crossing that can be set at the beginning or end of a section. For crossings in the middle in a node (Japanese style) use decorated turns.
Synopsis¶
Methods¶
def
__init__()def
getNode()def
getPolygon()def
isAtTheEnd()def
isSignalized()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
- __init__(arg__1)
- Parameters:
arg__1 –
GKPedestrianCrossing
Returns if the pedestrian crossing allows pedestrians to cross in red
Gets whether this pedestrian crossing will be considered as yellow box or not.
Gets whether vehicles will halt at the stop line (true) or at the end of the section, meaning they enter and wait *on* the crossing (false).
Returns the waiting area at left. If it does not exist, it creates the waiting area with width equal to section lane width.
Returns the node this pedestrian crossing affects to, that is, the section’s origin node when located at the beginning of the section and the section’s destination node when located at the end
It will return the color to be used in 2D views to colour the pedestrian crossing. White in editing mode. Red, green or amber depending on the signal state during the simulation
- getPolygon([_margin=1.0])¶
- Parameters:
_margin – float
- Return type:
.std.pairGKPoints,uint
Gets the pedestrian crossing polygon enclosed in the section and parallel to the entranceLineAngle if the pedestrian crossing is at the beginning of the section or to the exitLineAngle if it is located at the end of the section. The width of the returned polygon will be the same as the pedestrian crossing minus the margin parameter.
The uint value also returned is the number of points in the left part (that is, first part) of the returned polygon
Returns the waiting area at right. If it does not exist, it creates the waiting area with width equal to section lane width.
Safety margin (in m) to apply to a pedestrian back. 3 m by default.
Safety margin (in m) to apply to a pedestrian front. 3 m by default.
Returns all the turns in the node this pedestrian crossing affects to, that intersect with this pedestrian crossing
Is this pedestrian crossing at the beginning of the section? By beginning meaning the first part of the section a vehicle goes through.
Is this pedestrian crossing at the end of the section? By end meaning the last part of the section a vehicle goes through.
Returns whether the LEFT waiting area is active or not. They are only visible when the pedestrian crossing is inside a pedestrian area
Returns whether the RIGHT waiting area is active or not. They are only visible when the pedestrian crossing is inside a pedestrian area
Returns whether the waiting areas are visible or not. They are only visible when the pedestrian crossing is inside a pedestrian area
- isSignalized(masterPlan)¶
- Parameters:
masterPlan –
GKMasterControlPlan- Return type:
Returns true if the pedestrian crossing is signalised in the masterPlan. False, otherwise. Pedestrian crossings can only be in signal groups belonging to either section’s origin node or section’s destination node
- rebuildWaitingAreas()¶
- setAllowCrossingInRed(allowCrossingInRed)¶
- Parameters:
allowCrossingInRed – bool
Sets if the pedestrian crossing allows pedestrians to cross in red
- setConsiderAsYellowBox(value)¶
- Parameters:
value – bool
Sets this pedestrian crossing to be considered as yellow box or not.
- setDisableUpdateOnConnections(val)¶
- Parameters:
val – bool
- setGiveWayToVehiclesBefore(value)¶
- Parameters:
value – bool
Sets whether vehicles will halt at the stop line (true) or at the end of the section, meaning they enter and wait *on* the crossing (false).
Sets the left waiting area points
- setPedestriansYieldToVehicles(val)¶
- Parameters:
val – bool
Sets the right waiting area points
- setSafetyMarginBack(margin)¶
- Parameters:
margin – float
Safety margin (in m) to apply to a pedestrian back. 3 m by default.
- setSafetyMarginFront(margin)¶
- Parameters:
margin – float
Safety margin (in m) to apply to a pedestrian front. 3 m by default.
- updateConnections()¶
Force update the connections if any