|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.quinncurtis.chart3djava.ChartObj
com.quinncurtis.chart3djava.Polysurface
public class Polysurface
| Nested Class Summary | |
|---|---|
class |
Polysurface.pointListType
All of the 3D points that are used to define the polygons of the polysurface |
class |
Polysurface.polygonEntryType
Each polygon is defined by a class that specifies its starting position in the surfacePolygonList.polygonedgelist array, the number of edges in the list, and associated colors. |
class |
Polysurface.polygonListType
This class holds a list of the polygons making up the polysurface. |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
Polysurface()
Default constructor |
|
Polysurface(ChartPoint3D[] points,
int numpoints)
Constructor initializes a poly surface using an array of ChartPoint3D objects. |
|
Polysurface(ChartPoint3D[] points,
int startindex,
int numpoints)
Constructor initializes a poly surface using an array of ChartPoint3D objects. |
|
Polysurface(ChartPoint3D[] grid,
int rows,
int columns,
int gridtype)
Constructor initializes a polysurface using an even spaced grid. |
|
Polysurface(double[] x,
double[] y,
double[] z,
int numpoints)
Constructor initializes a poly surface using arrays of x, y and z values. |
|
Polysurface(double[] x,
double[] y,
double[] z,
int startindex,
int numpoints)
Constructor initializes a poly surface using arrays of x, y and z values. |
|
Polysurface(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
double[] zvalues,
int gridtype)
Constructor initializes a evenly spaced grid polysurface using a function. |
|
Polysurface(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
SurfaceFunction sf)
Constructor initializes a evenly spaced grid polysurface using a function. |
|
Polysurface(int numpoints,
int numpolygons,
int pntsperpoly)
Constructor initializes a poly surface for a given number of points and polygons. |
|
Polysurface(Polysurface ps)
Constructor initializes polysurface as a copy of another polysurface. |
|
Polysurface(Polysurface ps,
int reduction)
Constructor initializes polysurface as a compressed copy of another polysurface. |
|
| Method Summary | |
|---|---|
void |
addAdjacentPolyList(int tri,
int[] adjlist)
Add a polygon to the adjacent polygon list. |
void |
addPolysurfacePolygon(int polyindex,
int[] pointindices,
int numedges,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
Add a polygon to the polysurface. |
void |
allocAdjacentPolygonList()
Allocates the buffers used for storage of adjacent polygons in the Delaunay surface routines. |
java.lang.Object |
clone()
Returns an object that is a clone of this DChartContourDataset object. |
void |
closeDelaunay()
Close the delaunay surface, free allocated memory. |
void |
closePolysurface()
Free the memory associated with the polysurace. |
void |
convertRG2PS(ChartPoint3D[] grid,
int rows,
int columns,
int gridtype)
Convert a collection of 3D points organized as a regular grid to a polysurface. |
void |
copy(Polysurface ps)
Copies the source polysurface. |
void |
createPolysurfaceEvenGrid(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
double[] rdata,
int gridtype)
Evaluate the polysurface function across the x and y range using an evenly spaced grid. |
void |
createPolysurfaceFunction(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
SurfaceFunction sf)
Evaluate the polysurface function across the x and y range using an evenly spaced grid. |
void |
createRGAdjacentPolygonList()
Allocate the adjacent polygon list. |
void |
delaunaySurface(boolean keepadjtrilist)
Carry out a delaunay triangularization to create the polygons of the point list. |
int |
errorCheck(int nerror)
Checks the current object for common errors. |
void |
freeAdjacentPolygonList()
Frees the buffers used for storage of adjacent polygons in the Delaunay surface routines. |
int[] |
getAdjacentPolygonPntr()
Return a reference to the adjacent polygon list. |
void |
getAdjacentPolyList(int tri,
int[] adjlist)
Get the adjacent triangles to the specified triangle |
void |
getOnePolysurfacePoint(int index,
ChartPoint3D points)
Get a single polysurface point. |
ChartPoint3D[] |
getPolysurfacePointList()
Get a reference to the surface point list. |
int |
getPolysurfacePolygon(int polyindex,
ChartPoint3D[] points,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
Get the polysurface polygon at index polyindex. |
int |
getPSMaxPolygons()
Returns the maximum number of polygons in the polysurface. |
int |
getPSNumPoints()
Get the number of points making up the polysurface. |
int |
getPSNumPolygons()
Returns the number of polygons in the polysurface. |
double |
getPSPMean(int polyindex,
int coord)
Get the mean value of a specific coordinate of a polygon. |
int |
getPSPointsPerPolygon()
Get the number of points per polygon. |
int |
getPSPolygonIndices(int polyindex,
int[] indices,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
Get the polysurface polygon at index polyindex. |
boolean |
getWireFrame()
Get the wire frame mode of the polysurface. |
int |
gPSPolygon(int polyindex,
ChartPoint3D[] points)
Get the polysurface polygon at index polyindex. |
int |
initDelaunay()
Initialize the delaunay variables. |
void |
normalizePolysurfacePoint(int polyindex,
ChartPoint3D mx,
ChartPoint3D b)
Normalize a polysurface point (x - b)/m. |
void |
openPolysurface(int numpnts,
int numpolygons,
int pntsperpoly)
Initializes the poly surface for a given number of points and polygons. |
void |
reducePolysurface(Polysurface ps,
int reduction,
int gridtype)
Initializes polysurface as a compressed copy of another polysurface. |
void |
resetPolysurfacePolygons()
Clear the polygon list of the polysurface. |
void |
setOnePolysurfacePoint(int index,
ChartPoint3D points)
Add a single 3D point to the polysurface. |
void |
setPolysurfaceColors(int polyindex,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
Set the colors associated with a polygon. |
void |
setPolysurfacePoints(ChartPoint3D[] points,
int startindex,
int numpnts)
Set points in the polysurface. |
void |
setWireFrame(boolean bWFrame)
Set the wire frame mode of the polysurface. |
void |
unNormalizePolysurfacePoint(int polyindex,
ChartPoint3D mx,
ChartPoint3D b)
Reverse a point normalization (mx + b) |
| Methods inherited from class com.quinncurtis.chart3djava.ChartObj |
|---|
copy, getChartObjIDCntr, getChartObjType, getThisChartObjID |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Polysurface()
public Polysurface(double[] x,
double[] y,
double[] z,
int startindex,
int numpoints)
x - Array of x-valuesy - Array of y-valuesz - Array of z-valuesstartindex - Starting point in the polysurfacenumpoints -
public Polysurface(double[] x,
double[] y,
double[] z,
int numpoints)
x - Array of x-valuesy - Array of y-valuesz - Array of z-valuesnumpoints - Number of data points
public Polysurface(ChartPoint3D[] points,
int startindex,
int numpoints)
points - Array of 3D pointsstartindex - Starting point in the polysurfacenumpoints - Number of data points
public Polysurface(ChartPoint3D[] points,
int numpoints)
points - Array of 3D pointsnumpoints - Number of data points
public Polysurface(int numpoints,
int numpolygons,
int pntsperpoly)
numpoints - Number of 3D points in the polysuracenumpolygons - Number of polygons in the polysurfacepntsperpoly - Number of points per polygon
public Polysurface(ChartPoint3D[] grid,
int rows,
int columns,
int gridtype)
grid - An array of 3D data points.rows - The number of rows in the evenly spaced grid.columns - The number of columns in the evenly spaced grid.gridtype - The grid type.
public Polysurface(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
SurfaceFunction sf)
rows - The number of rows in the evenly spaced grid.columns - The number of columns in the evenly spaced grid.x1 - The starting x-value for evaluating the function.y1 - The starting y-value for evaluating the function.x2 - The ending x-value for evaluating the function.y2 - The ending y-value for evaluating the function.sf - The function used to evaluate the 3D surface.
public Polysurface(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
double[] zvalues,
int gridtype)
rows - The number of rows in the evenly spaced grid.columns - The number of columns in the evenly spaced grid.x1 - The starting x-value for evaluating the function.y1 - The starting y-value for evaluating the function.x2 - The ending x-value for evaluating the function.y2 - The ending y-value for evaluating the function.zvalues - An array of z-values to apply to the evenly spaced grid.gridtype - The grid type, 0 = trianular, 1 = rectangle.public Polysurface(Polysurface ps)
ps - Source polysurface.
public Polysurface(Polysurface ps,
int reduction)
ps - Source polysurface.reduction - Compression factor.| Method Detail |
|---|
public void closePolysurface()
public void openPolysurface(int numpnts,
int numpolygons,
int pntsperpoly)
numpnts - Number of 3D points in the polysuracenumpolygons - Number of polygons in the polysurfacepntsperpoly - Number of points per polygon
public void reducePolysurface(Polysurface ps,
int reduction,
int gridtype)
ps - Source polysurface.reduction - Compression factor.gridtype - The grid type.public int errorCheck(int nerror)
errorCheck in class ChartObjnerror - Current value of the error code.
public java.lang.Object clone()
clone in class java.lang.Objectpublic void copy(Polysurface ps)
ps - Source polysurfacepublic void allocAdjacentPolygonList()
public void freeAdjacentPolygonList()
public int[] getAdjacentPolygonPntr()
public void addAdjacentPolyList(int tri,
int[] adjlist)
tri - Index of the triangle to add.adjlist - An array of three indices to the three adjacent polygons
public void getAdjacentPolyList(int tri,
int[] adjlist)
tri - Index of the triangle to get the adjacent triangles of.adjlist - Returns an array of three indices to the three adjacent polygonspublic void closeDelaunay()
public void setPolysurfacePoints(ChartPoint3D[] points,
int startindex,
int numpnts)
points - An array of 3D points.startindex - The start index to add the points to.numpnts - Number of points to add.
public void setOnePolysurfacePoint(int index,
ChartPoint3D points)
index - Index in the point list to place the point.points - A single polysurface point.
public void getOnePolysurfacePoint(int index,
ChartPoint3D points)
index - Index of the point.points - Returns the point.public ChartPoint3D[] getPolysurfacePointList()
public void addPolysurfacePolygon(int polyindex,
int[] pointindices,
int numedges,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
polyindex - Index of the polygon to add.pointindices - An array of the point indices in the polysurface point list.numedges - Number of points in the polygonoutsidecolor - Outside colorbordercolor - Inside color
public void setPolysurfaceColors(int polyindex,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
polyindex - The polygon index.outsidecolor - The inside color.bordercolor - The outside color.
public int gPSPolygon(int polyindex,
ChartPoint3D[] points)
polyindex - The index of the polygon.points - Returns an array of the 3D points that make the polygon.
public int getPolysurfacePolygon(int polyindex,
ChartPoint3D[] points,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
polyindex - The index of the polygon.points - Returns an array of the 3D points that make the polygon.outsidecolor - Returns the inside color.bordercolor - Returns the outside color.
public int getPSPolygonIndices(int polyindex,
int[] indices,
java.awt.Color outsidecolor,
java.awt.Color bordercolor)
polyindex - The index of the polygon.indices - Returns an array of the indices of the points that make the polygon.outsidecolor - Returns the inside color.bordercolor - Returns the outside color.
public void createPolysurfaceFunction(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
SurfaceFunction sf)
rows - The number of rows in the evenly spaced grid.columns - The number of columns in the evenly spaced grid.x1 - The starting x-value for evaluating the function.y1 - The starting y-value for evaluating the function.x2 - The ending x-value for evaluating the function.y2 - The ending y-value for evaluating the function.sf - The function used to evaluate the 3D surface.
public void createPolysurfaceEvenGrid(int rows,
int columns,
double x1,
double y1,
double x2,
double y2,
double[] rdata,
int gridtype)
rows - The number of rows in the evenly spaced grid.columns - The number of columns in the evenly spaced grid.x1 - The starting x-value for evaluating the function.y1 - The starting y-value for evaluating the function.x2 - The ending x-value for evaluating the function.y2 - The ending y-value for evaluating the function.rdata - The z-values of the evenly spaced grid.gridtype - The surface grid type.public void createRGAdjacentPolygonList()
public void convertRG2PS(ChartPoint3D[] grid,
int rows,
int columns,
int gridtype)
grid - An array of 3D points.rows - Number of rows.columns - Number of columnsgridtype - Grid type.
public void normalizePolysurfacePoint(int polyindex,
ChartPoint3D mx,
ChartPoint3D b)
polyindex - Index of the point in the point listmx - 3D point representing the scale factors used in the normalizationb - 3D point representing the offset facotrs used in the normalization.
public void unNormalizePolysurfacePoint(int polyindex,
ChartPoint3D mx,
ChartPoint3D b)
polyindex - Index of the point in the point listmx - 3D point representing the scale factors used in the normalizationb - 3D point representing the offset facotrs used in the normalization.
public double getPSPMean(int polyindex,
int coord)
polyindex - Polygon indexcoord - Coordinate type (X_AXIS, Y_AXIS, Z_AXIS)
public int getPSNumPolygons()
public int getPSMaxPolygons()
public int getPSPointsPerPolygon()
public int getPSNumPoints()
public void resetPolysurfacePolygons()
public void setWireFrame(boolean bWFrame)
bWFrame - Set to true to enable the wire frame mode.public boolean getWireFrame()
public int initDelaunay()
public void delaunaySurface(boolean keepadjtrilist)
keepadjtrilist - Set to true to keep the adjacent triangle list.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||