Package org.opentrafficsim.core.geometry
Class PolyLineCurve2d
java.lang.Object
org.opentrafficsim.core.geometry.PolyLineCurve2d
- All Implemented Interfaces:
Curve<DirectedPoint2d,,Double, Point2d, Flattener2d, PolyLine2d> Curve2d,Flattener.FlattableCurve<Point2d,,Double> OffsetCurve2d
Curve based on a poly line implementing all the features of
OffsetCurve2d.
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
-
Constructor Summary
ConstructorsConstructorDescriptionPolyLineCurve2d(PolyLine2d line, double startDirection, double endDirection) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetDirection(double fraction) doublegetDirection(double fraction, ContinuousPiecewiseLinearFunction of) doublegetPoint(double fraction) getPoint(double fraction, ContinuousPiecewiseLinearFunction of) toPolyLine(Flattener2d flattener) toPolyLine(OffsetFlattener2d flattener, ContinuousPiecewiseLinearFunction offsets) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.djutils.draw.curve.Curve2d
getEndDirection, getEndPoint, getStartDirection, getStartPointMethods inherited from interface org.djutils.draw.curve.OffsetCurve2d
getT
-
Constructor Details
-
PolyLineCurve2d
Constructor.- Parameters:
line- poly linestartDirection- start directionendDirection- end direction
-
-
Method Details
-
getDirection
- Specified by:
getDirectionin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Specified by:
getDirectionin interfaceCurve2d- Specified by:
getDirectionin interfaceFlattener.FlattableCurve<Point2d,Double>
-
getDirection
- Specified by:
getDirectionin interfaceOffsetCurve2d
-
getPoint
- Specified by:
getPointin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d> - Specified by:
getPointin interfaceFlattener.FlattableCurve<Point2d,Double>
-
getPoint
- Specified by:
getPointin interfaceOffsetCurve2d
-
getLength
public double getLength()- Specified by:
getLengthin interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d>
-
toPolyLine
- Specified by:
toPolyLinein interfaceCurve<DirectedPoint2d,Double, Point2d, Flattener2d, PolyLine2d>
-
toPolyLine
public PolyLine2d toPolyLine(OffsetFlattener2d flattener, ContinuousPiecewiseLinearFunction offsets) - Specified by:
toPolyLinein interfaceOffsetCurve2d
-