|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.curve.AbstractContinuousCurve2D
math.geom2d.polygon.LinearCurve2D
math.geom2d.polygon.Polyline2D
public class Polyline2D
A polyline is a continuous curve where each piece of the curve is a LineSegment2D.
| Field Summary |
|---|
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY |
| Constructor Summary | |
|---|---|
Polyline2D()
|
|
Polyline2D(java.util.Collection<? extends Point2D> vertices)
|
|
Polyline2D(double[] xcoords,
double[] ycoords)
|
|
Polyline2D(int nVertices)
Creates a new polyline by allocating enough memory for the specified number of vertices. |
|
Polyline2D(Point2D... vertices)
|
|
Polyline2D(Point2D initialPoint)
|
|
| Method Summary | |
|---|---|
boolean |
almostEquals(GeometricObject2D obj,
double eps)
Checks if the two objects are similar up to a given threshold value. |
java.awt.geom.GeneralPath |
appendPath(java.awt.geom.GeneralPath path)
Append the path of the curve to the given path. |
java.awt.geom.GeneralPath |
asGeneralPath()
Returns a general path iterator. |
Polyline2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D. |
java.util.Collection<? extends Polyline2D> |
continuousCurves()
Returns the collection of continuous curves which constitute this curve. |
static Polyline2D |
create(java.util.Collection<? extends Point2D> points)
Static factory for creating a new Polyline2D from a collection of points. |
static Polyline2D |
create(Point2D... points)
Static factory for creating a new Polyline2D from an array of points. |
LineSegment2D |
edge(int index)
Returns the i-th edge of this linear curve. |
int |
edgeNumber()
Returns the number of edges of this linear curve. |
java.util.Collection<LineSegment2D> |
edges()
Returns an array of LineSegment2D. |
boolean |
equals(java.lang.Object object)
|
double |
getT1()
Deprecated. replaced by t1() (since 0.11.1). |
boolean |
isClosed()
Returns false, as Polyline2D is open by definition. |
boolean |
isInside(Point2D pt)
Returns true if the point is 'inside' the domain bounded by the curve. |
LineSegment2D |
lastEdge()
|
Point2D |
lastPoint()
Returns the last point of this polyline, or null if the polyline does not contain any point. |
Point2D |
point(double t)
Returns the point located at the given position on the curve. |
Polyline2D |
reverse()
Returns the polyline with same points considered in reverse order. |
Polyline2D |
subCurve(double t0,
double t1)
Return an instance of Polyline2D. |
double |
t1()
Returns the number of points in the polyline, minus one. |
Polyline2D |
transform(AffineTransform2D trans)
Transforms the shape by an affine transform. |
CirculinearContinuousCurve2D |
transform(CircleInversion2D inv)
Transforms the shape by a circle inversion. |
double |
windingAngle(Point2D point)
Return the angle portion that the curve turn around the given point. |
| Methods inherited from class math.geom2d.polygon.LinearCurve2D |
|---|
addVertex, boundingBox, buffer, clearVertices, clip, closestVertexIndex, contains, contains, curvature, distance, distance, draw, firstEdge, firstPoint, getT0, insertVertex, intersections, isBounded, isEmpty, isSingular, leftTangent, length, length, parallel, position, position, project, removeVertex, removeVertex, rightTangent, setVertex, signedDistance, signedDistance, singularPoints, smoothPieces, t0, vertex, vertexArray, vertexIterator, vertexNumber, vertices |
| Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D |
|---|
asAwtShape, asPolyline |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface math.geom2d.circulinear.CirculinearContinuousCurve2D |
|---|
clip, parallel, smoothPieces |
| Methods inherited from interface math.geom2d.circulinear.CirculinearCurve2D |
|---|
length, length, position |
| Methods inherited from interface math.geom2d.circulinear.CirculinearShape2D |
|---|
buffer |
| Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
asPolyline, curvature, leftTangent, rightTangent |
| Methods inherited from interface math.geom2d.domain.OrientedCurve2D |
|---|
signedDistance, signedDistance |
| Methods inherited from interface math.geom2d.curve.Curve2D |
|---|
asAwtShape, draw, firstPoint, getT0, intersections, isSingular, position, project, singularPoints, t0, vertices |
| Methods inherited from interface math.geom2d.Shape2D |
|---|
boundingBox, contains, contains, distance, distance, isBounded, isEmpty |
| Constructor Detail |
|---|
public Polyline2D()
public Polyline2D(int nVertices)
nVertices - public Polyline2D(Point2D initialPoint)
public Polyline2D(Point2D... vertices)
public Polyline2D(java.util.Collection<? extends Point2D> vertices)
public Polyline2D(double[] xcoords,
double[] ycoords)
| Method Detail |
|---|
public static Polyline2D create(java.util.Collection<? extends Point2D> points)
public static Polyline2D create(Point2D... points)
public java.util.Collection<LineSegment2D> edges()
edges in class LinearCurve2Dpublic int edgeNumber()
LinearCurve2D
edgeNumber in class LinearCurve2Dpublic LineSegment2D edge(int index)
LinearCurve2D
edge in class LinearCurve2Dpublic LineSegment2D lastEdge()
lastEdge in class LinearCurve2Dpublic CirculinearContinuousCurve2D transform(CircleInversion2D inv)
CirculinearShape2D
transform in interface CirculinearContinuousCurve2Dtransform in interface CirculinearCurve2Dtransform in interface CirculinearShape2Dinv - the circle inversion
public double windingAngle(Point2D point)
OrientedCurve2D
windingAngle in interface OrientedCurve2Dpoint - a point of the plane
public boolean isInside(Point2D pt)
OrientedCurve2D
isInside in interface OrientedCurve2Dpt - a point in the plane
public boolean isClosed()
isClosed in interface ContinuousCurve2Dpublic Point2D point(double t)
Curve2D
point in interface Curve2Dpublic double t1()
t1 in interface Curve2D@Deprecated public double getT1()
getT1 in interface Curve2Dpublic Point2D lastPoint()
lastPoint in interface Curve2DlastPoint in class AbstractContinuousCurve2DCurve2D.t1(),
Curve2D.point(double)public Polyline2D reverse()
reverse in interface CirculinearContinuousCurve2Dreverse in interface CirculinearCurve2Dreverse in interface ContinuousCurve2Dreverse in interface Curve2Dreverse in interface ContinuousOrientedCurve2Dreverse in interface OrientedCurve2Dpublic java.util.Collection<? extends Polyline2D> continuousCurves()
Curve2D
continuousCurves in interface CirculinearCurve2DcontinuousCurves in interface Curve2DcontinuousCurves in class LinearCurve2D
public Polyline2D subCurve(double t0,
double t1)
subCurve in interface CirculinearContinuousCurve2DsubCurve in interface CirculinearCurve2DsubCurve in interface ContinuousCurve2DsubCurve in interface Curve2DsubCurve in interface ContinuousOrientedCurve2Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curve
public Polyline2D transform(AffineTransform2D trans)
Shape2D
transform in interface ContinuousCurve2Dtransform in interface Curve2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface OrientedCurve2Dtransform in interface Shape2Dtrans - an affine transform
public java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
ContinuousCurve2D
appendPath in interface ContinuousCurve2Dpath - a path to modify
public java.awt.geom.GeneralPath asGeneralPath()
asGeneralPath in class LinearCurve2D
public boolean almostEquals(GeometricObject2D obj,
double eps)
GeometricObject2D
almostEquals in interface GeometricObject2Dobj - the object to compareeps - a threshold value, for example the minimal coordinate difference
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic Polyline2D clone()
Curve2D
clone in interface Curve2Dclone in class AbstractContinuousCurve2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||