Interface Ellipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>
-
- Type Parameters:
ST- is the type of the general implementation.IT- is the type of the implementation of this shape.IE- is the type of the path elements.P- is the type of the points.V- is the type of the vectors.B- is the type of the bounding boxes.
- All Superinterfaces:
Cloneable,JsonableObject,RectangularShape2afp<ST,IT,IE,P,V,B>,Serializable,Shape2afp<ST,IT,IE,P,V,B>,Shape2D<ST,IT,PathIterator2afp<IE>,P,V,B>
- All Known Subinterfaces:
Circle2afp<ST,IT,IE,P,V,B>
- All Known Implementing Classes:
Circle2d,Circle2dfx,Ellipse2d,Ellipse2dfx
public interface Ellipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>> extends RectangularShape2afp<ST,IT,IE,P,V,B>
Fonctional interface that represented a 2D ellipse on a plane.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Hamza JAFFALI
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classEllipse2afp.AbstractEllipsePathIterator<T extends PathElement2afp>Abstract iterator on the path elements of the ellipse.static classEllipse2afp.EllipsePathIterator<T extends PathElement2afp>Iterator on the ellipse path elements.static classEllipse2afp.PrivateAPIPrivate API functions for the ellipses.static classEllipse2afp.TransformedEllipsePathIterator<T extends PathElement2afp>Iterator on the path elements of a transformed ellipse.
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default booleancontains(double x, double y)Replies if the given point is inside this shape.default booleancontains(Rectangle2afp<?,?,?,?,?,?> rectangle)Replies if the given rectangle is inside this shape.static booleancontainsEllipsePoint(double ellx, double elly, double ellw, double ellh, double px, double py)Replies if the given point is inside the given ellipse.static booleancontainsEllipseRectangle(double ex, double ey, double ewidth, double eheight, double rxmin, double rymin, double rxmax, double rymax)Replies if a rectangle is inside in the ellipse.default booleanequalsToShape(IT shape)Replies this shape is equal to the given shape.static voidfindsClosestPointShallowEllipsePoint(double px, double py, double ex, double ey, double ew, double eh, Point2D<?,?> result)Replies the closest point from the given point in the shallow ellipse.static voidfindsClosestPointSolidEllipsePoint(double px, double py, double ex, double ey, double ew, double eh, Point2D<?,?> result)Replies the closest point from the given point in the solid ellipse.static voidfindsFarthestPointShallowEllipsePoint(double px, double py, double ex, double ey, double ew, double eh, Point2D<?,?> result)Replies the farthest point from the given point in the shallow ellipse.default PgetClosestPointTo(Circle2afp<?,?,?,?,?,?> circle)Replies the closest point on this shape to the given circle.default PgetClosestPointTo(Ellipse2afp<?,?,?,?,?,?> ellipse)Replies the closest point on this shape to the given ellipse.default PgetClosestPointTo(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)Replies the closest point on this shape to the given oriented rectangle.default PgetClosestPointTo(Parallelogram2afp<?,?,?,?,?,?> parallelogram)Replies the closest point on this shape to the given parallelogram.default PgetClosestPointTo(Path2afp<?,?,?,?,?,?> path)Replies the closest point on this shape to the given path.default PgetClosestPointTo(Rectangle2afp<?,?,?,?,?,?> rectangle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)Replies the closest point on this shape to the given round rectangle.default PgetClosestPointTo(Segment2afp<?,?,?,?,?,?> segment)Replies the closest point on this shape to the given segment.default PgetClosestPointTo(Triangle2afp<?,?,?,?,?,?> triangle)Replies the closest point on this shape to the given triangle.default PgetClosestPointTo(Point2D<?,?> pt)Replies the point on the shape that is closest to the given point.default doublegetDistanceL1(Point2D<?,?> pt)Computes the L-1 (Manhattan) distance between this shape and point p1.default doublegetDistanceLinf(Point2D<?,?> pt)Computes the L-infinite distance between this shape and point p1.default doublegetDistanceSquared(Point2D<?,?> pt)Replies the squared value of the minimal distance from this shape to the given point.default PgetFarthestPointTo(Point2D<?,?> pt)Replies the point on the shape that is farthest the given point.default PathIterator2afp<IE>getFlatteningPathIterator()Replies a path iterator on this shape that is replacing the curves by line approximations.default doublegetHorizontalRadius()Replies the horizontal radius of the ellipse.default PgetMaxFocusPoint()Replies the focus point with the higher coordinates.default PgetMinFocusPoint()Replies the focus point with the lower coordinates.default PathIterator2afp<IE>getPathIterator(Transform2D transform)Replies the elements of the paths.default doublegetVerticalRadius()Replies the vertical radius of the ellipse.default booleanintersects(Circle2afp<?,?,?,?,?,?> circle)Replies if this shape is intersecting the given circle.default booleanintersects(Ellipse2afp<?,?,?,?,?,?> ellipse)Replies if this shape is intersecting the given ellipse.default booleanintersects(MultiShape2afp<?,?,?,?,?,?,?> multishape)Replies if this shape is intersecting the given multishape.default booleanintersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(Parallelogram2afp<?,?,?,?,?,?> parallelogram)Replies if this shape is intersecting the given parallelogram.default booleanintersects(PathIterator2afp<?> iterator)Replies if this shape is intersecting the shape representing the given path iterator.default booleanintersects(Rectangle2afp<?,?,?,?,?,?> rectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(Segment2afp<?,?,?,?,?,?> segment)Replies if this shape is intersecting the given line.default booleanintersects(Triangle2afp<?,?,?,?,?,?> triangle)Replies if this shape is intersecting the given triangle.static booleanintersectsEllipseCircle(double ex, double ey, double ewidth, double eheight, double cx, double cy, double cradius)Replies if an ellipse and a circle are intersecting.static booleanintersectsEllipseEllipse(double x1, double y1, double width1, double height1, double x2, double y2, double width2, double height2)Replies if two ellipses are intersecting.static booleanintersectsEllipseLine(double ex, double ey, double ew, double eh, double x1, double y1, double x2, double y2)Replies if an ellipse and a line are intersecting.static booleanintersectsEllipseRectangle(double ex, double ey, double ewidth, double eheight, double x3, double y3, double x4, double y4)Replies if two ellipses are intersecting.static booleanintersectsEllipseSegment(double ex, double ey, double ew, double eh, double x1, double y1, double x2, double y2, boolean intersectsWhenTouching)Replies if an ellipse and a segment are intersecting.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.RectangularShape2afp
clear, getCenter, getCenterX, getCenterY, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, inflate, isEmpty, set, set, set, setFromCenter, setFromCenter, setFromCorners, setFromCorners, setHeight, setMaxX, setMaxY, setMinX, setMinY, setWidth, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Shape2afp
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
clone, equalsToPathIterator, getDistance, getDistance, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Method Detail
-
containsEllipsePoint
@Pure static boolean containsEllipsePoint(double ellx, double elly, double ellw, double ellh, double px, double py)Replies if the given point is inside the given ellipse.- Parameters:
ellx- is the min corner of the ellipse.elly- is the min corner of the ellipse.ellw- is the width of the ellipse.ellh- is the height of the ellipse.px- is the point to test.py- is the point to test.- Returns:
trueif the point is inside the ellipse;falseif not.
-
findsClosestPointSolidEllipsePoint
static void findsClosestPointSolidEllipsePoint(double px, double py, double ex, double ey, double ew, double eh, Point2D<?,?> result)Replies the closest point from the given point in the solid ellipse. A solid ellipse is an ellipse with a border and an interior area.- Parameters:
px- is the coordinate of the point.py- is the coordinate of the point.ex- is the coordinate of the min corner of the ellipseey- is the coordinate of the min corner of the ellipseew- is the width of the ellipseeh- is the height of the ellipseresult- the closest point in the ellipse.- See Also:
findsClosestPointShallowEllipsePoint(double, double, double, double, double, double, Point2D)
-
findsClosestPointShallowEllipsePoint
static void findsClosestPointShallowEllipsePoint(double px, double py, double ex, double ey, double ew, double eh, Point2D<?,?> result)Replies the closest point from the given point in the shallow ellipse. A shallow ellipse is an ellipse with a border and not an interior area.- Parameters:
px- is the coordinate of the point.py- is the coordinate of the point.ex- is the coordinate of the min corner of the ellipseey- is the coordinate of the min corner of the ellipseew- is the width of the ellipseeh- is the height of the ellipseresult- the closest point in the ellipse.- See Also:
findsClosestPointSolidEllipsePoint(double, double, double, double, double, double, Point2D)
-
findsFarthestPointShallowEllipsePoint
static void findsFarthestPointShallowEllipsePoint(double px, double py, double ex, double ey, double ew, double eh, Point2D<?,?> result)Replies the farthest point from the given point in the shallow ellipse. A shallow ellipse is an ellipse with a border and not an interior area.- Parameters:
px- is the coordinate of the point.py- is the coordinate of the point.ex- is the coordinate of the min corner of the ellipseey- is the coordinate of the min corner of the ellipseew- is the width of the ellipseeh- is the height of the ellipseresult- the farthest point in the ellipse.
-
containsEllipseRectangle
@Pure static boolean containsEllipseRectangle(double ex, double ey, double ewidth, double eheight, double rxmin, double rymin, double rxmax, double rymax)Replies if a rectangle is inside in the ellipse.- Parameters:
ex- is the lowest corner of the ellipse.ey- is the lowest corner of the ellipse.ewidth- is the width of the ellipse.eheight- is the height of the ellipse.rxmin- is the lowest corner of the rectangle.rymin- is the lowest corner of the rectangle.rxmax- is the uppest corner of the rectangle.rymax- is the uppest corner of the rectangle.- Returns:
trueif the given rectangle is inside the ellipse; otherwisefalse.
-
intersectsEllipseEllipse
@Pure static boolean intersectsEllipseEllipse(double x1, double y1, double width1, double height1, double x2, double y2, double width2, double height2)Replies if two ellipses are intersecting.- Parameters:
x1- is the lowest corner of the first ellipse.y1- is the lowest corner of the first ellipse.width1- is the width of the first ellipse.height1- is the height of the first ellipse.x2- is the lowest corner of the second ellipse.y2- is the lowest corner of the second ellipse.width2- is the width of the second ellipse.height2- is the height of the second ellipse.- Returns:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsEllipseCircle
@Pure static boolean intersectsEllipseCircle(double ex, double ey, double ewidth, double eheight, double cx, double cy, double cradius)Replies if an ellipse and a circle are intersecting.- Parameters:
ex- is the lowest corner of the ellipse.ey- is the lowest corner of the ellipse.ewidth- is the width of the ellipse.eheight- is the height of the ellipse.cx- is the center of the circle.cy- is the center of the circle.cradius- the radius of the circle.- Returns:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsEllipseLine
@Pure static boolean intersectsEllipseLine(double ex, double ey, double ew, double eh, double x1, double y1, double x2, double y2)Replies if an ellipse and a line are intersecting.- Parameters:
ex- is the lowest corner of the ellipse.ey- is the lowest corner of the ellipse.ew- is the width of the ellipse.eh- is the height of the ellipse.x1- is the first point of the line.y1- is the first point of the line.x2- is the second point of the line.y2- is the second point of the line.- Returns:
trueif the two shapes are intersecting; otherwisefalse- See Also:
- "http://blog.csharphelper.com/2012/09/24/calculate-where-a-line-segment-and-an-ellipse-intersect-in-c.aspx"
-
intersectsEllipseSegment
@Pure static boolean intersectsEllipseSegment(double ex, double ey, double ew, double eh, double x1, double y1, double x2, double y2, boolean intersectsWhenTouching)Replies if an ellipse and a segment are intersecting.- Parameters:
ex- is the lowest corner of the ellipse.ey- is the lowest corner of the ellipse.ew- is the width of the ellipse.eh- is the height of the ellipse.x1- is the first point of the segment.y1- is the first point of the segment.x2- is the second point of the segment.y2- is the second point of the segment.intersectsWhenTouching- indicates if there is an intersection if the segment is touching the ellipse at one point.- Returns:
trueif the two shapes are intersecting; otherwisefalse- See Also:
- "http://blog.csharphelper.com/2012/09/24/calculate-where-a-line-segment-and-an-ellipse-intersect-in-c.aspx"
-
intersectsEllipseRectangle
@Pure static boolean intersectsEllipseRectangle(double ex, double ey, double ewidth, double eheight, double x3, double y3, double x4, double y4)Replies if two ellipses are intersecting.- Parameters:
ex- is the first corner of the first ellipse.ey- is the first corner of the first ellipse.ewidth- is the width of the first ellipse.eheight- is the height of the first ellipse.x3- is the first corner of the second rectangle.y3- is the first corner of the second rectangle.x4- is the second corner of the second rectangle.y4- is the second corner of the second rectangle.- Returns:
trueif the two shapes are intersecting; otherwisefalse
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape2DReplies this shape is equal to the given shape.- Specified by:
equalsToShapein interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
shape- the shape to compare to.- Returns:
trueif this shape is equal is equal to the given path.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquaredin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- squared value of the minimal distance between this shape and the point.
-
getDistanceL1
@Pure default double getDistanceL1(Point2D<?,?> pt)
Description copied from interface:Shape2DComputes the L-1 (Manhattan) distance between this shape and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).- Specified by:
getDistanceL1in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point2D<?,?> pt)
Description copied from interface:Shape2DComputes the L-infinite distance between this shape and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Specified by:
getDistanceLinfin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
contains
@Pure default boolean contains(double x, double y)Description copied from interface:Shape2afpReplies if the given point is inside this shape.- Specified by:
containsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
x- x coordinate of the point to test.y- y coordinate of the point to test.- Returns:
trueif the given point is inside this shape, otherwisefalse.
-
contains
default boolean contains(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afpReplies if the given rectangle is inside this shape.- Specified by:
containsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
trueif the given rectangle is inside this shape, otherwisefalse.
-
intersects
default boolean intersects(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
default boolean intersects(Ellipse2afp<?,?,?,?,?,?> ellipse)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given ellipse.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
ellipse- the ellipse.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Circle2afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given circle.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
circle- the circle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Segment2afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given line.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
segment- the segment.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
orientedRectangle- the oriented rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Triangle2afp<?,?,?,?,?,?> triangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given triangle.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
triangle- the triangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Parallelogram2afp<?,?,?,?,?,?> parallelogram)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given parallelogram.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
parallelogram- the parallelogram.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
roundRectangle- the round rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
default boolean intersects(PathIterator2afp<?> iterator)
Description copied from interface:Shape2afpReplies if this shape is intersecting the shape representing the given path iterator.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
iterator- the path iterator.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2afpReplies if this shape is intersecting the given multishape.- Specified by:
intersectsin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
multishape- the multishape.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
getPathIterator
default PathIterator2afp<IE> getPathIterator(Transform2D transform)
Description copied from interface:Shape2DReplies the elements of the paths.- Specified by:
getPathIteratorin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
transform- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
getFlatteningPathIterator
@Pure default PathIterator2afp<IE> getFlatteningPathIterator()
Replies a path iterator on this shape that is replacing the curves by line approximations.- Returns:
- the iterator on the approximation.
- See Also:
Shape2D.getPathIterator(),GeomConstants.SPLINE_APPROXIMATION_RATIO
-
getClosestPointTo
default P getClosestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the point on the shape that is closest to the given point.- Specified by:
getClosestPointToin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Circle2afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given circle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
circle- the circle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Ellipse2afp<?,?,?,?,?,?> ellipse)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given ellipse.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
ellipse- the ellipse.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given rectangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Segment2afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given segment.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
segment- the segment.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Triangle2afp<?,?,?,?,?,?> triangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given triangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
triangle- the triangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given oriented rectangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
orientedRectangle- the oriented rectangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Parallelogram2afp<?,?,?,?,?,?> parallelogram)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given parallelogram.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
parallelogram- the parallelogram.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given round rectangle.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
roundRectangle- the round rectangle.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getClosestPointTo
default P getClosestPointTo(Path2afp<?,?,?,?,?,?> path)
Description copied from interface:Shape2afpReplies the closest point on this shape to the given path.If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.
- Specified by:
getClosestPointToin interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
path- the path.- Returns:
- the closest point on the shape; or the point itself if it is inside the shape.
-
getFarthestPointTo
default P getFarthestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointToin interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Ellipse2afp<?,?,IE,P,V,B>,IE extends PathElement2afp,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2afp<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the farthest point on the shape.
-
getHorizontalRadius
default double getHorizontalRadius()
Replies the horizontal radius of the ellipse.- Returns:
- the horizontal radius.
-
getVerticalRadius
default double getVerticalRadius()
Replies the vertical radius of the ellipse.- Returns:
- the vertical radius.
-
getMinFocusPoint
default P getMinFocusPoint()
Replies the focus point with the lower coordinates.The foci always lie on the major (longest) axis, spaced equally each side of the center. If the major axis and minor axis are the same length, the figure is a circle and both foci are at the center.
- Returns:
- the focus point.
-
getMaxFocusPoint
default P getMaxFocusPoint()
Replies the focus point with the higher coordinates.The foci always lie on the major (longest) axis, spaced equally each side of the center. If the major axis and minor axis are the same length, the figure is a circle and both foci are at the center.
- Returns:
- the focus point.
-
-