Uses of Class
com.google.common.geometry.S1Angle
-
-
Uses of S1Angle in com.google.common.geometry
Fields in com.google.common.geometry declared as S1Angle Modifier and Type Field Description static S1Angle
S2EdgeUtil. DEFAULT_INTERSECTION_TOLERANCE
IEEE floating-point operations have a maximum error of 0.5 ULPS (units in the last place).static S1Angle
S1Angle. INFINITY
An angle larger than any finite angle.private S1Angle
S2ClosestPointQuery. maxDistance
The max distance to search for points.private S1Angle
S2PolygonBuilder.Options.Builder. mergeDistance
private S1Angle
S2PolygonBuilder.Options. mergeDistance
static S1Angle
S1Angle. ZERO
An explicit shorthand for the default constructor.Methods in com.google.common.geometry that return S1Angle Modifier and Type Method Description S1Angle
S1Angle. add(S1Angle a)
Retuns anS1Angle
whose angle is(this + a)
.S1Angle
S2Cap. angle()
Returns the cap radius as an S1Angle.S1Angle
S1Angle.Builder. build()
Returns a newS1Angle
copied from the current state of this builder.static S1Angle
S1Angle. degrees(double degrees)
Returns a new S1Angle converted from degrees.S1Angle
S1Angle. div(double d)
Retuns anS1Angle
whose angle is(this / d)
.static S1Angle
S1Angle. e5(int e5)
Returns a new S1Angle converted from tens of microdegrees.static S1Angle
S1Angle. e6(int e6)
Returns a new S1Angle converted from microdegrees.static S1Angle
S1Angle. e7(int e7)
Returns a new S1Angle converted from tenths of a microdegree.S1Angle
S2Polyline. getArclengthAngle()
Return the angle corresponding to the total arclength of the polyline on a unit sphere.private static S1Angle
S2LatLngRectBase. getDirectedHausdorffDistance(double lngDiff, R1Interval a, R1Interval b)
Return the directed Hausdorff distance from one longitudinal edge spanning latitude rangea_lat
to the other longitudinal edge spanning latitude rangeb_lat
, with their longitudinal difference given bylngDiff
.S1Angle
S2LatLngRectBase. getDirectedHausdorffDistance(S2LatLngRectBase other)
Returns the directed Hausdorff distance (measured along the surface of the sphere) to the given S2LatLngRect.static S1Angle
S2EdgeUtil. getDistance(S2Point x, S2Point a, S2Point b)
Return the minimum distance from X to any point on the edge AB.static S1Angle
S2EdgeUtil. getDistance(S2Point x, S2Point a, S2Point b, S2Point aCrossB)
A slightly more efficient version of getDistance() where the cross product of the two endpoints has been precomputed.S1Angle
S2LatLng. getDistance(S2LatLng o)
Return the distance (measured along the surface of the sphere) to the given point.S1Angle
S2LatLngRectBase. getDistance(S2LatLng p)
Returns the minimum distance (measured along the surface of the sphere) from a given point to the rectangle (both its boundary and its interior).S1Angle
S2LatLngRectBase. getDistance(S2LatLngRectBase other)
Returns the minimum distance (measured along the surface of the sphere) to the given S2LatLngRectBase.S1Angle
S2Loop. getDistance(S2Point p)
Returns the shortest distance from a point P to this loop, given as the angle formed between P, the origin and the nearest point on the loop to P.S1Angle
S2Polygon. getDistance(S2Point p)
Returns the shortest distance from a point P to this polygon, given as the angle formed between P, the origin, and the nearest point on the polygon to P.S1Angle
S2LatLngRectBase. getHausdorffDistance(S2LatLngRectBase other)
Returns the undirected Hausdorff distance (measured along the surface of the sphere) to the given S2LatLngRect.private static S1Angle
S2LatLngRectBase. getInteriorMaxDistance(R1Interval aLat, S2Point b)
Return max distance from a point b to the segment spanning latitude range aLat on longitude 0, if the max occurs in the interior of aLat.S1Angle
S2ClosestPointQuery. getMaxDistance()
Returns the max distance between returned points and the given target.S1Angle
S2PolygonBuilder.Options. getMergeDistance()
If set to a positive value, all vertex pairs that are separated by less than this distance will be merged together.S1Angle
S2PolygonBuilder.Options. getRobustnessRadius()
Returns robustness radius computed frommergeDistance
andedgeSpliceFraction
.S1Angle
S2LatLng. lat()
Returns the latitude of this point as a new S1Angle.S1Angle
S2LatLngRectBase. latHi()
static S1Angle
S2LatLng. latitude(S2Point p)
S1Angle
S2LatLngRectBase. latLo()
static S1Angle
S2ShapeIndexMeasures. length(S2ShapeIndex shapeIndex)
Returns the total length of all polylines in shapeIndex, orZERO
if shapeIndex contains no polylines.static S1Angle
S2ShapeMeasures. length(S2Shape shape)
Returns the sum of all polyline lengths on the unit sphere for shapes of dimension 1, orZERO
otherwise.S1Angle
S2LatLng. lng()
Returns the longitude of this point as a new S1Angle.S1Angle
S2LatLngRectBase. lngHi()
S1Angle
S2LatLngRectBase. lngLo()
static S1Angle
S2LatLng. longitude(S2Point p)
(package private) static S1Angle
S2ShapeMeasures. loopPerimeter(S2Shape shape, int chainId)
Returns the perimeter of the loop, orZERO
if the loop has 0 or 1 vertices.static S1Angle
S1Angle. max(S1Angle left, S1Angle right)
static S1Angle
S1Angle. min(S1Angle left, S1Angle right)
S1Angle
S1Angle. mul(double m)
Retuns anS1Angle
whose angle is(this * m)
.S1Angle
S1Angle. neg()
S1Angle
S1Angle. normalize()
Returns the angle normalized to the range (-180, 180] degrees.static S1Angle
S2ShapeIndexMeasures. perimeter(S2ShapeIndex shapeIndex)
Returns the total perimeter of all polygons in shapeIndex (including both "shells" and "holes"), orZERO
shapeIndex contains no polygons.static S1Angle
S2ShapeMeasures. perimeter(S2Shape shape)
Returns the sum of all loop perimeters on the unit sphere for shapes of dimension 2, orZERO
otherwise.(package private) static S1Angle
S2ShapeMeasures. polylineLength(S2Shape shape, int chainId)
Returns the length of the polyline, orZERO
if the polyline has fewer than two vertices.static S1Angle
S1Angle. radians(double radians)
Returns a new S1Angle specified in radians.S1Angle
S1Angle. sub(S1Angle a)
Retuns anS1Angle
whose angle is(this - a)
.S1Angle
S1ChordAngle. toAngle()
Convert the chord angle to anS1Angle
.Methods in com.google.common.geometry with parameters of type S1Angle Modifier and Type Method Description S1Angle
S1Angle. add(S1Angle a)
Retuns anS1Angle
whose angle is(this + a)
.S1Angle.Builder
S1Angle.Builder. add(S1Angle angle)
Adds angle.boolean
S2Polygon. approxContains(S2Polygon b, S1Angle vertexMergeRadius)
Returns true if this polygon (A) approximately contains the given other polygon (B).private java.util.Map<S2Point,S2Point>
S2PolygonBuilder. buildMergeMap(S1Angle snapDistance)
Clusters vertices that are separated by at mostS2PolygonBuilder.Options.getMergeDistance()
and returns a map of each one to a single representative vertex for all the vertices in the cluster.int
S1Angle. compareTo(S1Angle that)
S2LatLngRect.Builder
S2LatLngRect.Builder. convolveWithCap(S1Angle angle)
Mutates the current rectangle to contain the convolution of this rectangle with a cap of the given angle.S2LatLngRect
S2LatLngRect. convolveWithCap(S1Angle angle)
Returns a rectangle that contains the convolution of this rectangle with a cap of the given angle.void
S2CellUnion. expand(S1Angle minRadius, int maxLevelDiff)
Expand the cell union such that it contains all points whose distance to the cell union is at most minRadius, but do not use cells that are more than maxLevelDiff levels higher than the largest cell in the input.S2LatLngRect
S2LatLngRect. expandedByDistance(S1Angle distance)
Expands this rectangle so that it contains all points within the given distance of the boundary, and return the smallest such rectangle.private int
S2Polyline. findEndVertex(S1Angle tolerance, int index)
Given a polyline, a tolerance distance, and a start index, this function returns the maximal end index such that the line segment between these two vertices passes within "tolerance" of all interior vertices, in order.static S2Cap
S2Cap. fromAxisAngle(S2Point axis, S1Angle angle)
Create a cap given its axis and the cap opening angle, i.e.static S1ChordAngle
S1ChordAngle. fromS1Angle(S1Angle angle)
Returns a new chord angle approximated fromangle
(seeS1ChordAngle.getS1AngleConstructorMaxError()
for the max magnitude of the error).boolean
S1Angle. greaterOrEquals(S1Angle that)
boolean
S1Angle. greaterThan(S1Angle that)
void
S2Polygon. initToDifferenceSloppy(S2Polygon a, S2Polygon b, S1Angle vertexMergeRadius)
void
S2Polygon. initToIntersectionSloppy(S2Polygon a, S2Polygon b, S1Angle vertexMergeRadius)
void
S2Polygon. initToSimplified(S2Polygon a, S1Angle tolerance, boolean snapToCellCenters)
Initializes this polygon to a polygon that contains fewer vertices and is within tolerance of the polygon a, with some caveats.void
S2Polygon. initToSimplifiedInCell(S2Polygon a, S2Cell cell, S1Angle tolerance)
Initializes this polygon to a polygon that contains fewer vertices and is within tolerance of the polygon a, while ensuring that the vertices on the cell boundary are preserved.private void
S2Polygon. initToSimplifiedInternal(S2Polygon a, S1Angle tolerance, boolean snapToCellCenters, com.google.common.base.Predicate<S2Point> vertexFilter)
Simplifies the polygon.void
S2Polygon. initToUnionSloppy(S2Polygon a, S2Polygon b, S1Angle vertexMergeRadius)
private java.util.List<S2Polyline>
S2Polygon. internalClipPolyline(boolean invert, S2Polyline a, S1Angle mergeRadius)
Clips theS2Polyline
a
to the interior of this polygon.static S2Point
S2EdgeUtil. interpolateAtDistance(S1Angle ax, S2Point a, S2Point b)
LikeS2EdgeUtil.interpolate(double, com.google.common.geometry.S2Point, com.google.common.geometry.S2Point)
, except that the parameter "ax" represents the desired distance from A to the result X rather than a fraction between 0 and 1.static S2Point
S2EdgeUtil. interpolateAtDistance(S1Angle ax, S2Point a, S2Point b, S1Angle ab)
A slightly more efficient version ofS2EdgeUtil.interpolateAtDistance(com.google.common.geometry.S1Angle, com.google.common.geometry.S2Point, com.google.common.geometry.S2Point, com.google.common.geometry.S1Angle)
that can be used when the distance AB is already known.java.util.List<S2Polyline>
S2Polygon. intersectWithPolylineSloppy(S2Polyline in, S1Angle vertexMergeRadius)
Similar toS2Polygon.intersectWithPolyline(com.google.common.geometry.S2Polyline)
, except that vertices will be dropped as necessary to ensure that all adjacent vertices in the sequence obtained by concatenating the output polylines will be farther thanvertexMergeRadius
apart.boolean
S1Angle. lessOrEquals(S1Angle that)
boolean
S1Angle. lessThan(S1Angle that)
S2Loop
S2FractalBuilder. makeLoop(Matrix3x3 frame, S1Angle nominalRadius)
Returns a fractal loop centered around the a-axis of the given coordinate frame, with the first vertex in the direction of the positive x-axis, and the given nominal radius.static S2Loop
S2Loop. makeRegularLoop(S2Point center, S1Angle radius, int numVertices)
Create a circle of points with a given center, radius, and number of vertices.static java.util.List<S2Point>
S2Loop. makeRegularVertices(S2Point center, S1Angle radius, int numVertices)
AsS2Loop.makeRegularLoop(S2Point, S1Angle, int)
, but returns vertices as a list.java.util.List<S2Point>
S2FractalBuilder. makeVertices(Matrix3x3 frame, S1Angle nominalRadius)
AsS2FractalBuilder.makeLoop(Matrix3x3, S1Angle)
except it returns the vertices instead of loop.static S1Angle
S1Angle. max(S1Angle left, S1Angle right)
static S1Angle
S1Angle. min(S1Angle left, S1Angle right)
void
S2ClosestPointQuery. setMaxDistance(S1Angle maxDistance)
Sets a new max distance to search for points.S2PolygonBuilder.Options.Builder
S2PolygonBuilder.Options.Builder. setMergeDistance(S1Angle mergeDistance)
Sets the threshold angle at which to merge vertex pairs.S2PolygonBuilder.Options.Builder
S2PolygonBuilder.Options.Builder. setRobustnessRadius(S1Angle robustnessRadius)
SetsmergeDistance
computed from robustness radius and edge splice fraction.S2Loop
S2Loop. simplify(S1Angle tolerance, com.google.common.base.Predicate<S2Point> vertexFilter)
Returns a simplified loop, which may be self-intersecting, or null if the entire loop was within the tolerance.private void
S2PolygonBuilder. spliceEdges(S1Angle spliceDistance)
Splices vertices that are near an edge onto the edge.S1Angle
S1Angle. sub(S1Angle a)
Retuns anS1Angle
whose angle is(this - a)
.S2Polyline
S2Polyline. subsampleVertices(S1Angle tolerance)
Return a subsequence of vertex indices such that the polyline connecting these vertices is never further than "tolerance" from the original polyline.java.util.List<S2Polyline>
S2Polygon. subtractFromPolylineSloppy(S2Polyline in, S1Angle vertexMergeRadius)
Same asS2Polygon.intersectWithPolylineSloppy(com.google.common.geometry.S2Polyline, com.google.common.geometry.S1Angle)
, but subtracts this polygon from the given polyline.static S2Polygon
S2Polygon. unionSloppy(java.lang.Iterable<S2Polygon> polygons, S1Angle vertexMergeRadius)
Returns a polygon that is the union of the given polygons; combines vertices that form edges that are almost identical, as defined byvertexMergeRadius
.Constructors in com.google.common.geometry with parameters of type S1Angle Constructor Description S2LatLng(S1Angle lat, S1Angle lng)
Basic constructor.
-