|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.line.Polyline2D
math.geom2d.line.ClosedPolyline2D
public class ClosedPolyline2D
Extends Polyline2D, by considering the last point is connected to the first one. A ClosedPolyline2D can be used as boundary for Polygons.
| Field Summary |
|---|
| Fields inherited from class math.geom2d.line.Polyline2D |
|---|
points |
| 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 | |
|---|---|
ClosedPolyline2D()
|
|
ClosedPolyline2D(java.util.Collection<? extends Point2D> points)
|
|
ClosedPolyline2D(double[] xcoords,
double[] ycoords)
|
|
ClosedPolyline2D(Point2D initialPoint)
|
|
ClosedPolyline2D(Point2D[] points)
|
|
| Method Summary | |
|---|---|
java.awt.geom.GeneralPath |
appendPath(java.awt.geom.GeneralPath path)
Append the path of the curve to the given path. |
double |
getArea()
Computes area of the polyline, by returning the absolute value of the signed area. |
java.util.Collection<ContinuousBoundary2D> |
getBoundaryCurves()
Return the different continuous curves composing the boundary |
java.util.Collection<LineSegment2D> |
getEdges()
return an array of LineSegment2D. |
Point2D |
getFirstPoint()
return the first point of the polyline. |
java.awt.geom.GeneralPath |
getGeneralPath()
Return a general path iterator. |
Point2D |
getLastPoint()
return the first point, as this is the same as the last point. |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans)
Return pathiterator for this polyline. |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
Return pathiterator for this polyline. |
Point2D |
getPoint(double t,
Point2D point)
return point from position as double. |
ClosedPolyline2D |
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(java.awt.geom.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(java.awt.geom.Point2D point)
Return the angle portion that the curve turn around the given point. |
boolean |
isClosed()
return true, by definition. |
boolean |
isInside(java.awt.geom.Point2D point)
return true if the point is 'inside' the domain bounded by the curve. |
ClosedPolyline2D |
transform(AffineTransform2D trans)
Return the transformed shape, as a ClosePolyline2D. |
| Methods inherited from class math.geom2d.line.Polyline2D |
|---|
addPoint, clearPoints, clip, contains, contains, contains, contains, equals, getAsPolyline, getBoundingBox, getBounds, getBounds2D, getContinuousCurves, getDistance, getDistance, getIntersections, getPoint, getPointArray, getPoints, getPointsIterator, getPosition, getSmoothPieces, getVerticesNumber, intersects, intersects, isBounded, project, removePoint |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface math.geom2d.curve.ContinuousOrientedCurve2D |
|---|
clip |
| Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
getAsPolyline, getSmoothPieces |
| Methods inherited from interface math.geom2d.curve.Curve2D |
|---|
getContinuousCurves, getIntersections, getPoint, getPosition, 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 |
| Constructor Detail |
|---|
public ClosedPolyline2D()
public ClosedPolyline2D(Point2D initialPoint)
public ClosedPolyline2D(Point2D[] points)
public ClosedPolyline2D(double[] xcoords,
double[] ycoords)
public ClosedPolyline2D(java.util.Collection<? extends Point2D> points)
| Method Detail |
|---|
public double getArea()
public double getSignedArea()
public java.util.Collection<LineSegment2D> getEdges()
getEdges in class Polyline2Dpublic java.util.Collection<ContinuousBoundary2D> getBoundaryCurves()
Boundary2D
getBoundaryCurves in interface Boundary2D
public double getSignedDistance(double x,
double y)
OrientedCurve2D
getSignedDistance in interface OrientedCurve2DgetSignedDistance in class Polyline2Dx - x-coord of a pointy - y-coord of a point
public double getSignedDistance(java.awt.geom.Point2D point)
OrientedCurve2D
getSignedDistance in interface OrientedCurve2DgetSignedDistance in class Polyline2Dpoint - a point of the plane
public double getWindingAngle(java.awt.geom.Point2D point)
OrientedCurve2D
getWindingAngle in interface OrientedCurve2DgetWindingAngle in class Polyline2Dpoint - a point of the plane
public boolean isInside(java.awt.geom.Point2D point)
OrientedCurve2D
isInside in interface OrientedCurve2DisInside in class Polyline2Dpoint - a point in the plane
public boolean isClosed()
isClosed in interface ContinuousCurve2DisClosed in class Polyline2D
public Point2D getPoint(double t,
Point2D point)
getPoint in interface Curve2DgetPoint in class Polyline2Dpublic double getT0()
getT0 in interface Curve2DgetT0 in class Polyline2Dpublic double getT1()
getT1 in interface Curve2DgetT1 in class Polyline2Dpublic Point2D getFirstPoint()
getFirstPoint in interface Curve2DgetFirstPoint in class Polyline2Dpublic Point2D getLastPoint()
getLastPoint in interface Curve2DgetLastPoint in class Polyline2Dpublic ClosedPolyline2D getReverseCurve()
getReverseCurve in interface Boundary2DgetReverseCurve in interface ContinuousBoundary2DgetReverseCurve in interface ContinuousCurve2DgetReverseCurve in interface ContinuousOrientedCurve2DgetReverseCurve in interface Curve2DgetReverseCurve in interface OrientedCurve2DgetReverseCurve in class Polyline2D
public Polyline2D getSubCurve(double t0,
double t1)
getSubCurve in interface ContinuousCurve2DgetSubCurve in interface ContinuousOrientedCurve2DgetSubCurve in interface Curve2DgetSubCurve in class Polyline2Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curve
public ClosedPolyline2D transform(AffineTransform2D trans)
transform in interface Boundary2Dtransform in interface ContinuousBoundary2Dtransform in interface ContinuousCurve2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface Curve2Dtransform in interface OrientedCurve2Dtransform in interface Shape2Dtransform in class Polyline2Dtrans - an affine transform
public java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
ContinuousCurve2D
appendPath in interface ContinuousCurve2DappendPath in class Polyline2Dpath - a path to modify
public java.awt.geom.GeneralPath getGeneralPath()
getGeneralPath in class Polyline2Dpublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans)
getPathIterator in interface java.awt.ShapegetPathIterator in class Polyline2D
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
getPathIterator in interface java.awt.ShapegetPathIterator in class Polyline2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||