Home
last modified time | relevance | path

Searched refs:S2Projections (Results 1 – 12 of 12) sorted by relevance

/external/s2-geometry-library-java/tests/com/google/common/geometry/
DS2Test.java58 assertEquals(S2Projections.stToUV(x), x); in testSTUV()
59 assertEquals(S2Projections.uvToST(x), x); in testSTUV()
63 assertDoubleNear(S2Projections.uvToST(S2Projections.stToUV(x)), x); in testSTUV()
64 assertDoubleNear(S2Projections.stToUV(S2Projections.uvToST(x)), x); in testSTUV()
72 S2Point center = S2Projections.faceUvToXyz(face, 0, 0); in testFaceUVtoXYZ()
73 assertEquals(S2Projections.getNorm(face), center); in testFaceUVtoXYZ()
82 S2Point.crossProd(S2Projections.getUAxis(face), S2Projections.getVAxis(face)).dotProd( in testFaceUVtoXYZ()
83 S2Projections.faceUvToXyz(face, 0, 0)), 1.0); in testFaceUVtoXYZ()
92 assertEquals(S2Projections.faceUvToXyz(face, sign, -sign), in testFaceUVtoXYZ()
93 S2Projections.faceUvToXyz((face + 1) % 6, -1, -1)); in testFaceUVtoXYZ()
[all …]
DS2CellTest.java272 S2Point center = S2Projections.getNorm(children[i].face()); in testSubdivide()
273 S2Point edge = S2Point.add(center, S2Projections.getUAxis(children[i].face())); in testSubdivide()
274 S2Point corner = S2Point.add(edge, S2Projections.getVAxis(children[i].face())); in testSubdivide()
398 s.maxArea, s.avgArea, S2Projections.MIN_AREA, S2Projections.MAX_AREA, in testSubdivide()
399 S2Projections.AVG_AREA); in testSubdivide()
401 s.avgWidth, S2Projections.MIN_WIDTH, S2Projections.MAX_WIDTH, in testSubdivide()
402 S2Projections.AVG_WIDTH); in testSubdivide()
404 s.avgEdge, S2Projections.MIN_EDGE, S2Projections.MAX_EDGE, in testSubdivide()
405 S2Projections.AVG_EDGE); in testSubdivide()
407 s.avgDiag, S2Projections.MIN_DIAG, S2Projections.MAX_DIAG, in testSubdivide()
[all …]
DS2CellIdTest.java188 double maxDist = S2Projections.MAX_EDGE.getValue(MAX_WALK_LEVEL); in testContinuity()
197 int face = S2Projections.xyzToFace(p); in testContinuity()
198 R2Vector uv = S2Projections.validFaceXyzToUv(face, p); in testContinuity()
200 S2Projections.uvToST(uv.x()), 1.0 / (1 << MAX_WALK_LEVEL)), 0); in testContinuity()
202 S2Projections.uvToST(uv.y()), 1.0 / (1 << MAX_WALK_LEVEL)), 0); in testContinuity()
215 double maxDist = 0.5 * S2Projections.MAX_DIAG.getValue(S2CellId.MAX_LEVEL); in testCoverage()
DS2CapTest.java180 S2Cell edgeCell = new S2Cell(S2Projections.faceUvToXyz(face, 0, 1 - EPS)); in testCells()
183 S2Cell cornerCell = new S2Cell(S2Projections.faceUvToXyz(face, 1 - EPS, 1 - EPS)); in testCells()
204 S2Point center = S2Projections.getNorm(capFace); in testCells()
DS2CellUnionTest.java343 Math.min(minLevel + maxLevelDiff, S2Projections.MIN_WIDTH.getMaxLevel(radius)); in testExpand()
350 assertTrue(expandedMaxAngle - maxAngle <= 2.01 * S2Projections.MAX_DIAG in testExpand()
/external/s2-geometry-library-java/src/com/google/common/geometry/
DS2Cell.java96 return S2Projections.faceUvToXyz(face, uv[0][(k >> 1) ^ (k & 1)], uv[1][k >> 1]); in getVertexRaw()
106 return S2Projections.getVNorm(face, uv[1][0]); // South in getEdgeRaw()
108 return S2Projections.getUNorm(face, uv[0][1]); // East in getEdgeRaw()
110 return S2Point.neg(S2Projections.getVNorm(face, uv[1][1])); // North in getEdgeRaw()
112 return S2Point.neg(S2Projections.getUNorm(face, uv[0][0])); // West in getEdgeRaw()
189 double x = S2Projections.stToUV((1.0 / MAX_CELL_SIZE) * si); in getCenterUV()
192 double y = S2Projections.stToUV((1.0 / MAX_CELL_SIZE) * sj); in getCenterUV()
201 return S2Projections.AVG_AREA.getValue(level); in averageArea()
281 S2Cap cap = S2Cap.fromAxisHeight(S2Point.normalize(S2Projections.faceUvToXyz(face, u, v)), 0); in getCapBound()
319 int i = S2Projections.getUAxis(face).z == 0 ? (u < 0 ? 1 : 0) : (u > 0 ? 1 : 0); in getRectBound()
[all …]
DS2CellId.java149 int face = S2Projections.xyzToFace(p); in fromPoint()
150 R2Vector uv = S2Projections.validFaceXyzToUv(face, p); in fromPoint()
151 int i = stToIJ(S2Projections.uvToST(uv.x())); in fromPoint()
152 int j = stToIJ(S2Projections.uvToST(uv.y())); in fromPoint()
841 double u = S2Projections.stToUV(kScale * si); in faceSiTiToXYZ()
842 double v = S2Projections.stToUV(kScale * ti); in faceSiTiToXYZ()
843 return S2Projections.faceUvToXyz(face, u, v); in faceSiTiToXYZ()
866 S2Point p = S2Projections.faceUvToXyz(face, s, t); in fromFaceIJWrap()
867 face = S2Projections.xyzToFace(p); in fromFaceIJWrap()
868 R2Vector st = S2Projections.validFaceXyzToUv(face, p); in fromFaceIJWrap()
DS2Projections.java72 public final strictfp class S2Projections { class
145 (S2Projections.S2_PROJECTION == Projections.S2_LINEAR_PROJECTION ? 1 / Math.sqrt(6) : // 0.408
415 private S2Projections() { in S2Projections() method in S2Projections
DS2CellUnion.java399 int radiusLevel = S2Projections.MIN_WIDTH.getMaxLevel(minRadius.radians()); in expand()
400 if (radiusLevel == 0 && minRadius.radians() > S2Projections.MIN_WIDTH.getValue(0)) { in expand()
DS2RegionCoverer.java447 int level = Math.min(S2Projections.MIN_WIDTH.getMaxLevel(2 * cap.angle().radians()), in getInitialCandidates()
DS2EdgeIndex.java315 int idealLevel = S2Projections.MIN_WIDTH.getMaxLevel(edgeLength * (1 + 2 * THICKENING)); in getCovering()
DS2PolygonBuilder.java644 Math.min(S2Projections.MIN_WIDTH.getMaxLevel(2 * searchRadius), S2CellId.MAX_LEVEL - 1); in PointIndex()