com.jogamp.opengl.math.geom

## 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `float` | `d` Distance to origin
    `float[]` | `n` Normal of the plane

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Frustum.Plane()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `float` | `distanceTo(float[] p)` Return distance of plane to given point, see `distanceTo(float, float, float)`.
    `float` | `distanceTo(float x, float y, float z)` Return signed distance of plane to given point.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### n

          public final float[] n

      Normal of the plane

    - #### d

          public float d

      Distance to origin

  - ### Constructor Detail

    - #### Frustum.Plane

          public Frustum.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

    - #### 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`

Copyright 2010 JogAmp Community.