Skip to content

ClothoidCurve

Greg edited this page Jun 19, 2025 · 2 revisions

The clothoid curve is essentially a container for a list of ClothoidSegment objects. Each segment will record its own endpoint offset and tangent angle. The curve is responsible for stitching these segments end to end, using those offsets and tangent angles. The curve records its own offset and rotation, which are normally the position and tangent angle of the first point given to the solution algorithms.

Properties & Fields

  • Vector3 Offset
    • The offset of this curve
  • double AngleOffset
    • The initial tangent angle of this curve in radians
  • int Count
    • The number of ClothoidSegments held by this object
  • List<ClothoidSegment> segments
    • The segments that make up this curve
  • List<Vector3> inputPolyline
    • If the curve is interpolated, this will be a list of points used for interpolation, otherwise it is empty.

Constructors

  • ClothoidCurve()
    • A blank curve
  • ClothoidCurve(List<Vector3> inputPolyline)
    • Initialize a curve with a polyline, this will not generate a curve but will simply store the polyline
  • ClothoidCurve(List<ClothoidSegment> orderedSegments, List<Vector3> inputPolyline)
    • Initialize a curve with segments and a polyline
  • ClothoidCurve(ClothoidCurve curve)
    • Initialize a curve by copying another curve

Operators

  • ClothoidCurve +(ClothoidCurve start, ClothoidCurve end)
    • Add a curve to the end of another curve
  • ClothoidCurve +(ClothoidCurve start, ClothoidSegment end)
    • Append a segment to a curve

Useful Methods

  • GetSamples(int n)
    • Get a number of evenly spaced samples of the clothoid segment.
  • SampleCurveFromArcLength(double arcLength)
    • Sample this curve by a given arc length (must be between 0 and ArcLengthEnd of the final segment)
  • Tangent(double arcLength)
    • Sample the tangent angle at some arc length along the curve.

Clone this wiki locally