Class Frustum.Plane

java.lang.Object
com.jogamp.opengl.math.geom.Frustum.Plane
Enclosing class:
Frustum

public static class Frustum.Plane extends Object
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 Details

    • n

      public final float[] n
      Normal of the plane
    • d

      public float d
      Distance 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.
      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

    • distanceTo

      public final float distanceTo(float[] p)
      Return distance of plane to given point, see distanceTo(float, float, float).
    • toString

      public String toString()
      Overrides:
      toString in class Object