public abstract class RoadMarkerAlong extends CrossSectionElement
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-09-03 13:38:01 +0200 (Thu, 03 Sep 2015) $, @version $Revision: 1378 $, by $Author: averbraeck $,
initial version Oct 25, 2014
crossSectionSlices, length, parentLink
Constructor and Description |
---|
RoadMarkerAlong(CrossSectionLink parentLink,
org.djunits.value.vdouble.scalar.Length.Rel lateralCenterPosition,
org.djunits.value.vdouble.scalar.Length.Rel 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,
org.djunits.value.vdouble.scalar.Length.Rel startCenterPosition,
org.djunits.value.vdouble.scalar.Length.Rel endCenterPosition,
org.djunits.value.vdouble.scalar.Length.Rel beginWidth,
org.djunits.value.vdouble.scalar.Length.Rel 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.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermeability(org.opentrafficsim.core.gtu.GTUType gtuType,
org.opentrafficsim.core.network.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(org.opentrafficsim.core.gtu.GTUType gtuType,
org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
constructContour, equals, getBeginWidth, getBounds, getCenterLine, getContour, getDesignLineOffsetAtBegin, getDesignLineOffsetAtEnd, getEndWidth, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLocation, getParentLink, getWidth, getWidth, hashCode, toString
public RoadMarkerAlong(CrossSectionLink parentLink, org.djunits.value.vdouble.scalar.Length.Rel startCenterPosition, org.djunits.value.vdouble.scalar.Length.Rel endCenterPosition, org.djunits.value.vdouble.scalar.Length.Rel beginWidth, org.djunits.value.vdouble.scalar.Length.Rel endWidth) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
parentLink
- Cross Section Link to which the element belongs.startCenterPosition
- the lateral start position compared to the linear geometry of the Cross Section Link at the
start of the road marker.endCenterPosition
- the lateral end position compared to the linear geometry of the Cross Section Link at the end of
the road marker.beginWidth
- start width, positioned symmetrically around the lateral start position.endWidth
- end width, positioned symmetrically around the lateral end position.org.opentrafficsim.core.geometry.OTSGeometryException
- when creation of the center line or contour geometry failsorg.opentrafficsim.core.network.NetworkException
- when id equal to null or not uniquepublic RoadMarkerAlong(CrossSectionLink parentLink, org.djunits.value.vdouble.scalar.Length.Rel lateralCenterPosition, org.djunits.value.vdouble.scalar.Length.Rel width) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
parentLink
- Cross Section Link to which the element belongs.lateralCenterPosition
- the lateral start position compared to the linear geometry of the Cross Section Link.width
- start width, positioned symmetrically around the lateral start position.org.opentrafficsim.core.geometry.OTSGeometryException
- when creation of the center line or contour geometry failsorg.opentrafficsim.core.network.NetworkException
- when id equal to null or not uniquepublic RoadMarkerAlong(CrossSectionLink parentLink, List<CrossSectionSlice> crossSectionSlices) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
parentLink
- Cross Section Link to which the element belongs.crossSectionSlices
- 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.Rel = 0.
If there are more slices, the last one should be at the length of the design line. If not, a NetworkException
is thrown.org.opentrafficsim.core.geometry.OTSGeometryException
- when creation of the center line or contour geometry failsorg.opentrafficsim.core.network.NetworkException
- when id equal to null or not uniqueprotected final double getZ()
getZ
in class CrossSectionElement
public final void addPermeability(org.opentrafficsim.core.gtu.GTUType gtuType, org.opentrafficsim.core.network.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(org.opentrafficsim.core.gtu.GTUType gtuType, org.opentrafficsim.core.network.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–2016 Delft University of Technology. All rights reserved.