|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Point3i edu.jhu.ece.iacl.jist.structures.geom.GridPt
public class GridPt
The Class GridPt.
Nested Class Summary | |
---|---|
static class |
GridPt.Connectivity
The Enum Connectivity. |
Field Summary | |
---|---|
protected GridPt.Connectivity |
conn
The conn. |
protected double |
data
The data. |
Constructor Summary | |
---|---|
GridPt(int x,
int y,
int z)
Instantiates a new grid pt. |
|
GridPt(int x,
int y,
int z,
double d)
Instantiates a new grid pt. |
|
GridPt(Point3f pt)
Instantiates a new grid pt. |
|
GridPt(Point3f pt,
double d)
Instantiates a new grid pt. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
double |
distance(double x,
double y,
double z)
Distance. |
static double |
distance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Distance. |
double |
distance(GridPt otherpt)
Distance. |
double |
distance(GridPt otherpt,
float resX,
float resY,
float resZ)
Distance. |
double |
distance(XYZ otherpt)
Distance. |
boolean |
equals(GridPt pt)
Equals. |
double |
getData()
Gets the data. |
double |
magnitude()
Magnitude. |
GridPt[] |
neighborhood()
Neighborhood. |
GridPt[] |
neighborhood18C()
Neighborhood18 c. |
static GridPt[] |
neighborhood18C(GridPt pt)
Neighborhood18 c. |
static GridPt[] |
neighborhood18C(int i,
int j,
int k)
Neighborhood18 c. |
GridPt[] |
neighborhood26C()
Neighborhood26 c. |
static GridPt[] |
neighborhood26C(GridPt pt)
Neighborhood26 c. |
static GridPt[] |
neighborhood26C(int i,
int j,
int k)
Neighborhood26 c. |
GridPt[] |
neighborhood6C()
Neighborhood6 c. |
static GridPt[] |
neighborhood6C(GridPt pt)
Neighborhood6 c. |
static GridPt[] |
neighborhood6C(int i,
int j,
int k)
Neighborhood6 c. |
static GridPt[] |
onlyInBounds(GridPt[] list,
int xlen,
int ylen,
int zlen)
If a Grid Point is out of bounds, a null element will be put in its place. |
GridPt |
roundInBounds(int xmax,
int ymax,
int zmax)
Round in bounds. |
void |
setConnectivity(GridPt.Connectivity c)
Sets the connectivity. |
void |
setData(float d)
Sets the data. |
static double |
sqrdistance(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
Sqrdistance. |
double |
sqrdistance(XYZ otherpt)
Sqrdistance. |
double[] |
toPolarCoord()
To polar coord. |
static double[] |
toPolarCoord(GridPt pt)
To polar coord. |
static double[] |
toPolarCoord(Point3f pt)
To polar coord. |
java.lang.String |
toString()
|
GridPt |
vectorFrom(GridPt otherpt)
Vector from. |
GridPt |
vectorTo(GridPt otherpt)
Vector to. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double data
protected GridPt.Connectivity conn
Constructor Detail |
---|
public GridPt(int x, int y, int z)
x
- the xy
- the yz
- the zpublic GridPt(int x, int y, int z, double d)
x
- the xy
- the yz
- the zd
- the dpublic GridPt(Point3f pt)
pt
- the ptpublic GridPt(Point3f pt, double d)
pt
- the ptd
- the dMethod Detail |
---|
public double magnitude()
public double distance(double x, double y, double z)
x
- the xy
- the yz
- the z
public double distance(GridPt otherpt)
otherpt
- the otherpt
public double distance(GridPt otherpt, float resX, float resY, float resZ)
otherpt
- the otherptresX
- the res xresY
- the res yresZ
- the res z
public double distance(XYZ otherpt)
otherpt
- the otherpt
public GridPt vectorTo(GridPt otherpt)
otherpt
- the otherpt
public GridPt vectorFrom(GridPt otherpt)
otherpt
- the otherpt
public double getData()
public void setData(float d)
d
- the new datapublic void setConnectivity(GridPt.Connectivity c)
c
- the new connectivitypublic double[] toPolarCoord()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public static double[] toPolarCoord(GridPt pt)
pt
- the pt
public static double[] toPolarCoord(Point3f pt)
pt
- the pt
public double sqrdistance(XYZ otherpt)
otherpt
- the otherpt
public static double distance(double x1, double y1, double z1, double x2, double y2, double z2)
x1
- the x1y1
- the y1z1
- the z1x2
- the x2y2
- the y2z2
- the z2
public static double sqrdistance(double x1, double y1, double z1, double x2, double y2, double z2)
x1
- the x1y1
- the y1z1
- the z1x2
- the x2y2
- the y2z2
- the z2
public boolean equals(GridPt pt)
pt
- the pt
public GridPt[] neighborhood6C()
public GridPt[] neighborhood18C()
public GridPt[] neighborhood26C()
public GridPt[] neighborhood()
public static GridPt[] neighborhood6C(GridPt pt)
pt
- the pt
public static GridPt[] neighborhood6C(int i, int j, int k)
i
- the ij
- the jk
- the k
public static GridPt[] neighborhood18C(GridPt pt)
pt
- the pt
public static GridPt[] neighborhood18C(int i, int j, int k)
i
- the ij
- the jk
- the k
public static GridPt[] neighborhood26C(GridPt pt)
pt
- the pt
public static GridPt[] neighborhood26C(int i, int j, int k)
i
- the ij
- the jk
- the k
public java.lang.String toString()
public GridPt roundInBounds(int xmax, int ymax, int zmax)
xmax
- the xmaxymax
- the ymaxzmax
- the zmax
public static GridPt[] onlyInBounds(GridPt[] list, int xlen, int ylen, int zlen)
list
- Array of Grid Points to keep in boundsxlen
- Max xylen
- Max yzlen
- Max z
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |