public class GeoPolygonFactory extends Object
Modifier and Type | Method and Description |
---|---|
static GeoPolygon |
buildPolygonShape(PlanetModel planetModel,
List<GeoPoint> pointsList,
int startPointIndex,
int endPointIndex,
SidedPlane startingEdge,
boolean isInternalEdge)
Build a GeoMembershipShape given points, starting edge, and whether starting edge is internal or not.
|
protected static int |
getLegalIndex(int index,
int size)
Convert raw point index into valid array position.
|
protected static boolean |
isWithin(GeoPoint newPoint,
List<SidedPlane> currentPlanes)
Check if a point is within a described list of planes.
|
static GeoPolygon |
makeGeoPolygon(PlanetModel planetModel,
List<GeoPoint> pointList,
int convexPointIndex)
Create a GeoMembershipShape of the right kind given the specified bounds.
|
public static GeoPolygon makeGeoPolygon(PlanetModel planetModel, List<GeoPoint> pointList, int convexPointIndex)
pointList
- is a list of the GeoPoints to build an arbitrary polygon out of.convexPointIndex
- is the index of a single convex point whose conformation with
its neighbors determines inside/outside for the entire polygon.public static GeoPolygon buildPolygonShape(PlanetModel planetModel, List<GeoPoint> pointsList, int startPointIndex, int endPointIndex, SidedPlane startingEdge, boolean isInternalEdge)
pointsList
- is a list of the GeoPoints to build an arbitrary polygon out of.startPointIndex
- is one of the points constituting the starting edge.endPointIndex
- is another of the points constituting the starting edge.startingEdge
- is the plane describing the starting edge.isInternalEdge
- is true if the specified edge is an internal one.protected static boolean isWithin(GeoPoint newPoint, List<SidedPlane> currentPlanes)
newPoint
- is the point.currentPlanes
- is the list of planes.protected static int getLegalIndex(int index, int size)
index
- is the array index.size
- is the array size.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.