Package org.djutils.draw.curve
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
Flattener that limits the distance between the
Curve3d
and the PolyLine3d
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.djutils.draw.curve.Flattener
Flattener.FlattableCurve<P,
DIR> Nested classes/interfaces inherited from interface org.djutils.draw.curve.Flattener3d
Flattener3d.MaxAngle, Flattener3d.MaxDeviation, Flattener3d.MaxDeviationAndAngle, Flattener3d.NumSegments
-
Constructor Summary
ConstructorsConstructorDescriptionMaxDeviation
(double maxDeviation) Construct a flattener that limits the distance between theCurve3d
and thePolyLine3d
. -
Method Summary
Modifier and TypeMethodDescriptionFlatten a Curve3d into a PolyLine3d.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.djutils.draw.curve.Flattener
checkPositionError, loadKnot, loadKnots
Methods inherited from interface org.djutils.draw.curve.Flattener3d
checkDirectionError, checkInflectionPoint, checkLoopBack
-
Constructor Details
-
MaxDeviation
public MaxDeviation(double maxDeviation) Construct a flattener that limits the distance between theCurve3d
and thePolyLine3d
.- Parameters:
maxDeviation
- maximum deviation, must be above 0.0.- Throws:
ArithmeticException
- whenmaxDeviation
isNaN
IllegalArgumentException
- whenmaxDeviation ≤ 0.0
-
-
Method Details
-
flatten
Description copied from interface:Flattener3d
Flatten a Curve3d into a PolyLine3d.- Specified by:
flatten
in interfaceFlattener3d
- Parameters:
curve
- the curve- Returns:
- flattened line
-