com.croftsoft.core.math.geom
Class Circle
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Ellipse2D
java.awt.geom.Ellipse2D.Double
com.croftsoft.core.math.geom.Circle
- All Implemented Interfaces:
- CircleAccessor, Shape, Serializable, Cloneable
public class Circle
- extends Ellipse2D.Double
- implements CircleAccessor, Serializable
A circle Shape.
Currently extends Ellipse2D.Double as an implementation convenience
but this may change in the future.
- Since:
- 2003-04-13
- Version:
- 2003-05-13
- See Also:
- Serialized Form
- Author:
- David Wallace Croft
Methods inherited from class java.awt.geom.RectangularShape |
clone, contains, contains, getBounds, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Circle
public Circle(double centerX,
double centerY,
double radius)
Circle
public Circle(CircleAccessor circleAccessor)
Circle
public Circle()
getCenter
public PointXY getCenter()
- Specified by:
getCenter
in interface CircleAccessor
getCenterX
public double getCenterX()
- Specified by:
getCenterX
in interface CircleAccessor
- Overrides:
getCenterX
in class RectangularShape
getCenterY
public double getCenterY()
- Specified by:
getCenterY
in interface CircleAccessor
- Overrides:
getCenterY
in class RectangularShape
getRadius
public double getRadius()
- Specified by:
getRadius
in interface CircleAccessor
setCenter
public void setCenter(double centerX,
double centerY)
setCenter
public void setCenter(PointXY pointXY)
setRadius
public void setRadius(double radius)
contains
public boolean contains(double x,
double y)
- Specified by:
contains
in interface Shape
- Overrides:
contains
in class Ellipse2D
intersectsCircle
public boolean intersectsCircle(CircleAccessor circleAccessor)
- Specified by:
intersectsCircle
in interface CircleAccessor
intersectsShape
public boolean intersectsShape(Shape shape)
- Specified by:
intersectsShape
in interface CircleAccessor
toString
public String toString()
- Overrides:
toString
in class Object
CroftSoft Core Javadoc (2008-09-28 20:58:02)