public class Polygon3d
extends java.lang.Object
Constructor and Description |
---|
Polygon3d() |
Polygon3d(double[] coords) |
Polygon3d(Point3d[] pnts) |
Modifier and Type | Method and Description |
---|---|
void |
addVertexAfter(PolygonVertex3d vtx,
PolygonVertex3d ref) |
void |
appendVertex(PolygonVertex3d vtx) |
void |
clear() |
boolean |
epsilonEquals(Polygon3d poly,
double eps)
Returns true if this polygon is equal to another polygon within a
prescribed tolerance eps.
|
boolean |
equals(Polygon3d poly)
Returns true if this polygon is equal to another polygon.
|
void |
getBounds(Point3d minValues,
Point3d maxValues) |
PolygonVertex3d |
getFirstVertex() |
PolygonVertex3d |
getLastVertex() |
double |
getMaxCoordinate() |
java.util.ListIterator |
getVertices() |
void |
inverseTransform(AffineTransform3dBase X)
Applies an inverse affine transformation to the vertices of this polygon.
|
boolean |
isEmpty() |
int |
numVertices() |
void |
prependVertex(PolygonVertex3d vtx) |
void |
scan(ReaderTokenizer rtok) |
void |
set(double[] coords,
int numVertices) |
void |
set(Point3d[] pnts,
int numVertices) |
void |
set(Polygon3d poly) |
java.lang.String |
toString() |
java.lang.String |
toString(NumberFormat fmt) |
java.lang.String |
toString(java.lang.String fmtStr) |
void |
transform(AffineTransform3dBase X)
Applies a affine transformation to the vertices of this polygon.
|
void |
updateBounds(Point3d minValues,
Point3d maxValues) |
public Polygon3d()
public Polygon3d(double[] coords)
public Polygon3d(Point3d[] pnts)
public java.util.ListIterator getVertices()
public int numVertices()
public double getMaxCoordinate()
public void addVertexAfter(PolygonVertex3d vtx, PolygonVertex3d ref)
public void appendVertex(PolygonVertex3d vtx)
public void prependVertex(PolygonVertex3d vtx)
public boolean isEmpty()
public PolygonVertex3d getLastVertex()
public PolygonVertex3d getFirstVertex()
public void clear()
public void set(Polygon3d poly)
public void set(double[] coords, int numVertices)
public void set(Point3d[] pnts, int numVertices)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String fmtStr)
public java.lang.String toString(NumberFormat fmt)
public void scan(ReaderTokenizer rtok) throws java.io.IOException
java.io.IOException
public boolean epsilonEquals(Polygon3d poly, double eps)
poly
- polygon to be compared witheps
- tolerance valueepsilonEquals(maspack.geometry.Polygon3d, double)
public boolean equals(Polygon3d poly)
poly
- polygon to be compared withepsilonEquals(maspack.geometry.Polygon3d, double)
public void transform(AffineTransform3dBase X)
X
- affine transformationpublic void inverseTransform(AffineTransform3dBase X)
X
- affine transformation