Package org.djutils.draw.curve
Interface Curve2d
- All Superinterfaces:
Curve<DirectedPoint2d,,Double, Point2d, Flattener2d, PolyLine2d> Flattener.FlattableCurve<Point2d,Double>
- All Known Subinterfaces:
OffsetCurve2d
- All Known Implementing Classes:
Arc2d,Bezier2d,BezierCubic2d,Clothoid2d,Straight2d
public interface Curve2d
extends Curve<DirectedPoint2d,Double,Point2d,Flattener2d,PolyLine2d>, Flattener.FlattableCurve<Point2d,Double>
This interface narrows down the interface of continuous curves for 2d use.
Copyright (c) 2023-2025 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 TypeMethodDescriptiondefault DoublegetDirection(double fraction) Returns the direction at the given fraction.default DoubleEnd direction of this Curve.default DirectedPoint2dEnd point of this Curve.default DoubleStart direction of this Curve.default DirectedPoint2dStart point of this Curve.Methods inherited from interface org.djutils.draw.curve.Curve
getKnots, getLength, getPoint, toPolyLineMethods inherited from interface org.djutils.draw.curve.Flattener.FlattableCurve
getPoint
-
Method Details
-
getStartPoint
Description copied from interface:CurveStart point of this Curve.- Specified by:
getStartPointin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Returns:
- start point of this Curve
-
getEndPoint
Description copied from interface:CurveEnd point of this Curve.- Specified by:
getEndPointin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Returns:
- end point of this Curve
-
getStartDirection
Description copied from interface:CurveStart direction of this Curve.- Specified by:
getStartDirectionin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Returns:
- start direction of this Curve
-
getEndDirection
Description copied from interface:CurveEnd direction of this Curve.- Specified by:
getEndDirectionin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Returns:
- end direction of this Curve
-
getDirection
Description copied from interface:CurveReturns the direction at the given fraction. The fraction may represent any parameter, such as t in a Bézier curve, 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.- Specified by:
getDirectionin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Specified by:
getDirectionin interfaceFlattener.FlattableCurve<Point2d,Double> - Parameters:
fraction- the fraction- Returns:
- the direction at the given
fraction
-