CubicSubdivisionCriterion (which tells when a cubic
is good enough not to need splitting in two anymore).QuadSubdivisionCriterion (which tells when a quad Bézier
is good enough not to need splitting in two anymore).CubicSubdivisionCriterion (which tells when a cubic Bézier
is good enough not to need splitting in two anymore).QuadSubdivisionCriterion (which tells when a quad Bézier
is good enough not to need splitting in two anymore).double[]
array.cubic
or a quadratic curve any time
the cubic's squared flatness
(or the quad's ConvexHullFlatnessAlgo.getSquaredFlatness(QuadCurve2D) squared flatness})
is greater than a provided tolerance.Initialises an instance with a
default tolerance of 1.0e-5.java.awt.geom.CubicCurve2D segments resulted from
subdivisions (see
BezierUtils.adaptiveHalving(CubicCurve2D, CubicSubdivisionCriterion, CubicSegmentConsumer)).java.awt.geom.CubicCurve2D should be
sub-divided
in order to be more accurate represented by a straight segment.CubicSubdivisionCriterion which does its job by using a
provided CubicFlatnessAlgorithm and a tolerance:
the criterion will ask for yet one subdivision whenever
algorithm returns a flatness value that's greater than
the required tolerance.Initalises
a new instance with a ConvexHullFlatnessAlgo as the flatness algorithm
and a tolerance of 1.0e-5.Initialises
a new instance with a ConvexHullFlatnessAlgo as the flatness algorithm
and the provided tolerance.Initialises
a new instance the provided flatness algo
and a tolerance of 1.0e-5.Initialises
using the provided parameters.QuadSubdivisionCriterion which does its job by using a
provided QuadFlatnessAlgorithm and a tolerance:
the criterion will ask for yet one subdivision whenever
algorithm returns a flatness value that's greater than
the required tolerance.Initialises
a new instance with a ConvexHullFlatnessAlgo as the flatness algorithm
and a tolerance of 1.0e-5.Initialises
a new instance with a ConvexHullFlatnessAlgo as the flatness algorithm
and the provided tolerance.Initialises
a new instance the provided flatness algo
and a tolerance of 1.0e-5.Initialises
using the provided parameters.ConvexHullFlatnessAlgo.getSquaredFlatness(QuadCurve2D)
(so use ConvexHullFlatnessAlgo.getSquaredFlatness(QuadCurve2D) if possible instead
of this one, it will be less computational intensive).ConvexHullFlatnessAlgo.getSquaredFlatness(CubicCurve2D)
(so use ConvexHullFlatnessAlgo.getSquaredFlatness(CubicCurve2D) if possible instead
of this one, it will be less computational intensive).square distance between the control point of the curve and
the segment defined by its anchor points.squared distance between the two control points and the
segment defined by the curve's anchor points.1/2.1/2.true if the flatness is non-zero for any
cubic curve that is not equal with the segment connecting the
cubic's anchors (can handle degenerated cubic curves), false
otherwise.true., and that's because the
DistUtils.pointToSegSqEucDist(double, double, double, double, double, double)
method is used, so if any of the anchor points is on the line defined by the
anchor points but falls outside the segment, then the method will return a
non-zero distance for it.falsetrue if the flatness is non-zero for any
cubic curve that is not equal with the segment connecting the
cubic's anchors (can handle degenerated cubic curves), false
otherwise.true if the squared flatness is computed
easier (i.e.true.true if the distance type is
LineDefectFlatnessAlgo.EUCL_DIST (since computing the squared distance is less
computational expensive than computing the distance), false if
the distance type is LineDefectFlatnessAlgo.MNHT_DIST or LineDefectFlatnessAlgo.CBSV_DIST (for those two,
computing the distance is less computational expensive than computing the
squared distance}.true if the squared flatness is computed
easier (i.e.1/3 and 2/3
positions of the segment that connects the anchor points.LineDefectFlatnessAlgo.LineDefectFlatnessAlgo(int, boolean),
with a EUCL_DIST for
the distance type and using the sum for the case
of cubics.LineDefectFlatnessAlgo.LineDefectFlatnessAlgo(int, boolean),
with the specified distance type and using the
sum for the case
of cubics.LineDefectFlatnessAlgo.LineDefectFlatnessAlgo(int, boolean),
with a EUCL_DIST for
the distance type and using the specified behaviour for the use of
sum/max when computing the flatness for cubics.t, and returns the position in
an output parameter (if provided).t, and returns the position in
an output parameter (if provided).java.awt.geom.QuadCurve2D segments resulted from
subdivisions (see
BezierUtils.adaptiveHalving(QuadCurve2D, QuadSubdivisionCriterion, QuadSegmentConsumer))
or approximations (see FIXME TBD).java.awt.geom.QuadCurve2D should be
sub-divided
in order to be more accurate represented by a straight segment.true whenever the
defect
is greater than the provided tolerance.true whenever the
defect
is greater than the provided tolerance.true whenever the GenericCubicSubdivCriterion.flatnessAlgo
returns a value greater than the required tolerance.true whenever the GenericQuadSubdivCriterion.flatnessAlgo
returns a value greater than the required tolerance.SimpleConvexHullFlatness.getFlatness(CubicCurve2D) or quadratic
Bezier (SimpleConvexHullFlatness.getFlatness(QuadCurve2D) and the line defined by the
anchor points of the Bezier curve.SimpleConvexHullFlatness.CubicFlatnessAlgorithm
that prefers
working with squared distances.QuadFlatnessAlgorithm
that prefers
working with squared distances.true,
the flatness is returned as the sum of the distances between the
control points and their ideal position of the degenerate cubic.Copyright © 2016. All rights reserved.