Package com.google.common.geometry
Class S2Shape.ReferencePoint
- java.lang.Object
-
- com.google.common.geometry.S2Point
-
- com.google.common.geometry.S2Shape.ReferencePoint
-
- Enclosing interface:
- S2Shape
public abstract static class S2Shape.ReferencePoint extends S2Point
A point with a known containment relationship.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.geometry.S2Point
S2Point.Builder, S2Point.Shape
-
-
Field Summary
Fields Modifier and Type Field Description private static S2Shape.ReferencePoint
ORIGIN_INSIDE
private static S2Shape.ReferencePoint
ORIGIN_OUTSIDE
-
Constructor Summary
Constructors Modifier Constructor Description private
ReferencePoint(S2Point p)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
contained()
Returns true if this point is contained by the reference shape.static S2Shape.ReferencePoint
create(boolean contained)
Returns a referenced point at an arbitrary position, suitable for shapes that contain all points or no points.static S2Shape.ReferencePoint
create(S2Point p, boolean contained)
Creates a referenced point at position 'p', with known containment 'contained'.boolean
equals(java.lang.Object o)
-
Methods inherited from class com.google.common.geometry.S2Point
add, add, aequal, angle, compareTo, contains, contains, crossProd, crossProd, crossProdNorm, decode, decode, div, div, dotProd, encode, encode, equalsPoint, fabs, fabs, get, getCapBound, getDistance, getDistance2, getRectBound, getX, getY, getZ, hashCode, largestAbsComponent, largestAbsComponent, lessThan, mayIntersect, minus, mul, mul, neg, neg, norm, norm2, normalize, normalize, ortho, rotate, scalarTripleProduct, sub, sub, toBuilder, toDegreesString, toString
-
-
-
-
Field Detail
-
ORIGIN_INSIDE
private static final S2Shape.ReferencePoint ORIGIN_INSIDE
-
ORIGIN_OUTSIDE
private static final S2Shape.ReferencePoint ORIGIN_OUTSIDE
-
-
Constructor Detail
-
ReferencePoint
private ReferencePoint(S2Point p)
-
-
Method Detail
-
contained
public abstract boolean contained()
Returns true if this point is contained by the reference shape.
-
create
public static S2Shape.ReferencePoint create(boolean contained)
Returns a referenced point at an arbitrary position, suitable for shapes that contain all points or no points.
-
create
public static S2Shape.ReferencePoint create(S2Point p, boolean contained)
Creates a referenced point at position 'p', with known containment 'contained'.
-
-