|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.curve.AbstractContinuousCurve2D math.geom2d.polygon.Polyline2D 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:
Field Summary |
---|
Fields inherited from class math.geom2d.polygon.Polyline2D |
---|
points |
Fields inherited from interface math.geom2d.Shape2D |
---|
ACCURACY |
Constructor Summary | |
---|---|
LinearRing2D()
|
|
LinearRing2D(Collection<? extends Point2D> points)
|
|
LinearRing2D(double[] xcoords,
double[] ycoords)
|
|
LinearRing2D(Point2D initialPoint)
|
|
LinearRing2D(Point2D[] points)
|
Method Summary | |
---|---|
GeneralPath |
appendPath(GeneralPath path)
Append the path of the curve to the given path. |
LinearRing2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D. |
static LinearRing2D |
create(Collection<? extends Point2D> points)
Static factory for creating a new LinearRing2D from a collection of points. |
static LinearRing2D |
create(Point2D[] points)
Static factory for creating a new LinearRing2D from an array of points. |
boolean |
equals(Object object)
|
void |
fill(Graphics2D g2)
|
double |
getArea()
Computes area of the polyline, by returning the absolute value of the signed area. |
Collection<ContinuousBoundary2D> |
getBoundaryCurves()
Returns the different continuous curves composing the boundary |
Collection<? extends LinearRing2D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve. |
Domain2D |
getDomain()
Returns the domain delimited by this boundary. |
Collection<LineSegment2D> |
getEdges()
Returns an array of LineSegment2D. |
Point2D |
getFirstPoint()
return the first point of the polyline. |
GeneralPath |
getGeneralPath()
Return a general path iterator. |
LineSegment2D |
getLastEdge()
|
Point2D |
getLastPoint()
return the first point, as this is the same as the last point. |
CirculinearRing2D |
getParallel(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.In the case of a continuous curve formed by several smooth circulinear elements, the parallels of contiguous elements are joined by a circle arc. |
Point2D |
getPoint(double t)
Returns point from position as double. |
LinearRing2D |
getReverseCurve()
Returns the closed polyline with same points taken in reverse order. |
double |
getSignedArea()
Computes the signed area of the polyline. |
double |
getSignedDistance(double x,
double y)
The same as getSignedDistance(Point2D), but by passing 2 double as arguments. |
double |
getSignedDistance(Point2D point)
Get the signed distance of the curve to the given point: this distance is positive if the point lies outside the shape, and is negative if the point lies inside the shape. |
Polyline2D |
getSubCurve(double t0,
double t1)
Return an instance of Polyline2D. |
double |
getT0()
returns 0. |
double |
getT1()
return the number of points in the polyline. |
double |
getWindingAngle(Point2D point)
Return the angle portion that the curve turn around the given point. |
boolean |
isClosed()
return true, by definition. |
boolean |
isInside(double x,
double y)
|
boolean |
isInside(Point2D point)
Returns true if the point is 'inside' the domain bounded by the curve. |
LinearRing2D |
transform(AffineTransform2D trans)
Return the transformed shape, as a ClosePolyline2D. |
CirculinearContour2D |
transform(CircleInversion2D inv)
Transforms the shape by a circle inversion. |
Methods inherited from class math.geom2d.polygon.Polyline2D |
---|
addPoint, clearPoints, clearVertices, clip, contains, contains, getBoundingBox, getBuffer, getDistance, getDistance, getEdge, getFirstEdge, getIntersections, getLeftTangent, getLength, getLength, getPointArray, getPointsIterator, getPosition, getPosition, getRightTangent, getSingularPoints, getSmoothPieces, getVertex, getVertexNumber, getVertices, isBounded, isEmpty, isSingular, project, removePoint |
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D |
---|
draw, getAsAWTShape, getAsPolyline, wrapCurve |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface math.geom2d.circulinear.CirculinearContinuousCurve2D |
---|
clip, getSmoothPieces |
Methods inherited from interface math.geom2d.circulinear.CirculinearCurve2D |
---|
getLength, getLength, getPosition |
Methods inherited from interface math.geom2d.circulinear.CirculinearShape2D |
---|
getBuffer |
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
---|
getAsPolyline, getLeftTangent, getRightTangent |
Methods inherited from interface math.geom2d.curve.Curve2D |
---|
draw, getAsAWTShape, getIntersections, getPosition, getSingularPoints, isSingular, project |
Methods inherited from interface math.geom2d.Shape2D |
---|
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty |
Methods inherited from interface math.geom2d.circulinear.CirculinearBoundary2D |
---|
clip |
Constructor Detail |
---|
public LinearRing2D()
public LinearRing2D(Point2D initialPoint)
public LinearRing2D(Point2D[] points)
public LinearRing2D(double[] xcoords, double[] ycoords)
public LinearRing2D(Collection<? extends Point2D> points)
Method Detail |
---|
public static LinearRing2D create(Collection<? extends Point2D> points)
public static LinearRing2D create(Point2D[] points)
public double getArea()
public double getSignedArea()
public Collection<LineSegment2D> getEdges()
getEdges
in class Polyline2D
public LineSegment2D getLastEdge()
getLastEdge
in class Polyline2D
public CirculinearRing2D getParallel(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.
getParallel
in interface CirculinearContinuousCurve2D
getParallel
in interface CirculinearContour2D
getParallel
in interface CirculinearCurve2D
getParallel
in interface ContinuousCirculinearCurve2D
getParallel
in class Polyline2D
dist
- the distance between the original curve and he parallel curve.
public CirculinearContour2D transform(CircleInversion2D inv)
CirculinearShape2D
transform
in interface CirculinearBoundary2D
transform
in interface CirculinearContinuousCurve2D
transform
in interface CirculinearContour2D
transform
in interface CirculinearCurve2D
transform
in interface CirculinearShape2D
transform
in interface ContinuousCirculinearCurve2D
transform
in class Polyline2D
inv
- the circle inversion
public Collection<ContinuousBoundary2D> getBoundaryCurves()
Boundary2D
getBoundaryCurves
in interface Boundary2D
public Domain2D getDomain()
Boundary2D
getDomain
in interface Boundary2D
public void fill(Graphics2D g2)
fill
in interface Boundary2D
public double getSignedDistance(double x, double y)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
getSignedDistance
in class Polyline2D
x
- x-coord of a pointy
- y-coord of a point
public double getSignedDistance(Point2D point)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
getSignedDistance
in class Polyline2D
point
- a point of the plane
public double getWindingAngle(Point2D point)
OrientedCurve2D
getWindingAngle
in interface OrientedCurve2D
getWindingAngle
in class Polyline2D
point
- a point of the plane
public boolean isInside(double x, double y)
public boolean isInside(Point2D point)
OrientedCurve2D
isInside
in interface Boundary2D
isInside
in interface OrientedCurve2D
isInside
in class Polyline2D
point
- a point in the plane
public boolean isClosed()
isClosed
in interface ContinuousCurve2D
isClosed
in class Polyline2D
public Point2D getPoint(double t)
getPoint
in interface Curve2D
getPoint
in class Polyline2D
public double getT0()
getT0
in interface Curve2D
getT0
in class Polyline2D
public double getT1()
getT1
in interface Curve2D
getT1
in class Polyline2D
public Point2D getFirstPoint()
getFirstPoint
in interface Curve2D
getFirstPoint
in class Polyline2D
public Point2D getLastPoint()
getLastPoint
in interface Curve2D
getLastPoint
in class Polyline2D
public Collection<? extends LinearRing2D> getContinuousCurves()
Curve2D
getContinuousCurves
in interface CirculinearBoundary2D
getContinuousCurves
in interface CirculinearCurve2D
getContinuousCurves
in interface Curve2D
getContinuousCurves
in class Polyline2D
public LinearRing2D getReverseCurve()
getReverseCurve
in interface CirculinearBoundary2D
getReverseCurve
in interface CirculinearContinuousCurve2D
getReverseCurve
in interface CirculinearContour2D
getReverseCurve
in interface CirculinearCurve2D
getReverseCurve
in interface ContinuousCirculinearCurve2D
getReverseCurve
in interface ContinuousCurve2D
getReverseCurve
in interface Curve2D
getReverseCurve
in interface Boundary2D
getReverseCurve
in interface ContinuousBoundary2D
getReverseCurve
in interface ContinuousOrientedCurve2D
getReverseCurve
in interface OrientedCurve2D
getReverseCurve
in class Polyline2D
public Polyline2D getSubCurve(double t0, double t1)
getSubCurve
in interface CirculinearContinuousCurve2D
getSubCurve
in interface CirculinearCurve2D
getSubCurve
in interface ContinuousCirculinearCurve2D
getSubCurve
in interface ContinuousCurve2D
getSubCurve
in interface Curve2D
getSubCurve
in interface ContinuousOrientedCurve2D
getSubCurve
in class Polyline2D
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curve
public LinearRing2D transform(AffineTransform2D trans)
transform
in interface ContinuousCurve2D
transform
in interface Curve2D
transform
in interface Boundary2D
transform
in interface ContinuousBoundary2D
transform
in interface ContinuousOrientedCurve2D
transform
in interface OrientedCurve2D
transform
in interface Shape2D
transform
in class Polyline2D
trans
- an affine transform
public GeneralPath appendPath(GeneralPath path)
ContinuousCurve2D
appendPath
in interface ContinuousCurve2D
appendPath
in class Polyline2D
path
- a path to modify
public GeneralPath getGeneralPath()
getGeneralPath
in class Polyline2D
public boolean equals(Object object)
equals
in class Polyline2D
public LinearRing2D clone()
Curve2D
clone
in interface Curve2D
clone
in class Polyline2D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |