public class Stripe extends RoadMarkerAlong
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
Modifier and Type | Class and Description |
---|---|
static class |
Stripe.Permeable
The types of permeability of a stripe.
|
crossSectionSlices, length, parentLink
Constructor and Description |
---|
Stripe(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.
|
Stripe(CrossSectionLink parentLink,
org.djunits.value.vdouble.scalar.Length.Rel lateralCenterPosition,
org.djunits.value.vdouble.scalar.Length.Rel width,
Set<org.opentrafficsim.core.gtu.GTUType> gtuTypes,
Stripe.Permeable permeable)
Helper constructor that immediately provides permeability for a number of GTU classes.
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. |
Stripe(CrossSectionLink parentLink,
List<CrossSectionSlice> crossSectionSlices,
Stripe.Permeable permeable)
Helper constructor that immediately provides permeability for all GTU classes.
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,
Stripe.Permeable permeable) |
String |
toString() |
addPermeability, getZ, isPermeable
constructContour, equals, getBeginWidth, getBounds, getCenterLine, getContour, getDesignLineOffsetAtBegin, getDesignLineOffsetAtEnd, getEndWidth, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLocation, getParentLink, getWidth, getWidth, hashCode
public Stripe(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 belongslateralCenterPosition
- the lateral start position compared to the linear geometry of the Cross Section Linkwidth
- positioned symmetrically around the center line given by the lateralCenterPosition.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 Stripe(CrossSectionLink parentLink, org.djunits.value.vdouble.scalar.Length.Rel lateralCenterPosition, org.djunits.value.vdouble.scalar.Length.Rel width, Set<org.opentrafficsim.core.gtu.GTUType> gtuTypes, Stripe.Permeable permeable) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
parentLink
- Cross Section Link to which the element belongslateralCenterPosition
- the lateral start position compared to the linear geometry of the Cross Section Linkwidth
- positioned symmetrically around the center line given by the lateralCenterPositiongtuTypes
- the GTU types for which the permeability is definedpermeable
- one of the enums of Stripe.Permeable to define the permeabilityorg.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 Stripe(CrossSectionLink parentLink, List<CrossSectionSlice> crossSectionSlices, Stripe.Permeable permeable) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
parentLink
- Cross Section Link to which the element belongscrossSectionSlices
- 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.permeable
- one of the enums of Stripe.Permeable to define the permeabilityorg.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 final void addPermeability(org.opentrafficsim.core.gtu.GTUType gtuType, Stripe.Permeable permeable)
gtuType
- GTU type to add permeability for.permeable
- direction(s) to add compared to the direction of the design line.public String toString()
toString
in class CrossSectionElement
Copyright © 2014–2016 Delft University of Technology. All rights reserved.