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:
Serializable
,Comparable<S2ContainsPointQuery.S2VertexModel>
,java.lang.constant.Constable
- Enclosing class:
S2ContainsPointQuery
public static enum S2ContainsPointQuery.S2VertexModel
extends Enum<S2ContainsPointQuery.S2VertexModel>
A rule for whether shapes are considered to contain their vertices.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIn the CLOSED model, all shapes contain their vertices (including points and polylines).In the OPEN model, no shapes contain their vertices (not even points).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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.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 Details
-
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
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
In the CLOSED model, all shapes contain their vertices (including points and polylines).
-
-
Constructor Details
-
S2VertexModel
private S2VertexModel()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
shapeContains
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.
-