public bool CheckChange() { var chg = old_mapExtent != mapExtent || old_maxVertsPerMesh != maxVertsPerMesh || old_hmult != hmult || old_synthTex != synthTex || old_flatTris != flatTriangles || old_mappprov != mapprov || old_normmethod != normmethod || old_nodefak != nodefak || old_heightType != heightType || old_useElevationData != useElevationData; if (updcount == 0 || chg) { old_mapExtent = mapExtent; old_flatTris = flatTriangles; old_hmult = hmult; old_useElevationData = useElevationData; old_mappprov = mapprov; old_normmethod = normmethod; old_nodefak = nodefak; old_synthTex = synthTex; old_maxVertsPerMesh = maxVertsPerMesh; old_addMeshColliders = addMeshColliders; old_heightType = heightType; } if (chg) { Debug.Log("Change " + heightType); } return(chg); }
public async Task <(QmapMesh, int, int)> MakeMeshFromLlbox(string scenename, LatLngBox llbox, int tpqk = 4, float hmult = 1, string mapcoordname = "", MapExtentTypeE mapextent = MapExtentTypeE.SnapToTiles, MapProvider mapprov = MapProvider.Bing, ElevProvider elevprov = ElevProvider.Bing, bool execute = true, bool forceload = false, bool limitQuadkeys = true, QmapMesh.sythTexMethod synthTex = QmapMesh.sythTexMethod.Quadkeys, HeightTypeE heitType = HeightTypeE.FetchedAndZeroed) { var wpstays = false; Debug.Log($"QmapMan.MakeMeshFromLlbox scenename:{scenename} wpstays:{wpstays}"); this.mapprov = mapprov; this.elevprov = elevprov; this.scenename = scenename; this.mapcoordname = mapcoordname; if (rgo != null) { Destroy(rgo); rgo = null; } rgo = new GameObject("rgo"); rgo.transform.SetParent(this.transform, worldPositionStays: wpstays); qkgo = new GameObject("QmapMesh"); qkgo.transform.SetParent(rgo.transform, worldPositionStays: wpstays); qkgo.transform.position = Vector3.zero; var qmmcomp = qkgo.AddComponent <QmapMesh>(); qmmcomp.descriptor = $"{scenename} {llbox.lod} {mapprov} {mapextent}"; qmmcomp.InitializeGrid(scenename, llbox, mapcoordname: mapcoordname); qmmcomp.secsPerQkTile = tpqk; qmmcomp.useElevationData = useElevationDataStart; qmmcomp.mapExtent = mapextent; qmmcomp.hmult = hmult; qmmcomp.synthTex = synthTex; qmmcomp.limitQuadkeys = limitQuadkeys; qmmcomp.heightType = heitType; (var nbm, var nel) = await qmmcomp.GenerateGrid(execute, forceload, limitQuadkeys : limitQuadkeys); return(qmmcomp, nbm, nel); }