Class S2AreaCentroid

  • All Implemented Interfaces:
    java.io.Serializable

    @GwtCompatible(serializable=true)
    public final class S2AreaCentroid
    extends java.lang.Object
    implements java.io.Serializable
    The area of an interior, i.e. the region on the left side of an odd number of loops and optionally a centroid. The area is between 0 and 4*Pi. If it has a centroid, it is the true centroid of the interior multiplied by the area of the shape. Note that the centroid may not be contained by the shape.
    See Also:
    Serialized Form
    • Field Detail

      • area

        private final double area
      • centroid

        private final S2Point centroid
    • Constructor Detail

      • S2AreaCentroid

        public S2AreaCentroid​(double area,
                              @Nullable
                              S2Point centroid)
    • Method Detail

      • getArea

        public double getArea()
      • getCentroid

        @Nullable
        public S2Point getCentroid()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object