Projection { public static Projection createEquirectangular(@C.StereoMode int stereoMode) { return createEquirectangular( 50, 36, 72, 180, 360, stereoMode); } Projection(Mesh mesh, int stereoMode);  Projection(Mesh leftMesh, Mesh rightMesh, int stereoMode); static Projection createEquirectangular(@C.StereoMode int stereoMode); static Projection createEquirectangular(
      float radius,
      int latitudes,
      int longitudes,
      float verticalFovDegrees,
      float horizontalFovDegrees,
      @C.StereoMode int stereoMode); static final int DRAW_MODE_TRIANGLES; static final int DRAW_MODE_TRIANGLES_STRIP; static final int DRAW_MODE_TRIANGLES_FAN; static final int TEXTURE_COORDS_PER_VERTEX; static final int POSITION_COORDS_PER_VERTEX; final Mesh leftMesh; final Mesh rightMesh; final @StereoMode int stereoMode; final boolean singleMesh; }
@Test public void testSphericalMesh() throws Exception { Projection projection = Projection.createEquirectangular( RADIUS, LATITUDES, LONGITUDES, VERTICAL_FOV_DEGREES, HORIZONTAL_FOV_DEGREES, C.STEREO_MODE_MONO); Projection.SubMesh subMesh = projection.leftMesh.getSubMesh(0); assertThat(subMesh.getVertexCount()).isGreaterThan(LATITUDES * LONGITUDES); float[] data = subMesh.vertices; for (int i = 0; i < data.length; ) { float x = data[i++]; float y = data[i++]; float z = data[i++]; assertEquals(RADIUS, Math.sqrt(x * x + y * y + z * z), EPSILON); } }