public abstract class RoadMarkerAlong extends CrossSectionElement
Copyright (c) 2013-2017 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
Modifier | Constructor and Description |
---|---|
|
RoadMarkerAlong(CrossSectionLink parentLink,
org.djunits.value.vdouble.scalar.Length lateralCenterPosition,
org.djunits.value.vdouble.scalar.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,
org.djunits.value.vdouble.scalar.Length startCenterPosition,
org.djunits.value.vdouble.scalar.Length endCenterPosition,
org.djunits.value.vdouble.scalar.Length beginWidth,
org.djunits.value.vdouble.scalar.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,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation,
RoadMarkerAlong cse)
Clone a RoadMarkerAlong for a new network.
|
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 Map<org.opentrafficsim.core.gtu.GTUType,Set<org.opentrafficsim.core.network.LateralDirectionality>> |
getPermeabilityMap() |
protected double |
getZ()
Retrieve the Z offset (used to determine what covers what when drawing).
|
boolean |
isPermeable(org.opentrafficsim.core.gtu.GTUType gtuType,
org.opentrafficsim.core.network.LateralDirectionality lateralDirection) |
clone, constructContour, equals, getBeginWidth, getBounds, getCenterLine, getContour, getDesignLineOffsetAtBegin, getDesignLineOffsetAtEnd, getEndWidth, getFullId, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLocation, 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, org.djunits.value.vdouble.scalar.Length startCenterPosition, org.djunits.value.vdouble.scalar.Length endCenterPosition, org.djunits.value.vdouble.scalar.Length beginWidth, org.djunits.value.vdouble.scalar.Length 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 lateralCenterPosition, org.djunits.value.vdouble.scalar.Length 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 = 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 RoadMarkerAlong(CrossSectionLink newCrossSectionLink, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation, RoadMarkerAlong cse) throws org.opentrafficsim.core.network.NetworkException
newCrossSectionLink
- the new link to which the clone belongsnewSimulator
- the new simulator for this networkanimation
- whether to (re)create animation or notcse
- the element to clone fromorg.opentrafficsim.core.network.NetworkException
- 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(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–2017 Delft University of Technology. All rights reserved.