gov.nasa.worldwind.geom
Class ViewFrustum
java.lang.Object
gov.nasa.worldwind.geom.ViewFrustum
public class ViewFrustum
- extends Object
|
Constructor Summary |
ViewFrustum(Angle fieldOfView,
int viewportWidth,
int viewportHeight,
double near,
double far)
Creates a Frustum from a horizontal field-of-view, viewport aspect ratio and distance to near and
far depth clipping planes. |
ViewFrustum(double near,
double far,
double left,
double right,
double bottom,
double top)
Creates a Frustum from three sets of parallel clipping planes (a parallel projection). |
ViewFrustum(Matrix4 projectionMatrix)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ViewFrustum
public ViewFrustum(Angle fieldOfView,
int viewportWidth,
int viewportHeight,
double near,
double far)
- Creates a
Frustum from a horizontal field-of-view, viewport aspect ratio and distance to near and
far depth clipping planes. The near plane must be closer than the far plane, and both planes must be a positive
distance away.
- Parameters:
fieldOfView - horizontal field-of-view angle in the range (0, 180)viewportWidth - the width of the viewport in screen pixelsviewportHeight - the height of the viewport in screen pixelsnear - distance to the near depth clipping planefar - distance to far depth clipping plane
- Throws:
IllegalArgumentException - if fov is not in the range (0, 180), if either near or far are negative, or near
is greater than or equal to far
ViewFrustum
public ViewFrustum(double near,
double far,
double left,
double right,
double bottom,
double top)
- Creates a
Frustum from three sets of parallel clipping planes (a parallel projection). In this case,
the near and far depth clipping planes may be a negative distance away.
- Parameters:
left - distance to the left vertical clipping planeright - distance to the right vertical clipping planebottom - distance to the bottom horizontal clipping planetop - distance to the top horizontal clipping planenear - distance to the near depth clipping planefar - distance to far depth clipping plane
- Throws:
IllegalArgumentException - if the difference of any plane set (lright - left, top - bottom, far - near) is
less than or equal to zero.
ViewFrustum
public ViewFrustum(Matrix4 projectionMatrix)
getFrustum
public final Frustum getFrustum()
getProjectionMatrix
public final Matrix4 getProjectionMatrix()