|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyQuadrilateral
public class XyQuadrilateral
A four-sided and four-cornered figured. Currently the implementation assumes it is simple (lines do not cross).
Copyright 2008 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyQuadrilateral(XyPoint corner1,
XyPoint corner2,
XyPoint corner3,
XyPoint corner4)
|
|
| Method Summary | |
|---|---|
boolean |
contains(XyPoint point)
Tests if a point is inside this area. |
double |
getArea()
Returns the 2-dimensional area covered by this... |
XyBounds |
getBounds()
Returns an XyBounds object representing the rectangular extents of this shape. |
XyPoint |
getCentroid()
|
XyPoint |
getCorner1()
|
XyPoint |
getCorner2()
|
XyPoint |
getCorner3()
|
XyPoint |
getCorner4()
|
double |
getPerimeter()
Returns the total length of the lines and/or curves bounding the area. |
java.util.Iterator<XyPoint> |
iterator()
|
XyQuadrilateral |
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 this area to a polygon which approximates it in some fashion. |
XyShape |
transformedBy(XyTransform transform)
Transform the shape using the given transform. |
XyQuadrilateral |
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XyQuadrilateral(XyPoint corner1,
XyPoint corner2,
XyPoint corner3,
XyPoint corner4)
| Method Detail |
|---|
public boolean contains(XyPoint point)
XyArea
contains in interface XyArea<XyQuadrilateral>point - point to test for containmentpublic double getArea()
XyArea
getArea in interface XyArea<XyQuadrilateral>public double getPerimeter()
XyArea
getPerimeter in interface XyArea<XyQuadrilateral>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<XyQuadrilateral>public XyPolygon toPolygon()
XyAreaXyArea.toPolygon(XyAngle) with a default angle granularity of
1/60 circle (1 degree, pi/30 radians).
toPolygon in interface XyArea<XyQuadrilateral>public XyBounds getBounds()
XyShape
getBounds in interface XyShape<XyQuadrilateral>public XyQuadrilateral scaledBy(double factor)
XyShape
scaledBy in interface XyShape<XyQuadrilateral>factor - scaling factor
public XyShape transformedBy(XyTransform transform)
XyShape
transformedBy in interface XyShape<XyQuadrilateral>transform - affine transform to apply.
public XyQuadrilateral translatedBy(double offsetX,
double offsetY)
XyShape
translatedBy in interface XyShape<XyQuadrilateral>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 XyPoint getCentroid()
public XyPoint getCorner1()
public XyPoint getCorner2()
public XyPoint getCorner3()
public XyPoint getCorner4()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||