Class Flattener.MaxDeviation

java.lang.Object
org.opentrafficsim.core.geometry.Flattener.MaxDeviation
All Implemented Interfaces:
Flattener
Enclosing interface:
Flattener

public static class Flattener.MaxDeviation extends Object implements Flattener
Flattener based on maximum deviation.

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:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • MaxDeviation

      public MaxDeviation(double maxDeviation)
      Constructor.
      Parameters:
      maxDeviation - int; maximum deviation, must be above 0.0.
  • Method Details

    • flatten

      public org.djutils.draw.line.PolyLine2d flatten(FlattableLine line)
      Flatten continuous line in to a polyline.
      Specified by:
      flatten in interface Flattener
      Parameters:
      line - FlattableLine; line function.
      Returns:
      PolyLine2d; flattened line.