Interface Circle2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
,Ellipse2afp<ST,IT,IE,P,V,B>
,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:
Circle2d
,Circle2dfx
public interface Circle2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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 Ellipse2afp<ST,IT,IE,P,V,B>
Fonctional interface that represented a 2D circle on a plane.- Since:
- 13.0
- 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
Circle2afp.AbstractCirclePathIterator<T extends PathElement2afp>
Abstract iterator on the path elements of the circle.static class
Circle2afp.CirclePathIterator<T extends PathElement2afp>
Iterator on the path elements of the circle.static class
Circle2afp.TransformedCirclePathIterator<T extends PathElement2afp>
Iterator on the path elements of the circle.-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.afp.Ellipse2afp
Ellipse2afp.AbstractEllipsePathIterator<T extends PathElement2afp>, Ellipse2afp.EllipsePathIterator<T extends PathElement2afp>, Ellipse2afp.PrivateAPI, Ellipse2afp.TransformedEllipsePathIterator<T extends PathElement2afp>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
clear()
Reset this shape to be equivalent to an just-created instance of this shape type.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
containsCirclePoint(double cx, double cy, double radius, double px, double py)
Replies if the given point is inside the given ellipse.static boolean
containsCircleRectangle(double cx, double cy, double radius, double rxmin, double rymin, double rxmax, double rymax)
Replies if a rectangle is inside in the circle.default boolean
equalsToShape(IT shape)
Replies this shape is equal to the given shape.default P
getCenter()
Replies the center.default double
getCenterX()
Replies the center x.default double
getCenterY()
Replies the center y.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(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Replies the closest point on this shape to the given multishape.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
getDistance(Point2D<?,?> pt)
Replies the minimal distance from this shape 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 double
getHorizontalRadius()
Replies the horizontal radius of the ellipse.default double
getMaxX()
Replies the max x.default double
getMaxY()
Replies the max y.default double
getMinX()
Replies the min X.default double
getMinY()
Replies the min y.default PathIterator2afp<IE>
getPathIterator(Transform2D transform)
Replies the elements of the paths.double
getRadius()
Replies the radius.default double
getVerticalRadius()
Replies the vertical radius of the ellipse.double
getX()
Replies the center X.double
getY()
Replies the center y.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<?,?,?,?,?,?> parallelogram)
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
intersectsCircleCircle(double x1, double y1, double radius1, double x2, double y2, double radius2)
Replies if two circles are intersecting.static boolean
intersectsCircleLine(double x1, double y1, double radius, double x2, double y2, double x3, double y3)
Replies if a circle and a line are intersecting.static boolean
intersectsCircleRectangle(double x1, double y1, double radius, double x2, double y2, double x3, double y3)
Replies if a circle and a rectangle are intersecting.static boolean
intersectsCircleSegment(double x1, double y1, double radius, double x2, double y2, double x3, double y3)
Replies if a circle and a segment are intersecting.default boolean
isEmpty()
Replies if this shape is empty.void
set(double x, double y, double radius)
Change the frame of the circle.default void
set(IT shape)
Set this shape with the attributes of the given shape.default void
set(Point2D<?,?> center, double radius)
Change the frame of the circle.default void
setCenter(double x, double y)
Change the center.default void
setCenter(Point2D<?,?> center)
Change the center.default void
setFromCenter(double centerX, double centerY, double cornerX, double cornerY)
Sets the framing rectangle of thisShape
based on the specified center point coordinates and corner point coordinates.default void
setFromCorners(double x1, double y1, double x2, double y2)
Change the frame of the rectangle conserving previous min and max if needed.default void
setMaxX(double x)
Set the max X conserving previous max if needed.default void
setMaxY(double y)
Set the max Y conserving previous max if needed.default void
setMinX(double x)
Set the min X conserving previous min if needed.default void
setMinY(double y)
Set the min Y conserving previous min if needed.void
setRadius(double radius)
Set the radius.void
setX(double x)
Change the x coordinate of the center.void
setY(double y)
Change the y coordinate of the center.default void
toBoundingBox(B box)
Replies the bounds of the shape.default void
translate(double dx, double dy)
Translate the shape.-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Ellipse2afp
getFlatteningPathIterator, getMaxFocusPoint, getMinFocusPoint
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.RectangularShape2afp
getHeight, getWidth, inflate, set, set, setFromCenter, setFromCorners, setHeight, setWidth
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Shape2afp
contains, contains, createTransformedShape, 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, getPathIterator, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo
-
-
-
-
Method Detail
-
containsCirclePoint
@Pure static boolean containsCirclePoint(double cx, double cy, double radius, double px, double py)
Replies if the given point is inside the given ellipse.- Parameters:
px
- is the point to test.py
- is the point to test.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 point is inside the circle;false
if not.
-
containsCircleRectangle
@Pure static boolean containsCircleRectangle(double cx, double cy, double radius, double rxmin, double rymin, double rxmax, double rymax)
Replies if a rectangle is inside in the circle.- Parameters:
cx
- is the center of the circle.cy
- is the center of the circle.radius
- is the radius of the circle.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:
true
if the given rectangle is inside the circle; otherwisefalse
.
-
intersectsCircleCircle
@Pure static boolean intersectsCircleCircle(double x1, double y1, double radius1, double x2, double y2, double radius2)
Replies if two circles are intersecting.- Parameters:
x1
- is the center of the first circley1
- is the center of the first circleradius1
- is the radius of the first circlex2
- is the center of the second circley2
- is the center of the second circleradius2
- is the radius of the second circle- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsCircleRectangle
@Pure static boolean intersectsCircleRectangle(double x1, double y1, double radius, double x2, double y2, double x3, double y3)
Replies if a circle and a rectangle are intersecting.- Parameters:
x1
- is the center of the circley1
- is the center of the circleradius
- is the radius of the circlex2
- is the first corner of the rectangle.y2
- is the first corner of the rectangle.x3
- is the second corner of the rectangle.y3
- is the second corner of the rectangle.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsCircleLine
@Pure static boolean intersectsCircleLine(double x1, double y1, double radius, double x2, double y2, double x3, double y3)
Replies if a circle and a line are intersecting.- Parameters:
x1
- is the center of the circley1
- is the center of the circleradius
- is the radius of the circlex2
- is the first point of the line.y2
- is the first point of the line.x3
- is the second point of the line.y3
- is the second point of the line.- Returns:
true
if the two shapes are intersecting; otherwisefalse
-
intersectsCircleSegment
@Pure static boolean intersectsCircleSegment(double x1, double y1, double radius, double x2, double y2, double x3, double y3)
Replies if a circle and a segment are intersecting.- Parameters:
x1
- is the center of the circley1
- is the center of the circleradius
- is the radius of the circlex2
- is the first point of the segment.y2
- is the first point of the segment.x3
- is the second point of the segment.y3
- is the second point of the segment.- 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
equalsToShape
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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.
-
getX
@Pure double getX()
Replies the center X.- Returns:
- the center x.
-
getY
@Pure double getY()
Replies the center y.- Returns:
- the center y.
-
getCenterX
@Pure default double getCenterX()
Description copied from interface:RectangularShape2afp
Replies the center x.- Specified by:
getCenterX
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the center x.
-
getCenterY
@Pure default double getCenterY()
Description copied from interface:RectangularShape2afp
Replies the center y.- Specified by:
getCenterY
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the center y.
-
getCenter
@Pure default P getCenter()
Description copied from interface:RectangularShape2afp
Replies the center.- Specified by:
getCenter
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the center.
-
setCenter
default void setCenter(Point2D<?,?> center)
Change the center.- Parameters:
center
- the center point.
-
setCenter
default void setCenter(double x, double y)
Change the center.- Parameters:
x
- x coordinate of the center point.y
- y coordinate of the center point.
-
setX
void setX(double x)
Change the x coordinate of the center.- Parameters:
x
- x coordinate of the center point.
-
setY
void setY(double y)
Change the y coordinate of the center.- Parameters:
y
- y coordinate of the center point.
-
getRadius
@Pure double getRadius()
Replies the radius.- Returns:
- the radius.
-
setRadius
void setRadius(double radius)
Set the radius.- Parameters:
radius
- is the radius.
-
set
void set(double x, double y, double radius)
Change the frame of the circle.- Parameters:
x
- x coordinate of the center point.y
- y coordinate of the center point.radius
- the radius.
-
set
default void set(Point2D<?,?> center, double radius)
Change the frame of the circle.- Parameters:
center
- the center point.radius
- the radius.
-
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 Circle2afp<?,?,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 Circle2afp<?,?,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.
-
clear
default void clear()
Description copied from interface:Shape2D
Reset this shape to be equivalent to an just-created instance of this shape type.- Specified by:
clear
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
clear
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
-
toBoundingBox
default void toBoundingBox(B box)
Description copied from interface:Shape2D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
toBoundingBox
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
box
- is set with the bounds of the shape.
-
isEmpty
default boolean isEmpty()
Description copied from interface:Shape2D
Replies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmpty
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
isEmpty
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
true
if the shape is empty;false
otherwise.
-
getDistance
@Pure default double getDistance(Point2D<?,?> pt)
Description copied from interface:Shape2D
Replies the minimal distance from this shape to the given point.- Specified by:
getDistance
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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 minimal distance between this shape and the point.
-
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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getDistanceSquared
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getDistanceL1
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getDistanceLinf
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:Shape2afp
Replies if the given point is inside this shape.- Specified by:
contains
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
contains
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
contains
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
.
-
translate
default void translate(double dx, double dy)
Description copied from interface:Shape2afp
Translate the shape.- Specified by:
translate
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
translate
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
dx
- x translation.dy
- y translation.
-
intersects
@Pure default boolean intersects(Rectangle2afp<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(Ellipse2afp<?,?,?,?,?,?> ellipse)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given ellipse.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(Circle2afp<?,?,?,?,?,?> circle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given circle.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(Triangle2afp<?,?,?,?,?,?> triangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given triangle.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(Segment2afp<?,?,?,?,?,?> segment)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given line.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(OrientedRectangle2afp<?,?,?,?,?,?> orientedRectangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(Parallelogram2afp<?,?,?,?,?,?> parallelogram)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given parallelogram.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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(RoundRectangle2afp<?,?,?,?,?,?> roundRectangle)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default boolean intersects(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2afp
Replies if this shape is intersecting the given multishape.- Specified by:
intersects
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
intersects
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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.
-
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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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.
-
getClosestPointTo
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getClosestPointTo
in interfaceShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
@Pure default P getClosestPointTo(MultiShape2afp<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2afp
Replies the closest point on this shape to the given multishape.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 Circle2afp<?,?,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:
- 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 interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getFarthestPointTo
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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.
-
getPathIterator
@Pure default PathIterator2afp<IE> getPathIterator(Transform2D transform)
Description copied from interface:Shape2D
Replies the elements of the paths.- Specified by:
getPathIterator
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
getPathIterator
in interfaceShape2D<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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.
-
getHorizontalRadius
@Pure default double getHorizontalRadius()
Description copied from interface:Ellipse2afp
Replies the horizontal radius of the ellipse.- Specified by:
getHorizontalRadius
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the horizontal radius.
-
getVerticalRadius
@Pure default double getVerticalRadius()
Description copied from interface:Ellipse2afp
Replies the vertical radius of the ellipse.- Specified by:
getVerticalRadius
in interfaceEllipse2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the vertical radius.
-
setFromCenter
default void setFromCenter(double centerX, double centerY, double cornerX, double cornerY)
Sets the framing rectangle of thisShape
based on the specified center point coordinates and corner point coordinates. The framing rectangle is used by the subclasses ofRectangularShape
to define their geometry.The circle is set in order to be enclosed inside the given box. It means that the center of the circle is the center of the box, and the radius of the circle is the minimum of the demi-width and demi-height.
- Specified by:
setFromCenter
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
centerX
- the X coordinate of the specified center pointcenterY
- the Y coordinate of the specified center pointcornerX
- the X coordinate of the specified corner pointcornerY
- the Y coordinate of the specified corner point
-
setFromCorners
default void setFromCorners(double x1, double y1, double x2, double y2)
Change the frame of the rectangle conserving previous min and max if needed.The circle is set in order to be enclosed inside the given box. It means that the center of the circle is the center of the box, and the radius of the circle is the minimum of the demi-width and demi-height.
- Specified by:
setFromCorners
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
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.
-
getMinX
default double getMinX()
Description copied from interface:RectangularShape2afp
Replies the min X.- Specified by:
getMinX
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the min x.
-
setMinX
default void setMinX(double x)
Set the min X conserving previous min if needed.Assuming that the maximum X coordinate should not change, the center of the circle is the point between the new minimum and the current maximum coordinates, and the radius of the circle is set to the difference between the new minimum and center coordinates.
If the new minimum is greater than the current maximum, the coordinates are automatically swapped.
- Specified by:
setMinX
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
- the min x.
-
getMaxX
default double getMaxX()
Description copied from interface:RectangularShape2afp
Replies the max x.- Specified by:
getMaxX
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the max x.
-
setMaxX
default void setMaxX(double x)
Set the max X conserving previous max if needed.Assuming that the minimum X coordinate should not change, the center of the circle is the point between the new maximum and the current minimum coordinates, and the radius of the circle is set to the difference between the new maximum and center coordinates.
If the new maximum is lower than the current minimum, the coordinates are automatically swapped.
- Specified by:
setMaxX
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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
- the max x.
-
getMinY
default double getMinY()
Description copied from interface:RectangularShape2afp
Replies the min y.- Specified by:
getMinY
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the min y.
-
setMinY
default void setMinY(double y)
Set the min Y conserving previous min if needed.Assuming that the maximum Y coordinate should not change, the center of the circle is the point between the new minimum and the current maximum coordinates, and the radius of the circle is set to the difference between the new minimum and center coordinates.
If the new minimum is greater than the current maximum, the coordinates are automatically swapped.
- Specified by:
setMinY
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
y
- the min y.
-
getMaxY
default double getMaxY()
Description copied from interface:RectangularShape2afp
Replies the max y.- Specified by:
getMaxY
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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>>
- Returns:
- the max y.
-
setMaxY
default void setMaxY(double y)
Set the max Y conserving previous max if needed.Assuming that the minimum Y coordinate should not change, the center of the circle is the point between the new maximum and the current minimum coordinates, and the radius of the circle is set to the difference between the new maximum and center coordinates.
If the new maximum is lower than the current minimum, the coordinates are automatically swapped.
- Specified by:
setMaxY
in interfaceRectangularShape2afp<ST extends Shape2afp<?,?,IE,P,V,B>,IT extends Circle2afp<?,?,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:
y
- the max y.
-
-