Package org.opentrafficsim.core.geometry
Interface FlattableLine
public interface FlattableLine
Line representation that a
Flattener
can flatten in to a polyline.
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:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionorg.djutils.draw.point.Point2d
get
(double fraction) Returns the point at the given fraction.default double
getDirection
(double fraction) Returns the direction at the given fraction.
-
Method Details
-
get
org.djutils.draw.point.Point2d get(double fraction) Returns the point at the given fraction. The fraction may represent any parameter, such as t in a Bezier, s in a Clothoid, or simply the fraction of length.- Parameters:
fraction
- double; fraction.- Returns:
- double; point at the given fraction.
-
getDirection
default double getDirection(double fraction) Returns the direction at the given fraction. The fraction may represent any parameter, such as t in a Bezier, s in a Clothoid, or simply the fraction of length. The default implementation performs a numerical approach by looking at the direction between the points at fraction, and a point 1e-6 away.- Parameters:
fraction
- double; fraction.- Returns:
- double; direction at the given fraction.
-