|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyCircle
public class XyCircle
A circle in (x, y) space.
Copyright 2004-2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XyCircle(double centerX,
double centerY,
double radius)
public XyCircle(XyPoint center,
double radius)
| Method Detail |
|---|
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)
XyShape
scaledBy in interface XyShape<XyCircle>scale - scaling factor
public XyCircle scaledBy(double scaleX,
double scaleY)
public XyCircle translatedBy(double offsetX,
double offsetY)
XyShape
translatedBy in interface XyShape<XyCircle>offsetX - offset for the x dimensionoffsetY - offset for the y dimension
public XyShape transformedBy(XyTransform transform)
XyShape
transformedBy in interface XyShape<XyCircle>transform - affine transform to apply.
public XyBounds getBounds()
XyShape
getBounds in interface XyShape<XyCircle>public double getArea()
XyArea
getArea in interface XyArea<XyCircle>public double getPerimeter()
XyArea
getPerimeter in interface XyArea<XyCircle>public boolean contains(XyPoint point)
XyArea
contains in interface XyArea<XyCircle>point - point to test for containmentpublic XyPolygon toPolygon()
XyAreaXyArea.toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians).
toPolygon in interface XyArea<XyCircle>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.
toPolygon in interface XyArea<XyCircle>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()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||