NASA World Wind

gov.nasa.worldwind.geom
Class PickPointFrustum

java.lang.Object
  extended by gov.nasa.worldwind.geom.Frustum
      extended by gov.nasa.worldwind.geom.PickPointFrustum

public class PickPointFrustum
extends Frustum

A viewport aligned Frustum that also stores the 2D screen rectangle that the Frustum contains.


Nested Class Summary
 
Nested classes/interfaces inherited from class gov.nasa.worldwind.geom.Frustum
Frustum.Corners
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.geom.Frustum
allPlanes, bottom, far, left, near, right, top
 
Constructor Summary
PickPointFrustum(Frustum frustum, Rectangle rect)
          Constructs a new PickPointFrustum from another Frustum and screen rectangle
 
Method Summary
 boolean contains(double x, double y)
          Returns true if the specified point is inside the 2D screen rectangle enclosed by this frustum
 boolean contains(Point point)
          Returns true if the specified point is inside the 2D screen rectangle enclosed by this frustum
 Rectangle getScreenRect()
          Returns the screenRect associated with this frustum
 boolean intersects(Rectangle rect)
          Returns true if the specified 2D screen Rectangle intersects the space enclosed by this view aligned frustums screen rectangle.
 PickPointFrustum transformBy(Matrix matrix)
          Returns a copy of this PickPointFrustum which is transformed by the specified Matrix.
 
Methods inherited from class gov.nasa.worldwind.geom.Frustum
contains, contains, equals, fromPerspective, fromPerspective, fromPerspectiveVecs, fromProjectionMatrix, getAllPlanes, getBottom, getCorners, getFar, getLeft, getNear, getRight, getTop, hashCode, intersects, intersectsSegment, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PickPointFrustum

public PickPointFrustum(Frustum frustum,
                        Rectangle rect)
Constructs a new PickPointFrustum from another Frustum and screen rectangle

Parameters:
frustum - frustum to create the PickPointFrustum from
rect - screen rectangle to store with this frustum
Method Detail

contains

public final boolean contains(double x,
                              double y)
Returns true if the specified point is inside the 2D screen rectangle enclosed by this frustum

Parameters:
x - the x coordinate to test.
y - the y coordinate to test.
Returns:
true if the specified point is inside the space enclosed by this Frustum, and false otherwise.
Throws:
IllegalArgumentException - if the point is null.

contains

public final boolean contains(Point point)
Returns true if the specified point is inside the 2D screen rectangle enclosed by this frustum

Parameters:
point - the point to test.
Returns:
true if the specified point is inside the space enclosed by this Frustum, and false otherwise.
Throws:
IllegalArgumentException - if the point is null.

getScreenRect

public Rectangle getScreenRect()
Returns the screenRect associated with this frustum

Returns:
screenRect associated with this frustum

intersects

public final boolean intersects(Rectangle rect)
Returns true if the specified 2D screen Rectangle intersects the space enclosed by this view aligned frustums screen rectangle.

Parameters:
rect - the rectangle to test
Returns:
true if the specified Rectangle intersects the space enclosed by this Frustum, and false otherwise.
Throws:
IllegalArgumentException - if the extent is null.

transformBy

public PickPointFrustum transformBy(Matrix matrix)
Returns a copy of this PickPointFrustum which is transformed by the specified Matrix.

Overrides:
transformBy in class Frustum
Parameters:
matrix - the Matrix to transform this Frustum by.
Returns:
a copy of this Frustum, transformed by the specified Matrix.
Throws:
IllegalArgumentException - if the matrix is null

NASA World Wind