- 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 doublegetRadius()Replies the radius.doublegetX()Replies the center X.doublegetY()Replies the center y.inthashCode()voidset(double x, double y, double radius)Change the frame of the circle.voidsetRadius(double radius)Set the radius.voidsetX(double x)Change the x coordinate of the center.voidsetY(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:
hashCodein classAbstractShape2d<Circle2d>
-
getX
@Pure public double getX()
Description copied from interface:Circle2afpReplies the center X.- Specified by:
getXin interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>- Returns:
- the center x.
-
getY
@Pure public double getY()
Description copied from interface:Circle2afpReplies the center y.- Specified by:
getYin interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>- Returns:
- the center y.
-
setX
public void setX(double x)
Description copied from interface:Circle2afpChange the x coordinate of the center.- Specified by:
setXin 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:Circle2afpChange the y coordinate of the center.- Specified by:
setYin interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>- Parameters:
y- y coordinate of the center point.
-
getRadius
@Pure public double getRadius()
Description copied from interface:Circle2afpReplies the radius.- Specified by:
getRadiusin interfaceCircle2afp<Shape2d<?>,Circle2d,PathElement2d,Point2d,Vector2d,Rectangle2d>- Returns:
- the radius.
-
setRadius
public void setRadius(double radius)
Description copied from interface:Circle2afpSet the radius.- Specified by:
setRadiusin 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:Circle2afpChange the frame of the circle.- Specified by:
setin 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.
-
-