Class MapStripeData
java.lang.Object
org.opentrafficsim.editor.extensions.map.MapCrossSectionData
org.opentrafficsim.editor.extensions.map.MapStripeData
- All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable,OtsShape,LineLocatable,CrossSectionElementAnimation.CrossSectionElementData,StripeAnimation.StripeData
Stripe data for in the editor.
Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
-
Field Summary
Fields inherited from interface org.opentrafficsim.base.geometry.OtsShape
DEFAULT_POLYGON_SEGMENTS, WORLD_MARGIN_LINE -
Constructor Summary
ConstructorsConstructorDescriptionMapStripeData(Length dashOffset, XsdTreeNode linkNode, CrossSectionGeometry geometry, List<StripeElement> elements, StripeElement.StripeLateralSync lateralSync, PolyLine2d linkLine, MapLinkData.MiddleOffset middleOffset, Direction startDirection, Direction endDirection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the lateral sync.getLine()Returns the lane width at the give position.voidsetDashOffset(Length dashOffset) Sets a new dash offset, which should only occur due to synchronization.toString()Methods inherited from class org.opentrafficsim.editor.extensions.map.MapCrossSectionData
getAbsoluteContour, getLinkId, getLocation, getRelativeContourMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.draw.LineLocatable
contains, signedDistanceMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, getAbsoluteBounds, getAbsoluteContour, getAbsoluteContour, getDirZ, getRelativeBounds, getRelativeContour, signedDistanceMethods inherited from interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
getLocation, getZ
-
Constructor Details
-
MapStripeData
public MapStripeData(Length dashOffset, XsdTreeNode linkNode, CrossSectionGeometry geometry, List<StripeElement> elements, StripeElement.StripeLateralSync lateralSync, PolyLine2d linkLine, MapLinkData.MiddleOffset middleOffset, Direction startDirection, Direction endDirection) Constructor.- Parameters:
dashOffset- dash offsetlinkNode- node representing the elementgeometry- geometryelements- elementslateralSync- lateral synchronizationlinkLine- link linemiddleOffset- middle offsets to determine link reference linestartDirection- start directionendDirection- end direction
-
-
Method Details
-
getLine
- Specified by:
getLinein interfaceLineLocatable
-
getWidth
Description copied from class:MapCrossSectionDataReturns the lane width at the give position.- Specified by:
getWidthin interfaceStripeAnimation.StripeData- Overrides:
getWidthin classMapCrossSectionData- Parameters:
position- position along the lane.- Returns:
- lane width at the position.
-
getReferenceLine
- Specified by:
getReferenceLinein interfaceStripeAnimation.StripeData
-
getCenterLine
- Specified by:
getCenterLinein interfaceCrossSectionElementAnimation.CrossSectionElementData- Specified by:
getCenterLinein interfaceStripeAnimation.StripeData- Overrides:
getCenterLinein classMapCrossSectionData
-
getElements
- Specified by:
getElementsin interfaceStripeAnimation.StripeData
-
getDashOffset
- Specified by:
getDashOffsetin interfaceStripeAnimation.StripeData
-
getLateralSync
Returns the lateral sync.- Returns:
- lateral sync.
-
setDashOffset
Sets a new dash offset, which should only occur due to synchronization.- Parameters:
dashOffset- dash offset
-
toString
- Overrides:
toStringin classMapCrossSectionData
-