public class Stripe extends RoadMarkerAlong
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
Modifier and Type | Class and Description |
---|---|
static class |
Stripe.Permeable
The types of permeability of a stripe.
|
crossSectionSlices, length, parentLink
Modifier | Constructor and Description |
---|---|
|
Stripe(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.
|
|
Stripe(CrossSectionLink parentLink,
org.djunits.value.vdouble.scalar.Length lateralCenterPosition,
org.djunits.value.vdouble.scalar.Length 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. |
protected |
Stripe(CrossSectionLink newParentLink,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation,
Stripe cse)
Clone a Stripe for a new network.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermeability(org.opentrafficsim.core.gtu.GTUType gtuType,
Stripe.Permeable permeable) |
Stripe |
clone(CrossSectionLink newParentLink,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation)
Clone the CrossSectionElement for e.g., copying a network.
|
String |
toString() |
addPermeability, getPermeabilityMap, getZ, isPermeable
constructContour, equals, getBeginWidth, getBounds, getCenterLine, getContour, getDesignLineOffsetAtBegin, getDesignLineOffsetAtEnd, getEndWidth, getFullId, getId, getLateralBoundaryPosition, getLateralBoundaryPosition, getLateralCenterPosition, getLateralCenterPosition, getLength, getLocation, getParentLink, getWidth, getWidth, hashCode
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 Stripe(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 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 lateralCenterPosition, org.djunits.value.vdouble.scalar.Length 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 = 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 uniqueprotected Stripe(CrossSectionLink newParentLink, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation, Stripe cse) throws org.opentrafficsim.core.network.NetworkException
newParentLink
- 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.public 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
public Stripe clone(CrossSectionLink newParentLink, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation) throws org.opentrafficsim.core.network.NetworkException
clone
in class CrossSectionElement
newParentLink
- the new link to which the clone belongsnewSimulator
- the new simulator for this networkanimation
- whether to (re)create animation or notorg.opentrafficsim.core.network.NetworkException
- in case the cloning failsCopyright © 2014–2017 Delft University of Technology. All rights reserved.