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 class
Circle2ai.AbstractCirclePathIterator<IE extends PathElement2ai>
Abstract iterator on the path elements of the circle.static class
Circle2ai.CirclePathIterator<IE extends PathElement2ai>
Iterator on the path elements of the circle.static class
Circle2ai.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 class
Circle2ai.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 void
clear()
Reset this shape to be equivalent to an just-created instance of this shape type.default boolean
contains(int x, int y)
Replies if the given point is inside this shape.default boolean
contains(Rectangle2ai<?,?,?,?,?,?> box)
Replies if the given rectangle is inside this shape.static boolean
containsCirclePoint(int cx, int cy, int cr, int x, int y)
Replies if the given point is inside the circle.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.default boolean
equalsToShape(IT shape)
Replies this shape is equal to the given shape.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.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.default P
getCenter()
Replies the center.default P
getClosestPointTo(Circle2ai<?,?,?,?,?,?> circle)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Path2ai<?,?,?,?,?,?> path)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Rectangle2ai<?,?,?,?,?,?> rectangle)
Replies the closest point on this shape to the given rectangle.default P
getClosestPointTo(Segment2ai<?,?,?,?,?,?> segment)
Replies the closest point on this shape to the given rectangle.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 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.int
getRadius()
Replies the radius.int
getX()
Replies the center X.int
getY()
Replies the center y.default boolean
intersects(Circle2ai<?,?,?,?,?,?> circle)
Replies if this shape is intersecting the given circle.default boolean
intersects(MultiShape2ai<?,?,?,?,?,?,?> multishape)
Replies if this shape is intersecting the given multishape.default boolean
intersects(PathIterator2ai<?> iterator)
Replies if this shape is intersecting the path described by the given iterator.default boolean
intersects(Rectangle2ai<?,?,?,?,?,?> rectangle)
Replies if this shape is intersecting the given rectangle.default boolean
intersects(Segment2ai<?,?,?,?,?,?> segment)
Replies if this shape is intersecting the given segment.static boolean
intersectsCircleCircle(int x1, int y1, int radius1, int x2, int y2, int radius2)
Replies if two circles are intersecting.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.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.default boolean
isEmpty()
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.void
set(int x, int y, int radius)
Change the circle.default void
set(IT shape)
Set this shape with the attributes of the given shape.default void
set(Point2D<?,?> center, int radius)
Change the circle.default void
setCenter(int x, int y)
Change the circle's center.default void
setCenter(Point2D<?,?> center)
Change the circle's center.void
setRadius(int radius)
Change the radius.void
setX(int x)
Change the center X.void
setY(int y)
Change the center Y.default void
toBoundingBox(B box)
Replies the bounds of the shape.default void
translate(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:
true
if 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:
true
if the point is inside the circle.
-
contains
@Pure default boolean contains(int x, int y)
Description copied from interface:Shape2ai
Replies if the given point is inside this shape.- Specified by:
contains
in 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:
true
if the given point is inside this shape, otherwisefalse
.
-
contains
@Pure default boolean contains(Rectangle2ai<?,?,?,?,?,?> box)
Description copied from interface:Shape2ai
Replies if the given rectangle is inside this shape.- Specified by:
contains
in 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:
true
if 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:
true
if 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:
true
if 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:
true
if 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:
getPointIterator
in 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:Shape2D
Replies this shape is equal to the given shape.- Specified by:
equalsToShape
in 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:
true
if this shape is equal is equal to the given path.
-
clear
default void clear()
Description copied from interface:Shape2D
Reset this shape to be equivalent to an just-created instance of this shape type.
-
isEmpty
@Pure 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 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:
true
if the shape is empty;false
otherwise.
-
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:Shape2D
Set this shape with the attributes of the given shape.- Specified by:
set
in 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:Shape2D
Replies the bounds of the shape.- Specified by:
toBoundingBox
in 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:Shape2D
Replies the squared value of the minimal distance from this shape to the given point.- Specified by:
getDistanceSquared
in 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: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 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: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 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:Shape2D
Replies the point on the shape that is closest to the given point.- Specified by:
getClosestPointTo
in 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:Shape2ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in 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:Shape2ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in 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:Shape2ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in 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:Shape2ai
Replies the closest point on this shape to the given rectangle.- Specified by:
getClosestPointTo
in 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:Shape2D
Replies the point on the shape that is farthest the given point.- Specified by:
getFarthestPointTo
in 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:Shape2ai
Replies if this shape is intersecting the given rectangle.- Specified by:
intersects
in 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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(Circle2ai<?,?,?,?,?,?> circle)
Description copied from interface:Shape2ai
Replies if this shape is intersecting the given circle.- Specified by:
intersects
in 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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(Segment2ai<?,?,?,?,?,?> segment)
Description copied from interface:Shape2ai
Replies if this shape is intersecting the given segment.- Specified by:
intersects
in 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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(PathIterator2ai<?> iterator)
Description copied from interface:Shape2ai
Replies if this shape is intersecting the path described by the given iterator.- Specified by:
intersects
in 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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
intersects
@Pure default boolean intersects(MultiShape2ai<?,?,?,?,?,?,?> multishape)
Description copied from interface:Shape2ai
Replies if this shape is intersecting the given multishape.- Specified by:
intersects
in 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:
true
if this shape is intersecting the given shape;false
if there is no intersection.
-
translate
default void translate(int dx, int dy)
Description copied from interface:Shape2ai
Translate the shape.- Specified by:
translate
in 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:Shape2D
Replies the elements of the paths.- Specified by:
getPathIterator
in 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
-
-