Package com.google.common.geometry
Class S2ClosestPointQuery.PointTarget
java.lang.Object
com.google.common.geometry.S2ClosestPointQuery.PointTarget
- All Implemented Interfaces:
S2ClosestPointQuery.Target
- Enclosing class:
S2ClosestPointQuery<T>
private static class S2ClosestPointQuery.PointTarget
extends Object
implements S2ClosestPointQuery.Target
A point query, used to find the closest points to a query point.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncenter()Returns the approximate center of the target.getDistance(S2Cell cell) Returns the distance between this target and the given cell.getMinDistance(S2Point x, S1ChordAngle minDist) Returns the smaller ofdistanceand a new distance from target topoint.doubleradius()Returns the radian radius of an angular cap that encloses this target.
-
Field Details
-
point
-
-
Constructor Details
-
PointTarget
-
-
Method Details
-
center
Description copied from interface:S2ClosestPointQuery.TargetReturns the approximate center of the target.- Specified by:
centerin interfaceS2ClosestPointQuery.Target
-
radius
public double radius()Description copied from interface:S2ClosestPointQuery.TargetReturns the radian radius of an angular cap that encloses this target.- Specified by:
radiusin interfaceS2ClosestPointQuery.Target
-
getMinDistance
Description copied from interface:S2ClosestPointQuery.TargetReturns the smaller ofdistanceand a new distance from target topoint.- Specified by:
getMinDistancein interfaceS2ClosestPointQuery.Target
-
getDistance
Description copied from interface:S2ClosestPointQuery.TargetReturns the distance between this target and the given cell.- Specified by:
getDistancein interfaceS2ClosestPointQuery.Target
-