public class Planed extends Object implements Externalizable
| Modifier and Type | Field and Description |
|---|---|
double |
a
The factor
a in the plane equation a*x + b*y + c*z + d = 0. |
double |
b
The factor
b in the plane equation a*x + b*y + c*z + d = 0. |
double |
c
The factor
c in the plane equation a*x + b*y + c*z + d = 0. |
double |
d
The constant
d in the plane equation a*x + b*y + c*z + d = 0. |
| Constructor and Description |
|---|
Planed()
Create a new undefined
Planed. |
Planed(double a,
double b,
double c,
double d)
Create a new
Planed with the plane equation a*x + b*y + c*z + d = 0. |
Planed(Planed source)
Create a new
Planed as a copy of the given source. |
Planed(Vector3dc point,
Vector3dc normal)
|
Planed(Vector3dc pointA,
Vector3dc pointB,
Vector3dc pointC)
Create a new
Planef from the given three points lying on the plane. |
Planed(Vector3fc pointA,
Vector3fc pointB,
Vector3fc pointC)
Create a new
Planef from the given three points lying on the plane. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Vector4d |
equationFromPoints(double v0X,
double v0Y,
double v0Z,
double v1X,
double v1Y,
double v1Z,
double v2X,
double v2Y,
double v2Z,
Vector4d dest)
Compute the factors
a, b, c and d in the plane equation
a*x + b*y + c*z + d = 0 from the three points (v0X, v0Y, v0Z), (v1X, v1Y, v1Z) and
(v2X, v2Y, v2Z) on the plane, and write the values to the x, y, z
and w components, respectively, of the given dest vector. |
static Vector4d |
equationFromPoints(Vector3d v0,
Vector3d v1,
Vector3d v2,
Vector4d dest)
Compute the factors
a, b, c and d in the plane equation
a*x + b*y + c*z + d = 0 from the given three points on the plane, and write the values
to the x, y, z and w components, respectively, of the given
dest vector. |
int |
hashCode() |
Planed |
normalize()
Normalize this plane.
|
Planed |
normalize(Planed dest)
Normalize this plane and store the result in
dest. |
void |
readExternal(ObjectInput in) |
Planed |
set(double a,
double b,
double c,
double d)
Set the components of this plane.
|
String |
toString()
Return a string representation of this plane.
|
String |
toString(NumberFormat formatter)
Return a string representation of this plane by formatting the components with the given
NumberFormat. |
void |
writeExternal(ObjectOutput out) |
public double a
a in the plane equation a*x + b*y + c*z + d = 0.public double b
b in the plane equation a*x + b*y + c*z + d = 0.public double c
c in the plane equation a*x + b*y + c*z + d = 0.public double d
d in the plane equation a*x + b*y + c*z + d = 0.public Planed()
Planed.public Planed(Planed source)
Planed as a copy of the given source.source - the Planed to copy frompublic Planed(Vector3dc point, Vector3dc normal)
point - any point lying on the planenormal - the normal of the planepublic Planed(double a,
double b,
double c,
double d)
Planed with the plane equation a*x + b*y + c*z + d = 0.a - the x factor in the plane equationb - the y factor in the plane equationc - the z factor in the plane equationd - the constant in the plane equationpublic Planed(Vector3dc pointA, Vector3dc pointB, Vector3dc pointC)
Planef from the given three points lying on the plane.
The resulting plane is not necessarily normalized.
pointA - the first pointpointB - the second pointpointC - the third pointpublic Planed(Vector3fc pointA, Vector3fc pointB, Vector3fc pointC)
Planef from the given three points lying on the plane.
The resulting plane is not necessarily normalized.
pointA - the first pointpointB - the second pointpointC - the third pointpublic Planed set(double a, double b, double c, double d)
a - the x factor in the plane equationb - the y factor in the plane equationc - the z factor in the plane equationd - the constant in the plane equationpublic Planed normalize()
public Planed normalize(Planed dest)
dest.dest - will hold the resultpublic static Vector4d equationFromPoints(Vector3d v0, Vector3d v1, Vector3d v2, Vector4d dest)
a, b, c and d in the plane equation
a*x + b*y + c*z + d = 0 from the given three points on the plane, and write the values
to the x, y, z and w components, respectively, of the given
dest vector.v0 - the first point on the planev1 - the second point on the planev2 - the third point on the planedest - will hold the resultpublic static Vector4d equationFromPoints(double v0X, double v0Y, double v0Z, double v1X, double v1Y, double v1Z, double v2X, double v2Y, double v2Z, Vector4d dest)
a, b, c and d in the plane equation
a*x + b*y + c*z + d = 0 from the three points (v0X, v0Y, v0Z), (v1X, v1Y, v1Z) and
(v2X, v2Y, v2Z) on the plane, and write the values to the x, y, z
and w components, respectively, of the given dest vector.v0X - the x coordinate of the first point on the planev0Y - the y coordinate of the first point on the planev0Z - the z coordinate of the first point on the planev1X - the x coordinate of the second point on the planev1Y - the y coordinate of the second point on the planev1Z - the z coordinate of the second point on the planev2X - the x coordinate of the third point on the planev2Y - the y coordinate of the third point on the planev2Z - the z coordinate of the third point on the planedest - will hold the resultpublic String toString()
This method creates a new DecimalFormat on every invocation with the format string "0.000E0;-".
public String toString(NumberFormat formatter)
NumberFormat.formatter - the NumberFormat used to format the components withpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2015–2019 JOML. All rights reserved.