|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Plane equation := dot(n, x - p) = 0 -> Ax + By + Cz + d == 0. More...
Public Member Functions | |
| Plane () | |
| Plane (final Plane o) | |
| Plane | set (final Plane o) |
| Plane | set (final Vec3f p0, final Vec3f p1, final Vec3f p2) |
| Setup of plane using 3 points. More... | |
| Plane | set (final Vec3f n, final Vec3f p0) |
| Setup of plane using given normal and one point on plane. More... | |
| Vec4f | toVec4f (final Vec4f out) |
Sets the given Vec4f out to ( n, d ). More... | |
| void | toFloats (final float[] out, final int off) |
Sets the given [float[off]..float[off+4]) out to ( n, d ). More... | |
| final float | distanceTo (final float x, final float y, final float z) |
| Return signed distance of plane to given point. More... | |
| final float | distanceTo (final Vec3f p) |
Return distance of plane to given point, see distanceTo(float, float, float). More... | |
| String | toString () |
Public Attributes | |
| final Vec3f | n |
| Normal of the plane. More... | |
| float | d |
| Distance to origin. More... | |
Plane equation := dot(n, x - p) = 0 -> Ax + By + Cz + d == 0.
In order to work w/ isOutside(..) methods, the normals have to point to the inside of the frustum.
Definition at line 158 of file Frustum.java.
| com.jogamp.math.geom.Frustum.Plane.Plane | ( | ) |
Definition at line 165 of file Frustum.java.
| com.jogamp.math.geom.Frustum.Plane.Plane | ( | final Plane | o | ) |
Definition at line 170 of file Frustum.java.
| final float com.jogamp.math.geom.Frustum.Plane.distanceTo | ( | final float | x, |
| final float | y, | ||
| final float | z | ||
| ) |
Return signed distance of plane to given point.
A plane cuts 3D space into 2 half spaces.
Positive halfspace is where the plane’s normals vector points into.
Negative halfspace is the other side of the plane, i.e. *-1
Definition at line 244 of file Frustum.java.
| final float com.jogamp.math.geom.Frustum.Plane.distanceTo | ( | final Vec3f | p | ) |
Return distance of plane to given point, see distanceTo(float, float, float).
Definition at line 249 of file Frustum.java.
Definition at line 175 of file Frustum.java.
Setup of plane using given normal and one point on plane.
The given normal is mutated, the point not mutated.
| n | normal to plane pointing to the inside of this frustum |
| p0 | point on plane, consider choosing the closest point to origin |
Definition at line 206 of file Frustum.java.
Setup of plane using 3 points.
None of the three points are mutated.
Since this method may not properly define whether the normal points inside the frustum, consider using set(Vec3f, Vec3f).
| p0 | point on plane, used as the shared start-point for vec(p0->p1) and vec(p0->p2) |
| p1 | point on plane |
| p2 | point on plane |
Definition at line 192 of file Frustum.java.
| void com.jogamp.math.geom.Frustum.Plane.toFloats | ( | final float[] | out, |
| final int | off | ||
| ) |
Sets the given [float[off]..float[off+4]) out to ( n, d ).
| out | the float[off+4] output array |
Definition at line 222 of file Frustum.java.
| String com.jogamp.math.geom.Frustum.Plane.toString | ( | ) |
Definition at line 254 of file Frustum.java.
Sets the given Vec4f out to ( n, d ).
Returns out for chaining.
Definition at line 213 of file Frustum.java.
| float com.jogamp.math.geom.Frustum.Plane.d |
Distance to origin.
Definition at line 163 of file Frustum.java.
| final Vec3f com.jogamp.math.geom.Frustum.Plane.n |
Normal of the plane.
Definition at line 160 of file Frustum.java.