Package gov.nasa.worldwind.geom
Interface Extent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vec4getCenter()Returns the extent's center point.doublegetDiameter()Returns the extent's diameter.doublegetEffectiveRadius(Plane plane)Computes the effective radius of the extent relative to a specified plane.doublegetProjectedArea(View view)Computes the area in square pixels of thisExtentafter it is projected into the specifiedview'sviewport.doublegetRadius()Returns the extent's radius.Intersection[]intersect(Line line)Computes the intersections of this extent withline.booleanintersects(Frustum frustum)Determines whether or not thisExtentintersectsfrustum.booleanintersects(Line line)Determines whether or notlineintersects thisExtent.booleanintersects(Plane plane)Calculate whether or not thisExtentis 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 thisExtentintersectsfrustum. Returns true if any part of these two objects intersect, including the case where either object wholly contains the other, false otherwise.- Parameters:
frustum- theFrustumwith 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.lineis considered to have infinite length in both directions.- Parameters:
line- theLinewith which to intersect thisExtent.- Returns:
- an array of intersections representing all the points where
lineenters or leave thisExtent.
-
intersects
boolean intersects(Line line)
Determines whether or notlineintersects 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- theLinewith which to test for intersection.- Returns:
- true if an intersection is found, false otherwise.
-
intersects
boolean intersects(Plane plane)
Calculate whether or not thisExtentis intersected byplane.- Parameters:
plane- thePlanewith which to test for intersection.- Returns:
- true if
planeis 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 thisExtentafter it is projected into the specifiedview'sviewport. The returned value is the screen area that thisExtentcovers in the infinite plane defined by theview'sviewport. This area is not limited to the size of theview'sviewport, and portions of thisExtentare not clipped by theview'sfrustum.This returns
Double.POSITIVE_INFINITYif theview'seye point is inside thisExtent, or if any portion of thisExtentis behind the eye point. In either case, thisExtenthas no finite projection on theview.- Parameters:
view- theViewfor which to compute a projected screen area.- Returns:
- the projected screen area of this
Extentin square pixels, orDouble.POSITIVE_INFINITYif theview'seye point is inside thisExtentor part of thisExtentis behind theview'seye point. - Throws:
java.lang.IllegalArgumentException- if theviewisnull.
-
-