|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.randelshofer.geom3d.Polygon3D
public class Polygon3D
A polygon located in three dimensional (x, y, z) coordinate space. Note: The edges do not have to be on the same plane.
Field Summary | |
---|---|
int |
npoints
The total number of points. |
double[] |
xpoints
The array of x coordinates. |
double[] |
ypoints
The array of y coordinates. |
double[] |
zpoints
The array of z coordinates. |
Constructor Summary | |
---|---|
Polygon3D()
Creates an empty polygon. |
|
Polygon3D(double[] xpoints,
double[] ypoints,
double[] zpoints,
int npoints)
Constructs and initializes a Polygon from the specified parameters. |
|
Polygon3D(int capacity)
Creates an empty polygon with the indicated capacity. |
|
Polygon3D(short[][] points,
int position,
int npoints)
Constructs and initializes a Polygon from the specified parameters. |
Method Summary | |
---|---|
void |
addPoint(double x,
double y,
double z)
Appends a point to a polygon. |
void |
setCapacity(int capacity)
Sets the capacity of the Polygon but drops all data! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int npoints
public double[] xpoints
public double[] ypoints
public double[] zpoints
Constructor Detail |
---|
public Polygon3D()
public Polygon3D(int capacity)
public Polygon3D(double[] xpoints, double[] ypoints, double[] zpoints, int npoints)
xpoints
- the array of x coordinatesypoints
- the array of y coordinateszpoints
- the array of z coordinatesnpoints
- the total number of points in the Polygonpublic Polygon3D(short[][] points, int position, int npoints)
points
- the array of points coordinates; the second index specifies
the axis where [0]=x; [1]=y; [2]=z;position
- the start index of the points in the arraynpoints
- the total number of points in the PolygonMethod Detail |
---|
public void setCapacity(int capacity)
public void addPoint(double x, double y, double z)
x
- the x coordinate of the pointy
- the y coordinate of the pointz
- the z coordinate of the point
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |