|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object PolygonXZ SimplePolygonXZ
public class SimplePolygonXZ
a non-self-intersecting polygon in the XZ plane
Field Summary |
---|
Fields inherited from class PolygonXZ |
---|
vertexLoop |
Constructor Summary | |
---|---|
SimplePolygonXZ(List<VectorXZ> vertexLoop)
|
Method Summary | |
---|---|
PolygonWithHolesXZ |
asPolygonWithHolesXZ()
|
SimplePolygonXZ |
asSimplePolygon()
returns a polygon with the coordinates of this polygon that is an instance of SimplePolygonXZ . |
static boolean |
contains(List<VectorXZ> polygonVertexLoop,
VectorXZ test)
returns true if the polygon defined by the polygonVertexLoop parameter contains a given position |
boolean |
contains(PolygonXZ p)
returns true if this polygon contains the parameter polygon |
boolean |
contains(VectorXZ test)
returns true if the polygon contains a given position |
double |
distanceToSegments(VectorXZ p)
returns the distance of a point to the segments this polygon. |
double |
getArea()
returns the polygon's area |
VectorXZ |
getCentroid()
returns the centroid (or "barycenter") of the polygon |
double |
getDiameter()
returns the largest distance between any pair of vertices of this polygon |
List<LineSegmentXZ> |
getSegments()
|
SimplePolygonXZ |
getSimplifiedPolygon()
returns a different polygon that is constructed from this polygon by removing all vertices where this has an angle close to 180° (i.e. |
boolean |
isClockwise()
returns true if the polygon has clockwise orientation |
boolean |
isSelfIntersecting()
returns whether this polygon is self-intersecting |
boolean |
isSimple()
checks whether this polygon is simple |
SimplePolygonXZ |
makeClockwise()
returns this polygon if it is counterclockwise, or the reversed polygon if it is clockwise. |
SimplePolygonXZ |
makeCounterclockwise()
returns this polygon if it is clockwise, or the reversed polygon if it is counterclockwise. |
SimplePolygonXZ |
reverse()
|
SimplePolygonXZ |
shift(VectorXZ shiftVector)
creates a new polygon by adding a shift vector to each vector of this |
Methods inherited from class PolygonXZ |
---|
assertLoopProperty, asTriangleXZ, getCenter, getClosestSegment, getOutlineLength, getVertex, getVertexAfter, getVertexBefore, getVertexCollection, getVertexLoop, getVertices, intersectionPositions, intersectionSegments, intersects, intersects, intersects, isEquivalentTo, isSelfIntersecting, size, toString, xyz |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimplePolygonXZ(List<VectorXZ> vertexLoop)
vertexLoop
- vertices defining the polygon;
first and last vertex must be equal
InvalidGeometryException
- if the polygon is self-intersecting
or produces invalid area calculation resultsMethod Detail |
---|
public List<LineSegmentXZ> getSegments()
getSegments
in class PolygonXZ
public double getArea()
public VectorXZ getCentroid()
public double getDiameter()
public boolean isClockwise()
public boolean isSelfIntersecting()
PolygonXZ
isSelfIntersecting
in class PolygonXZ
public boolean isSimple()
PolygonXZ
isSimple
in class PolygonXZ
public SimplePolygonXZ asSimplePolygon()
PolygonXZ
SimplePolygonXZ
.
Only works if it actually PolygonXZ.isSimple()
!
asSimplePolygon
in class PolygonXZ
public PolygonWithHolesXZ asPolygonWithHolesXZ()
PolygonWithHolesXZ
with this polygon as the outer polygon and no holespublic SimplePolygonXZ makeClockwise()
public SimplePolygonXZ makeCounterclockwise()
public SimplePolygonXZ reverse()
reverse
in class PolygonXZ
public SimplePolygonXZ shift(VectorXZ shiftVector)
public static boolean contains(List<VectorXZ> polygonVertexLoop, VectorXZ test)
public boolean contains(VectorXZ test)
public boolean contains(PolygonXZ p)
public double distanceToSegments(VectorXZ p)
public SimplePolygonXZ getSimplifiedPolygon()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |