Package com.jogamp.opengl.math.geom
Class Frustum.Plane
java.lang.Object
com.jogamp.opengl.math.geom.Frustum.Plane
- Enclosing class:
- Frustum
Plane equation := dot(n, x - p) = 0 -> ax + bc + cx + d == 0
In order to work w/ isOutside(..)
methods,
the normals have to point to the inside of the frustum.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal float
distanceTo
(float[] p) Return distance of plane to given point, seedistanceTo(float, float, float)
.final float
distanceTo
(float x, float y, float z) Return signed distance of plane to given point.toString()
-
Field Details
-
n
public final float[] nNormal of the plane -
d
public float dDistance to origin
-
-
Constructor Details
-
Plane
public Plane()
-
-
Method Details
-
distanceTo
public final float distanceTo(float x, float y, float z) Return signed distance of plane to given point.- If dist < 0 , then the point p lies in the negative halfspace.
- If dist = 0 , then the point p lies in the plane.
- If dist > 0 , then the point p lies in the positive halfspace.
Positive halfspace is where the plane’s normals vector points into.
Negative halfspace is the other side of the plane, i.e. *-1
-
distanceTo
public final float distanceTo(float[] p) Return distance of plane to given point, seedistanceTo(float, float, float)
. -
toString
-