Package com.google.common.geometry
Class S2ShapeUtil.AreaCentroidMeasure
- java.lang.Object
-
- com.google.common.geometry.S2ShapeUtil.AreaCentroidMeasure
-
- All Implemented Interfaces:
S2ShapeUtil.TriangleConsumer
- Enclosing class:
- S2ShapeUtil
public static final class S2ShapeUtil.AreaCentroidMeasure extends Object implements S2ShapeUtil.TriangleConsumer
A collector of both combined area and centroid values.
-
-
Constructor Summary
Constructors Constructor Description AreaCentroidMeasure()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(S2Point a, S2Point b, S2Point c)S2AreaCentroidvalue(int numVertices, com.google.common.base.Supplier<Boolean> isNormalized)Returns the area and centroid.
-
-
-
Method Detail
-
accept
public void accept(S2Point a, S2Point b, S2Point c)
- Specified by:
acceptin interfaceS2ShapeUtil.TriangleConsumer
-
value
public S2AreaCentroid value(int numVertices, com.google.common.base.Supplier<Boolean> isNormalized)
Returns the area and centroid. Only call after all triangles have been consumed.
-
-