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.
  • Enum Constant Details

    • 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).
  • Constructor Details

    • S2VertexModel

      private S2VertexModel()
  • Method Details

    • values

      public static S2ContainsPointQuery.S2VertexModel[] 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

      public static S2ContainsPointQuery.S2VertexModel valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      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.