|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.curve.CurveArray2D<T> math.geom2d.curve.PolyCurve2D<T> math.geom2d.domain.PolyOrientedCurve2D<T>
public class PolyOrientedCurve2D<T extends ContinuousOrientedCurve2D>
A PolyOrientedCurve2D 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 |
---|
Fields inherited from interface math.geom2d.Shape2D |
---|
ACCURACY |
Constructor Summary | |
---|---|
PolyOrientedCurve2D()
|
|
PolyOrientedCurve2D(java.util.Collection<? extends T> curves)
|
|
PolyOrientedCurve2D(java.util.Collection<? extends T> curves,
boolean closed)
|
|
PolyOrientedCurve2D(int size)
|
|
PolyOrientedCurve2D(T... curves)
|
|
PolyOrientedCurve2D(T[] curves,
boolean closed)
|
Method Summary | ||
---|---|---|
CurveSet2D<? extends ContinuousOrientedCurve2D> |
clip(Box2D box)
Clips the PolyCurve2D by a box. |
|
static
|
create(java.util.Collection<T> curves)
Static factory for creating a new PolyOrientedCurve2D from a collection of curves. |
|
static
|
create(java.util.Collection<T> curves,
boolean closed)
Static factory for creating a new PolyOrientedCurve2D from a collection of curves and a flag indicating if the curve is closed or not. |
|
static
|
create(T... curves)
Static factory for creating a new PolyOrientedCurve2D from an array of curves. |
|
static
|
create(T[] curves,
boolean closed)
Static factory for creating a new PolyOrientedCurve2D from an array of curves and a flag indicating if the curve is closed or not. |
|
static
|
createClosed(T... curves)
Static factory for creating a new PolyOrientedCurve2D from an array of curves. |
|
boolean |
equals(java.lang.Object obj)
Returns true if obj is a CurveArray2D with the same number of curves, and such that each curve belongs to both objects. |
|
boolean |
isInside(Point2D point)
Determines if the given point lies within the domain bounded by this curve. |
|
PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> |
reverse()
Returns the reverse curve of this PolyCurve2D. |
|
double |
signedDistance(double x,
double y)
The same as distanceSigned(Point2D), but by passing 2 double as arguments. |
|
double |
signedDistance(Point2D p)
Returns the signed distance of the curve to the given point. |
|
PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> |
subCurve(double t0,
double t1)
Returns a portion of this curve as an instance of PolyOrientedCurve2D. |
|
PolyOrientedCurve2D<?> |
transform(AffineTransform2D trans)
Transforms each smooth piece in this PolyCurve2D and returns a new instance of PolyCurve2D. |
|
double |
windingAngle(Point2D point)
Return the angle portion that the curve turn around the given point. |
Methods inherited from class math.geom2d.curve.PolyCurve2D |
---|
appendPath, asPolyline, continuousCurves, curvature, draw, getGeneralPath, isClosed, leftTangent, rightTangent, setClosed, smoothPieces |
Methods inherited from class math.geom2d.curve.CurveArray2D |
---|
add, add, almostEquals, asAwtShape, boundingBox, childCurve, clear, clone, contains, contains, contains, curveIndex, curves, distance, distance, firstCurve, firstPoint, get, getT0, getT1, globalPosition, indexOf, intersections, isBounded, isEmpty, isSingular, iterator, lastCurve, lastPoint, localPosition, point, position, project, remove, remove, singularPoints, size, t0, t1, vertices |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
---|
appendPath, asPolyline, curvature, isClosed, leftTangent, rightTangent, smoothPieces |
Methods inherited from interface math.geom2d.curve.Curve2D |
---|
asAwtShape, clone, continuousCurves, draw, firstPoint, getT0, getT1, intersections, isSingular, lastPoint, point, position, project, singularPoints, t0, t1, vertices |
Methods inherited from interface math.geom2d.Shape2D |
---|
boundingBox, contains, contains, distance, distance, isBounded, isEmpty |
Methods inherited from interface math.geom2d.GeometricObject2D |
---|
almostEquals |
Constructor Detail |
---|
public PolyOrientedCurve2D()
public PolyOrientedCurve2D(int size)
public PolyOrientedCurve2D(T... curves)
public PolyOrientedCurve2D(T[] curves, boolean closed)
public PolyOrientedCurve2D(java.util.Collection<? extends T> curves)
public PolyOrientedCurve2D(java.util.Collection<? extends T> curves, boolean closed)
Method Detail |
---|
public static <T extends ContinuousOrientedCurve2D> PolyOrientedCurve2D<T> create(java.util.Collection<T> curves)
public static <T extends ContinuousOrientedCurve2D> PolyOrientedCurve2D<T> create(T... curves)
public static <T extends ContinuousOrientedCurve2D> PolyOrientedCurve2D<T> createClosed(T... curves)
public static <T extends ContinuousOrientedCurve2D> PolyOrientedCurve2D<T> create(java.util.Collection<T> curves, boolean closed)
public static <T extends ContinuousOrientedCurve2D> PolyOrientedCurve2D<T> create(T[] curves, boolean closed)
public double windingAngle(Point2D point)
OrientedCurve2D
windingAngle
in interface OrientedCurve2D
point
- a point of the plane
public double signedDistance(Point2D p)
OrientedCurve2D
signedDistance
in interface OrientedCurve2D
p
- a point of the plane
public double signedDistance(double x, double y)
OrientedCurve2D
signedDistance
in interface OrientedCurve2D
x
- x-coord of a pointy
- y-coord of a point
public boolean isInside(Point2D point)
isInside
in interface OrientedCurve2D
point
- a point in the plane
public PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> reverse()
PolyCurve2D
reverse
in interface ContinuousCurve2D
reverse
in interface Curve2D
reverse
in interface ContinuousOrientedCurve2D
reverse
in interface OrientedCurve2D
reverse
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
public PolyOrientedCurve2D<? extends ContinuousOrientedCurve2D> subCurve(double t0, double t1)
subCurve
in interface ContinuousCurve2D
subCurve
in interface Curve2D
subCurve
in interface ContinuousOrientedCurve2D
subCurve
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curve
public CurveSet2D<? extends ContinuousOrientedCurve2D> clip(Box2D box)
clip
in interface ContinuousCurve2D
clip
in interface Curve2D
clip
in interface ContinuousOrientedCurve2D
clip
in interface OrientedCurve2D
clip
in interface Shape2D
clip
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
box
- the clipping box
public PolyOrientedCurve2D<?> transform(AffineTransform2D trans)
PolyCurve2D
transform
in interface ContinuousCurve2D
transform
in interface Curve2D
transform
in interface CurveSet2D<T extends ContinuousOrientedCurve2D>
transform
in interface ContinuousOrientedCurve2D
transform
in interface OrientedCurve2D
transform
in interface Shape2D
transform
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
trans
- an affine transform
public boolean equals(java.lang.Object obj)
CurveArray2D
equals
in class PolyCurve2D<T extends ContinuousOrientedCurve2D>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |