com.jogamp.opengl.math.geom
Class Frustum.Plane

java.lang.Object
  extended by 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
 float d
          Distance to origin
 float[] n
          Normal of the plane
 
Constructor Summary
Frustum.Plane()
           
 
Method Summary
 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. 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.