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 java.lang.Object implements S2ClosestPointQuery.Target
An edge query, used to find the closest points to a query edge.
-
-
Constructor Summary
Constructors Constructor Description EdgeTarget(S2Point a, S2Point b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description S2Pointcenter()Returns the approximate center of the target.S1ChordAnglegetDistance(S2Cell cell)Returns the distance between this target and the given cell.S1ChordAnglegetMinDistance(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.
-
-
-
Method Detail
-
center
public S2Point 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
public S1ChordAngle getMinDistance(S2Point x, S1ChordAngle minDist)
Description copied from interface:S2ClosestPointQuery.TargetReturns the smaller ofdistanceand a new distance from target topoint.- Specified by:
getMinDistancein interfaceS2ClosestPointQuery.Target
-
getDistance
public S1ChordAngle getDistance(S2Cell cell)
Description copied from interface:S2ClosestPointQuery.TargetReturns the distance between this target and the given cell.- Specified by:
getDistancein interfaceS2ClosestPointQuery.Target
-
-