| Constructor and Description |
|---|
XyCircle(double centerX,
double centerY,
double radius)
Create a new circle with the given center and radius.
|
XyCircle(XyPoint center,
double radius)
Create a new circle with the given center and radius.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(XyPoint point)
Tests if a point is inside this area.
|
boolean |
equals(java.lang.Object nother) |
static XyCircle |
forThreePoints(XyPoint p1,
XyPoint p2,
XyPoint p3)
Calculates the circle that intersects the given three points.
|
double |
getArea()
Returns the 2-dimensional area covered by this...
|
XyBounds |
getBounds()
Returns an XyBounds object representing the rectangular extents of this
shape.
|
XyPoint |
getCenter()
Geometric center of circle.
|
double |
getPerimeter()
Returns the total length of the lines and/or curves bounding the area.
|
double |
getRadius()
Radius of circle.
|
java.util.Iterator<XyPoint> |
iterator() |
XyCircle |
scaledBy(double scale)
Return a scaled version of the shape by multiplying all coordinates by
the given factor in both dimensions.
|
XyCircle |
scaledBy(double scaleX,
double scaleY) |
XyPolygon |
toPolygon()
Same as
XyArea.toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians). |
XyPolygon |
toPolygon(XyAngle granularity)
Converts this area to a polygon which approximates it in some fashion.
|
java.lang.String |
toString() |
XyShape |
transformedBy(XyTransform transform)
Transform the shape using the given transform.
|
XyCircle |
translatedBy(double offsetX,
double offsetY)
Translate the shape by adding all coordinates to the given x and y
offsets.
|
XyCircle |
withCenter(XyPoint newCenter)
Returns a modified version of this circle with the given center.
|
XyCircle |
withRadius(double newRadius)
Returns a modified version of this circle with the given radius.
|
public XyCircle(double centerX,
double centerY,
double radius)
public XyCircle(XyPoint center, double radius)
public static XyCircle forThreePoints(XyPoint p1, XyPoint p2, XyPoint p3)
public XyCircle withRadius(double newRadius)
public XyCircle withCenter(XyPoint newCenter)
public XyCircle scaledBy(double scale)
XyShapepublic XyCircle scaledBy(double scaleX, double scaleY)
public XyCircle translatedBy(double offsetX, double offsetY)
XyShapetranslatedBy in interface XyShape<XyCircle>offsetX - offset for the x dimensionoffsetY - offset for the y dimensionpublic XyShape transformedBy(XyTransform transform)
XyShapetransformedBy in interface XyShape<XyCircle>transform - affine transform to apply.public XyBounds getBounds()
XyShapepublic double getArea()
XyAreapublic double getPerimeter()
XyAreagetPerimeter in interface XyArea<XyCircle>public boolean contains(XyPoint point)
XyAreapublic XyPolygon toPolygon()
XyAreaXyArea.toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians).public XyPolygon toPolygon(XyAngle granularity)
XyAreaThe angle parameter allows a certain level of control of the output. Essentially it dictates the minimum angular granularity used to approximate curved paths. For example, a circle would be turned into a polygon by placing points around the circle, separated by the given angle.
public java.util.Iterator<XyPoint> iterator()
iterator in interface java.lang.Iterable<XyPoint>public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object nother)
equals in class java.lang.Objectpublic XyPoint getCenter()
public double getRadius()