Class MapCrossSectionData
java.lang.Object
org.opentrafficsim.editor.extensions.map.MapCrossSectionData
- All Implemented Interfaces:
nl.tudelft.simulation.dsol.animation.Locatable
,org.opentrafficsim.base.geometry.OtsLocatable
,CrossSectionElementAnimation.CrossSectionElementData
- Direct Known Subclasses:
MapLaneData
,MapShoulderData
,MapStripeData
public class MapCrossSectionData
extends Object
implements CrossSectionElementAnimation.CrossSectionElementData
Cross section element 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
Modifier and TypeFieldDescriptionprotected final org.djutils.draw.line.PolyLine2d
Center line. -
Constructor Summary
ConstructorDescriptionMapCrossSectionData
(XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.opentrafficsim.base.geometry.OtsBounds2d
org.djutils.draw.line.PolyLine2d
Returns the link id.org.djutils.draw.point.OrientedPoint2d
org.djunits.value.vdouble.scalar.Length
getWidth
(org.djunits.value.vdouble.scalar.Length position) Returns the lane width at the give position.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZ, getZ
-
Field Details
-
centerLine
protected final org.djutils.draw.line.PolyLine2d centerLineCenter line.
-
-
Constructor Details
-
MapCrossSectionData
public MapCrossSectionData(XsdTreeNode linkNode, org.djutils.draw.line.PolyLine2d centerLine, org.djutils.draw.line.Polygon2d contour, org.opentrafficsim.road.network.lane.SliceInfo sliceInfo) Constructor.- Parameters:
linkNode
- XsdTreeNode; node representing the element.centerLine
- PolyLine2d; center line.contour
- PolyLine2d; contour.sliceInfo
- SliceInfo; slice info.
-
-
Method Details
-
getBounds
public org.opentrafficsim.base.geometry.OtsBounds2d getBounds()- Specified by:
getBounds
in interfacenl.tudelft.simulation.dsol.animation.Locatable
- Specified by:
getBounds
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getLocation
public org.djutils.draw.point.OrientedPoint2d getLocation()- Specified by:
getLocation
in interfacenl.tudelft.simulation.dsol.animation.Locatable
- Specified by:
getLocation
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getCenterLine
public org.djutils.draw.line.PolyLine2d getCenterLine()- Specified by:
getCenterLine
in interfaceCrossSectionElementAnimation.CrossSectionElementData
-
getLinkId
Returns the link id.- Specified by:
getLinkId
in interfaceCrossSectionElementAnimation.CrossSectionElementData
- Returns:
- String; link id.
-
getWidth
public org.djunits.value.vdouble.scalar.Length getWidth(org.djunits.value.vdouble.scalar.Length position) Returns the lane width at the give position.- Parameters:
position
- Length; position along the lane.- Returns:
- Length; lane width at the position.
-
toString
-