NASA World Wind

gov.nasa.worldwind.geom
Interface Extent

All Known Subinterfaces:
Globe
All Known Implementing Classes:
Cylinder, Earth, EarthFlat, EllipsoidalGlobe, FlatGlobe, Mars, Moon, Sphere

public interface Extent

Represents an enclosing volume.


Method Summary
 Vec4 getCenter()
           
 double getDiameter()
           
 double getRadius()
           
 Intersection[] intersect(Line line)
          Obtain the intersections of this extent with line.
 boolean intersects(Frustum frustum)
          Tests whether or not this Extent intersects frustum.
 boolean intersects(Line line)
          Calculate whether or not line intersects this Extent.
 boolean intersects(Plane plane)
          Calculate whether or not this Extent is intersected by plane.
 

Method Detail

getCenter

Vec4 getCenter()

getDiameter

double getDiameter()

getRadius

double getRadius()

intersect

Intersection[] intersect(Line line)
Obtain the intersections of this extent with line. 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 - the Line with which to intersect this Extent
Returns:
an array of intersections representing all the points where line enters or leave this Extent

intersects

boolean intersects(Frustum frustum)
Tests whether or not this Extent intersects frustum. Returns true if any part of these two objects intersect, including the case where either object wholly contains the other, false otherwise.

Parameters:
frustum - the Frustum with which to test for intersection
Returns:
true if there is an intersection, false otherwise

intersects

boolean intersects(Line line)
Calculate whether or not line intersects this Extent. This method may be faster than checking the size of the arary returned by intersect(Line). Implementing methods must ensure that this method returns true if and only if intersect(Line) returns a non-null array containing at least one element.

Parameters:
line - the Line with which to test for intersection
Returns:
true if an intersection is found, false otherwise

intersects

boolean intersects(Plane plane)
Calculate whether or not this Extent is intersected by plane.

Parameters:
plane - the Plane with which to test for intersection
Returns:
true if plane is found to intersect this Extent

NASA World Wind