public class BoundarySet2D<T extends ContinuousBoundary2D> extends CurveArray2D<T> implements Boundary2D
curves| Constructor and Description |
|---|
BoundarySet2D() |
BoundarySet2D(Collection<? extends T> curves) |
BoundarySet2D(int size) |
BoundarySet2D(T curve) |
BoundarySet2D(T[] curves) |
| Modifier and Type | Method and Description |
|---|---|
CurveSet2D<? extends ContinuousOrientedCurve2D> |
clip(Box2D box)
Clip the curve by a box.
|
static <T extends ContinuousBoundary2D> |
create(Collection<T> curves)
Static factory for creating a new PolyCurve2D from a collection of
curves.
|
static <T extends ContinuousBoundary2D> |
create(T[] curves)
Static factory for creating a new PolyCurve2D from an array of
curves.
|
void |
fill(Graphics2D g2) |
Collection<ContinuousBoundary2D> |
getBoundaryCurves()
Returns the different continuous curves composing the boundary
|
Domain2D |
getDomain()
Returns the domain delimited by this boundary.
|
BoundarySet2D<? extends ContinuousBoundary2D> |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in
reverse order.
|
double |
getSignedDistance(double x,
double y)
The same as getSignedDistance(Point2D), but by passing 2 double as
arguments.
|
double |
getSignedDistance(Point2D p)
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.
|
CurveSet2D<? extends ContinuousOrientedCurve2D> |
getSubCurve(double t0,
double t1)
Return an instance of CurveArray2D.
|
double |
getWindingAngle(Point2D point)
Return the angle portion that the curve turn around the given point.
|
boolean |
isInside(Point2D point)
Returns true if the point is 'inside' the domain bounded by the curve.
|
BoundarySet2D<? extends ContinuousBoundary2D> |
transform(AffineTransform2D trans)
Transforms each curve, and build a new CurveArray2D with the set of
transformed curves.
|
addCurve, clearCurves, clone, contains, contains, containsCurve, draw, equals, getAsAWTShape, getBoundingBox, getChildCurve, getContinuousCurves, getCurve, getCurveIndex, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getGeneralPath, getGlobalPosition, getIntersections, getLastCurve, getLastPoint, getLocalPosition, getPoint, getPosition, getSingularPoints, getT0, getT1, isBounded, isEmpty, isSingular, iterator, project, removeCurvefromUnitSegment, toUnitSegmentfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, draw, getAsAWTShape, getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, projectcontains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmptypublic BoundarySet2D()
public BoundarySet2D(int size)
public BoundarySet2D(T[] curves)
public BoundarySet2D(Collection<? extends T> curves)
public BoundarySet2D(T curve)
public static <T extends ContinuousBoundary2D> BoundarySet2D<T> create(Collection<T> curves)
public static <T extends ContinuousBoundary2D> BoundarySet2D<T> create(T[] curves)
public Collection<ContinuousBoundary2D> getBoundaryCurves()
Boundary2DgetBoundaryCurves in interface Boundary2Dpublic Domain2D getDomain()
Boundary2DgetDomain in interface Boundary2Dpublic void fill(Graphics2D g2)
fill in interface Boundary2Dpublic double getWindingAngle(Point2D point)
OrientedCurve2DgetWindingAngle in interface OrientedCurve2Dpoint - a point of the planepublic double getSignedDistance(Point2D p)
OrientedCurve2DgetSignedDistance in interface OrientedCurve2Dp - a point of the planepublic double getSignedDistance(double x,
double y)
OrientedCurve2DgetSignedDistance in interface OrientedCurve2Dx - x-coord of a pointy - y-coord of a pointpublic boolean isInside(Point2D point)
Boundary2DisInside in interface Boundary2DisInside in interface OrientedCurve2Dpoint - a point in the planepublic BoundarySet2D<? extends ContinuousBoundary2D> getReverseCurve()
Curve2DgetReverseCurve in interface Curve2DgetReverseCurve in interface Boundary2DgetReverseCurve in interface OrientedCurve2DgetReverseCurve in class CurveArray2D<T extends ContinuousBoundary2D>public CurveSet2D<? extends ContinuousOrientedCurve2D> getSubCurve(double t0, double t1)
CurveArray2DgetSubCurve in interface Curve2DgetSubCurve in class CurveArray2D<T extends ContinuousBoundary2D>t0 - position of the start of the sub-curvet1 - position of the end of the sub-curvepublic CurveSet2D<? extends ContinuousOrientedCurve2D> clip(Box2D box)
clip in interface Curve2Dclip in interface OrientedCurve2Dclip in interface Shape2Dclip in class CurveArray2D<T extends ContinuousBoundary2D>box - the clipping boxpublic BoundarySet2D<? extends ContinuousBoundary2D> transform(AffineTransform2D trans)
CurveArray2Dtransform in interface Curve2Dtransform in interface Boundary2Dtransform in interface OrientedCurve2Dtransform in interface Shape2Dtransform in class CurveArray2D<T extends ContinuousBoundary2D>trans - an affine transformCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.