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
FieldsModifier and TypeFieldDescriptionprotected final org.djutils.draw.line.PolyLine2dCenter line. -
Constructor Summary
ConstructorsConstructorDescriptionMapCrossSectionData(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.OtsBounds2dorg.djutils.draw.line.PolyLine2dReturns the link id.org.djutils.draw.point.OrientedPoint2dorg.djunits.value.vdouble.scalar.LengthgetWidth(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, waitMethods 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:
getBoundsin interfacenl.tudelft.simulation.dsol.animation.Locatable- Specified by:
getBoundsin interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getLocation
public org.djutils.draw.point.OrientedPoint2d getLocation()- Specified by:
getLocationin interfacenl.tudelft.simulation.dsol.animation.Locatable- Specified by:
getLocationin interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getCenterLine
public org.djutils.draw.line.PolyLine2d getCenterLine()- Specified by:
getCenterLinein interfaceCrossSectionElementAnimation.CrossSectionElementData
-
getLinkId
Returns the link id.- Specified by:
getLinkIdin 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
-