|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.model.gmf.util.SplineUtilities
public final class SplineUtilities
Helper methods for handling splines.
TODO implement missing functions from this class into KielerMath
Method Summary | |
---|---|
static PointList |
approximateSpline(PointList control)
Approximates a spline based on the control list. |
static PointList |
calcRoundedCornersPolyline(PointList points,
int r,
|
static double |
distanceFromSpline(Point start,
Point c,
Point end,
Point needle)
Calculate the distance from quadratic spline curve to point needle. |
static double |
distanceFromSpline(Point start,
Point c1,
Point c2,
Point end,
Point needle)
Calculate the distance from cubic spline curve to point needle. |
static double |
nearestPointOnSpline(Point start,
Point c,
Point end,
Point needle,
Point nearest)
Calculate the distance from quadratic spline curve to point needle and set nearest to the point on the curve closest to needle. |
static double |
nearestPointOnSpline(Point start,
Point c1,
Point c2,
Point end,
Point needle,
Point nearest)
Return the distance from cubic spline curve to point needle and set location of nearest to nearest point on the spline curve. |
static Point |
sourceReferencePoint(PointList points,
int distance)
Calculate reference Point for source RotatableDecoration. |
static Point |
targetReferencePoint(PointList points,
int distance)
Calculate reference Point for target RotatableDecoration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PointList approximateSpline(PointList control)
control
- list of control points
public static Point sourceReferencePoint(PointList points, int distance)
points
- line segmentdistance
- distance from source
public static Point targetReferencePoint(PointList points, int distance)
points
- line segmentdistance
- distance from target
public static double distanceFromSpline(Point start, Point c, Point end, Point needle)
start
- Starting pointc
- Control pointend
- End pointneedle
- Point to look for
public static double nearestPointOnSpline(Point start, Point c, Point end, Point needle, Point nearest)
start
- Starting pointc
- Control pointend
- End pointneedle
- Point to look fornearest
- Container for point on curve nearest to needle
public static double distanceFromSpline(Point start, Point c1, Point c2, Point end, Point needle)
start
- Starting pointc1
- Control point 1c2
- Control point 2end
- End pointneedle
- Point to look for
public static double nearestPointOnSpline(Point start, Point c1, Point c2, Point end, Point needle, Point nearest)
start
- Starting Pointc1
- Control point 1c2
- Control point 2end
- End pointneedle
- Point to look fornearest
- Container for point on curve nearest to needle
public static PointList calcRoundedCornersPolyline(PointList points, int r,rForBendpoint, boolean calculateAppoxPoints)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |