Class Smoother
java.lang.Object
com.treemap.swing.voronoi.smoothing.Smoother
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneralPath
createGeneralPath
(List<SmoothedSegment> smoothedSegments) createSamples
(CubicCurve2D curve) static SmoothedSegment
createSmoothedSegment
(SmoothedSegment commonSegment, SegmentLocation start, SegmentLocation end, Vertex startVertex, Vertex endVertex) static void
getBezierLocation
(CubicCurve2D curve, double t, Point2d sampleLocation) static double
getDiagonalLength
(Rectangle bounds) static CurveLocation
getNearestCurveLocation
(Vertex vertex, CubicCurve2D curve, Map<Double, Point2d> samples, SmoothedSegment smoothedSegment) static CubicCurve2D
getSubCruveFromP1
(CurveLocation curveLocation, CubicCurve2D curve) static CubicCurve2D
getSubCruveToP2
(CurveLocation curveLocation, CubicCurve2D curve) static CurveLocation
getTheOneCloserToP1
(CurveLocation l1, CurveLocation l2, CubicCurve2D curve) static SegmentLocation
getTheOneCloserToP2
(CurveLocation l1, CurveLocation l2, CubicCurve2D curve) static CubicCurve2D
newCubicCurve2D
(Class<? extends CubicCurve2D> curveType) Creates a new instance of CubicCurve2D while the specific type CubicCurve2D.Float or CubicCurve2D.Double.static void
reverse
(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
-