Class Smoother
java.lang.Object
com.treemap.swing.voronoi.smoothing.Smoother
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneralPathcreateGeneralPath(List<SmoothedSegment> smoothedSegments) createSamples(CubicCurve2D curve) static SmoothedSegmentcreateSmoothedSegment(SmoothedSegment commonSegment, SegmentLocation start, SegmentLocation end, Vertex startVertex, Vertex endVertex) static voidgetBezierLocation(CubicCurve2D curve, double t, Point2d sampleLocation) static doublegetDiagonalLength(Rectangle bounds) static CurveLocationgetNearestCurveLocation(Vertex vertex, CubicCurve2D curve, Map<Double, Point2d> samples, SmoothedSegment smoothedSegment) static CubicCurve2DgetSubCruveFromP1(CurveLocation curveLocation, CubicCurve2D curve) static CubicCurve2DgetSubCruveToP2(CurveLocation curveLocation, CubicCurve2D curve) static CurveLocationgetTheOneCloserToP1(CurveLocation l1, CurveLocation l2, CubicCurve2D curve) static SegmentLocationgetTheOneCloserToP2(CurveLocation l1, CurveLocation l2, CubicCurve2D curve) static CubicCurve2DnewCubicCurve2D(Class<? extends CubicCurve2D> curveType) Creates a new instance of CubicCurve2D while the specific type CubicCurve2D.Float or CubicCurve2D.Double.static voidreverse(CubicCurve2D curve) sample(CubicCurve2D curve, int nSamples)
-
Constructor Details
-
Smoother
public Smoother()
-
-
Method Details
-
createSmoothedSegment
public static SmoothedSegment createSmoothedSegment(SmoothedSegment commonSegment, SegmentLocation start, SegmentLocation end, Vertex startVertex, Vertex endVertex) -
getNearestCurveLocation
public static CurveLocation getNearestCurveLocation(Vertex vertex, CubicCurve2D curve, Map<Double, Point2d> samples, SmoothedSegment smoothedSegment) -
createSamples
-
getDiagonalLength
-
sample
-
getBezierLocation
-
reverse
-
getTheOneCloserToP1
public static CurveLocation getTheOneCloserToP1(CurveLocation l1, CurveLocation l2, CubicCurve2D curve) -
getTheOneCloserToP2
public static SegmentLocation getTheOneCloserToP2(CurveLocation l1, CurveLocation l2, CubicCurve2D curve) -
getSubCruveFromP1
-
getSubCruveToP2
-
newCubicCurve2D
Creates a new instance of CubicCurve2D while the specific type CubicCurve2D.Float or CubicCurve2D.Double.- Parameters:
curveType-- Returns:
-
createGeneralPath
-