public class Shoulder 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 Aug 19, 2014
crossSectionSlices, length, parentLink
Modifier | Constructor and Description |
---|---|
protected |
Shoulder(CrossSectionLink newParentLink,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation,
Shoulder cse)
Clone a Shoulder for a new network.
|
|
Shoulder(CrossSectionLink parentLink,
String id,
org.djunits.value.vdouble.scalar.Length lateralPosition,
org.djunits.value.vdouble.scalar.Length width) |
|
Shoulder(CrossSectionLink parentLink,
String id,
org.djunits.value.vdouble.scalar.Length lateralPositionStart,
org.djunits.value.vdouble.scalar.Length lateralPositionEnd,
org.djunits.value.vdouble.scalar.Length beginWidth,
org.djunits.value.vdouble.scalar.Length endWidth) |
|
Shoulder(CrossSectionLink parentLink,
String id,
List<CrossSectionSlice> crossSectionSlices) |
Modifier and Type | Method and Description |
---|---|
Shoulder |
clone(CrossSectionLink newParentLink,
org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator,
boolean animation)
Clone the CrossSectionElement for e.g., copying a network.
|
protected double |
getZ()
Retrieve the Z offset (used to determine what covers what when drawing).
|
String |
toString() |
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 Shoulder(CrossSectionLink parentLink, String id, org.djunits.value.vdouble.scalar.Length lateralPositionStart, org.djunits.value.vdouble.scalar.Length lateralPositionEnd, 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.id
- String; the id of the lane. Should be unique within the parentLink.lateralPositionStart
- the lateral start position compared to the linear geometry of the Cross Section Link.lateralPositionEnd
- the lateral end position compared to the linear geometry of the Cross Section LinkbeginWidth
- 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 Shoulder(CrossSectionLink parentLink, String id, org.djunits.value.vdouble.scalar.Length lateralPosition, 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.id
- String; the id of the lane. Should be unique within the parentLink.lateralPosition
- the lateral start position compared to the linear geometry of the Cross Section Link.width
- the shoulder 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 Shoulder(CrossSectionLink parentLink, String id, List<CrossSectionSlice> crossSectionSlices) throws org.opentrafficsim.core.geometry.OTSGeometryException, org.opentrafficsim.core.network.NetworkException
parentLink
- Cross Section Link to which the element belongs.id
- String; the id of the lane. Should be unique within the parentLink.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 Shoulder(CrossSectionLink newParentLink, org.opentrafficsim.core.dsol.OTSSimulatorInterface newSimulator, boolean animation, Shoulder 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.protected final double getZ()
getZ
in class CrossSectionElement
public String toString()
toString
in class CrossSectionElement
public Shoulder 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.