Class 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 Detail

      • n

        public final Vec3f n
        Normal of the plane
      • d

        public float d
        Distance to origin
    • Constructor Detail

      • Plane

        public Plane()
    • Method Detail

      • 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