public abstract class RoadMarkerAlong extends CrossSectionElement
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-09-03 13:38:01 +0200 (Thu, 03 Sep 2015) $, @version $Revision: 1378 $, by $Author: averbraeck $,
initial version Oct 25, 2014
crossSectionSlices, length, parentLink
listeners
FIRST_POSITION, LAST_POSITION
Modifier | Constructor and Description |
---|---|
|
RoadMarkerAlong(CrossSectionLink parentLink,
Length lateralCenterPosition,
Length width)
Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
the StartNode towards the EndNode as the longitudinal direction.
|
|
RoadMarkerAlong(CrossSectionLink parentLink,
Length startCenterPosition,
Length endCenterPosition,
Length beginWidth,
Length endWidth)
Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
the StartNode towards the EndNode as the longitudinal direction.
|
|
RoadMarkerAlong(CrossSectionLink parentLink,
List<CrossSectionSlice> crossSectionSlices)
Note: LEFT is seen as a positive lateral direction, RIGHT as a negative lateral direction, with the direction from
the StartNode towards the EndNode as the longitudinal direction.
|
protected |
RoadMarkerAlong(CrossSectionLink newCrossSectionLink,
SimulatorInterface.TimeDoubleUnit newSimulator,
RoadMarkerAlong cse)
Clone a RoadMarkerAlong for a new network.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermeability(GTUType gtuType,
LateralDirectionality lateralDirection)
Add lateral permeability for a GTU type in the direction of the design line of the overarching CrossSectionLink.
|
protected Map<GTUType,Set<LateralDirectionality>> |
getPermeabilityMap() |
protected double |
getZ()
Retrieve the Z offset (used to determine what covers what when drawing).
|
boolean |
isPermeable(GTUType gtuType,
LateralDirectionality lateralDirection) |
clone, constructContour, equals, getBeginWidth, getBounds, getCenterLine, getContour, getDesignLineOffsetAtBegin, getDesignLineOffsetAtEnd, getEndWidth, getFullId, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLocation, getNetwork, getParentLink, getWidth, getWidth, hashCode, toString
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
public RoadMarkerAlong(CrossSectionLink parentLink, Length startCenterPosition, Length endCenterPosition, Length beginWidth, Length endWidth) throws OTSGeometryException, NetworkException
parentLink
- CrossSectionLink; Cross Section Link to which the element belongs.startCenterPosition
- Length; the lateral start position compared to the linear geometry of the Cross Section Link
at the start of the road marker.endCenterPosition
- Length; the lateral end position compared to the linear geometry of the Cross Section Link at
the end of the road marker.beginWidth
- Length; start width, positioned <i>symmetrically around</i> the lateral start position.endWidth
- Length; end width, positioned <i>symmetrically around</i> the lateral end position.OTSGeometryException
- when creation of the center line or contour geometry failsNetworkException
- when id equal to null or not uniquepublic RoadMarkerAlong(CrossSectionLink parentLink, Length lateralCenterPosition, Length width) throws OTSGeometryException, NetworkException
parentLink
- CrossSectionLink; Cross Section Link to which the element belongs.lateralCenterPosition
- Length; the lateral start position compared to the linear geometry of the Cross Section
Link.width
- Length; start width, positioned <i>symmetrically around</i> the lateral start position.OTSGeometryException
- when creation of the center line or contour geometry failsNetworkException
- when id equal to null or not uniquepublic RoadMarkerAlong(CrossSectionLink parentLink, List<CrossSectionSlice> crossSectionSlices) throws OTSGeometryException, NetworkException
parentLink
- CrossSectionLink; Cross Section Link to which the element belongs.crossSectionSlices
- List<CrossSectionSlice>; The offsets and widths at positions along the line, relative to
the design line of the parent link. If there is just one with and offset, there should just be one element in
the list with Length = 0. If there are more slices, the last one should be at the length of the design line.
If not, a NetworkException is thrown.OTSGeometryException
- when creation of the center line or contour geometry failsNetworkException
- when id equal to null or not uniqueprotected RoadMarkerAlong(CrossSectionLink newCrossSectionLink, SimulatorInterface.TimeDoubleUnit newSimulator, RoadMarkerAlong cse) throws NetworkException
newCrossSectionLink
- CrossSectionLink; the new link to which the clone belongsnewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator for this networkcse
- RoadMarkerAlong; the element to clone fromNetworkException
- if link already exists in the network, if name of the link is not unique, or if the start node
or the end node of the link are not registered in the network.protected final double getZ()
getZ
in class CrossSectionElement
public final void addPermeability(GTUType gtuType, LateralDirectionality lateralDirection)
Suppose the design line runs from left to right. ========================= LANE 1L (BACKWARD) GTUs are allowed to move to lane 2L Permeability RIGHT is true, although vehicles will go to the LEFT... ------------------------- ========================= LANE 2L (BACKWARD) GTUs are NOT allowed to move to lane 1L nor to lane 2R No permeability defined (empty set) ========================= ========================= LANE 2R (FORWARD) GTUs are NOT allowed to move to lane 1R nor to lane 2L No permeability defined (empty set) ========================= ------------------------- LANE 1R (FORWARD) GTUs are allowed to move to lane 2R Permeability LEFT is true =========================Note: GTUType.ALL can be used to set permeability for all types of GTU at once.
gtuType
- GTUType; GTU type to add permeability for.lateralDirection
- LateralDirectionality; direction to add (LEFT or RIGHT) compared to the direction of the design
line.public final boolean isPermeable(GTUType gtuType, LateralDirectionality lateralDirection)
gtuType
- GTUType; GTU type to look for.lateralDirection
- LateralDirectionality; direction to look for (LEFT or RIGHT) compared to the direction of the
design line.protected final Map<GTUType,Set<LateralDirectionality>> getPermeabilityMap()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.