public class GeomNetwork extends java.lang.Object implements GeomElement
Modified by: Joseph A. Huwaldt
Constructor and Description |
---|
GeomNetwork(double[][] xArr,
double[][] yArr,
double[][] zArr,
java.lang.String name)
Create a network made up of the X, Y, and Z coordinates given in 2D Java arrays.
|
GeomNetwork(GeomPoint[][] pointArr,
java.lang.String name)
Create a network made up of a 2D array of 3D points.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Make a copy of this GeomNetwork object.
|
boolean |
equals(java.lang.Object obj)
Compares the specified object with this network for equality.
|
java.util.Map |
getAllData()
Returns a reference to a Map containing all application specific objects associated
with this network.
|
double[][] |
getAllNormalX()
Return the normal vector X component for each panel in this network.
|
double[][] |
getAllNormalY()
Return the normal vector Y component for each panel in this network.
|
double[][] |
getAllNormalZ()
Return the normal vector Z component for each panel in this network.
|
GeomPoint[][] |
getAllPoints()
Return all the 3D points that make up this network.
|
double[][] |
getAllX()
Return the X coordinate values for each point in this network.
|
double[][] |
getAllY()
Return the Y coordinate values for each point in this network.
|
double[][] |
getAllZ()
Return the Z coordinate values for each point in this network.
|
double |
getArea()
Return the surface area of this network.
|
double |
getArea(int row,
int col)
Return the surface area of the specified panel.
|
GeomPoint |
getBoundsMax()
Return the coordinate point representing the maximum bounding box corner (max X,
max Y, max Z).
|
GeomPoint |
getBoundsMin()
Return the coordinate point representing the minimum bounding box corner (min X,
min Y, min Z).
|
double |
getCentroidX(int row,
int col)
Return the area centroid X component for the specified panel in this network.
|
double |
getCentroidY(int row,
int col)
Return the area centroid Y component for the specified panel in this network.
|
double |
getCentroidZ(int row,
int col)
Return the area centroid Z component for the specified panel in this network.
|
java.lang.Object |
getData(java.lang.Object key)
Return the application specific object associated with the specified key that has
been assigned to this network.
|
double |
getMaxX()
Return the maximum bounding X coordinate for this network.
|
double |
getMaxY()
Return the maximum bounding Y coordinate for this network.
|
double |
getMaxZ()
Return the maximum bounding Z coordinate for this network.
|
double |
getMinX()
Return the minimum bounding X coordinate for this network.
|
double |
getMinY()
Return the minimum bounding Y coordinate for this network.
|
double |
getMinZ()
Return the minimum bounding Z coordinate for this network.
|
java.lang.String |
getName()
Return the name of this network.
|
GeomPoint |
getNormal(int row,
int col)
Return the normal vector for the specified panel in this network.
|
double |
getNormalX(int row,
int col)
Return the normal vector X component for the specified panel in this network.
|
double |
getNormalY(int row,
int col)
Return the normal vector Y component for the specified panel in this network.
|
double |
getNormalZ(int row,
int col)
Return the normal vector Z component for the specified panel in this network.
|
int |
getNumberOfPanels()
Return the total number of panels in this network.
|
int |
getNumPoints()
Return the total number of points in this network.
|
int |
getNumPointsPerString()
Return the number of points per string in this network.
|
int |
getNumStrings()
Return the number of strings in this network.
|
GeomPanel |
getPanel(int row,
int col)
Get the panel at the specified location on the network.
|
int |
hashCode()
Returns the hash code value for this network.
|
java.util.Iterator |
panels()
Return an iteration of all the panels in this network.
|
void |
putData(java.lang.Object key,
java.lang.Object data)
Store application specific data that can be assigned to this network.
|
void |
scale(double sx,
double sy,
double sz)
Scale this network by a specified factor along each axis.
|
void |
setName(java.lang.String newName)
Change the name of this network.
|
java.lang.String |
toString()
Create a string representation of this network by outputing the network name and
it's bounding rectangle coordinates.
|
void |
translate(double dx,
double dy,
double dz)
Translate this network by an incremental amount along each axis.
|
public GeomNetwork(double[][] xArr, double[][] yArr, double[][] zArr, java.lang.String name)
xArr
- Array of X coordinate values: xArr[strings][points in string].yArr
- Array of Y coordinate values: yArr[strings][points in string].zArr
- Array of Z coordinate values: zArr[strings][points in string].name
- Name of the network.public GeomNetwork(GeomPoint[][] pointArr, java.lang.String name)
pointArr
- Array of 3D points that make up the network:
pointArr[strings][points in strings].name
- Name of the network.public java.lang.String getName()
getName
in interface GeomElement
public void setName(java.lang.String newName)
setName
in interface GeomElement
newName
- The new name to be given to this network.public double getArea()
getArea
in interface GeomElement
public int getNumPoints()
public int getNumStrings()
public int getNumPointsPerString()
public int getNumberOfPanels()
getNumberOfPanels
in interface GeomElement
public GeomPanel getPanel(int row, int col)
row
- The row (string wise) index of the panel to be returned.col
- The column (point wise in string) index of the panel to be returned.public double[][] getAllX()
public double[][] getAllY()
public double[][] getAllZ()
public GeomPoint[][] getAllPoints()
public double[][] getAllNormalX()
public double[][] getAllNormalY()
public double[][] getAllNormalZ()
public double getArea(int row, int col)
row
- The row (string wise) index of the panel who's area is to be returned.col
- The column (point wise in string) index of the panel who's area is to be
returned.public double getCentroidX(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public double getCentroidY(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public double getCentroidZ(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public double getNormalX(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public double getNormalY(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public double getNormalZ(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public GeomPoint getNormal(int row, int col)
row
- The row (string wise) index of the panel who's normal vector is to be
returned.col
- The column (point wise in string) index of the panel who's normal vector
is to be returned.public double getMinX()
getMinX
in interface GeomElement
public double getMaxX()
getMaxX
in interface GeomElement
public double getMinY()
getMinY
in interface GeomElement
public double getMaxY()
getMaxY
in interface GeomElement
public double getMinZ()
getMinZ
in interface GeomElement
public double getMaxZ()
getMaxZ
in interface GeomElement
public GeomPoint getBoundsMin()
getBoundsMin
in interface GeomElement
public GeomPoint getBoundsMax()
getBoundsMax
in interface GeomElement
public void translate(double dx, double dy, double dz)
translate
in interface GeomElement
dx
- The amount to translate the network in the X direction.dy
- The amount to translate the network in the Y direction.dz
- The amount to translate the network in the Z direction.public void scale(double sx, double sy, double sz)
scale
in interface GeomElement
sx
- The amount to scale the network in the X direction.sy
- The amount to scale the network in the Y direction.sz
- The amount to scale the network in the Z direction.public java.lang.Object clone()
clone
in interface GeomElement
clone
in class java.lang.Object
public java.util.Iterator panels()
public void putData(java.lang.Object key, java.lang.Object data)
putData
in interface GeomElement
key
- The key used to store and retrieve the application specific data
assigned to this network.data
- The application specific object to be assigned to this network.public java.lang.Object getData(java.lang.Object key)
getData
in interface GeomElement
key
- The key used to store and retrieve the application specific data.public java.util.Map getAllData()
getAllData
in interface GeomElement
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to be compared for equality with this network.public int hashCode()
hashCode
in class java.lang.Object