NODEID - the ID type of the Node, e.g., String.LINKID - the ID type of the Link, e.g., String.public abstract class RoadMarkerAlong<LINKID,NODEID> extends CrossSectionElement<LINKID,NODEID>
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-26 22:05:02 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1156 $, by $Author: averbraeck $,
initial version Oct 25, 2014
beginWidth, designLineOffsetAtBegin, designLineOffsetAtEnd, endWidth, length, parentLink| Constructor and Description |
|---|
RoadMarkerAlong(CrossSectionLink<LINKID,NODEID> parentLink,
DoubleScalar.Rel<LengthUnit> lateralCenterPosition,
DoubleScalar.Rel<LengthUnit> beginWidth,
DoubleScalar.Rel<LengthUnit> 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.
|
| 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 double |
getZ() |
boolean |
isPermeable(GTUType<?> gtuType,
LateralDirectionality lateralDirection) |
getBeginWidth, getBounds, getCenterLine, getContour, getDesignLineOffsetAtBegin, getDesignLineOffsetAtEnd, getEndWidth, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLocation, getParentLink, getWidth, getWidth, toStringpublic RoadMarkerAlong(CrossSectionLink<LINKID,NODEID> parentLink, DoubleScalar.Rel<LengthUnit> lateralCenterPosition, DoubleScalar.Rel<LengthUnit> beginWidth, DoubleScalar.Rel<LengthUnit> endWidth) throws OTSGeometryException
parentLink - Cross Section Link to which the element belongs.lateralCenterPosition - the lateral start position compared to the linear geometry of the Cross Section Link.beginWidth - start width, positioned symmetrically around the lateral start position.endWidth - end width, positioned symmetrically around the lateral end position.OTSGeometryException - when creation of the center line or contour geometry failsprotected final double getZ()
getZ in class CrossSectionElement<LINKID,NODEID>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 - GTU type to add permeability for.lateralDirection - direction to add (LEFT or RIGHT) compared to the direction of the design line.public final boolean isPermeable(GTUType<?> gtuType, LateralDirectionality lateralDirection)
gtuType - GTU type to look for.lateralDirection - direction to look for (LEFT or RIGHT) compared to the direction of the design line.Copyright © 2014–2015 Delft University of Technology. All rights reserved.