- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.i.AbstractShape2i<Circle2i>
-
- org.arakhne.afc.math.geometry.d2.i.Circle2i
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Circle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
,Shape2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
,Shape2i<Circle2i>
,Shape2D<Shape2i<?>,Circle2i,PathIterator2ai<PathElement2i>,Point2i,Vector2i,Rectangle2i>
,JsonableObject
public class Circle2i extends AbstractShape2i<Circle2i> implements Circle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
A circle with 2 integer numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.arakhne.afc.math.geometry.d2.ai.Circle2ai
Circle2ai.AbstractCirclePathIterator<IE extends PathElement2ai>, Circle2ai.CirclePathIterator<IE extends PathElement2ai>, Circle2ai.CirclePerimeterIterator<P extends Point2D<? super P,? super V>,V extends Vector2D<? super V,? super P>>, Circle2ai.TransformedCirclePathIterator<IE extends PathElement2ai>
-
-
Constructor Summary
Constructors Constructor Description Circle2i()
Construct an empty circle.Circle2i(int x, int y, int radius)
Construct a circle at the given position and with the given radius.Circle2i(Circle2ai<?,?,?,?,?,?> circle)
Construct a circle from a circle.Circle2i(Point2D<?,?> center, int radius)
Construct a circle at the given position and with the given radius.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getRadius()
Replies the radius.int
getX()
Replies the center X.int
getY()
Replies the center y.int
hashCode()
void
set(int x, int y, int radius)
Change the circle.void
setRadius(int radius)
Change the radius.void
setX(int x)
Change the center X.void
setY(int y)
Change the center Y.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.i.AbstractShape2i
addShapeGeometryChangeListener, clone, equals, fireGeometryChange, getGeomFactory, removeShapeGeometryChangeListener, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.ai.Circle2ai
clear, contains, contains, equalsToShape, getCenter, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getFlatteningPathIterator, getPathIterator, getPointIterator, getPointIterator, intersects, intersects, intersects, intersects, intersects, isEmpty, set, set, setCenter, setCenter, toBoundingBox, translate
-
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
-
-
-
-
Constructor Detail
-
Circle2i
public Circle2i()
Construct an empty circle.
-
Circle2i
public Circle2i(Point2D<?,?> center, int radius)
Construct a circle at the given position and with the given radius.- Parameters:
center
- the center position of the circle.radius
- the radius of the circle.
-
Circle2i
public Circle2i(int x, int y, int radius)
Construct a circle at the given position and with the given radius.- Parameters:
x
- x coordinat eof the the center position of the circle.y
- y coordinat eof the the center position of the circle.radius
- the radius of the circle.
-
Circle2i
public Circle2i(Circle2ai<?,?,?,?,?,?> circle)
Construct a circle from a circle.- Parameters:
circle
- the circle to copy.
-
-
Method Detail
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape2i<Circle2i>
-
getX
@Pure public int getX()
Description copied from interface:Circle2ai
Replies the center X.- Specified by:
getX
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Returns:
- the center x.
-
getY
@Pure public int getY()
Description copied from interface:Circle2ai
Replies the center y.- Specified by:
getY
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Returns:
- the center y.
-
setX
public void setX(int x)
Description copied from interface:Circle2ai
Change the center X.- Specified by:
setX
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Parameters:
x
- the center x.
-
setY
public void setY(int y)
Description copied from interface:Circle2ai
Change the center Y.- Specified by:
setY
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Parameters:
y
- the center y.
-
getRadius
@Pure public int getRadius()
Description copied from interface:Circle2ai
Replies the radius.- Specified by:
getRadius
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Returns:
- the radius.
-
setRadius
public void setRadius(int radius)
Description copied from interface:Circle2ai
Change the radius.- Specified by:
setRadius
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Parameters:
radius
- the radius.
-
set
public void set(int x, int y, int radius)
Description copied from interface:Circle2ai
Change the circle.- Specified by:
set
in interfaceCircle2ai<Shape2i<?>,Circle2i,PathElement2i,Point2i,Vector2i,Rectangle2i>
- Parameters:
x
- the x coordinate of the center.y
- the y coordinate of the center.radius
- the radiusof the center.
-
-