예제 #1
0
        // TODO should use TileFactory
        private GlobeTile CreateTile(Transform parent, Wmts coords)
        {
            GameObject tileGo = Instantiate(tileTemplate);

            // high level tile mesh needs to be scaled for radius of globe -pete
            tileGo.transform.SetParentClearRelativeTransform(parent.transform, Vector3.zero, Quaternion.identity, Vector3.one * 0.5f);
            tileGo.name = coords.ToString();

            GlobeTile tile = tileGo.GetComponent <GlobeTile>();

            tile.coords = coords;
            tile.globe  = this;
            tile.bBox   = CurrentLayer.Wmts2Bbox(coords);

            return(tile);
        }