Package com.google.common.geometry
Class S2ClosestPointQuery.EdgeTarget
java.lang.Object
com.google.common.geometry.S2ClosestPointQuery.EdgeTarget
- All Implemented Interfaces:
S2ClosestPointQuery.Target
- Enclosing class:
S2ClosestPointQuery<T>
private static class S2ClosestPointQuery.EdgeTarget
extends Object
implements S2ClosestPointQuery.Target
An edge query, used to find the closest points to a query edge.
-
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 ofdistance
and a new distance from target topoint
.double
radius()
Returns the radian radius of an angular cap that encloses this target.
-
Field Details
-
a
-
b
-
-
Constructor Details
-
EdgeTarget
-
-
Method Details
-
center
Description copied from interface:S2ClosestPointQuery.Target
Returns the approximate center of the target.- Specified by:
center
in interfaceS2ClosestPointQuery.Target
-
radius
public double radius()Description copied from interface:S2ClosestPointQuery.Target
Returns the radian radius of an angular cap that encloses this target.- Specified by:
radius
in interfaceS2ClosestPointQuery.Target
-
getMinDistance
Description copied from interface:S2ClosestPointQuery.Target
Returns the smaller ofdistance
and a new distance from target topoint
.- Specified by:
getMinDistance
in interfaceS2ClosestPointQuery.Target
-
getDistance
Description copied from interface:S2ClosestPointQuery.Target
Returns the distance between this target and the given cell.- Specified by:
getDistance
in interfaceS2ClosestPointQuery.Target
-