|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyEllipse
public class XyEllipse
| Constructor Summary | |
|---|---|
XyEllipse(XyPoint center,
double a,
double b)
Creates a new XyEllipse with the given center, horizontal radius (a), and vertical radius (b). |
|
XyEllipse(XyPoint center,
double a,
double b,
XyRotation rotation)
Creates a new XyEllipse with the given center, horizontal radius (a), and vertical radius (b). |
|
| Method Summary | |
|---|---|
boolean |
contains(XyPoint point)
Tests if a point is inside this area. |
static XyEllipse |
ellipse(XyRectangle rectangle)
Creates a new XyEllipse bounded by the given XyRectangle. |
boolean |
equals(java.lang.Object nother)
|
double |
getA()
The a parameter, which is half the length of the major (longest) axis. |
double |
getArea()
Returns the 2-dimensional area covered by this... |
double |
getB()
The b parameter, which is half the length of the minor (shortest) axis. |
XyBounds |
getBounds()
Returns an XyBounds object representing the rectangular extents of this shape. |
XyPoint |
getCenter()
The center of the ellipse. |
double |
getEccentricity()
The eccentricity of the ellipse. |
XyPoint |
getLeftFocus()
The "left" focus. |
double |
getPerimeter()
Returns the total length of the lines and/or curves bounding the area. |
XyPoint |
getRightFocus()
The "right" focus. |
XyRotation |
getRotation()
The angle of rotation of the major axis. |
java.util.Iterator<XyPoint> |
iterator()
|
XyEllipse |
scaledBy(double factor)
Return a scaled version of the shape by multiplying all coordinates by the given factor in both dimensions. |
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 the ellipse to a polygon with the given number of vertices. |
java.lang.String |
toString()
|
XyShape |
transformedBy(XyTransform transform)
Transform the shape using the given transform. |
XyEllipse |
translatedBy(double offsetX,
double offsetY)
Translate the shape by adding all coordinates to the given x and y offsets. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XyEllipse(XyPoint center,
double a,
double b)
public XyEllipse(XyPoint center,
double a,
double b,
XyRotation rotation)
| Method Detail |
|---|
public static XyEllipse ellipse(XyRectangle rectangle)
public XyPolygon toPolygon(XyAngle granularity)
toPolygon in interface XyArea<XyEllipse>public XyPolygon toPolygon()
XyAreaXyArea.toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians).
toPolygon in interface XyArea<XyEllipse>public boolean contains(XyPoint point)
XyArea
contains in interface XyArea<XyEllipse>point - point to test for containmentpublic double getArea()
XyArea
getArea in interface XyArea<XyEllipse>public double getPerimeter()
XyArea
getPerimeter in interface XyArea<XyEllipse>public XyBounds getBounds()
XyShape
getBounds in interface XyShape<XyEllipse>public XyEllipse scaledBy(double factor)
XyShape
scaledBy in interface XyShape<XyEllipse>factor - scaling factor
public XyShape transformedBy(XyTransform transform)
XyShape
transformedBy in interface XyShape<XyEllipse>transform - affine transform to apply.
public XyEllipse translatedBy(double offsetX,
double offsetY)
XyShape
translatedBy in interface XyShape<XyEllipse>offsetX - offset for the x dimensionoffsetY - offset for the y dimension
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 double getA()
public double getB()
public XyRotation getRotation()
public XyPoint getCenter()
public double getEccentricity()
public XyPoint getLeftFocus()
public XyPoint getRightFocus()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||