Class Flattener3d.MaxDeviation

java.lang.Object
org.djutils.draw.curve.Flattener3d.MaxDeviation
All Implemented Interfaces:
Flattener<Flattener3d,Curve3d,PolyLine3d,Point3d,Direction3d>, Flattener3d
Enclosing interface:
Flattener3d

public static class Flattener3d.MaxDeviation extends Object implements Flattener3d
Flattener that limits the distance between the Curve3d and the PolyLine3d.
  • Constructor Details

    • MaxDeviation

      public MaxDeviation(double maxDeviation)
      Construct a flattener that limits the distance between the Curve3d and the PolyLine3d.
      Parameters:
      maxDeviation - maximum deviation, must be above 0.0.
      Throws:
      ArithmeticException - when maxDeviation is NaN
      IllegalArgumentException - when maxDeviation ≤ 0.0
  • Method Details

    • flatten

      public PolyLine3d flatten(Curve3d curve)
      Description copied from interface: Flattener3d
      Flatten a Curve3d into a PolyLine3d.
      Specified by:
      flatten in interface Flattener3d
      Parameters:
      curve - the curve
      Returns:
      flattened line