private void CreateGeometry(GlobeTile tile) { int tessellation = Globe.TessellationDivisions(coords.zoom); Mesh tileMesh = tile.globe.tessellator.GenerateSector(tile.FullBoundingBox, Ellipsoid.ScaledWgs84, tessellation, tessellation); gameObject.GetComponent <MeshFilter>().mesh = tileMesh; cullingBounds = tileMesh.bounds; Vector3 tileCenter = GeographicGridTessellator.LatLonToPosition(tile.bBox.Center, Ellipsoid.ScaledWgs84); Vector3 normal = Ellipsoid.ScaledWgs84.GeodeticSurfaceNormal(tileCenter); Vector3 normalWs = globe.transform.TransformDirection(normal); surfaceNormal = transform.InverseTransformDirection(normalWs); // Store in local space }
public Vector3 LatLonToPosition(LatLon latLong) { return(GeographicGridTessellator.LatLonToPosition(latLong, Ellipsoid.ScaledWgs84)); }