|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--convexhull3d.SpatialPoint
A 3D spatial point, used to represent both input points and hull vertices.
Field Summary | |
double |
x
The x coordinate. |
double |
y
The y coordinate. |
double |
z
The z coordinate. |
Constructor Summary | |
SpatialPoint(double x,
double y,
double z,
int idx)
Constructs a SpatialPoint with the coordinates (x,y,z) and a point index given by idx . |
Method Summary | |
boolean |
epsilonEquals(SpatialPoint pnt,
double epsilon)
Returns true if this point equals another point within a prescribed tolerance. |
boolean |
equals(SpatialPoint pnt)
Returns true if this point equals another point. |
double |
getCoord(int i)
Returns the value of the i-th coordinate of the point. |
int |
getHullFaceIndex()
Gets the hull face index for this point. |
int |
getMergedFaceIndex()
Gets the merged face index for this point. |
int |
getPointIndex()
Gets the point index for this point. |
void |
setHullFaceIndex(int idx)
Sets the hull face index for this point. |
void |
setMergedFaceIndex(int idx)
Sets the merged face index for this point. |
void |
setPointIndex(int idx)
Sets the point index for this point. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double x
public double y
public double z
Constructor Detail |
public SpatialPoint(double x, double y, double z, int idx)
idx
.
The point index should correspond to the location
of the point within the input data.
x
- the x coordinatey
- the y coordinatez
- the z coordinateidx
- the point indexMethod Detail |
public double getCoord(int i)
i
- coordinate index (with 0,1,2 corresponding to x,y,z).
public void setPointIndex(int idx)
idx
- new point indexpublic int getPointIndex()
public void setHullFaceIndex(int idx)
idx
- new hull face indexgetHullFaceIndex()
public int getHullFaceIndex()
ConvexHull3D.getHullFaceVertices()
. If this point is not
associated with a hull face vertex, then -1 is returned.
ConvexHull3D.getHullFaceVertices()
public void setMergedFaceIndex(int idx)
idx
- new merged face indexgetMergedFaceIndex()
public int getMergedFaceIndex()
ConvexHull3D.getMergedFaceVertices()
. If this point is not
associated with a merged face vertex, then -1 is returned.
ConvexHull3D.getMergedFaceVertices()
public boolean equals(SpatialPoint pnt)
pnt
- the other point
public boolean epsilonEquals(SpatialPoint pnt, double epsilon)
pnt
- the other pointepsilon
- tolerance value
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |