Package gov.nasa.worldwind.geom
Class PickPointFrustum
- java.lang.Object
-
- gov.nasa.worldwind.geom.Frustum
-
- gov.nasa.worldwind.geom.PickPointFrustum
-
public class PickPointFrustum extends Frustum
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class gov.nasa.worldwind.geom.Frustum
Frustum.Corners
-
-
Constructor Summary
Constructors Constructor Description PickPointFrustum(Frustum frustum, java.awt.Rectangle rect)
Constructs a new PickPointFrustum from another Frustum and screen rectangle
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(double x, double y)
Returns true if the specified point is inside the 2D screen rectangle enclosed by this frustumboolean
contains(java.awt.Point point)
Returns true if the specified point is inside the 2D screen rectangle enclosed by this frustumjava.awt.Rectangle
getScreenRect()
Returns the screenRect associated with this frustumboolean
intersects(java.awt.Rectangle rect)
Returns true if the specified 2D screenRectangle
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
-
-
-
-
Constructor Detail
-
PickPointFrustum
public PickPointFrustum(Frustum frustum, java.awt.Rectangle rect)
Constructs a new PickPointFrustum from another Frustum and screen rectangle- Parameters:
frustum
- frustum to create the PickPointFrustum fromrect
- screen rectangle to store with this frustum
-
-
Method Detail
-
intersects
public final boolean intersects(java.awt.Rectangle rect)
Returns true if the specified 2D screenRectangle
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:
java.lang.IllegalArgumentException
- if the extent is null.
-
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:
java.lang.IllegalArgumentException
- if the point is null.
-
contains
public final boolean contains(java.awt.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:
java.lang.IllegalArgumentException
- if the point is null.
-
transformBy
public PickPointFrustum transformBy(Matrix matrix)
Returns a copy of this PickPointFrustum which is transformed by the specified Matrix.- Overrides:
transformBy
in classFrustum
- Parameters:
matrix
- the Matrix to transform this Frustum by.- Returns:
- a copy of this Frustum, transformed by the specified Matrix.
- Throws:
java.lang.IllegalArgumentException
- if the matrix is null
-
getScreenRect
public java.awt.Rectangle getScreenRect()
Returns the screenRect associated with this frustum- Returns:
- screenRect associated with this frustum
-
-