Package gov.nasa.worldwind.geom
Interface Extent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vec4
getCenter()
Returns the extent's center point.double
getDiameter()
Returns the extent's diameter.double
getEffectiveRadius(Plane plane)
Computes the effective radius of the extent relative to a specified plane.double
getProjectedArea(View view)
Computes the area in square pixels of thisExtent
after it is projected into the specifiedview's
viewport.double
getRadius()
Returns the extent's radius.Intersection[]
intersect(Line line)
Computes the intersections of this extent withline
.boolean
intersects(Frustum frustum)
Determines whether or not thisExtent
intersectsfrustum
.boolean
intersects(Line line)
Determines whether or notline
intersects thisExtent
.boolean
intersects(Plane plane)
Calculate whether or not thisExtent
is intersected byplane
.
-
-
-
Method Detail
-
getCenter
Vec4 getCenter()
Returns the extent's center point.- Returns:
- the extent's center point.
-
getDiameter
double getDiameter()
Returns the extent's diameter. The computation of the diameter depends on the implementing class. See the documentation for the individual classes to determine how they compute a diameter.- Returns:
- the extent's diameter.
-
getRadius
double getRadius()
Returns the extent's radius. The computation of the radius depends on the implementing class. See the documentation for the individual classes to determine how they compute a radius.- Returns:
- the extent's radius.
-
intersects
boolean intersects(Frustum frustum)
Determines whether or not thisExtent
intersectsfrustum
. Returns true if any part of these two objects intersect, including the case where either object wholly contains the other, false otherwise.- Parameters:
frustum
- theFrustum
with which to test for intersection.- Returns:
- true if there is an intersection, false otherwise.
-
intersect
Intersection[] intersect(Line line)
Computes the intersections of this extent withline
. The returned array may be either null or of zero length if no intersections are discovered. It does not contain null elements. Tangential intersections are marked as such.line
is considered to have infinite length in both directions.- Parameters:
line
- theLine
with which to intersect thisExtent
.- Returns:
- an array of intersections representing all the points where
line
enters or leave thisExtent
.
-
intersects
boolean intersects(Line line)
Determines whether or notline
intersects thisExtent
. This method may be faster than checking the size of the array returned byintersect(Line)
. Implementing methods must ensure that this method returns true if and only ifintersect(Line)
returns a non-null array containing at least one element.- Parameters:
line
- theLine
with which to test for intersection.- Returns:
- true if an intersection is found, false otherwise.
-
intersects
boolean intersects(Plane plane)
Calculate whether or not thisExtent
is intersected byplane
.- Parameters:
plane
- thePlane
with which to test for intersection.- Returns:
- true if
plane
is found to intersect thisExtent
.
-
getEffectiveRadius
double getEffectiveRadius(Plane plane)
Computes the effective radius of the extent relative to a specified plane.- Parameters:
plane
- the plane.- Returns:
- the effective radius, or 0 if the plane is null.
-
getProjectedArea
double getProjectedArea(View view)
Computes the area in square pixels of thisExtent
after it is projected into the specifiedview's
viewport. The returned value is the screen area that thisExtent
covers in the infinite plane defined by theview's
viewport. This area is not limited to the size of theview's
viewport, and portions of thisExtent
are not clipped by theview's
frustum.This returns
Double.POSITIVE_INFINITY
if theview's
eye point is inside thisExtent
, or if any portion of thisExtent
is behind the eye point. In either case, thisExtent
has no finite projection on theview
.- Parameters:
view
- theView
for which to compute a projected screen area.- Returns:
- the projected screen area of this
Extent
in square pixels, orDouble.POSITIVE_INFINITY
if theview's
eye point is inside thisExtent
or part of thisExtent
is behind theview's
eye point. - Throws:
java.lang.IllegalArgumentException
- if theview
isnull
.
-
-