|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectPlane
public class Plane
Equation of a plane in a three-dimensional space (x,y,z).
The plane equation is expressed by c, cx and cy coefficients as
below:
z(x,y) = c + cx×x + cy×yThose coefficients can be set directly, or computed by a linear regression of this plane through a set of three-dimensional points.
| utility/geotk-utility (download) | View source code for this class |
| Field Summary | |
|---|---|
double |
c
The c coefficient for this plane. |
double |
cx
The cx coefficient for this plane. |
double |
cy
The cy coefficient for this plane. |
| Constructor Summary | |
|---|---|
Plane()
Construct a new plane. |
|
| Method Summary | |
|---|---|
Plane |
clone()
Returns a clone of this plane. |
boolean |
equals(Object object)
Compares this plane with the specified object for equality. |
double |
fit(double[] x,
double[] y,
double[] z)
Computes the plane's coefficients from a set of points. |
double |
fit(float[] x,
float[] y,
float[] z)
Computes the plane's coefficients from a set of points. |
double |
fit(Vector x,
Vector y,
Vector z)
Computes the plane's coefficients from a set of points. |
int |
hashCode()
Returns a hash code value for this plane. |
void |
setPlane(Point3d P1,
Point3d P2,
Point3d P3)
Computes the plane's coefficients from the specified points. |
String |
toString()
Returns a string representation of this plane. |
double |
x(double y,
double z)
Computes the x value for the specified (y,z) point. |
double |
y(double x,
double z)
Computes the y value for the specified (x,z) point. |
double |
z(double x,
double y)
Computes the z value for the specified (x,y) point. |
| Methods inherited from class Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double c
public double cx
public double cy
| Constructor Detail |
|---|
public Plane()
| Method Detail |
|---|
public final double z(double x,
double y)
z(x,y) = c + cx*x + cy*y
x - The x value.y - The y value.
public final double y(double x,
double z)
y(x,z) = (z - (c + cx*x)) / cy
x - The x value.z - The y value.
public final double x(double y,
double z)
x(y,z) = (z - (c + cy*y)) / cx
y - The x value.z - The y value.
public void setPlane(Point3d P1,
Point3d P2,
Point3d P3)
throws ArithmeticException
P1 - The first point.P2 - The second point.P3 - The third point.
ArithmeticException - If the three points are colinear.
public double fit(double[] x,
double[] y,
double[] z)
throws MismatchedSizeException
Vector objects and delegates to
fit(Vector, Vector, Vector).
x - array of x coordinatesy - array of y coordinatesz - array of z values
MismatchedSizeException - if x, y and z
don't have the same length.
public double fit(float[] x,
float[] y,
float[] z)
throws MismatchedSizeException
Vector objects and delegates to
fit(Vector, Vector, Vector).
x - array of x coordinatesy - array of y coordinatesz - array of z values
MismatchedSizeException - if x, y and z
don't have the same length.
public double fit(Vector x,
Vector y,
Vector z)
throws MismatchedSizeException
x - vector of x coordinatesy - vector of y coordinatesz - vector of z values
MismatchedSizeException - if x, y and z
don't have the same length.public String toString()
z(x,y) =c+cx*x +cy*y
toString in class Objectpublic boolean equals(Object object)
equals in class Objectobject - The object to compare with this plane for equality.
true if both objects are equal.public int hashCode()
hashCode in class Objectpublic Plane clone()
clone in class ObjectObject.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||