Package cds.healpix.common.sphgeom
Enum Polygon.ContainsSouthPoleComputer
- java.lang.Object
-
- java.lang.Enum<Polygon.ContainsSouthPoleComputer>
-
- cds.healpix.common.sphgeom.Polygon.ContainsSouthPoleComputer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Polygon.ContainsSouthPoleComputer>
- Enclosing class:
- Polygon
public static enum Polygon.ContainsSouthPoleComputer extends java.lang.Enum<Polygon.ContainsSouthPoleComputer>
Defines the method used to know if the south pole is in the polygon or in its complement.- Author:
- F.-X. Pineau
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BASIC
Consider the south pole to be inside the polygon if the sum of consecutive longitude differences equals 2pi and if there is more vertices in the south hemisphere than in the north hemisphere.PROVIDED_FALSE
We explicilty tell that the south pole is NOT inside the polygon.PROVIDED_TRUE
We explicitly tell that the south pole is inside the polygon.STD_FXP
Consider that the gravity center of the first 3 non-aligned vertices is inside the polygon if it is on the left of the first two edges, then test is the south pole is inside or outside the polygon.STD_IVOA
Consider that the inside of the polygon is always located on the left part of each edge (thus, the inside become the outside when considering the vertices list in reverse order), then test is the south pole is inside or outside the polygon.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Polygon.ContainsSouthPoleComputer
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Polygon.ContainsSouthPoleComputer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PROVIDED_TRUE
public static final Polygon.ContainsSouthPoleComputer PROVIDED_TRUE
We explicitly tell that the south pole is inside the polygon.
-
PROVIDED_FALSE
public static final Polygon.ContainsSouthPoleComputer PROVIDED_FALSE
We explicilty tell that the south pole is NOT inside the polygon.
-
BASIC
public static final Polygon.ContainsSouthPoleComputer BASIC
Consider the south pole to be inside the polygon if the sum of consecutive longitude differences equals 2pi and if there is more vertices in the south hemisphere than in the north hemisphere.
-
STD_FXP
public static final Polygon.ContainsSouthPoleComputer STD_FXP
Consider that the gravity center of the first 3 non-aligned vertices is inside the polygon if it is on the left of the first two edges, then test is the south pole is inside or outside the polygon.
-
STD_IVOA
public static final Polygon.ContainsSouthPoleComputer STD_IVOA
Consider that the inside of the polygon is always located on the left part of each edge (thus, the inside become the outside when considering the vertices list in reverse order), then test is the south pole is inside or outside the polygon. WARNING: Valid only for non self-intersecting polygons. WARNING: NOT IMPLENTED YET (I HAVE TO SEE HOW TO IMPLEMENT IT FOR CONCAVE POLYGONS).
-
-
Method Detail
-
values
public static Polygon.ContainsSouthPoleComputer[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Polygon.ContainsSouthPoleComputer c : Polygon.ContainsSouthPoleComputer.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Polygon.ContainsSouthPoleComputer valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-