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,org.opentrafficsim.base.geometry.OtsLocatable,org.opentrafficsim.base.geometry.SpatialObject,org.opentrafficsim.draw.ClickableLineLocatable,org.opentrafficsim.draw.ClickableLocatable,org.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData,org.opentrafficsim.draw.road.StripeAnimation.StripeData
public class MapStripeData
extends MapCrossSectionData
implements org.opentrafficsim.draw.road.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.draw.ClickableLocatable
EXPANSE -
Constructor Summary
ConstructorsConstructorDescriptionMapStripeData(org.djunits.value.vdouble.scalar.Length dashOffset, XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry, List<org.opentrafficsim.base.StripeElement> elements, org.opentrafficsim.base.StripeElement.StripeLateralSync lateralSync, org.djutils.draw.line.PolyLine2d linkLine, MapLinkData.MiddleOffset middleOffset, org.djunits.value.vdouble.scalar.Direction startDirection, org.djunits.value.vdouble.scalar.Direction endDirection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.opentrafficsim.base.geometry.DirectionalPolyLineorg.djunits.value.vdouble.scalar.LengthList<org.opentrafficsim.base.StripeElement>org.opentrafficsim.base.StripeElement.StripeLateralSyncReturns the lateral sync.org.djutils.draw.line.PolyLine2dgetLine()org.djutils.draw.line.PolyLine2dorg.djunits.value.vdouble.scalar.LengthgetWidth(org.djunits.value.vdouble.scalar.Length position) Returns the lane width at the give position.voidsetDashOffset(org.djunits.value.vdouble.scalar.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
getContour, getLinkId, getLocation, getShapeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.draw.ClickableLineLocatable
getBoundsMethods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZMethods inherited from interface org.opentrafficsim.base.geometry.OtsLocatable
getShapeMethods inherited from interface org.opentrafficsim.base.geometry.SpatialObject
getContourMethods inherited from interface org.opentrafficsim.draw.road.StripeAnimation.StripeData
getLocation, getZ
-
Constructor Details
-
MapStripeData
public MapStripeData(org.djunits.value.vdouble.scalar.Length dashOffset, XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry, List<org.opentrafficsim.base.StripeElement> elements, org.opentrafficsim.base.StripeElement.StripeLateralSync lateralSync, org.djutils.draw.line.PolyLine2d linkLine, MapLinkData.MiddleOffset middleOffset, org.djunits.value.vdouble.scalar.Direction startDirection, org.djunits.value.vdouble.scalar.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
public org.djutils.draw.line.PolyLine2d getLine()- Specified by:
getLinein interfaceorg.opentrafficsim.draw.ClickableLineLocatable
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth(org.djunits.value.vdouble.scalar.Length position) Description copied from class:MapCrossSectionDataReturns the lane width at the give position.- Specified by:
getWidthin interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData- Overrides:
getWidthin classMapCrossSectionData- Parameters:
position- position along the lane.- Returns:
- lane width at the position.
-
getReferenceLine
public org.djutils.draw.line.PolyLine2d getReferenceLine()- Specified by:
getReferenceLinein interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
-
getCenterLine
public org.opentrafficsim.base.geometry.DirectionalPolyLine getCenterLine()- Specified by:
getCenterLinein interfaceorg.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData- Specified by:
getCenterLinein interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData- Overrides:
getCenterLinein classMapCrossSectionData
-
getElements
- Specified by:
getElementsin interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
-
getDashOffset
public org.djunits.value.vdouble.scalar.Length getDashOffset()- Specified by:
getDashOffsetin interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
-
getLateralSync
public org.opentrafficsim.base.StripeElement.StripeLateralSync getLateralSync()Returns the lateral sync.- Returns:
- lateral sync.
-
setDashOffset
public void setDashOffset(org.djunits.value.vdouble.scalar.Length dashOffset) Sets a new dash offset, which should only occur due to synchronization.- Parameters:
dashOffset- dash offset
-
toString
- Overrides:
toStringin classMapCrossSectionData
-