|
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)
Returns true if the specified point is inside the space enclosed by all six of tihs Frustum's clipping planes, and false otherwise. |
boolean |
equals(java.lang.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 |
fromPerspectiveVecs(Vec4 vTL,
Vec4 vTR,
Vec4 vBL,
Vec4 vBR,
double near,
double far)
Creates a Frustum from four edge vectors, viewport aspect ratio and distance to near and far depth
clipping planes. |
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)
Returns true if the specified Extent intersects the space enclosed by all six of this Frustum's clipping
planes, and false otherwise. |
java.lang.String |
toString()
|
Frustum |
transformBy(Matrix matrix)
Returns a copy of this Frustum which is transformed by the specified 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
java.lang.IllegalArgumentException - if any argument is null| Method Detail |
|---|
public final boolean contains(Vec4 point)
point - the point to test.
java.lang.IllegalArgumentException - if the point is null.public boolean equals(java.lang.Object obj)
equals in class java.lang.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
java.lang.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
java.lang.IllegalArgumentException - if the difference of any plane set (lright - left, top - bottom, far - near) is
less than or equal to zero.
public static Frustum fromPerspectiveVecs(Vec4 vTL,
Vec4 vTR,
Vec4 vBL,
Vec4 vBR,
double near,
double far)
Frustum from four edge vectors, 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.
vTL - vector defining the top-left of the frustumvTR - vector defining the top-right of the frustumvBL - vector defining the bottom-left of the frustumvBR - vector defining the bottom-right of the frustumnear - distance to the near depth clipping planefar - distance to far depth clipping plane
java.lang.IllegalArgumentException - if any of the vectors are null, if either near or far are negative, or near is
greater than or equal to farpublic 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 java.lang.Objectpublic final boolean intersects(Extent extent)
Extent intersects the space enclosed by all six of this Frustum's clipping
planes, and false otherwise.
extent - the Extent to test.
java.lang.IllegalArgumentException - if the extent is null.public java.lang.String toString()
toString in class java.lang.Objectpublic Frustum transformBy(Matrix matrix)
matrix - the Matrix to transform this Frustum by.
java.lang.IllegalArgumentException - if the matrix is null
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||