Class DoubleSpline
- java.lang.Object
-
- com.macrofocus.treemap.voronoi.smoothing.AbstractSmoothedSegment
-
- com.macrofocus.treemap.voronoi.smoothing.DoubleSpline
-
- All Implemented Interfaces:
SmoothedSegment
public class DoubleSpline extends AbstractSmoothedSegment
-
-
Constructor Summary
Constructors Constructor Description DoubleSpline(LineSegment lineSegment, SegmentDirection direction)
DoubleSpline(java.awt.geom.CubicCurve2D startToConnectingPoint, java.awt.geom.CubicCurve2D connectingPointToEnd, Vertex startVertex, Vertex endVertex, LineSegment lineSegment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCurveToGeneralPath(java.awt.geom.GeneralPath generalPath, SegmentDirection direction)
void
addToGeneralPath(java.awt.geom.GeneralPath generalPath)
Point2d
getConnectingPoint()
void
getCurveControlPoints(Point2d[] knots, Point2d[] firstControlPoints, Point2d[] secondControlPoints)
Get open-ended Bezier Spline Control Points.SegmentLocation
getNearestSegmentLocation(Vertex vertex)
java.awt.geom.CubicCurve2D
getStartCurve()
java.awt.geom.CubicCurve2D
getSubCruveFromConnectingPoint(CurveLocation curveLocation)
SmoothedSegment
getSubSegment(SegmentLocation start, SegmentLocation end)
SmoothedSegment
reversed()
-
Methods inherited from class com.macrofocus.treemap.voronoi.smoothing.AbstractSmoothedSegment
getEndVertex, getLineSegment, getStartVertex
-
-
-
-
Constructor Detail
-
DoubleSpline
public DoubleSpline(LineSegment lineSegment, SegmentDirection direction)
-
DoubleSpline
public DoubleSpline(java.awt.geom.CubicCurve2D startToConnectingPoint, java.awt.geom.CubicCurve2D connectingPointToEnd, Vertex startVertex, Vertex endVertex, LineSegment lineSegment)
-
-
Method Detail
-
getConnectingPoint
public Point2d getConnectingPoint()
-
getStartCurve
public java.awt.geom.CubicCurve2D getStartCurve()
-
getNearestSegmentLocation
public SegmentLocation getNearestSegmentLocation(Vertex vertex)
-
getSubSegment
public SmoothedSegment getSubSegment(SegmentLocation start, SegmentLocation end)
-
getSubCruveFromConnectingPoint
public java.awt.geom.CubicCurve2D getSubCruveFromConnectingPoint(CurveLocation curveLocation)
-
addCurveToGeneralPath
public void addCurveToGeneralPath(java.awt.geom.GeneralPath generalPath, SegmentDirection direction)
-
getCurveControlPoints
public void getCurveControlPoints(Point2d[] knots, Point2d[] firstControlPoints, Point2d[] secondControlPoints)
Get open-ended Bezier Spline Control Points. From (http://www.codeproject.com/KB/graphics/BezierSpline.aspx?msg=3396481) License (CPOL) 1.02 : Source Code and Executable Files can be used in commercial applications; Source Code and Executable Files can be redistributed; and Source Code can be modified to create derivative works.*- Parameters:
knots
- Input Knot Bezier spline points.firstControlPoints
- Output of First Control pointssecondControlPoints
- Output of Second Control points
-
addToGeneralPath
public void addToGeneralPath(java.awt.geom.GeneralPath generalPath)
-
reversed
public SmoothedSegment reversed()
-
-