Package org.opentrafficsim.draw
Interface LineLocatable
- All Superinterfaces:
nl.tudelft.simulation.dsol.animation.Locatable,OtsShape
- All Known Subinterfaces:
AbstractLineAnimation.LaneBasedObjectData,BusStopAnimation.BusStopData,ConflictAnimation.ConflictData,LaneDetectorAnimation.LaneDetectorData,LaneDetectorAnimation.LoopDetectorData,LaneDetectorAnimation.SinkData,LinkAnimation.LinkData,StripeAnimation.StripeData,TrafficLightAnimation.TrafficLightData
- All Known Implementing Classes:
LaneAnimation.CenterLine
This class returns a line that represent the object.
Copyright (c) 2024-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.base.geometry.OtsShape
DEFAULT_POLYGON_SEGMENTS, WORLD_MARGIN_LINE -
Method Summary
Modifier and TypeMethodDescriptiondefault booleangetLine()Returns line representation of this object in object coordinates.default doublesignedDistance(Point2d point) Signed distance function.Methods inherited from interface nl.tudelft.simulation.dsol.animation.Locatable
getZMethods inherited from interface org.opentrafficsim.base.geometry.OtsShape
contains, getAbsoluteBounds, getAbsoluteContour, getAbsoluteContour, getDirZ, getLocation, getRelativeBounds, getRelativeContour, signedDistance
-
Method Details
-
getLine
PolyLine2d getLine()Returns line representation of this object in object coordinates.- Returns:
- line representation of this object in object coordinates
-
signedDistance
Signed distance function. The point must be relative. As this is a line object, only positive values are returned.- Specified by:
signedDistancein interfaceOtsShape- Parameters:
point- point for which distance is returned- Returns:
- distance from point to these bounds
-
contains
-