Interface Circle2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,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,Serializable,Shape2ai<ST,IT,IE,P,V,B>,Shape2D<ST,IT,PathIterator2ai<IE>,P,V,B>
- All Known Implementing Classes:
Circle2i,Circle2ifx
public interface Circle2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>> extends Shape2ai<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 classCircle2ai.AbstractCirclePathIterator<IE extends PathElement2ai>Abstract iterator on the path elements of the circle.static classCircle2ai.CirclePathIterator<IE extends PathElement2ai>Iterator on the path elements of the circle.static classCircle2ai.CirclePerimeterIterator<P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>>Iterates on points on the perimeter of a circle.static classCircle2ai.TransformedCirclePathIterator<IE extends PathElement2ai>Iterator on the path elements of the circle.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()Reset this shape to be equivalent to an just-created instance of this shape type.default booleancontains(int x, int y)Replies if the given point is inside this shape.default booleancontains(Rectangle2ai<?,?,?,?,?,?> box)Replies if the given rectangle is inside this shape.static booleancontainsCirclePoint(int cx, int cy, int cr, int x, int y)Replies if the given point is inside the circle.static booleancontainsCircleQuadrantPoint(int cx, int cy, int cr, int quadrant, int x, int y)Replies if the given point is inside the quadrant of the given circle.default booleanequalsToShape(IT shape)Replies this shape is equal to the given shape.static voidfindsClosestPointCirclePoint(int cx, int cy, int cr, int x, int y, Point2D<?,?> result)Replies the closest point in a circle to a point.static voidfindsFarthestPointCirclePoint(int cx, int cy, int cr, int x, int y, Point2D<?,?> result)Replies the farthest point in a circle to a point.default PgetCenter()Replies the center.default PgetClosestPointTo(Circle2ai<?,?,?,?,?,?> circle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Path2ai<?,?,?,?,?,?> path)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Rectangle2ai<?,?,?,?,?,?> rectangle)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Segment2ai<?,?,?,?,?,?> segment)Replies the closest point on this shape to the given rectangle.default PgetClosestPointTo(Point2D<?,?> pt)Replies the point on the shape that is closest to the given point.default doublegetDistanceL1(Point2D<?,?> pt)Computes the L-1 (Manhattan) distance between this shape and point p1.default doublegetDistanceLinf(Point2D<?,?> pt)Computes the L-infinite distance between this shape and point p1.default doublegetDistanceSquared(Point2D<?,?> pt)Replies the squared value of the minimal distance from this shape to the given point.default PgetFarthestPointTo(Point2D<?,?> pt)Replies the point on the shape that is farthest the given point.default PathIterator2ai<IE>getFlatteningPathIterator()Replies a path iterator on this shape that is replacing the curves by line approximations.default PathIterator2ai<IE>getPathIterator(Transform2D transform)Replies the elements of the paths.default Iterator<P>getPointIterator()Replies the points of the circle perimeters starting by the first octant.default Iterator<P>getPointIterator(int firstOctantIndex, int nbOctants)Replies the points of the circle perimeters starting by the first octant.intgetRadius()Replies the radius.intgetX()Replies the center X.intgetY()Replies the center y.default booleanintersects(Circle2ai<?,?,?,?,?,?> circle)Replies if this shape is intersecting the given circle.default booleanintersects(MultiShape2ai<?,?,?,?,?,?,?> multishape)Replies if this shape is intersecting the given multishape.default booleanintersects(PathIterator2ai<?> iterator)Replies if this shape is intersecting the path described by the given iterator.default booleanintersects(Rectangle2ai<?,?,?,?,?,?> rectangle)Replies if this shape is intersecting the given rectangle.default booleanintersects(Segment2ai<?,?,?,?,?,?> segment)Replies if this shape is intersecting the given segment.static booleanintersectsCircleCircle(int x1, int y1, int radius1, int x2, int y2, int radius2)Replies if two circles are intersecting.static booleanintersectsCircleRectangle(int x1, int y1, int radius, int x2, int y2, int x3, int y3)Replies if a circle and a rectangle are intersecting.static booleanintersectsCircleSegment(int x1, int y1, int radius, int x2, int y2, int x3, int y3)Replies if a circle and a segment are intersecting.default booleanisEmpty()Replies if this shape is empty.static <P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>>
Iterator<P>newPointIterator(int cx, int cy, int radius, int firstOctantIndex, int nbOctants, GeomFactory2ai<?,P,V,?> factory)Replies the points of the circle perimeters starting by the first octant.voidset(int x, int y, int radius)Change the circle.default voidset(IT shape)Set this shape with the attributes of the given shape.default voidset(Point2D<?,?> center, int radius)Change the circle.default voidsetCenter(int x, int y)Change the circle's center.default voidsetCenter(Point2D<?,?> center)Change the circle's center.voidsetRadius(int radius)Change the radius.voidsetX(int x)Change the center X.voidsetY(int y)Change the center Y.default voidtoBoundingBox(B box)Replies the bounds of the shape.default voidtranslate(int dx, int dy)Translate the shape.-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.Shape2ai
contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, 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
-
containsCirclePoint
@Pure static boolean containsCirclePoint(int cx, int cy, int cr, int x, int y)Replies if the given point is inside the circle.- Parameters:
cx- is the x-coordinate of the circle centercy- is the y-coordinate of the circle centercr- is the radius of the circle centerx- is the x-coordinate of the pointy- is the y-coordinate of the point- Returns:
trueif the point is inside the circle.
-
containsCircleQuadrantPoint
@Pure static boolean containsCircleQuadrantPoint(int cx, int cy, int cr, int quadrant, int x, int y)Replies if the given point is inside the quadrant of the given circle.quadrant x y 0 ≥cx ≥cy 1 ≥cx <cy 2 <cx ≥cy 3 <cx <cy - Parameters:
cx- is the x-coordinate of the circle centercy- is the y-coordinate of the circle centercr- is the radius of the circle centerquadrant- is the quadrant, see table in the method description.x- is the x-coordinate of the pointy- is the y-coordinate of the point- Returns:
trueif the point is inside the circle.
-
contains
@Pure default boolean contains(int x, int y)Description copied from interface:Shape2aiReplies if the given point is inside this shape.- Specified by:
containsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
x- x coordinate of the point to test.y- y coordinate of the point to test.- Returns:
trueif the given point is inside this shape, otherwisefalse.
-
contains
@Pure default boolean contains(Rectangle2ai<?,?,?,?,?,?> box)
Description copied from interface:Shape2aiReplies if the given rectangle is inside this shape.- Specified by:
containsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
box- the rectangle to test.- Returns:
trueif the given box is inside the shape.
-
findsClosestPointCirclePoint
static void findsClosestPointCirclePoint(int cx, int cy, int cr, int x, int y, Point2D<?,?> result)Replies the closest point in a circle to a point.The closest point is the point on the perimeter or inside the circle's disk that has the lowest Manhatan distance to the given origin point.
- Parameters:
cx- is the center of the circlecy- is the center of the circlecr- is the radius of the circlex- is the pointy- is the pointresult- the closest point in the circle to the point.
-
findsFarthestPointCirclePoint
static void findsFarthestPointCirclePoint(int cx, int cy, int cr, int x, int y, Point2D<?,?> result)Replies the farthest point in a circle to a point.The farthest point is the point on the perimeter of the circle that has the highest Manhatan distance to the given origin point.
- Parameters:
cx- is the center of the circlecy- is the center of the circlecr- is the radius of the circlex- is the pointy- is the pointresult- the farthest point in the circle to the point.
-
intersectsCircleCircle
@Pure static boolean intersectsCircleCircle(int x1, int y1, int radius1, int x2, int y2, int 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:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsCircleRectangle
@Pure static boolean intersectsCircleRectangle(int x1, int y1, int radius, int x2, int y2, int x3, int 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:
trueif the two shapes are intersecting; otherwisefalse
-
intersectsCircleSegment
@Pure static boolean intersectsCircleSegment(int x1, int y1, int radius, int x2, int y2, int x3, int 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:
trueif the two shapes are intersecting; otherwisefalse
-
newPointIterator
@Pure static <P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>> Iterator<P> newPointIterator(int cx, int cy, int radius, int firstOctantIndex, int nbOctants, GeomFactory2ai<?,P,V,?> factory)
Replies the points of the circle perimeters starting by the first octant.- Type Parameters:
P- the type of the points.V- the type of the vectors.- Parameters:
cx- is the center of the radius.cy- is the center of the radius.radius- is the radius of the radius.firstOctantIndex- is the index of the first octant to treat (value in [0;7].nbOctants- is the number of octants to traverse (value in [0; 7 - firstOctantIndex].factory- the factory to use for creating the points.- Returns:
- the points on the perimeters.
-
getPointIterator
@Pure default Iterator<P> getPointIterator(int firstOctantIndex, int nbOctants)
Replies the points of the circle perimeters starting by the first octant.- Parameters:
firstOctantIndex- is the index of the first octant (see figure) to treat.nbOctants- is the number of octants to traverse (greater than zero).- Returns:
- the points on the perimeters.
-
getPointIterator
@Pure default Iterator<P> getPointIterator()
Replies the points of the circle perimeters starting by the first octant.- Specified by:
getPointIteratorin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Returns:
- the points on the perimeters.
-
equalsToShape
@Pure default boolean equalsToShape(IT shape)
Description copied from interface:Shape2DReplies this shape is equal to the given shape.- Specified by:
equalsToShapein interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
shape- the shape to compare to.- Returns:
trueif this shape is equal is equal to the given path.
-
clear
default void clear()
Description copied from interface:Shape2DReset this shape to be equivalent to an just-created instance of this shape type.
-
isEmpty
@Pure default boolean isEmpty()
Description copied from interface:Shape2DReplies if this shape is empty. The semantic associated to the state "empty" depends on the implemented shape. See the subclasses for details.- Specified by:
isEmptyin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Returns:
trueif the shape is empty;falseotherwise.
-
set
void set(int x, int y, int radius)Change the circle.- Parameters:
x- the x coordinate of the center.y- the y coordinate of the center.radius- the radiusof the center.
-
set
default void set(IT shape)
Description copied from interface:Shape2DSet this shape with the attributes of the given shape.- Specified by:
setin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
shape- the shape to copy.
-
set
default void set(Point2D<?,?> center, int radius)
Change the circle.- Parameters:
center- the center of the circle.radius- the radius of the circle.
-
setCenter
default void setCenter(Point2D<?,?> center)
Change the circle's center.- Parameters:
center- the center of the circle.
-
setCenter
default void setCenter(int x, int y)Change the circle's center.- Parameters:
x- x coordinate of the center of the circle.y- y coordinate of the center of the circle.
-
getX
@Pure int getX()
Replies the center X.- Returns:
- the center x.
-
setX
@Pure void setX(int x)
Change the center X.- Parameters:
x- the center x.
-
getY
@Pure int getY()
Replies the center y.- Returns:
- the center y.
-
setY
@Pure void setY(int y)
Change the center Y.- Parameters:
y- the center y.
-
getCenter
@Pure default P getCenter()
Replies the center.- Returns:
- a copy of the center.
-
getRadius
@Pure int getRadius()
Replies the radius.- Returns:
- the radius.
-
setRadius
@Pure void setRadius(int radius)
Change the radius.- Parameters:
radius- the radius.
-
toBoundingBox
@Pure default void toBoundingBox(B box)
Description copied from interface:Shape2DReplies the bounds of the shape.- Specified by:
toBoundingBoxin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
box- is set with the bounds of the shape.
-
getDistanceSquared
@Pure default double getDistanceSquared(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquaredin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- squared value of the minimal distance between this shape and the point.
-
getDistanceL1
@Pure default double getDistanceL1(Point2D<?,?> pt)
Description copied from interface:Shape2DComputes the L-1 (Manhattan) distance between this shape and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).- Specified by:
getDistanceL1in interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
getDistanceLinf
@Pure default double getDistanceLinf(Point2D<?,?> pt)
Description copied from interface:Shape2DComputes the L-infinite distance between this shape and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].- Specified by:
getDistanceLinfin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
pt- the point- Returns:
- the distance.
-
getClosestPointTo
@Pure default P getClosestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the point on the shape that is closest to the given point.- Specified by:
getClosestPointToin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,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(Rectangle2ai<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Circle2ai<?,?,?,?,?,?> circle)
Description copied from interface:Shape2aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
circle- the circle.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Segment2ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape2aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
segment- the segment.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getClosestPointTo
default P getClosestPointTo(Path2ai<?,?,?,?,?,?> path)
Description copied from interface:Shape2aiReplies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointToin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
path- the path.- Returns:
- the closest point on this shape to the given shape; or the point if the point is in this shape.
-
getFarthestPointTo
@Pure default P getFarthestPointTo(Point2D<?,?> pt)
Description copied from interface:Shape2DReplies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointToin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
pt- the point.- Returns:
- the farthest point on the shape.
-
intersects
@Pure default boolean intersects(Rectangle2ai<?,?,?,?,?,?> rectangle)
Description copied from interface:Shape2aiReplies if this shape is intersecting the given rectangle.- Specified by:
intersectsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
rectangle- the rectangle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Circle2ai<?,?,?,?,?,?> circle)
Description copied from interface:Shape2aiReplies if this shape is intersecting the given circle.- Specified by:
intersectsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
circle- the circle.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(Segment2ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape2aiReplies if this shape is intersecting the given segment.- Specified by:
intersectsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
segment- the segment.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(PathIterator2ai<?> iterator)
Description copied from interface:Shape2aiReplies if this shape is intersecting the path described by the given iterator.- Specified by:
intersectsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
iterator- the path iterator.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape2ai<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2aiReplies if this shape is intersecting the given multishape.- Specified by:
intersectsin interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
multishape- the multishape.- Returns:
trueif this shape is intersecting the given shape;falseif there is no intersection.
-
translate
default void translate(int dx, int dy)Description copied from interface:Shape2aiTranslate the shape.- Specified by:
translatein interfaceShape2ai<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
dx- x translation.dy- y translation.
-
getPathIterator
@Pure default PathIterator2ai<IE> getPathIterator(Transform2D transform)
Description copied from interface:Shape2DReplies the elements of the paths.- Specified by:
getPathIteratorin interfaceShape2D<ST extends Shape2ai<?,?,IE,P,V,B>,IT extends Circle2ai<?,?,IE,P,V,B>,IE extends PathElement2ai,P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>,B extends Rectangle2ai<?,?,IE,P,V,B>>- Parameters:
transform- is the transformation to apply to the path.- Returns:
- the elements of the path.
-
getFlatteningPathIterator
@Pure default PathIterator2ai<IE> getFlatteningPathIterator()
Replies a path iterator on this shape that is replacing the curves by line approximations.- Returns:
- the iterator on the approximation.
- See Also:
Shape2D.getPathIterator(),GeomConstants.SPLINE_APPROXIMATION_RATIO
-
-