

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object com.caffeineowl.graphics.bezier.flatnessalgos.ConvexHullFlatnessAlgo
public class ConvexHullFlatnessAlgo
Constructor Summary  

ConvexHullFlatnessAlgo()

Method Summary  

double 
getFlatness(java.awt.geom.CubicCurve2D curve)
Returns the square root of the getSquaredFlatness(CubicCurve2D)
(so use getSquaredFlatness(CubicCurve2D) if possible instead
of this one, it will be less computational intensive). 
double 
getFlatness(java.awt.geom.QuadCurve2D curve)
Returns the square root of the getSquaredFlatness(QuadCurve2D)
(so use getSquaredFlatness(QuadCurve2D) if possible instead
of this one, it will be less computational intensive). 
double 
getSquaredFlatness(java.awt.geom.CubicCurve2D curve)
Returns the maximum squared distance between the two control points and the
segment defined by the curve's anchor points. 
double 
getSquaredFlatness(java.awt.geom.QuadCurve2D curve)
Returns the square distance between the control point of the curve and
the segment defined by its anchor points. 
boolean 
isDegenerationRobust()
Always return 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
nonzero distance for it. 
boolean 
isSquaredFlatenessPreferred()
Always return true . 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public ConvexHullFlatnessAlgo()
Method Detail 

public final boolean isDegenerationRobust()
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
nonzero distance for it.
isDegenerationRobust
in interface CubicFlatnessAlgorithm
isDegenerationRobust
in interface QuadFlatnessAlgorithm
public final boolean isSquaredFlatenessPreferred()
true
.
isSquaredFlatenessPreferred
in interface CubicFlatnessAlgorithm
isSquaredFlatenessPreferred
in interface QuadFlatnessAlgorithm
public final double getFlatness(java.awt.geom.QuadCurve2D curve)
getSquaredFlatness(QuadCurve2D)
(so use getSquaredFlatness(QuadCurve2D)
if possible instead
of this one, it will be less computational intensive).
getFlatness
in interface QuadFlatnessAlgorithm
public final double getSquaredFlatness(java.awt.geom.QuadCurve2D curve)
square distance
between the control point of the curve and
the segment defined by its anchor points.
getSquaredFlatness
in interface QuadFlatnessAlgorithm
public final double getFlatness(java.awt.geom.CubicCurve2D curve)
getSquaredFlatness(CubicCurve2D)
(so use getSquaredFlatness(CubicCurve2D)
if possible instead
of this one, it will be less computational intensive).
getFlatness
in interface CubicFlatnessAlgorithm
public final double getSquaredFlatness(java.awt.geom.CubicCurve2D curve)
squared distance
between the two control points and the
segment defined by the curve's anchor points.
getSquaredFlatness
in interface CubicFlatnessAlgorithm


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 