NASA World Wind

gov.nasa.worldwind.util
Class GeometryMath

java.lang.Object
  extended by gov.nasa.worldwind.util.GeometryMath

public class GeometryMath
extends Object

A collection of useful geometric methods, all static.


Constructor Summary
GeometryMath()
           
 
Method Summary
static double computePolygonArea(Iterable<? extends LatLon> locations)
           
static double computePolygonArea2(Iterable<? extends Vec4> points)
           
static String computePolygonWindingOrder(Iterable<? extends LatLon> locations)
           
static String computePolygonWindingOrder2(Iterable<? extends Vec4> points)
           
static boolean isLocationInside(LatLon location, Iterable<? extends LatLon> locations)
          Determines whether a LatLon location is located inside a given polygon.
static boolean isPolygonClosed(Iterable<? extends LatLon> locations)
           
static boolean isPolygonClosed2(Iterable<? extends Vec4> points)
           
static boolean isSegmentIntersectingSector(LatLon begin, LatLon end, Sector sector)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryMath

public GeometryMath()
Method Detail

computePolygonArea

public static double computePolygonArea(Iterable<? extends LatLon> locations)

computePolygonArea2

public static double computePolygonArea2(Iterable<? extends Vec4> points)

computePolygonWindingOrder

public static String computePolygonWindingOrder(Iterable<? extends LatLon> locations)

computePolygonWindingOrder2

public static String computePolygonWindingOrder2(Iterable<? extends Vec4> points)

isLocationInside

public static boolean isLocationInside(LatLon location,
                                       Iterable<? extends LatLon> locations)
Determines whether a LatLon location is located inside a given polygon.

Parameters:
location - the location
locations - the list of positions describing the polygon. Last one should be the same as the first one.
Returns:
true if the location is inside the polygon.

isPolygonClosed

public static boolean isPolygonClosed(Iterable<? extends LatLon> locations)

isPolygonClosed2

public static boolean isPolygonClosed2(Iterable<? extends Vec4> points)

isSegmentIntersectingSector

public static boolean isSegmentIntersectingSector(LatLon begin,
                                                  LatLon end,
                                                  Sector sector)

NASA World Wind

Hosted by docs.bugaco.com