- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.d.AbstractShape2d<Circle2d>
-
- org.arakhne.afc.math.geometry.d2.d.Circle2d
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Circle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
,Ellipse2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
,RectangularShape2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
,Shape2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
,Shape2d<Circle2d>
,Shape2D<Shape2d<?>,Circle2d,PathIterator2afp<PathElement2d>,Point2d,Vector2d,Rectangle2d>
,JsonableObject
public class Circle2d extends AbstractShape2d<Circle2d> implements Circle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
A circle with 2 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND, Hamza JAFFALI
- 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.afp.Circle2afp
Circle2afp.AbstractCirclePathIterator<T extends PathElement2afp>, Circle2afp.CirclePathIterator<T extends PathElement2afp>, Circle2afp.TransformedCirclePathIterator<T extends PathElement2afp>
-
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>
-
-
Constructor Summary
Constructors Constructor Description Circle2d()
Construct an empty circle.Circle2d(double x, double y, double radius)
Construct a circle at the given position, and with the given radius.Circle2d(Circle2afp<?,?,?,?,?,?> circle)
Construct a circle from a circle.Circle2d(Point2D<?,?> center, double 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 double
getRadius()
Replies the radius.double
getX()
Replies the center X.double
getY()
Replies the center y.int
hashCode()
void
set(double x, double y, double radius)
Change the frame of the circle.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.-
Methods inherited from class org.arakhne.afc.math.geometry.d2.d.AbstractShape2d
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.afp.Circle2afp
clear, contains, contains, equalsToShape, getCenter, getCenterX, getCenterY, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getHorizontalRadius, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, getVerticalRadius, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, isEmpty, set, set, setCenter, setCenter, setFromCenter, setFromCorners, setMaxX, setMaxY, setMinX, setMinY, toBoundingBox, translate
-
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
-
-
-
-
Constructor Detail
-
Circle2d
public Circle2d()
Construct an empty circle.
-
Circle2d
public Circle2d(Point2D<?,?> center, double radius)
Construct a circle at the given position, and with the given radius.- Parameters:
center
- the center of the circle.radius
- the radius of the circle.
-
Circle2d
public Circle2d(double x, double y, double radius)
Construct a circle at the given position, and with the given radius.- Parameters:
x
- x coordinate of the center of the circle.y
- y coordinate of the center of the circle.radius
- the radius of the circle.
-
Circle2d
public Circle2d(Circle2afp<?,?,?,?,?,?> circle)
Construct a circle from a circle.- Parameters:
circle
- the circle to copy.
-
-
Method Detail
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCode
in classAbstractShape2d<Circle2d>
-
getX
@Pure public double getX()
Description copied from interface:Circle2afp
Replies the center X.- Specified by:
getX
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Returns:
- the center x.
-
getY
@Pure public double getY()
Description copied from interface:Circle2afp
Replies the center y.- Specified by:
getY
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Returns:
- the center y.
-
setX
public void setX(double x)
Description copied from interface:Circle2afp
Change the x coordinate of the center.- Specified by:
setX
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Parameters:
x
- x coordinate of the center point.
-
setY
public void setY(double y)
Description copied from interface:Circle2afp
Change the y coordinate of the center.- Specified by:
setY
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Parameters:
y
- y coordinate of the center point.
-
getRadius
@Pure public double getRadius()
Description copied from interface:Circle2afp
Replies the radius.- Specified by:
getRadius
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Returns:
- the radius.
-
setRadius
public void setRadius(double radius)
Description copied from interface:Circle2afp
Set the radius.- Specified by:
setRadius
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Parameters:
radius
- is the radius.
-
set
public void set(double x, double y, double radius)
Description copied from interface:Circle2afp
Change the frame of the circle.- Specified by:
set
in interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>
- Parameters:
x
- x coordinate of the center point.y
- y coordinate of the center point.radius
- the radius.
-
-