|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object math.geom2d.curve.CurveSet2D<T> math.geom2d.curve.CurveArray2D<T> math.geom2d.domain.BoundarySet2D<T>
public class BoundarySet2D<T extends ContinuousBoundary2D>
A BoundarySet2D is a set of continuous oriented curves. Each curve of the set defines its own domain.
Field Summary |
---|
Fields inherited from class math.geom2d.curve.CurveSet2D |
---|
curves |
Fields inherited from interface math.geom2d.Shape2D |
---|
ACCURACY |
Constructor Summary | |
---|---|
BoundarySet2D()
|
|
BoundarySet2D(Collection<? extends T> curves)
|
|
BoundarySet2D(int size)
|
|
BoundarySet2D(T curve)
|
|
BoundarySet2D(T[] curves)
|
Method Summary | ||
---|---|---|
CurveSet2D<? extends ContinuousOrientedCurve2D> |
clip(Box2D box)
Clip the curve by a box. |
|
static
|
create(Collection<T> curves)
Static factory for creating a new PolyCurve2D from a collection of curves. |
|
static
|
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. |
Methods inherited from class math.geom2d.curve.CurveArray2D |
---|
addCurve, clearCurves, clone, contains, contains, containsCurve, draw, equals, getAsAWTShape, getBoundingBox, getContinuousCurves, getCurve, getCurveIndex, getCurveNumber, getCurves, getDistance, getDistance, getFirstCurve, getFirstPoint, getGeneralPath, getGlobalPosition, getChildCurve, getIntersections, getLastCurve, getLastPoint, getLocalPosition, getPoint, getPosition, getSingularPoints, getT0, getT1, isBounded, isEmpty, isSingular, iterator, project, removeCurve |
Methods inherited from class math.geom2d.curve.CurveSet2D |
---|
fromUnitSegment, toUnitSegment |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface math.geom2d.curve.Curve2D |
---|
clone, draw, getAsAWTShape, getContinuousCurves, getFirstPoint, getIntersections, getLastPoint, getPoint, getPosition, getSingularPoints, getT0, getT1, isSingular, project |
Methods inherited from interface math.geom2d.Shape2D |
---|
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty |
Constructor Detail |
---|
public BoundarySet2D()
public BoundarySet2D(int size)
public BoundarySet2D(T[] curves)
public BoundarySet2D(Collection<? extends T> curves)
public BoundarySet2D(T curve)
Method Detail |
---|
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()
Boundary2D
getBoundaryCurves
in interface Boundary2D
public Domain2D getDomain()
Boundary2D
getDomain
in interface Boundary2D
public void fill(Graphics2D g2)
fill
in interface Boundary2D
public double getWindingAngle(Point2D point)
OrientedCurve2D
getWindingAngle
in interface OrientedCurve2D
point
- a point of the plane
public double getSignedDistance(Point2D p)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
p
- a point of the plane
public double getSignedDistance(double x, double y)
OrientedCurve2D
getSignedDistance
in interface OrientedCurve2D
x
- x-coord of a pointy
- y-coord of a point
public boolean isInside(Point2D point)
Boundary2D
isInside
in interface Boundary2D
isInside
in interface OrientedCurve2D
point
- a point in the plane
public BoundarySet2D<? extends ContinuousBoundary2D> getReverseCurve()
Curve2D
getReverseCurve
in interface Curve2D
getReverseCurve
in interface Boundary2D
getReverseCurve
in interface OrientedCurve2D
getReverseCurve
in class CurveArray2D<T extends ContinuousBoundary2D>
public CurveSet2D<? extends ContinuousOrientedCurve2D> getSubCurve(double t0, double t1)
CurveArray2D
getSubCurve
in interface Curve2D
getSubCurve
in class CurveArray2D<T extends ContinuousBoundary2D>
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curve
public CurveSet2D<? extends ContinuousOrientedCurve2D> clip(Box2D box)
clip
in interface Curve2D
clip
in interface OrientedCurve2D
clip
in interface Shape2D
clip
in class CurveArray2D<T extends ContinuousBoundary2D>
box
- the clipping box
public BoundarySet2D<? extends ContinuousBoundary2D> transform(AffineTransform2D trans)
CurveArray2D
transform
in interface Curve2D
transform
in interface Boundary2D
transform
in interface OrientedCurve2D
transform
in interface Shape2D
transform
in class CurveArray2D<T extends ContinuousBoundary2D>
trans
- an affine transform
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |