java.io.Serializable
PistonPlane
, WallPlane
public class Plane
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
double |
epsilon |
Tolerance used to judge if a given point is in the plane.
|
Constructor | Description |
---|---|
Plane(Plane original) |
Constructs a new Plane as a copy of the given one.
|
Plane(Space space) |
Default constructor returns the y-z plane.
|
Plane(Space space,
double a,
double b,
double c,
double d) |
Constructs a Plane satisfying the equation a x + b y + c z + d = 0
|
Modifier and Type | Method | Description |
---|---|---|
double |
dihedralAngle(Plane p) |
Dihedral angle between this plane and the given plane.
|
double |
distanceTo(Vector x0) |
Perpendicular distance from the plane to the given point.
|
void |
E(Plane p) |
Sets the parameters of this plane to make it equivalent to the given one.
|
double |
getA() |
|
double |
getB() |
|
double |
getC() |
|
double |
getD() |
|
double |
getDistanceToOrigin() |
Perpendicular distance from the plane to the origin.
|
boolean |
inPlane(Vector p) |
Returns true if the given point is within a distance epsilon of this plane.
|
void |
invert() |
Changes the direction of the normal vector so that it points
toward the other side of the plane from its present orientation.
|
boolean |
isPositiveSide(Vector p) |
Returns true if the given point is on the side of the
plane or over the side of the plane by epsilon or less
toward which the normal vector points.
|
static void |
main(java.lang.String[] args) |
|
void |
moveTo(Vector r) |
Shifts the plane at fixed orientation so that it contains the given point.
|
void |
setDistanceToOrigin(double d) |
Sets perpendicular distance from the plane to the origin.
|
void |
setIntercepts(double u,
double v,
double w) |
Reorients and positions the plane so that its intercepts with the
x-, y-, and z-axes are the given values, respectively.
|
void |
setNormalPoint(Vector normal,
Vector point) |
Defines the plane via a normal vector (1st argument) and
a point (2nd argument).
|
void |
setNormalVector(Vector n) |
Sets the orientation of the plane to be normal to the given vector.
|
void |
setThreePoints(Vector p1,
Vector p2,
Vector p3) |
Defines the plane by specifying three points that lie in it.
|
void |
setToCenter(Vector v) |
Sets the given vector to be the point in the plane closest to the origin.
|
void |
setToInPlaneSquare(double size,
Vector[] s) |
inPlaneSquare with square centered on point in plane closest to origin.
|
void |
setToInPlaneSquare(Vector x0,
double size,
Vector[] s) |
Returns four points as the vertices of a square of size d centered on x0.
|
void |
setToInPlaneVectors(Vector[] p) |
Computes and returns two unit vectors perpendicular to each other and in the plane.
|
void |
setToNearestPoint(Vector x0,
Vector point) |
Determines the point in the plane closest to the point x0 (first argument).
|
void |
setToNormalVector(Vector normal) |
Sets the given vector to be a unit normal vector to the plane and returns it.
|
double |
xIntercept() |
Returns the intercept of the plane with the x-axis.
|
double |
yIntercept() |
Returns the intercept of the plane with the y-axis.
|
double |
zIntercept() |
Returns the intercept of the plane with the z-axis.
|
public double epsilon
public Plane(Space space)
public Plane(Plane original)
public Plane(Space space, double a, double b, double c, double d)
public double getA()
public double getB()
public double getC()
public double getD()
public void setNormalPoint(Vector normal, Vector point)
public void setThreePoints(Vector p1, Vector p2, Vector p3)
public void setToNormalVector(Vector normal)
public void setToInPlaneVectors(Vector[] p)
public void setNormalVector(Vector n)
public double getDistanceToOrigin()
public void setDistanceToOrigin(double d)
public void setIntercepts(double u, double v, double w)
public double xIntercept()
public double yIntercept()
public double zIntercept()
public void setToCenter(Vector v)
public void setToNearestPoint(Vector x0, Vector point)
public double distanceTo(Vector x0)
public void moveTo(Vector r)
public double dihedralAngle(Plane p)
public void E(Plane p)
public boolean isPositiveSide(Vector p)
public boolean inPlane(Vector p)
public void invert()
public void setToInPlaneSquare(Vector x0, double size, Vector[] s)
public void setToInPlaneSquare(double size, Vector[] s)
public static void main(java.lang.String[] args)