Class OtsOffsetLinePk

java.lang.Object
org.opentrafficsim.core.geometry.OtsOffsetLinePk

public final class OtsOffsetLinePk extends Object
Peter Knoppers' attempt to implement offsetLine.

Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Peter Knoppers
  • Method Details

    • offsetLine

      public static OtsLine3d offsetLine(OtsLine3d referenceLine, double offset) throws OtsGeometryException
      Construct an offset line.
      Parameters:
      referenceLine - OtsLine3d; the reference line
      offset - double; the offset; positive values indicate left of the reference line, negative values indicate right of the reference line
      Returns:
      OtsLine3d; a line at the specified offset from the reference line
      Throws:
      OtsGeometryException - when this method runs into major trouble and cannot produce a decent result
    • setDebugOffsetLine

      public static void setDebugOffsetLine(boolean newValue)
      Set or clear the debugging flag.
      Parameters:
      newValue - boolean; new value for the debugging flag