Interface ContinuousLine

All Known Implementing Classes:
ContinuousArc, ContinuousBezierCubic, ContinuousClothoid, ContinuousPolyLine, ContinuousStraight

public interface ContinuousLine
A continuous line defines a line in an exact manner, from which numerical polylines can be derived. The continuous definition is useful to accurately connect different lines, e.g. based on the direction of the point where they meet. Moreover, this direction may be accurately be determined by either of the lines. For example, an arc can be defined up to a certain angle. Whatever the angle of the last line segment in a polyline for the arc may be, the continuous line contains the final direction exactly. The continuous definition is also useful to define accurate offset lines, which depend on accurate directions especially at the line end points.

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
  • Method Details

    • getStartPoint

      org.djutils.draw.point.OrientedPoint2d getStartPoint()
      Start point.
      Returns:
      OrientedPoint2d; start point.
    • getEndPoint

      org.djutils.draw.point.OrientedPoint2d getEndPoint()
      End point.
      Returns:
      OrientedPoint2d; end point.
    • getStartDirection

      default org.djunits.value.vdouble.scalar.Direction getStartDirection()
      Start direction.
      Returns:
      Direction; start point.
    • getEndDirection

      default org.djunits.value.vdouble.scalar.Direction getEndDirection()
      End direction.
      Returns:
      Direction; end point.
    • getStartCurvature

      double getStartCurvature()
      Start curvature.
      Returns:
      double; start curvature.
    • getEndCurvature

      double getEndCurvature()
      End curvature.
      Returns:
      double; end curvature.
    • getStartRadius

      default double getStartRadius()
      Start radius.
      Returns:
      double; start radius.
    • getEndRadius

      default double getEndRadius()
      End radius.
      Returns:
      double; end radius.
    • flatten

      org.djutils.draw.line.PolyLine2d flatten(Flattener flattener)
      Flatten continuous line in to a polyline. Implementations should use the flattener when relevant and possible.
      Parameters:
      flattener - Flattener; flattener.
      Returns:
      PolyLine2d; flattened line.
    • flattenOffset

      org.djutils.draw.line.PolyLine2d flattenOffset(FractionalLengthData offsets, Flattener flattener)
      Flatten continuous line offset in to a polyline. Implementations should use the flattener when relevant and possible.
      Parameters:
      offsets - FractionalLengthData; offset data.
      flattener - Flattener; flattener.
      Returns:
      PolyLine2d; flattened line.
    • getLength

      double getLength()
      Return the length of the line.
      Returns:
      double; length of the line.