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.DirectionalPolyLine
org.djunits.value.vdouble.scalar.Length
List<org.opentrafficsim.base.StripeElement>
org.opentrafficsim.base.StripeElement.StripeLateralSync
Returns the lateral sync.org.djutils.draw.line.PolyLine2d
getLine()
org.djutils.draw.line.PolyLine2d
org.djunits.value.vdouble.scalar.Length
getWidth
(org.djunits.value.vdouble.scalar.Length position) Returns the lane width at the give position.void
setDashOffset
(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, getShape
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opentrafficsim.draw.ClickableLineLocatable
getBounds
Methods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZ
Methods inherited from interface org.opentrafficsim.base.geometry.OtsLocatable
getShape
Methods inherited from interface org.opentrafficsim.base.geometry.SpatialObject
getContour
Methods 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:
getLine
in interfaceorg.opentrafficsim.draw.ClickableLineLocatable
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth(org.djunits.value.vdouble.scalar.Length position) Description copied from class:MapCrossSectionData
Returns the lane width at the give position.- Specified by:
getWidth
in interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
- Overrides:
getWidth
in classMapCrossSectionData
- Parameters:
position
- position along the lane.- Returns:
- lane width at the position.
-
getReferenceLine
public org.djutils.draw.line.PolyLine2d getReferenceLine()- Specified by:
getReferenceLine
in interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
-
getCenterLine
public org.opentrafficsim.base.geometry.DirectionalPolyLine getCenterLine()- Specified by:
getCenterLine
in interfaceorg.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
- Specified by:
getCenterLine
in interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
- Overrides:
getCenterLine
in classMapCrossSectionData
-
getElements
- Specified by:
getElements
in interfaceorg.opentrafficsim.draw.road.StripeAnimation.StripeData
-
getDashOffset
public org.djunits.value.vdouble.scalar.Length getDashOffset()- Specified by:
getDashOffset
in 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:
toString
in classMapCrossSectionData
-