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 java.lang.Object implements S2ClosestPointQuery.Target
A point query, used to find the closest points to a query point.
-
-
Constructor Summary
Constructors Constructor Description PointTarget(S2Point point)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2Point
center()
Returns the approximate center of the target.S1ChordAngle
getDistance(S2Cell cell)
Returns the distance between this target and the given cell.S1ChordAngle
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 Detail
-
point
private final S2Point point
-
-
Constructor Detail
-
PointTarget
public PointTarget(S2Point point)
-
-
Method Detail
-
center
public S2Point 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
public S1ChordAngle getMinDistance(S2Point x, S1ChordAngle minDist)
Description copied from interface:S2ClosestPointQuery.Target
Returns the smaller ofdistance
and a new distance from target topoint
.- Specified by:
getMinDistance
in interfaceS2ClosestPointQuery.Target
-
getDistance
public S1ChordAngle getDistance(S2Cell cell)
Description copied from interface:S2ClosestPointQuery.Target
Returns the distance between this target and the given cell.- Specified by:
getDistance
in interfaceS2ClosestPointQuery.Target
-
-