Class Frustum

java.lang.Object
javaforce.gl.Frustum

public class Frustum extends Object
Represents the frustum (viewable area of a perspective)
Author:
pquiring
  • Field Details

  • Constructor Details

    • Frustum

      public Frustum()
  • Method Details

    • setPerspecive

      public void setPerspecive(float angle, float ratio, float near, float far)
    • setPosition

      public void setPosition(Vector3 p, Vector3 l, Vector3 u)
    • pointInside

      public int pointInside(Vector3 p)
    • sphereInside

      public int sphereInside(Vector3 p, float size)
      Tests if sphere is within frustum.
      Parameters:
      p - = center if sphere
      size - = size of sphere (radius or diameter?)
    • boxInside

      public int boxInside(Vector3[] pts)
      Tests if box is within frustum.
      Parameters:
      pts - = 8 points of box
    • print

      public void print()