math.geom2d.domain
Class Boundaries2D
- java.lang.Object
-
- math.geom2d.domain.Boundaries2D
-
public abstract class Boundaries2D extends java.lang.ObjectCollects some useful methods for operating on boundary curves.
-
-
Constructor Summary
Constructors Constructor and Description Boundaries2D()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static ContourArray2D<Contour2D>clipBoundary(Boundary2D boundary, Box2D box)Clips a boundary and closes the result curve.static CurveSet2D<ContinuousOrientedCurve2D>clipContinuousOrientedCurve(ContinuousOrientedCurve2D curve, Box2D box)Clip a curve, and return a CurveSet2D.static intfindNextCurveIndex(double[] positions, double pos)static Polyline2DgetBoundaryPortion(Box2D box, Point2D p0, Point2D p1)Extracts a portion of the boundary of a bounded box.
-
-
-
Method Detail
-
clipContinuousOrientedCurve
public static final CurveSet2D<ContinuousOrientedCurve2D> clipContinuousOrientedCurve(ContinuousOrientedCurve2D curve, Box2D box)
Clip a curve, and return a CurveSet2D. If the curve is totally outside the box, return a CurveSet2D with 0 curves inside. If the curve is totally inside the box, return a CurveSet2D with only one curve, which is the original curve.
-
clipBoundary
public static final ContourArray2D<Contour2D> clipBoundary(Boundary2D boundary, Box2D box)
Clips a boundary and closes the result curve. Returns an instance of ContourArray2D.
-
findNextCurveIndex
public static final int findNextCurveIndex(double[] positions, double pos)
-
getBoundaryPortion
public static final Polyline2D getBoundaryPortion(Box2D box, Point2D p0, Point2D p1)
Extracts a portion of the boundary of a bounded box.- Parameters:
box- the box from which one extract a portion of boundaryp0- the first point of the portionp1- the last point of the portion- Returns:
- the portion of the bounding box boundary as a Polyline2D
-
-
DMelt 3.0 © DataMelt by jWork.ORG