public class Planef extends Object
| Constructor and Description |
|---|
Planef()
Create a new undefined
Planef. |
Planef(float a,
float b,
float c,
float d)
Create a new
Planef with the plane equation a*x + b*y + c*z + d = 0. |
Planef(Planef source)
Create a new
Planef as a copy of the given source. |
Planef(Vector3fc point,
Vector3fc normal)
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Vector4f |
equationFromPoints(float v0X,
float v0Y,
float v0Z,
float v1X,
float v1Y,
float v1Z,
float v2X,
float v2Y,
float v2Z,
Vector4f 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 Vector4f |
equationFromPoints(Vector3f v0,
Vector3f v1,
Vector3f v2,
Vector4f 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() |
Planef |
normalize()
Normalize this plane.
|
Planef |
normalize(Planef dest)
Normalize this plane and store the result in
dest. |
Planef |
set(float a,
float b,
float c,
float 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. |
public Planef()
Planef.public Planef(Planef source)
Planef as a copy of the given source.source - the Planef to copy frompublic Planef(Vector3fc point, Vector3fc normal)
point - any point lying on the planenormal - the normal of the planepublic Planef(float a,
float b,
float c,
float d)
Planef 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 Planef set(float a, float b, float c, float 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 Planef normalize()
public Planef normalize(Planef dest)
dest.dest - will hold the resultpublic static Vector4f equationFromPoints(Vector3f v0, Vector3f v1, Vector3f v2, Vector4f 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 Vector4f equationFromPoints(float v0X, float v0Y, float v0Z, float v1X, float v1Y, float v1Z, float v2X, float v2Y, float v2Z, Vector4f 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 withCopyright © 2015–2019 JOML. All rights reserved.