Uses of Class
com.google.common.geometry.S1Angle
-
Uses of S1Angle in com.google.common.geometry
Fields in com.google.common.geometry declared as S1AngleModifier and TypeFieldDescriptionstatic final S1AngleS2EdgeUtil.DEFAULT_INTERSECTION_TOLERANCEIEEE floating-point operations have a maximum error of 0.5 ULPS (units in the last place).static final S1AngleS1Angle.INFINITYAn angle larger than any finite angle.private S1AngleS2ClosestPointQuery.maxDistanceThe max distance to search for points.private S1AngleS2PolygonBuilder.Options.Builder.mergeDistanceprivate final S1AngleS2PolygonBuilder.Options.mergeDistancestatic final S1AngleS1Angle.ZEROAn explicit shorthand for the default constructor.Methods in com.google.common.geometry that return S1AngleModifier and TypeMethodDescriptionRetuns anS1Anglewhose angle is(this + a).S2Cap.angle()Returns the cap radius as an S1Angle.S1Angle.Builder.build()Returns a newS1Anglecopied from the current state of this builder.static S1AngleS1Angle.degrees(double degrees) Returns a new S1Angle converted from degrees.S1Angle.div(double d) Retuns anS1Anglewhose angle is(this / d).static S1AngleS1Angle.e5(int e5) Returns a new S1Angle converted from tens of microdegrees.static S1AngleS1Angle.e6(int e6) Returns a new S1Angle converted from microdegrees.static S1AngleS1Angle.e7(int e7) Returns a new S1Angle converted from tenths of a microdegree.S2Polyline.getArclengthAngle()Return the angle corresponding to the total arclength of the polyline on a unit sphere.private static S1AngleS2LatLngRectBase.getDirectedHausdorffDistance(double lngDiff, R1Interval a, R1Interval b) Return the directed Hausdorff distance from one longitudinal edge spanning latitude rangea_latto the other longitudinal edge spanning latitude rangeb_lat, with their longitudinal difference given bylngDiff.final S1AngleS2LatLngRectBase.getDirectedHausdorffDistance(S2LatLngRectBase other) Returns the directed Hausdorff distance (measured along the surface of the sphere) to the given S2LatLngRect.static S1AngleS2EdgeUtil.getDistance(S2Point x, S2Point a, S2Point b) Return the minimum distance from X to any point on the edge AB.static S1AngleS2EdgeUtil.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.S2LatLng.getDistance(S2LatLng o) Return the distance (measured along the surface of the sphere) to the given point.final S1AngleS2LatLngRectBase.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).final S1AngleS2LatLngRectBase.getDistance(S2LatLngRectBase other) Returns the minimum distance (measured along the surface of the sphere) to the given S2LatLngRectBase.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.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.final S1AngleS2LatLngRectBase.getHausdorffDistance(S2LatLngRectBase other) Returns the undirected Hausdorff distance (measured along the surface of the sphere) to the given S2LatLngRect.private static S1AngleS2LatLngRectBase.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.S2ClosestPointQuery.getMaxDistance()Returns the max distance between returned points and the given target.S2PolygonBuilder.Options.getMergeDistance()If set to a positive value, all vertex pairs that are separated by less than this distance will be merged together.S2PolygonBuilder.Options.getRobustnessRadius()Returns robustness radius computed frommergeDistanceandedgeSpliceFraction.S2LatLng.lat()Returns the latitude of this point as a new S1Angle.final S1AngleS2LatLngRectBase.latHi()static S1Anglefinal S1AngleS2LatLngRectBase.latLo()static S1AngleS2ShapeIndexMeasures.length(S2ShapeIndex shapeIndex) Returns the total length of all polylines in shapeIndex, orZEROif shapeIndex contains no polylines.static S1AngleReturns the sum of all polyline lengths on the unit sphere for shapes of dimension 1, orZEROotherwise.S2LatLng.lng()Returns the longitude of this point as a new S1Angle.final S1AngleS2LatLngRectBase.lngHi()final S1AngleS2LatLngRectBase.lngLo()static S1Angle(package private) static S1AngleS2ShapeMeasures.loopPerimeter(S2Shape shape, int chainId) Returns the perimeter of the loop, orZEROif the loop has 0 or 1 vertices.static S1Anglestatic S1AngleS1Angle.mul(double m) Retuns anS1Anglewhose angle is(this * m).S1Angle.neg()S1Angle.normalize()Returns the angle normalized to the range (-180, 180] degrees.static S1AngleS2ShapeIndexMeasures.perimeter(S2ShapeIndex shapeIndex) Returns the total perimeter of all polygons in shapeIndex (including both "shells" and "holes"), orZEROshapeIndex contains no polygons.static S1AngleReturns the sum of all loop perimeters on the unit sphere for shapes of dimension 2, orZEROotherwise.(package private) static S1AngleS2ShapeMeasures.polylineLength(S2Shape shape, int chainId) Returns the length of the polyline, orZEROif the polyline has fewer than two vertices.static S1AngleS1Angle.radians(double radians) Returns a new S1Angle specified in radians.Retuns anS1Anglewhose angle is(this - a).S1ChordAngle.toAngle()Convert the chord angle to anS1Angle.Methods in com.google.common.geometry with parameters of type S1AngleModifier and TypeMethodDescriptionRetuns anS1Anglewhose angle is(this + a).Adds angle.booleanS2Polygon.approxContains(S2Polygon b, S1Angle vertexMergeRadius) Returns true if this polygon (A) approximately contains the given other polygon (B).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.intS2LatLngRect.Builder.convolveWithCap(S1Angle angle) Mutates the current rectangle to contain the convolution of this rectangle with a cap of the given angle.S2LatLngRect.convolveWithCap(S1Angle angle) Returns a rectangle that contains the convolution of this rectangle with a cap of the given angle.voidExpand 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.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 intS2Polyline.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 S2CapS2Cap.fromAxisAngle(S2Point axis, S1Angle angle) Create a cap given its axis and the cap opening angle, i.e.static S1ChordAngleS1ChordAngle.fromS1Angle(S1Angle angle) Returns a new chord angle approximated fromangle(seeS1ChordAngle.getS1AngleConstructorMaxError()for the max magnitude of the error).booleanS1Angle.greaterOrEquals(S1Angle that) booleanS1Angle.greaterThan(S1Angle that) voidS2Polygon.initToDifferenceSloppy(S2Polygon a, S2Polygon b, S1Angle vertexMergeRadius) voidS2Polygon.initToIntersectionSloppy(S2Polygon a, S2Polygon b, S1Angle vertexMergeRadius) voidS2Polygon.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.voidS2Polygon.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 voidS2Polygon.initToSimplifiedInternal(S2Polygon a, S1Angle tolerance, boolean snapToCellCenters, com.google.common.base.Predicate<S2Point> vertexFilter) Simplifies the polygon.voidS2Polygon.initToUnionSloppy(S2Polygon a, S2Polygon b, S1Angle vertexMergeRadius) private List<S2Polyline> S2Polygon.internalClipPolyline(boolean invert, S2Polyline a, S1Angle mergeRadius) Clips theS2Polylineato the interior of this polygon.static S2PointS2EdgeUtil.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 S2PointS2EdgeUtil.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.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 thanvertexMergeRadiusapart.booleanS1Angle.lessOrEquals(S1Angle that) booleanReturns 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 S2LoopS2Loop.makeRegularLoop(S2Point center, S1Angle radius, int numVertices) Create a circle of points with a given center, radius, and number of vertices.S2Loop.makeRegularVertices(S2Point center, S1Angle radius, int numVertices) AsS2Loop.makeRegularLoop(S2Point, S1Angle, int), but returns vertices as a list.S2FractalBuilder.makeVertices(Matrix3x3 frame, S1Angle nominalRadius) AsS2FractalBuilder.makeLoop(Matrix3x3, S1Angle)except it returns the vertices instead of loop.static S1Anglestatic S1AnglevoidS2ClosestPointQuery.setMaxDistance(S1Angle maxDistance) Sets a new max distance to search for points.S2PolygonBuilder.Options.Builder.setMergeDistance(S1Angle mergeDistance) Sets the threshold angle at which to merge vertex pairs.S2PolygonBuilder.Options.Builder.setRobustnessRadius(S1Angle robustnessRadius) SetsmergeDistancecomputed from robustness radius and edge splice fraction.Returns a simplified loop, which may be self-intersecting, or null if the entire loop was within the tolerance.private voidS2PolygonBuilder.spliceEdges(S1Angle spliceDistance) Splices vertices that are near an edge onto the edge.Retuns anS1Anglewhose angle is(this - a).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.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 S2PolygonS2Polygon.unionSloppy(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