|
||||||||||
| 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.LinearRing2D
public class LinearRing2D
A LinearRing2D is a Polyline2D whose last point is connected to the first one. This is typically the boundary of a SimplePolygon2D.
The name 'LinearRing2D' was used for 2 reasons:
| Constructor Summary | |
|---|---|
LinearRing2D()
|
|
LinearRing2D(java.util.Collection<? extends Point2D> points)
|
|
LinearRing2D(double[] xcoords,
double[] ycoords)
|
|
LinearRing2D(Point2D... vertices)
|
|
LinearRing2D(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. |
double |
area()
Computes the signed area of the linear ring. |
LinearRing2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D. |
java.util.Collection<? extends LinearRing2D> |
continuousCurves()
Returns the collection of continuous curves which constitute this curve. |
static LinearRing2D |
create(java.util.Collection<? extends Point2D> points)
Static factory for creating a new LinearRing2D from a collection of points. |
static LinearRing2D |
create(Point2D... vertices)
Static factory for creating a new LinearRing2D from an array of points. |
CirculinearDomain2D |
domain()
Returns the domain delimited by this boundary. |
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)
|
void |
fill(java.awt.Graphics2D g2)
Fills the interior of the boundary, using the Graphics current Paint. |
double |
getT1()
Deprecated. replaced by t1() (since 0.11.1). |
boolean |
isClosed()
Returns true, by definition of linear ring. |
boolean |
isInside(double x,
double y)
|
boolean |
isInside(Point2D point)
Returns true if the point is 'inside' the domain bounded by the curve. |
LineSegment2D |
lastEdge()
Returns the last edge of this linear ring. |
Point2D |
lastPoint()
Returns the first point, as this is the same as the last point. |
CirculinearRing2D |
parallel(double dist)
Creates a new curve, formed by the points with parameterization: p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of
the original curve, n(t) the normal of the curve, and |n| being the
norm of n. |
Point2D |
point(double t)
Returns point from position as double. |
LinearRing2D |
reverse()
Returns the linear ring with same points taken in reverse order. |
Polyline2D |
subCurve(double t0,
double t1)
Return an instance of Polyline2D. |
double |
t1()
Returns the number of points in the linear ring. |
LinearRing2D |
transform(AffineTransform2D trans)
Returns the transformed shape, as a LinerRing2D. |
CirculinearRing2D |
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, asGeneralPath, boundingBox, buffer, clearVertices, clip, closestVertexIndex, contains, contains, curvature, distance, distance, draw, firstEdge, firstPoint, getT0, insertVertex, intersections, isBounded, isEmpty, isSingular, leftTangent, length, length, 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, smoothPieces |
| Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
asPolyline, curvature, leftTangent, rightTangent |
| Methods inherited from interface math.geom2d.circulinear.CirculinearBoundary2D |
|---|
clip |
| 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.domain.OrientedCurve2D |
|---|
signedDistance, signedDistance |
| Constructor Detail |
|---|
public LinearRing2D()
public LinearRing2D(Point2D initialPoint)
public LinearRing2D(Point2D... vertices)
public LinearRing2D(double[] xcoords,
double[] ycoords)
public LinearRing2D(java.util.Collection<? extends Point2D> points)
| Method Detail |
|---|
public static LinearRing2D create(java.util.Collection<? extends Point2D> points)
public static LinearRing2D create(Point2D... vertices)
public double area()
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 CirculinearRing2D parallel(double dist)
CirculinearCurve2D p(t) = c(t) + d*n(t)/|n(t)|, with p(t) being a point of
the original curve, n(t) the normal of the curve, and |n| being the
norm of n.
parallel in interface CirculinearBoundary2Dparallel in interface CirculinearContinuousCurve2Dparallel in interface CirculinearContour2Dparallel in interface CirculinearCurve2Dparallel in interface CirculinearRing2Dparallel in class LinearCurve2Ddist - the distance between the original curve and he parallel curve.
public CirculinearRing2D transform(CircleInversion2D inv)
CirculinearShape2D
transform in interface CirculinearBoundary2Dtransform in interface CirculinearContinuousCurve2Dtransform in interface CirculinearContour2Dtransform in interface CirculinearCurve2Dtransform in interface CirculinearShape2Dinv - the circle inversion
public CirculinearDomain2D domain()
Boundary2D
domain in interface CirculinearBoundary2Ddomain in interface CirculinearRing2Ddomain in interface Boundary2Dpublic void fill(java.awt.Graphics2D g2)
Boundary2D
fill in interface Boundary2Dg2 - the Graphics to fill onpublic double windingAngle(Point2D point)
OrientedCurve2D
windingAngle in interface OrientedCurve2Dpoint - a point of the plane
public boolean isInside(double x,
double y)
public boolean isInside(Point2D point)
Boundary2D
isInside in interface Boundary2DisInside in interface OrientedCurve2Dpoint - a point in the plane
public boolean isClosed()
isClosed in interface ContinuousCurve2Dpublic Point2D point(double t)
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 java.util.Collection<? extends LinearRing2D> continuousCurves()
Curve2D
continuousCurves in interface CirculinearBoundary2DcontinuousCurves in interface CirculinearCurve2DcontinuousCurves in interface Curve2DcontinuousCurves in interface Boundary2DcontinuousCurves in class LinearCurve2Dpublic LinearRing2D reverse()
reverse in interface CirculinearBoundary2Dreverse in interface CirculinearContinuousCurve2Dreverse in interface CirculinearContour2Dreverse in interface CirculinearCurve2Dreverse in interface CirculinearRing2Dreverse in interface ContinuousCurve2Dreverse in interface Curve2Dreverse in interface Boundary2Dreverse in interface ContinuousOrientedCurve2Dreverse in interface Contour2Dreverse in interface OrientedCurve2D
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 LinearRing2D transform(AffineTransform2D trans)
transform in interface ContinuousCurve2Dtransform in interface Curve2Dtransform in interface Boundary2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface Contour2Dtransform 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 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 LinearRing2D 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 | |||||||||