|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.curve.Curve2DUtils
public abstract class Curve2DUtils
Collects some useful methods for clipping curves.
Constructor Summary | |
---|---|
Curve2DUtils()
|
Method Summary | |
---|---|
static double |
choosePosition(double t0,
double t1)
Choose an arbitrary position between positions t0 and t1, which can be infinite. |
static CurveSet2D<ContinuousCurve2D> |
clipContinuousCurve(ContinuousCurve2D curve,
Box2D box)
Clips a continuous curve and returns a set of continuous curves. |
static CurveSet2D<? extends Curve2D> |
clipCurve(Curve2D curve,
Box2D box)
Clip a curve, and return a CurveSet2D. |
static CurveSet2D<? extends Curve2D> |
clipCurveSet(CurveSet2D<?> curveSet,
Box2D box)
clip a CurveSet2D. |
static CurveSet2D<SmoothCurve2D> |
clipSmoothCurve(SmoothCurve2D curve,
Box2D box)
Clip a continuous smooth curve. |
static CurveSet2D<SmoothCurve2D> |
clipSmoothCurve(SmoothCurve2D curve,
StraightLine2D line)
Clip a continuous smooth curve by the half-plane defined by a line. |
static int |
findNextCurveIndex(double[] positions,
double pos)
|
static double |
fromUnitSegment(double t,
double t0,
double t1)
Transforms the value t between 0 and 1 in a value comprised between t0 and t1. |
static boolean |
isLeftInfinite(Curve2D curve)
|
static boolean |
isRightInfinite(Curve2D curve)
|
static double |
toUnitSegment(double t,
double t0,
double t1)
Mapping of the parameter t, relative to the local curve, into the interval [0 1], [0 1[, ]0 1], or ]0 1[, depending on the values of t0 and t1. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Curve2DUtils()
Method Detail |
---|
public static final double toUnitSegment(double t, double t0, double t1)
t
- a value between t0 and t1t0
- the lower bound of parameterization domaint1
- the upper bound of parameterization domain
public static final double fromUnitSegment(double t, double t0, double t1)
t
- a value between 0 and 1t0
- the lower bound of parameterization domaint1
- the upper bound of parameterization domain
public static final CurveSet2D<? extends Curve2D> clipCurve(Curve2D curve, Box2D box)
public static final CurveSet2D<? extends Curve2D> clipCurveSet(CurveSet2D<?> curveSet, Box2D box)
public static final CurveSet2D<ContinuousCurve2D> clipContinuousCurve(ContinuousCurve2D curve, Box2D box)
Clips a continuous curve and returns a set of continuous curves.
Algorithm is the following one:
Special processing is added when the first point of the curve lies on the boundary of the box, and when the curve is closed (when the first point of the curve is inside the box, the method return a portion of curve between the last intersection and the first intersection).
public static final CurveSet2D<SmoothCurve2D> clipSmoothCurve(SmoothCurve2D curve, Box2D box)
public static final CurveSet2D<SmoothCurve2D> clipSmoothCurve(SmoothCurve2D curve, StraightLine2D line)
public static final int findNextCurveIndex(double[] positions, double pos)
public static final double choosePosition(double t0, double t1)
t0
- the first bound of a curve parameterizationt1
- the second bound of a curve parameterization
public static final boolean isLeftInfinite(Curve2D curve)
public static final boolean isRightInfinite(Curve2D curve)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |