Package com.google.common.geometry
Enum S2ContainsPointQuery.S2VertexModel
- java.lang.Object
-
- java.lang.Enum<S2ContainsPointQuery.S2VertexModel>
-
- com.google.common.geometry.S2ContainsPointQuery.S2VertexModel
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<S2ContainsPointQuery.S2VertexModel>
- Enclosing class:
- S2ContainsPointQuery
public static enum S2ContainsPointQuery.S2VertexModel extends java.lang.Enum<S2ContainsPointQuery.S2VertexModel>
A rule for whether shapes are considered to contain their vertices.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSED
In the CLOSED model, all shapes contain their vertices (including points and polylines).OPEN
In the OPEN model, no shapes contain their vertices (not even points).SEMI_OPEN
In the SEMI_OPEN model, polygon point containment is defined such that if several polygons tile the region around a vertex, then exactly one of those polygons contains that vertex.
-
Constructor Summary
Constructors Modifier Constructor Description private
S2VertexModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
shapeContains(S2Point cellCenter, S2ShapeIndex.S2ClippedShape clipped, S2Point p)
Returns true if the clipped portion of a shape 'clipped' from a cell with center 'cellCenter' contains the point 'p' according to this vertex model.static S2ContainsPointQuery.S2VertexModel
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static S2ContainsPointQuery.S2VertexModel[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OPEN
public static final S2ContainsPointQuery.S2VertexModel OPEN
In the OPEN model, no shapes contain their vertices (not even points). Therefore contains(S2Point) returns true if and only if the point is in the interior of some polygon.
-
SEMI_OPEN
public static final S2ContainsPointQuery.S2VertexModel SEMI_OPEN
In the SEMI_OPEN model, polygon point containment is defined such that if several polygons tile the region around a vertex, then exactly one of those polygons contains that vertex. Points and polylines still do not contain any vertices.
-
CLOSED
public static final S2ContainsPointQuery.S2VertexModel CLOSED
In the CLOSED model, all shapes contain their vertices (including points and polylines).
-
-
Method Detail
-
values
public static S2ContainsPointQuery.S2VertexModel[] 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 (S2ContainsPointQuery.S2VertexModel c : S2ContainsPointQuery.S2VertexModel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static S2ContainsPointQuery.S2VertexModel 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
-
shapeContains
public boolean shapeContains(S2Point cellCenter, S2ShapeIndex.S2ClippedShape clipped, S2Point p)
Returns true if the clipped portion of a shape 'clipped' from a cell with center 'cellCenter' contains the point 'p' according to this vertex model.
-
-