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.PolyLine2d
org.djutils.draw.line.Polygon2d
Returns the link id.org.djutils.draw.point.OrientedPoint2d
org.opentrafficsim.base.geometry.OtsShape
getShape()
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 org.opentrafficsim.draw.ClickableLocatable
getBounds
Methods 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:
getLocation
in interfacenl.tudelft.simulation.dsol.animation.Locatable
- Specified by:
getLocation
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getContour
public org.djutils.draw.line.Polygon2d getContour()- Specified by:
getContour
in interfaceorg.opentrafficsim.base.geometry.SpatialObject
-
getShape
public org.opentrafficsim.base.geometry.OtsShape getShape()- Specified by:
getShape
in interfaceorg.opentrafficsim.base.geometry.OtsLocatable
-
getCenterLine
public org.djutils.draw.line.PolyLine2d getCenterLine()- Specified by:
getCenterLine
in interfaceorg.opentrafficsim.draw.road.CrossSectionElementAnimation.CrossSectionElementData
-
getLinkId
Returns the link id.- Specified by:
getLinkId
in 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
-