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,org.opentrafficsim.base.geometry.SpatialObject,org.opentrafficsim.draw.ClickableLocatable,org.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
- Direct Known Subclasses:
MapLaneData,MapShoulderData,MapStripeData
public class MapCrossSectionData
extends Object
implements org.opentrafficsim.draw.road.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
Fields inherited from interface org.opentrafficsim.draw.ClickableLocatable
EXPANSE -
Constructor Summary
ConstructorsConstructorDescriptionMapCrossSectionData(XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.djutils.draw.line.PolyLine2dorg.djutils.draw.line.Polygon2dReturns the link id.org.djutils.draw.point.OrientedPoint2dorg.opentrafficsim.base.geometry.OtsShapegetShape()org.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 org.opentrafficsim.draw.ClickableLocatable
getBoundsMethods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getDirZ, getZ
-
Constructor Details
-
MapCrossSectionData
public MapCrossSectionData(XsdTreeNode linkNode, org.opentrafficsim.road.network.lane.CrossSectionGeometry geometry) Constructor.- Parameters:
linkNode- node representing the elementgeometry- geometry
-
-
Method Details
-
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
-
getContour
public org.djutils.draw.line.Polygon2d getContour()- Specified by:
getContourin interfaceorg.opentrafficsim.base.geometry.SpatialObject
-
getShape
public org.opentrafficsim.base.geometry.OtsShape getShape()- Specified by:
getShapein interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getCenterLine
public org.djutils.draw.line.PolyLine2d getCenterLine()- Specified by:
getCenterLinein interfaceorg.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
-
getLinkId
Returns the link id.- Specified by:
getLinkIdin interfaceorg.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData- Returns:
- 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- position along the lane.- Returns:
- lane width at the position.
-
toString
-