|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--PlaneEquation
Represents a plane equation for a plane in 3D space.
| Field Summary | |
protected double |
A
The x-coefficient of the equation. |
protected double |
B
The y-coefficient of the equation. |
protected double |
C
The z-coefficient of the equation. |
protected double |
D
The constant value of the equation. |
protected Vector3D |
normalVector
The normal vector, cached value from (A,B,C) |
| Constructor Summary | |
PlaneEquation(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3)
Creates a plane equation from three (x,y,z) triplets. |
|
PlaneEquation(Mesh.Polygon polygon)
Creates a plane equation from the first three points in the polygon. |
|
PlaneEquation(Point3D pt1,
Point3D pt2,
Point3D pt3)
Creates a plane equation from a set of three points which are on the plane. |
|
| Method Summary | |
protected void |
calcEquations(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3)
Calculate the values of A,B,C,D of the plane equation. |
protected void |
calcNormalVector(Mesh.Polygon polygon)
Initializes the normalVector variable. |
double |
calcZ(double x,
double y)
Returns a Z value on the plane given the X and Y values. |
double |
evaluate(double x,
double y,
double z)
Evaluates a point to the plane equation. |
double |
evaluate(Point3D pt)
Evaluates a point to the plane equation. |
Vector3D |
getNormalVector()
Returns the normal vector. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected double A
calcEquations(double, double, double, double, double, double, double, double, double)protected double B
calcEquations(double, double, double, double, double, double, double, double, double)protected double C
calcEquations(double, double, double, double, double, double, double, double, double)protected double D
calcEquations(double, double, double, double, double, double, double, double, double)protected Vector3D normalVector
| Constructor Detail |
public PlaneEquation(Mesh.Polygon polygon)
polygon - a polygon in a polygon mesh.calcEquations(double, double, double, double, double, double, double, double, double)
public PlaneEquation(Point3D pt1,
Point3D pt2,
Point3D pt3)
pt1 - the first point.pt2 - the second point.pt3 - the third point.calcEquations(double, double, double, double, double, double, double, double, double)
public PlaneEquation(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3)
x1 - The x coordinate of the first point in the plane.y1 - The y coordinate of the first point in the plane.z1 - The z coordinate of the first point in the plane.x2 - The x coordinate of the second point in the plane.y2 - The y coordinate of the second point in the plane.z2 - The z coordinate of the second point in the plane.x3 - The x coordinate of the third point in the plane.y3 - The y coordinate of the third point in the plane.z3 - The z coordinate of the third point in the plane.calcEquations(double, double, double, double, double, double, double, double, double)| Method Detail |
protected void calcNormalVector(Mesh.Polygon polygon)
polygon - the polygon to calculate the normal vector from
protected void calcEquations(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3)
x1 - The x coordinate of the first point in the plane.y1 - The y coordinate of the first point in the plane.z1 - The z coordinate of the first point in the plane.x2 - The x coordinate of the second point in the plane.y2 - The y coordinate of the second point in the plane.z2 - The z coordinate of the second point in the plane.x3 - The x coordinate of the third point in the plane.y3 - The y coordinate of the third point in the plane.z3 - The z coordinate of the third point in the plane.A,
B,
C,
Dpublic double evaluate(Point3D pt)
point - the point to evaluate.evaluate(double x,double y,double z)
public double evaluate(double x,
double y,
double z)
x - x-value of the point to evaluate.y - y-value of the point to evaluate.z - z-value of the point to evaluate.evaluate(Point3D pt)
public double calcZ(double x,
double y)
public Vector3D getNormalVector()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||