Interface RoundRectangle2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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 Implementing Classes:
RoundRectangle2d
,RoundRectangle2dfx
public interface RoundRectangle2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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 round rectangle 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 class
RoundRectangle2afp.AbstractRoundRectanglePathIterator<T extends PathElement2afp>
Abstract iterator on the path elements of the round rectangle.static class
RoundRectangle2afp.RoundRectanglePathIterator<T extends PathElement2afp>
Iterator on the path elements of the rectangle.static class
RoundRectangle2afp.TransformedRoundRectanglePathIterator<T extends PathElement2afp>
Iterator on the path elements of the rectangle.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
contains(double x, double y)
Replies if the given point is inside this shape.default boolean
contains(Rectangle2afp<?,?,?,?,?,?> rectangle)
Replies if the given rectangle is inside this shape.static boolean
containsRoundRectanglePoint(double rx, double ry, double rwidth, double rheight, double awidth, double aheight, double px, double py)
Replies if a point is inside in the round rectangle.static boolean
containsRoundRectangleRectangle(double rx1, double ry1, double rwidth1, double rheight1, double awidth, double aheight, double rx2, double ry2, double rwidth2, double rheight2)
Replies if a rectangle is inside in the round rectangle.default boolean
equalsToShape(IT shape)
Replies this shape is equal to the given shape.double
getArcHeight()
Gets the height of the arc that rounds off the corners.double
getArcWidth()
Gets the width of the arc that rounds off the corners.default P
getClosestPointTo(Circle2afp<?,?,?,?,?,?> circle)
Replies the closest point on this shape to the given circle.default P
getClosestPointTo(Ellipse2afp<?,?,?,?,?,?> ellipse)
Replies the closest point on this shape to the given ellipse.default P
getClosestPointTo(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Replies the closest point on this shape to the given oriented rectangle.default P
getClosestPointTo(Parallelogram2afp<?,?,?,?,?,?> parallelogram)
Replies the closest point on this shape to the given parallelogram.default P
getClosestPointTo(Path2afp<?,?,?,?,?,?> path)
Replies the closest point on this shape to the given path.default P
getClosestPointTo(Rectangle2afp<?,?,?,?,?,?> rectangle)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Replies the closest point on this shape to the given round rectangle.default P
getClosestPointTo(Segment2afp<?,?,?,?,?,?> segment)
Replies the closest point on this shape to the given segment.default P
getClosestPointTo(Triangle2afp<?,?,?,?,?,?> triangle)
Replies the closest point on this shape to the given triangle.default P
getClosestPointTo(Point2D<?,?> pt)
Replies the point on the shape that is closest to the given point.default double
getDistanceL1(Point2D<?,?> pt)
Computes the L-1 (Manhattan) distance between this shape and point p1.default double
getDistanceLinf(Point2D<?,?> pt)
Computes the L-infinite distance between this shape and point p1.default double
getDistanceSquared(Point2D<?,?> pt)
Replies the squared value of the minimal distance from this shape to the given point.default P
getFarthestPointTo(Point2D<?,?> pt)
Replies the point on the shape that is farthest the given point.default PathIterator2afp<IE>
getFlatteningPathIterator()
Replies a path iterator on this round rectangle that is replacing the corner arcs by line approximations.default PathIterator2afp<IE>
getPathIterator(Transform2D transform)
Replies the elements of the paths.default boolean
intersects(Circle2afp<?,?,?,?,?,?> circle)
Replies if this shape is intersecting the given circle.default boolean
intersects(Ellipse2afp<?,?,?,?,?,?> ellipse)
Replies if this shape is intersecting the given ellipse.default boolean
intersects(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.default boolean
intersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Replies if this shape is intersecting the given rectangle.default boolean
intersects(Parallelogram2afp<?,?,?,?,?,?> oarallelogram)
Replies if this shape is intersecting the given parallelogram.default boolean
intersects(PathIterator2afp<?> iterator)
Replies if this shape is intersecting the shape representing the given path iterator.default boolean
intersects(Rectangle2afp<?,?,?,?,?,?> rectangle)
Replies if this shape is intersecting the given rectangle.default boolean
intersects(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Replies if this shape is intersecting the given rectangle.default boolean
intersects(Segment2afp<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given line.default boolean
intersects(Triangle2afp<?,?,?,?,?,?> triangle)
Replies if this shape is intersecting the given triangle.static boolean
intersectsRoundRectangleCircle(double rx1, double ry1, double rx2, double ry2, double aw, double ah, double cx, double cy, double radius)
Replies if a round rectangle and a circle are intersecting.static boolean
intersectsRoundRectangleEllipse(double rx1, double ry1, double rx2, double ry2, double aw, double ah, double ex, double ey, double ew, double eh)
Replies if a round rectangle and an ellipse are intersecting.static boolean
intersectsRoundRectangleRectangle(double r1x1, double r1y1, double r1x2, double r1y2, double r1aw, double r1ah, double r2x1, double r2y1, double r2x2, double r2y2)
Replies if a round rectangle and a rectangle are intersecting.static boolean
intersectsRoundRectangleRoundRectangle(double r1x1, double r1y1, double r1x2, double r1y2, double r1aw, double r1ah, double r2x1, double r2y1, double r2x2, double r2y2, double r2aw, double r2ah)
Replies if two round rectangles are intersecting.static boolean
intersectsRoundRectangleSegment(double rx1, double ry1, double rx2, double ry2, double aw, double ah, double sx1, double sy1, double sx2, double sy2)
Replies if the round rectangle is intersecting the segment.default void
set(double x, double y, double width, double height, double arcWidth, double arcHeight)
Change the frame of the rectangle.default void
set(IT shape)
Set this shape with the attributes of the given shape.void
setArcHeight(double arcHeight)
Set the height of the arc that rounds off the corners.void
setArcWidth(double arcWidth)
Set the width of the arc that rounds off the corners.void
setFromCorners(double x1, double y1, double x2, double y2, double arcWidth, double arcHeight)
Change the frame of the rectangle.-
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, 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
-
containsRoundRectangleRectangle
@Pure static boolean containsRoundRectangleRectangle(double rx1, double ry1, double rwidth1, double rheight1, double awidth, double aheight, double rx2, double ry2, double rwidth2, double rheight2)
Replies if a rectangle is inside in the round rectangle.- Parameters:
rx1
- is the lowest corner of the round rectangle.ry1
- is the lowest corner of the round rectangle.rwidth1
- is the width of the round rectangle.rheight1
- is the height of the round rectangle.awidth
- is the width of the arc of the round rectangle.aheight
- is the height of the arc of the round rectangle.rx2
- is the lowest corner of the inner-candidate rectangle.ry2
- is the lowest corner of the inner-candidate rectangle.rwidth2
- is the width of the inner-candidate rectangle.rheight2
- is the height of the inner-candidate rectangle.- Returns:
true
if the given rectangle is inside the ellipse; otherwisefalse
.
-
containsRoundRectanglePoint
@Pure static boolean containsRoundRectanglePoint(double rx, double ry, double rwidth, double rheight, double awidth, double aheight, double px, double py)
Replies if a point is inside in the round rectangle.- Parameters:
rx
- is the lowest corner of the round rectangle.ry
- is the lowest corner of the round rectangle.rwidth
- is the width of the round rectangle.rheight
- is the height of the round rectangle.awidth
- is the width of the arc of the round rectangle.aheight
- is the height of the arc of the round rectangle.px
- is the point.py
- is the point.- Returns:
true
if the given rectangle is inside the ellipse; otherwisefalse
.
-
intersectsRoundRectangleSegment
@Pure static boolean intersectsRoundRectangleSegment(double rx1, double ry1, double rx2, double ry2, double aw, double ah, double sx1, double sy1, double sx2, double sy2)
Replies if the round rectangle is intersecting the segment.- Parameters:
rx1
- is the first corner of the rectangle.ry1
- is the first corner of the rectangle.rx2
- is the second corner of the rectangle.ry2
- is the second corner of the rectangle.aw
- is the width of the arcs of the rectangle.ah
- is the height of the arcs of the rectangle.sx1
- is the first point of the segment.sy1
- is the first point of the segment.sx2
- is the second point of the segment.sy2
- is the second point of the segment.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsRoundRectangleRoundRectangle
@Pure static boolean intersectsRoundRectangleRoundRectangle(double r1x1, double r1y1, double r1x2, double r1y2, double r1aw, double r1ah, double r2x1, double r2y1, double r2x2, double r2y2, double r2aw, double r2ah)
Replies if two round rectangles are intersecting.- Parameters:
r1x1
- is the first corner of the first rectangle.r1y1
- is the first corner of the first rectangle.r1x2
- is the second corner of the first rectangle.r1y2
- is the second corner of the first rectangle.r1aw
- is the width of the arcs of the first rectangle.r1ah
- is the height of the arcs of the first rectangle.r2x1
- is the first corner of the second rectangle.r2y1
- is the first corner of the second rectangle.r2x2
- is the second corner of the second rectangle.r2y2
- is the second corner of the second rectangle.r2aw
- is the width of the arcs of the second rectangle.r2ah
- is the height of the arcs of the second rectangle.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsRoundRectangleCircle
@Pure static boolean intersectsRoundRectangleCircle(double rx1, double ry1, double rx2, double ry2, double aw, double ah, double cx, double cy, double radius)
Replies if a round rectangle and a circle are intersecting.- Parameters:
rx1
- is the first corner of the rectangle.ry1
- is the first corner of the rectangle.rx2
- is the second corner of the rectangle.ry2
- is the second corner of the rectangle.aw
- is the width of the arcs of the rectangle.ah
- is the height of the arcs of the rectangle.cx
- is the center of the circle.cy
- is the center of the circle.radius
- is the radius of the circle.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsRoundRectangleRectangle
@Pure static boolean intersectsRoundRectangleRectangle(double r1x1, double r1y1, double r1x2, double r1y2, double r1aw, double r1ah, double r2x1, double r2y1, double r2x2, double r2y2)
Replies if a round rectangle and a rectangle are intersecting.- Parameters:
r1x1
- is the first corner of the first rectangle.r1y1
- is the first corner of the first rectangle.r1x2
- is the second corner of the first rectangle.r1y2
- is the second corner of the first rectangle.r1aw
- is the width of the arcs of the first rectangle.r1ah
- is the height of the arcs of the first rectangle.r2x1
- is the first corner of the second rectangle.r2y1
- is the first corner of the second rectangle.r2x2
- is the second corner of the second rectangle.r2y2
- is the second corner of the second rectangle.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsRoundRectangleEllipse
@Pure static boolean intersectsRoundRectangleEllipse(double rx1, double ry1, double rx2, double ry2, double aw, double ah, double ex, double ey, double ew, double eh)
Replies if a round rectangle and an ellipse are intersecting.- Parameters:
rx1
- is the first corner of the rectangle.ry1
- is the first corner of the rectangle.rx2
- is the second corner of the rectangle.ry2
- is the second corner of the rectangle.aw
- is the width of the arcs of the rectangle.ah
- is the height of the arcs of the rectangle.ex
- is the coordinate of the ellipse corner.ey
- is the coordinate of the ellipse corner.ew
- is the width of the ellipse.eh
- is the height of the ellipse.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape2D
Replies this shape is equal to the given shape.- Specified by:
equalsToShape
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is equal is equal to the given path.
-
getArcWidth
@Pure double getArcWidth()
Gets the width of the arc that rounds off the corners.- Returns:
- the width of the arc that rounds off the corners
of this
RoundRectangle2afp
.
-
getArcHeight
@Pure double getArcHeight()
Gets the height of the arc that rounds off the corners.- Returns:
- the height of the arc that rounds off the corners
of this
RoundRectangle2afp
.
-
setArcWidth
void setArcWidth(double arcWidth)
Set the width of the arc that rounds off the corners.- Parameters:
arcWidth
- is the width of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
setArcHeight
void setArcHeight(double arcHeight)
Set the height of the arc that rounds off the corners.- Parameters:
arcHeight
- is the height of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
set
default void set(double x, double y, double width, double height, double arcWidth, double arcHeight)
Change the frame of the rectangle.- Parameters:
x
- new x coordinate of the minimum corner.y
- new y coordinate of the minimum corner.width
- new width of the rectangle.height
- new height of the rectangle.arcWidth
- is the width of the arc that rounds off the corners of thisRoundRectangle2afp
.arcHeight
- is the height of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
set
default void set(IT shape)
Description copied from interface:Shape2D
Set this shape with the attributes of the given shape.- Specified by:
set
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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>>
- Specified by:
set
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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 copy.
-
setFromCorners
void setFromCorners(double x1, double y1, double x2, double y2, double arcWidth, double arcHeight)
Change the frame of the rectangle.- Parameters:
x1
- is the coordinate of the first corner.y1
- is the coordinate of the first corner.x2
- is the coordinate of the second corner.y2
- is the coordinate of the second corner.arcWidth
- is the width of the arc that rounds off the corners of thisRoundRectangle2afp
.arcHeight
- is the height of the arc that rounds off the corners of thisRoundRectangle2afp
.
-
contains
default boolean contains(double x, double y)
Description copied from interface:Shape2afp
Replies if the given point is inside this shape.- Specified by:
contains
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if the given point is inside this shape, otherwisefalse
.
-
contains
default boolean contains(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afp
Replies if the given rectangle is inside this shape.- Specified by:
contains
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if the given rectangle is inside this shape, otherwisefalse
.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point2D<?,?> pt)
Description copied from interface:Shape2D
Replies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquared
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2D
Computes 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:
getDistanceL1
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2D
Computes 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:
getDistanceLinf
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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.
-
intersects
default boolean intersects(Circle2afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given circle.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(Ellipse2afp<?,?,?,?,?,?> ellipse)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given ellipse.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(Parallelogram2afp<?,?,?,?,?,?> oarallelogram)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given parallelogram.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
oarallelogram
- the parallelogram.- Returns:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(Segment2afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given line.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(Triangle2afp<?,?,?,?,?,?> triangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given triangle.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
default boolean intersects(PathIterator2afp<?> iterator)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the shape representing the given path iterator.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given multishape.- Specified by:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
getPathIterator
@Pure default PathIterator2afp<IE> getPathIterator(Transform2D transform)
Description copied from interface:Shape2D
Replies the elements of the paths.- Specified by:
getPathIterator
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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 round rectangle that is replacing the corner arcs by line approximations.- Returns:
- the iterator on the approximation.
- See Also:
Shape2D.getPathIterator()
,GeomConstants.SPLINE_APPROXIMATION_RATIO
-
getClosestPointTo
@Pure default P getClosestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2D
Replies the point on the shape that is closest to the given point.- Specified by:
getClosestPointTo
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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:Shape2afp
Replies 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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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
@Pure default P getFarthestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2D
Replies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointTo
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends RoundRectangle2afp<?,?,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.
-
-