|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.curve.CurveSet2D<T>
math.geom2d.curve.PolyCurve2D<T>
public class PolyCurve2D<T extends ContinuousCurve2D>
A PolyCurve2D is a set of piecewise smooth curve arcs, such that the end of a curve is the beginning of the next curve, and such that they do not intersect nor self-intersect.
| Field Summary | |
|---|---|
protected boolean |
closed
|
| Fields inherited from class math.geom2d.curve.CurveSet2D |
|---|
curves |
| Fields inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
CIRCLE, CLOSED_EDGE, LOOP, OPEN_EDGE |
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY, defaultClipWindow, EMPTY_SET |
| Constructor Summary | |
|---|---|
PolyCurve2D()
|
|
PolyCurve2D(java.util.Collection<? extends T> curves)
|
|
PolyCurve2D(T[] curves)
|
|
| Method Summary | |
|---|---|
java.awt.geom.GeneralPath |
appendPath(java.awt.geom.GeneralPath path)
Append the path of the curve to the given path. |
CurveSet2D<? extends ContinuousCurve2D> |
clip(Box2D box)
Clip the PolyCurve2D by a box. |
Polyline2D |
getAsPolyline(int n)
Returns an approximation of the curve as a polyline with n
line segments. |
protected java.awt.geom.GeneralPath |
getGeneralPath()
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
|
PolyCurve2D<? extends ContinuousCurve2D> |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in reverse order. |
java.util.Collection<? extends SmoothCurve2D> |
getSmoothPieces()
Returns a collection containing only instances of SmoothCurve2D. |
PolyCurve2D<? extends ContinuousCurve2D> |
getSubCurve(double t0,
double t1)
Return an instance of PolyCurve2D. |
boolean |
isClosed()
Return true if the curve makes a loop, that is come back to starting point after covering the path. |
void |
setClosed(boolean b)
|
PolyCurve2D<? extends ContinuousCurve2D> |
transform(AffineTransform2D trans)
Transform each curve, and build a new CurveSet2D with the set of transformed curves. |
| Methods inherited from class math.geom2d.curve.CurveSet2D |
|---|
addCurve, clearCurves, contains, contains, contains, contains, equals, fromUnitSegment, getBoundingBox, getBounds, getBounds2D, getContinuousCurves, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getIntersections, getLastCurve, getLastPoint, getPoint, getPoint, getPosition, getT0, getT1, intersects, intersects, isBounded, isEmpty, iterator, project, removeCurve, toUnitSegment |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface math.geom2d.curve.Curve2D |
|---|
getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPoint, getPosition, getT0, getT1, project |
| Methods inherited from interface math.geom2d.Shape2D |
|---|
getBoundingBox, getDistance, getDistance, isBounded |
| Methods inherited from interface java.awt.Shape |
|---|
contains, contains, contains, contains, getBounds, getBounds2D, intersects, intersects |
| Field Detail |
|---|
protected boolean closed
| Constructor Detail |
|---|
public PolyCurve2D()
public PolyCurve2D(T[] curves)
public PolyCurve2D(java.util.Collection<? extends T> curves)
| Method Detail |
|---|
public void setClosed(boolean b)
public Polyline2D getAsPolyline(int n)
ContinuousCurve2Dn
line segments. If the curve is closed, the method should return an
instance of ClosedPolyline2D.
getAsPolyline in interface ContinuousCurve2Dn - the number of line segments
n line segments.public boolean isClosed()
ContinuousCurve2D
isClosed in interface ContinuousCurve2Dpublic java.util.Collection<? extends SmoothCurve2D> getSmoothPieces()
getSmoothPieces in interface ContinuousCurve2Dpublic PolyCurve2D<? extends ContinuousCurve2D> getReverseCurve()
Curve2D
getReverseCurve in interface ContinuousCurve2DgetReverseCurve in interface Curve2DgetReverseCurve in class CurveSet2D<T extends ContinuousCurve2D>
public PolyCurve2D<? extends ContinuousCurve2D> getSubCurve(double t0,
double t1)
getSubCurve in interface ContinuousCurve2DgetSubCurve in interface Curve2DgetSubCurve in class CurveSet2D<T extends ContinuousCurve2D>t0 - position of the start of the sub-curvet1 - position of the end of the sub-curve
public CurveSet2D<? extends ContinuousCurve2D> clip(Box2D box)
clip in interface ContinuousCurve2Dclip in interface Curve2Dclip in interface Shape2Dclip in class CurveSet2D<T extends ContinuousCurve2D>box - the clipping box
public PolyCurve2D<? extends ContinuousCurve2D> transform(AffineTransform2D trans)
CurveSet2D
transform in interface ContinuousCurve2Dtransform in interface Curve2Dtransform in interface Shape2Dtransform in class CurveSet2D<T extends ContinuousCurve2D>trans - an affine transform
public java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
ContinuousCurve2D
appendPath in interface ContinuousCurve2Dpath - a path to modify
protected java.awt.geom.GeneralPath getGeneralPath()
getGeneralPath in class CurveSet2D<T extends ContinuousCurve2D>public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans)
getPathIterator in interface java.awt.ShapegetPathIterator in class CurveSet2D<T extends ContinuousCurve2D>
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
getPathIterator in interface java.awt.ShapegetPathIterator in class CurveSet2D<T extends ContinuousCurve2D>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||