Package com.google.common.geometry
Class S2ShapeUtil.CentroidMeasure
java.lang.Object
com.google.common.geometry.S2ShapeUtil.CentroidMeasure
- All Implemented Interfaces:
S2ShapeUtil.TriangleConsumer
- Enclosing class:
S2ShapeUtil
public static final class S2ShapeUtil.CentroidMeasure
extends Object
implements S2ShapeUtil.TriangleConsumer
A collector of the center of mass.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
sum
private final double[] sum
-
-
Constructor Details
-
CentroidMeasure
public CentroidMeasure()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceS2ShapeUtil.TriangleConsumer
-
value
Returns the centroid. Only call after all triangles have been consumed.
-