|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.geom.Frustum
public class Frustum
Instances of Frustum are immutable.
| Constructor Summary | |
|---|---|
Frustum()
Create a default frustum with six Planes. |
|
Frustum(Plane left,
Plane right,
Plane bottom,
Plane top,
Plane near,
Plane far)
Create a frustum from six Planes, which define its boundaries. |
|
| Method Summary | |
|---|---|
boolean |
contains(Vec4 point)
|
boolean |
equals(Object obj)
|
static Frustum |
fromPerspective(Angle horizontalFieldOfView,
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. |
static Frustum |
fromPerspective(double width,
double height,
double near,
double far)
Creates a Frustum from three sets of parallel clipping planes (a parallel projectionMatrix). |
static Frustum |
fromProjectionMatrix(Matrix projectionMatrix)
|
Plane[] |
getAllPlanes()
|
Plane |
getBottom()
|
Plane |
getFar()
|
Plane |
getLeft()
|
Plane |
getNear()
|
Plane |
getRight()
|
Plane |
getTop()
|
int |
hashCode()
|
boolean |
intersects(Extent extent)
|
String |
toString()
|
Frustum |
transformBy(Matrix matrix)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Frustum()
Planes. This defines a box of dimension (2, 2, 2) centered at the
origin.
public Frustum(Plane left,
Plane right,
Plane bottom,
Plane top,
Plane near,
Plane far)
Planes, which define its boundaries. Does not except null arguments.
near - the near planefar - the far planeleft - the left side of the view frustumright - the right side of the view frustmtop - the top of the view frustumbottom - the bottom of the view frustum
IllegalArgumentException - if any argument is null| Method Detail |
|---|
public final boolean contains(Vec4 point)
point -
IllegalArgumentException - if point is nullpublic boolean equals(Object obj)
equals in class Object
public static Frustum fromPerspective(Angle horizontalFieldOfView,
int viewportWidth,
int viewportHeight,
double near,
double far)
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.
horizontalFieldOfView - 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
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
public static Frustum fromPerspective(double width,
double height,
double near,
double far)
Frustum from three sets of parallel clipping planes (a parallel projectionMatrix). In this
case, the near and far depth clipping planes may be a negative distance away.
near - distance to the near depth clipping planefar - distance to far depth clipping planewidth - horizontal dimension of the near clipping planeheight - vertical dimension of the near clipping plane
IllegalArgumentException - if the difference of any plane set (lright - left, top - bottom, far - near) is
less than or equal to zero.public static Frustum fromProjectionMatrix(Matrix projectionMatrix)
public Plane[] getAllPlanes()
public final Plane getBottom()
public final Plane getFar()
public final Plane getLeft()
public final Plane getNear()
public final Plane getRight()
public final Plane getTop()
public int hashCode()
hashCode in class Objectpublic final boolean intersects(Extent extent)
extent -
IllegalArgumentException - if extent is nullpublic String toString()
toString in class Objectpublic Frustum transformBy(Matrix matrix)
matrix -
IllegalArgumentException - if matrix is null
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||