com.croftsoft.core.math.geom
Class Circle

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Ellipse2D
          extended by java.awt.geom.Ellipse2D.Double
              extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Ellipse2D
Ellipse2D.Double, Ellipse2D.Float
 
Field Summary
 
Fields inherited from class java.awt.geom.Ellipse2D.Double
height, width, x, y
 
Constructor Summary
Circle()
           
Circle(CircleAccessor circleAccessor)
           
Circle(double centerX, double centerY, double radius)
           
 
Method Summary
 boolean contains(double x, double y)
           
 PointXY getCenter()
           
 double getCenterX()
           
 double getCenterY()
           
 double getRadius()
           
 boolean intersectsCircle(CircleAccessor circleAccessor)
           
 boolean intersectsShape(Shape shape)
           
 void setCenter(double centerX, double centerY)
           
 void setCenter(PointXY pointXY)
           
 void setRadius(double radius)
           
 String toString()
           
 
Methods inherited from class java.awt.geom.Ellipse2D.Double
getBounds2D, getHeight, getWidth, getX, getY, isEmpty, setFrame
 
Methods inherited from class java.awt.geom.Ellipse2D
contains, equals, getPathIterator, hashCode, intersects
 
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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, intersects, intersects
 

Constructor Detail

Circle

public Circle(double centerX,
              double centerY,
              double radius)

Circle

public Circle(CircleAccessor circleAccessor)

Circle

public Circle()
Method Detail

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 Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)