public class Stripe extends RoadMarkerAlong
Copyright (c) 2013-2019 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
listeners
FIRST_POSITION, LAST_POSITION
Modifier | Constructor and Description |
---|---|
|
Stripe(CrossSectionLink parentLink,
Length lateralCenterPositionStart,
Length lateralCenterPositionEnd,
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,
Length lateralCenterPositionStart,
Length lateralCenterPositionEnd,
Length width,
Set<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,
SimulatorInterface.TimeDoubleUnit newSimulator,
Stripe cse)
Clone a Stripe for a new network.
|
Modifier and Type | Method and Description |
---|---|
void |
addPermeability(GTUType gtuType,
Stripe.Permeable permeable) |
Stripe |
clone(CrossSectionLink newParentLink,
SimulatorInterface.TimeDoubleUnit newSimulator)
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, Length lateralCenterPositionStart, Length lateralCenterPositionEnd, Length width) throws OTSGeometryException, NetworkException
parentLink
- CrossSectionLink; Cross Section Link to which the element belongslateralCenterPositionStart
- Length; the lateral start position compared to the linear geometry of the Cross Section
LinklateralCenterPositionEnd
- Length; the lateral start position compared to the linear geometry of the Cross Section
Linkwidth
- Length; positioned <i>symmetrically around</i> the center line given by the
lateralCenterPosition.OTSGeometryException
- when creation of the center line or contour geometry failsNetworkException
- when id equal to null or not uniquepublic Stripe(CrossSectionLink parentLink, Length lateralCenterPositionStart, Length lateralCenterPositionEnd, Length width, Set<GTUType> gtuTypes, Stripe.Permeable permeable) throws OTSGeometryException, NetworkException
parentLink
- CrossSectionLink; Cross Section Link to which the element belongslateralCenterPositionStart
- Length; the lateral start position compared to the linear geometry of the Cross Section
LinklateralCenterPositionEnd
- Length; the lateral start position compared to the linear geometry of the Cross Section
Linkwidth
- Length; positioned <i>symmetrically around</i> the center line given by the
lateralCenterPositiongtuTypes
- Set<GTUType>; the GTU types for which the permeability is definedpermeable
- Permeable; one of the enums of Stripe.Permeable to define the permeabilityOTSGeometryException
- when creation of the center line or contour geometry failsNetworkException
- when id equal to null or not uniquepublic Stripe(CrossSectionLink parentLink, List<CrossSectionSlice> crossSectionSlices, Stripe.Permeable permeable) throws OTSGeometryException, NetworkException
parentLink
- CrossSectionLink; Cross Section Link to which the element belongscrossSectionSlices
- List<CrossSectionSlice>; 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
- Permeable; one of the enums of Stripe.Permeable to define the permeabilityOTSGeometryException
- when creation of the center line or contour geometry failsNetworkException
- when id equal to null or not uniqueprotected Stripe(CrossSectionLink newParentLink, SimulatorInterface.TimeDoubleUnit newSimulator, Stripe cse) throws NetworkException
newParentLink
- CrossSectionLink; the new link to which the clone belongsnewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator for this networkcse
- Stripe; the element to clone fromNetworkException
- 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(GTUType gtuType, Stripe.Permeable permeable)
gtuType
- GTUType; GTU type to add permeability for.permeable
- 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, SimulatorInterface.TimeDoubleUnit newSimulator) throws NetworkException
clone
in class CrossSectionElement
newParentLink
- CrossSectionLink; the new link to which the clone belongsnewSimulator
- SimulatorInterface.TimeDoubleUnit; the new simulator for this networkNetworkException
- in case the cloning failsCopyright © 2014–2019 Delft University of Technology. All rights reserved.