Package org.djutils.draw.curve
Class OffsetFlattener2d.MaxAngle
java.lang.Object
org.djutils.draw.curve.OffsetFlattener2d.MaxAngle
- All Implemented Interfaces:
Flattener<Flattener2d,,Curve2d, PolyLine2d, Point2d, Double> OffsetFlattener2d
- Enclosing interface:
- OffsetFlattener2d
OffsetFlattener that limits the angle difference between the
OffsetCurve2d and the PolyLine2d.-
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.OffsetFlattener2d
OffsetFlattener2d.MaxAngle, OffsetFlattener2d.MaxDeviation, OffsetFlattener2d.MaxDeviationAndAngle, OffsetFlattener2d.NumSegments -
Constructor Summary
ConstructorsConstructorDescriptionMaxAngle(double maxAngle) Construct a flattener that limits the angle difference between theOffsetCurve2dand thePolyLine2d. -
Method Summary
Modifier and TypeMethodDescriptionFlatten a OffsetCurve2d curve into a PolyLine2d while applying lateral offsets.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.djutils.draw.curve.Flattener
checkInflectionPoint, checkPositionError, loadKnot, loadKnotsMethods inherited from interface org.djutils.draw.curve.OffsetFlattener2d
checkDirectionError, checkLoopBack, loadKnot, loadKnots, makeFlattableCurve
-
Constructor Details
-
MaxAngle
public MaxAngle(double maxAngle) Construct a flattener that limits the angle difference between theOffsetCurve2dand thePolyLine2d.- Parameters:
maxAngle- maximum angle.- Throws:
ArithmeticException- whenmaxAngleisNaNIllegalArgumentException- whenmaxAngle ≤ 0.0
-
-
Method Details
-
flatten
Description copied from interface:OffsetFlattener2dFlatten a OffsetCurve2d curve into a PolyLine2d while applying lateral offsets.- Specified by:
flattenin interfaceOffsetFlattener2d- Parameters:
curve- the curveof- the lateral offset to apply- Returns:
- flattened curve
-