Class OTSOffsetLinePK


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

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

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version Dec 1, 2015
    Author:
    Peter Knoppers
    • Method Detail

      • 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