From 92d9cb861bb90b746d3963a529815842d265ab9b Mon Sep 17 00:00:00 2001 From: Lukasz Domaradzki Date: Wed, 13 Oct 2021 21:58:44 +0200 Subject: [PATCH 01/78] Build script for .xcframework + project imports changes --- .gitignore | 2 + .../project.pbxproj | 198 +++++++++--------- .../WhirlyGlobeMaplyComponent.h | 1 + .../buildXCFramework.sh | 6 + .../include/MaplyBridge.h | 8 +- .../include/MaplyComponent.h | 144 ++++++------- .../include/WhirlyGlobeComponent.h | 4 +- .../include/control/MaplyAnnotation.h | 2 +- .../include/control/MaplyBaseViewController.h | 40 ++-- .../control/MaplyGlobeRenderController.h | 4 +- .../include/control/MaplyRenderController.h | 26 +-- .../include/control/MaplyUpdateLayer.h | 12 +- .../include/control/MaplyViewController.h | 12 +- .../include/control/MaplyViewTracker.h | 2 +- .../control/WhirlyGlobeViewController.h | 4 +- .../include/data_sources/MaplyMBTileFetcher.h | 6 +- .../include/data_sources/MaplyWMSTileSource.h | 4 +- .../include/gestures/GlobeDoubleTapDelegate.h | 2 +- .../gestures/GlobeDoubleTapDragDelegate.h | 2 +- .../include/gestures/GlobeTiltDelegate.h | 2 +- .../gestures/GlobeTwoFingerTapDelegate.h | 2 +- .../gestures/Maply3dTouchPreviewDelegate.h | 2 +- .../include/gestures/MaplyDoubleTapDelegate.h | 2 +- .../gestures/MaplyDoubleTapDragDelegate.h | 2 +- .../include/gestures/MaplyPinchDelegate.h | 2 +- .../include/gestures/MaplyTapDelegate.h | 2 +- .../gestures/MaplyTwoFingerTapDelegate.h | 2 +- .../include/helpers/MaplyGeomBuilder.h | 6 +- .../include/helpers/MaplyIconManager.h | 2 +- .../include/helpers/MaplyLocationTracker.h | 2 +- .../include/loading/GeoJSONSource.h | 2 +- .../include/loading/MaplyImageTile.h | 2 +- .../loading/MaplyQuadImageFrameLoader.h | 4 +- .../include/loading/MaplyQuadImageLoader.h | 14 +- .../include/loading/MaplyQuadLoader.h | 12 +- .../include/loading/MaplyQuadPagingLoader.h | 2 +- .../include/loading/MaplyQuadSampler.h | 8 +- .../include/loading/MaplyRemoteTileFetcher.h | 4 +- .../include/loading/MaplyTileSourceNew.h | 6 +- .../include/math/MaplyCoordinateSystem.h | 2 +- .../include/math/WGCoordinate.h | 2 +- .../include/rendering/MaplyAtmosphere.h | 6 +- .../include/rendering/MaplyLight.h | 2 +- .../include/rendering/MaplyRenderTarget.h | 2 +- .../include/rendering/MaplyVariableTarget.h | 6 +- .../vector_styles/MapboxVectorStyleSet.h | 4 +- .../include/vector_styles/MaplyVectorStyle.h | 4 +- .../vector_styles/MaplyVectorStyleSimple.h | 2 +- .../vector_styles/MaplyVectorTileLineStyle.h | 4 +- .../MaplyVectorTileMarkerStyle.h | 4 +- .../MaplyVectorTilePolygonStyle.h | 4 +- .../vector_styles/MaplyVectorTileStyle.h | 2 +- .../vector_styles/MaplyVectorTileTextStyle.h | 4 +- .../include/vector_styles/MapnikStyle.h | 2 +- .../include/vector_styles/MapnikStyleSet.h | 2 +- .../include/vector_styles/SLDOperators.h | 2 +- .../include/vector_styles/SLDStyleSet.h | 2 +- .../include/vector_styles/SLDSymbolizers.h | 2 +- .../vector_tiles/MapboxVectorInterpreter.h | 10 +- .../include/vector_tiles/MapboxVectorTiles.h | 8 +- .../include/visual_objects/MaplyBillboard.h | 4 +- .../include/visual_objects/MaplyCluster.h | 6 +- .../include/visual_objects/MaplyGeomModel.h | 6 +- .../include/visual_objects/MaplyLabel.h | 2 +- .../include/visual_objects/MaplyMarker.h | 2 +- .../include/visual_objects/MaplyMoon.h | 6 +- .../visual_objects/MaplyParticleSystem.h | 6 +- .../include/visual_objects/MaplyPoints.h | 6 +- .../include/visual_objects/MaplyScreenLabel.h | 2 +- .../visual_objects/MaplyScreenMarker.h | 2 +- .../visual_objects/MaplyScreenObject.h | 4 +- .../include/visual_objects/MaplyShape.h | 6 +- .../include/visual_objects/MaplyStarsModel.h | 4 +- .../include/visual_objects/MaplySticker.h | 4 +- .../include/visual_objects/MaplySun.h | 6 +- .../visual_objects/MaplyVectorObject.h | 4 +- 76 files changed, 359 insertions(+), 346 deletions(-) create mode 100755 ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh diff --git a/.gitignore b/.gitignore index 6cacd54bbf..8ee5034a0a 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,8 @@ android/library/Android/.gradle android/library/maply/.cxx ios/library/WhirlyGlobe-MaplyComponent/build ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.framework +ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcframework +ios/library/WhirlyGlobe-MaplyComponent/archives podlint\.txt diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index c5b3d7c2d2..aea97ba400 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -8,7 +8,7 @@ /* Begin PBXBuildFile section */ 2B0387F22069BC2E00DD5C40 /* QuadDisplayLayerNew.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B0387F12069BC2E00DD5C40 /* QuadDisplayLayerNew.h */; }; - 2B0387F8206ABD7B00DD5C40 /* MaplyQuadSampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B0387F7206ABD7B00DD5C40 /* MaplyQuadSampler.h */; }; + 2B0387F8206ABD7B00DD5C40 /* MaplyQuadSampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B0387F7206ABD7B00DD5C40 /* MaplyQuadSampler.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B092BB42373574E00E27CD8 /* MaplyGlobeRenderController_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B092BB32373574E00E27CD8 /* MaplyGlobeRenderController_private.h */; }; 2B0D978724490B4B00F64852 /* MapboxVectorStyleRaster.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B0D978124490B4A00F64852 /* MapboxVectorStyleRaster.h */; }; 2B0D978824490B4B00F64852 /* MapboxVectorStyleCircle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B0D978224490B4A00F64852 /* MapboxVectorStyleCircle.h */; }; @@ -30,7 +30,7 @@ 2B105F2924D099730053DFB5 /* MapboxVectorStyleSpritesImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B105F2824D099730053DFB5 /* MapboxVectorStyleSpritesImpl.cpp */; }; 2B127BF92012A12B0099F405 /* MaplyRenderController_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF82012A12A0099F405 /* MaplyRenderController_private.h */; }; 2B127BFB2012A1390099F405 /* MaplyRenderTarget_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BFA2012A1390099F405 /* MaplyRenderTarget_private.h */; }; - 2B127C03201911D40099F405 /* MapboxVectorInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127C01201911D30099F405 /* MapboxVectorInterpreter.h */; }; + 2B127C03201911D40099F405 /* MapboxVectorInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127C01201911D30099F405 /* MapboxVectorInterpreter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B1806D822AED08200DD3DB1 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B1806D622AED03300DD3DB1 /* Accelerate.framework */; }; 2B23131921F8DD61006AA344 /* GlobeView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B23131321F8DD60006AA344 /* GlobeView.h */; }; 2B23131A21F8DD61006AA344 /* MaplyFlatView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B23131421F8DD60006AA344 /* MaplyFlatView.h */; }; @@ -72,7 +72,7 @@ 2B3F452A243FD82200F85414 /* SLDOperators.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5EF69FB1D6B938800A2A660 /* SLDOperators.mm */; }; 2B3F452B243FD82200F85414 /* SLDSymbolizers.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5EF69FC1D6B938800A2A660 /* SLDSymbolizers.mm */; }; 2B3F452C243FD82200F85414 /* SLDWellKnownMarkers.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5EB67AA1D6DD19700FB3679 /* SLDWellKnownMarkers.mm */; }; - 2B446AB021EFE5DA0078A975 /* MaplyWMSTileSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446AAF21EFE5DA0078A975 /* MaplyWMSTileSource.h */; }; + 2B446AB021EFE5DA0078A975 /* MaplyWMSTileSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446AAF21EFE5DA0078A975 /* MaplyWMSTileSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B446ABB21F25C330078A975 /* WhirlyKitLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446AB921F25C330078A975 /* WhirlyKitLog.h */; }; 2B446ABC21F25C330078A975 /* WhirlyTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446ABA21F25C330078A975 /* WhirlyTypes.h */; }; 2B446AE121F288090078A975 /* LabelRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446AE021F288080078A975 /* LabelRenderer.h */; }; @@ -123,16 +123,16 @@ 2B446B9221FBA8250078A975 /* FontTextureManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446B9121FBA8240078A975 /* FontTextureManager.h */; }; 2B446B9621FBA8520078A975 /* Program.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446B9521FBA8520078A975 /* Program.h */; }; 2B446B9A21FBA9D50078A975 /* PerformanceTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B446B9921FBA9D50078A975 /* PerformanceTimer.h */; }; - 2B462EF623A9547E0050438C /* NSDictionary+StyleRules.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B462EF523A9547E0050438C /* NSDictionary+StyleRules.h */; }; + 2B462EF623A9547E0050438C /* NSDictionary+StyleRules.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B462EF523A9547E0050438C /* NSDictionary+StyleRules.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B462EF823A954870050438C /* NSDictionary+StyleRules.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B462EF723A954870050438C /* NSDictionary+StyleRules.mm */; }; 2B4A816925391A0D0016618C /* lodepng.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B4A816725391A0D0016618C /* lodepng.h */; }; 2B4A816A25391A0D0016618C /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B4A816825391A0D0016618C /* lodepng.cpp */; }; - 2B4B63A5236102DA0008C8C1 /* MaplyGlobeRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B4B63A4236102DA0008C8C1 /* MaplyGlobeRenderController.h */; }; + 2B4B63A5236102DA0008C8C1 /* MaplyGlobeRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B4B63A4236102DA0008C8C1 /* MaplyGlobeRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B4B63A7236102EC0008C8C1 /* MaplyGlobeRenderController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B63A6236102EC0008C8C1 /* MaplyGlobeRenderController.mm */; }; 2B50CEB025798F3200BD4004 /* RawPNGImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B50CEAF25798F3200BD4004 /* RawPNGImage.cpp */; }; 2B50CEB425798F4800BD4004 /* RawPNGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B50CEB325798F4800BD4004 /* RawPNGImage.h */; }; 2B526BDC240DE04B00647336 /* MetalPerformanceShaders.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B526BDB240DE04B00647336 /* MetalPerformanceShaders.framework */; }; - 2B541C171ECFAA2300EC35A0 /* MaplyRenderTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B541C161ECFAA2300EC35A0 /* MaplyRenderTarget.h */; }; + 2B541C171ECFAA2300EC35A0 /* MaplyRenderTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B541C161ECFAA2300EC35A0 /* MaplyRenderTarget.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B60F43C24523B5800CF9339 /* MapboxVectorTiles.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BA827C8225E6F2100324594 /* MapboxVectorTiles.mm */; }; 2B60F43E24523FAB00CF9339 /* MapboxVectorStyleSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BB4767D2000488C006AAACB /* MapboxVectorStyleSet.mm */; }; 2B60F4472452709B00CF9339 /* MapboxVectorInterpreter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B127C06201911DC0099F405 /* MapboxVectorInterpreter.mm */; }; @@ -180,11 +180,11 @@ 2B6998842293139400C31E3F /* MTLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B6998822293139400C31E3F /* MTLView.mm */; }; 2B73D6C2207D224100AF5095 /* MaplyQuadImageLoader_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B73D6C1207D224100AF5095 /* MaplyQuadImageLoader_private.h */; }; 2B7B84D821223F0300D11447 /* MaplyTextureAtlas_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7B84D721223F0200D11447 /* MaplyTextureAtlas_private.h */; }; - 2B7B84DA2122403700D11447 /* MaplyTapMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7B84D92122403700D11447 /* MaplyTapMessage.h */; }; + 2B7B84DA2122403700D11447 /* MaplyTapMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7B84D92122403700D11447 /* MaplyTapMessage.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B7E68A022A1E62400BBFD9E /* MaplySimpleTileFetcher.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B7E689F22A1E62400BBFD9E /* MaplySimpleTileFetcher.mm */; }; 2B810091221E07EE00CFF779 /* VectorObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B810090221E07EE00CFF779 /* VectorObject.h */; }; 2B810093221E080700CFF779 /* VectorObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B810092221E080700CFF779 /* VectorObject.cpp */; }; - 2B810099221F234D00CFF779 /* MaplyQuadPagingLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B810098221F234D00CFF779 /* MaplyQuadPagingLoader.h */; }; + 2B810099221F234D00CFF779 /* MaplyQuadPagingLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B810098221F234D00CFF779 /* MaplyQuadPagingLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2B81009B221F236B00CFF779 /* MaplyQuadPagingLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B81009A221F236B00CFF779 /* MaplyQuadPagingLoader.mm */; }; 2B82B5E31E82E2490095FB14 /* dict.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B82B3BB1E82E2490095FB14 /* dict.h */; }; 2B82B5E41E82E2490095FB14 /* geom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B82B3BC1E82E2490095FB14 /* geom.cpp */; }; @@ -522,35 +522,35 @@ 2B8A78E3228C853A008B0A1F /* MaplyTextureAtlas.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B84DD2122404A00D11447 /* MaplyTextureAtlas.mm */; }; 2B8A78E4228C8543008B0A1F /* MaplyShader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE537C51D249A1200B60FAD /* MaplyShader.mm */; }; 2B8E608920D458A600FB96F0 /* MaplyQuadSampler_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B8E608820D458A500FB96F0 /* MaplyQuadSampler_private.h */; }; - 2B8E608B20D47FEE00FB96F0 /* MaplyRemoteTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B8E608A20D47FEE00FB96F0 /* MaplyRemoteTileFetcher.h */; }; - 2BA827C7225E6F1700324594 /* MapboxVectorTiles.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BA827C6225E6F1600324594 /* MapboxVectorTiles.h */; }; + 2B8E608B20D47FEE00FB96F0 /* MaplyRemoteTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B8E608A20D47FEE00FB96F0 /* MaplyRemoteTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BA827C7225E6F1700324594 /* MapboxVectorTiles.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BA827C6225E6F1600324594 /* MapboxVectorTiles.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BA827CB225E719D00324594 /* MapboxVectorTiles_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BA827CA225E719D00324594 /* MapboxVectorTiles_private.h */; }; 2BA827D02261382800324594 /* vector_tile.pb.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BA827CF2261382800324594 /* vector_tile.pb.h */; }; - 2BB4767B2000486F006AAACB /* MapboxVectorStyleSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB476752000486F006AAACB /* MapboxVectorStyleSet.h */; }; - 2BB8A3CD21ED43A40025DA98 /* MaplyTileSourceNew.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3C921ED43A30025DA98 /* MaplyTileSourceNew.h */; }; - 2BB8A3CE21ED43A40025DA98 /* MaplyMBTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3CA21ED43A30025DA98 /* MaplyMBTileFetcher.h */; }; - 2BB8A3CF21ED43A40025DA98 /* MaplyVariableTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3CB21ED43A30025DA98 /* MaplyVariableTarget.h */; }; - 2BB8A3D021ED43A40025DA98 /* MaplyQuadImageFrameLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3CC21ED43A40025DA98 /* MaplyQuadImageFrameLoader.h */; }; + 2BB4767B2000486F006AAACB /* MapboxVectorStyleSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB476752000486F006AAACB /* MapboxVectorStyleSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3CD21ED43A40025DA98 /* MaplyTileSourceNew.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3C921ED43A30025DA98 /* MaplyTileSourceNew.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3CE21ED43A40025DA98 /* MaplyMBTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3CA21ED43A30025DA98 /* MaplyMBTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3CF21ED43A40025DA98 /* MaplyVariableTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3CB21ED43A30025DA98 /* MaplyVariableTarget.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3D021ED43A40025DA98 /* MaplyQuadImageFrameLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3CC21ED43A40025DA98 /* MaplyQuadImageFrameLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BB8A3D721ED43C00025DA98 /* MaplyVariableTarget_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3D121ED43BF0025DA98 /* MaplyVariableTarget_private.h */; }; 2BB8A3DB21ED43C00025DA98 /* ViewPlacementActiveModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3D521ED43C00025DA98 /* ViewPlacementActiveModel.h */; }; 2BB8A3DC21ED43C00025DA98 /* MaplyZoomGestureDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3D621ED43C00025DA98 /* MaplyZoomGestureDelegate_private.h */; }; - 2BB8A3EE21ED43D10025DA98 /* MaplyDoubleTapDragDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3DD21ED43D00025DA98 /* MaplyDoubleTapDragDelegate.h */; }; - 2BB8A3EF21ED43D10025DA98 /* MaplyRotateDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3DE21ED43D00025DA98 /* MaplyRotateDelegate.h */; }; - 2BB8A3F021ED43D10025DA98 /* GlobeDoubleTapDragDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3DF21ED43D00025DA98 /* GlobeDoubleTapDragDelegate.h */; }; - 2BB8A3F121ED43D10025DA98 /* GlobeTwoFingerTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E021ED43D00025DA98 /* GlobeTwoFingerTapDelegate.h */; }; - 2BB8A3F221ED43D10025DA98 /* GlobeRotateDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E121ED43D00025DA98 /* GlobeRotateDelegate.h */; }; - 2BB8A3F321ED43D10025DA98 /* MaplyTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E221ED43D00025DA98 /* MaplyTapDelegate.h */; }; - 2BB8A3F421ED43D10025DA98 /* MaplyZoomGestureDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E321ED43D10025DA98 /* MaplyZoomGestureDelegate.h */; }; - 2BB8A3F521ED43D10025DA98 /* MaplyPanDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E421ED43D10025DA98 /* MaplyPanDelegate.h */; }; - 2BB8A3F621ED43D10025DA98 /* MaplyPinchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E521ED43D10025DA98 /* MaplyPinchDelegate.h */; }; - 2BB8A3F721ED43D10025DA98 /* GlobePanDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E621ED43D10025DA98 /* GlobePanDelegate.h */; }; - 2BB8A3F821ED43D10025DA98 /* GlobePinchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E721ED43D10025DA98 /* GlobePinchDelegate.h */; }; - 2BB8A3F921ED43D10025DA98 /* GlobeTiltDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E821ED43D10025DA98 /* GlobeTiltDelegate.h */; }; - 2BB8A3FA21ED43D10025DA98 /* GlobeDoubleTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E921ED43D10025DA98 /* GlobeDoubleTapDelegate.h */; }; - 2BB8A3FB21ED43D10025DA98 /* GlobeTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3EA21ED43D10025DA98 /* GlobeTapDelegate.h */; }; - 2BB8A3FC21ED43D10025DA98 /* MaplyTwoFingerTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3EB21ED43D10025DA98 /* MaplyTwoFingerTapDelegate.h */; }; - 2BB8A3FD21ED43D10025DA98 /* MaplyDoubleTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3EC21ED43D10025DA98 /* MaplyDoubleTapDelegate.h */; }; - 2BB8A3FE21ED43D10025DA98 /* MaplyTouchCancelAnimationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3ED21ED43D10025DA98 /* MaplyTouchCancelAnimationDelegate.h */; }; + 2BB8A3EE21ED43D10025DA98 /* MaplyDoubleTapDragDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3DD21ED43D00025DA98 /* MaplyDoubleTapDragDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3EF21ED43D10025DA98 /* MaplyRotateDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3DE21ED43D00025DA98 /* MaplyRotateDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F021ED43D10025DA98 /* GlobeDoubleTapDragDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3DF21ED43D00025DA98 /* GlobeDoubleTapDragDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F121ED43D10025DA98 /* GlobeTwoFingerTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E021ED43D00025DA98 /* GlobeTwoFingerTapDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F221ED43D10025DA98 /* GlobeRotateDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E121ED43D00025DA98 /* GlobeRotateDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F321ED43D10025DA98 /* MaplyTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E221ED43D00025DA98 /* MaplyTapDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F421ED43D10025DA98 /* MaplyZoomGestureDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E321ED43D10025DA98 /* MaplyZoomGestureDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F521ED43D10025DA98 /* MaplyPanDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E421ED43D10025DA98 /* MaplyPanDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F621ED43D10025DA98 /* MaplyPinchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E521ED43D10025DA98 /* MaplyPinchDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F721ED43D10025DA98 /* GlobePanDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E621ED43D10025DA98 /* GlobePanDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F821ED43D10025DA98 /* GlobePinchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E721ED43D10025DA98 /* GlobePinchDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3F921ED43D10025DA98 /* GlobeTiltDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E821ED43D10025DA98 /* GlobeTiltDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3FA21ED43D10025DA98 /* GlobeDoubleTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3E921ED43D10025DA98 /* GlobeDoubleTapDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3FB21ED43D10025DA98 /* GlobeTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3EA21ED43D10025DA98 /* GlobeTapDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3FC21ED43D10025DA98 /* MaplyTwoFingerTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3EB21ED43D10025DA98 /* MaplyTwoFingerTapDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3FD21ED43D10025DA98 /* MaplyDoubleTapDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3EC21ED43D10025DA98 /* MaplyDoubleTapDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BB8A3FE21ED43D10025DA98 /* MaplyTouchCancelAnimationDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8A3ED21ED43D10025DA98 /* MaplyTouchCancelAnimationDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BB8E1B721FBC61C00154CDC /* ActiveModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8E1B621FBC61C00154CDC /* ActiveModel.h */; }; 2BB8E1BD21FBCEA400154CDC /* SharedAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BB8E1BC21FBCEA400154CDC /* SharedAttributes.h */; }; 2BB8E1FC21FF93CB00154CDC /* GlobeView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2B23132121F8DD7E006AA344 /* GlobeView.cpp */; }; @@ -566,7 +566,7 @@ 2BBC338C221766D30038A229 /* MaplyQuadSampler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B0387F5206ABD7400DD5C40 /* MaplyQuadSampler.mm */; }; 2BBC338E2217853E0038A229 /* MaplyQuadImageFrameLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BB8A3AC21ED43770025DA98 /* MaplyQuadImageFrameLoader.mm */; }; 2BBC339022178AFF0038A229 /* QuadImageFrameLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BBC338F22178AFE0038A229 /* QuadImageFrameLoader.h */; }; - 2BBC3394221C6F000038A229 /* MaplyQuadImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BBC3393221C6F000038A229 /* MaplyQuadImageLoader.h */; }; + 2BBC3394221C6F000038A229 /* MaplyQuadImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BBC3393221C6F000038A229 /* MaplyQuadImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BC3D6AA22024EB300CE91D0 /* MaplyAnimateTranslateMomentum.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC3D6A422024EB200CE91D0 /* MaplyAnimateTranslateMomentum.h */; }; 2BC3D6AB22024EB300CE91D0 /* GlobeAnimateRotation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC3D6A522024EB300CE91D0 /* GlobeAnimateRotation.h */; }; 2BC3D6AC22024EB300CE91D0 /* MaplyAnimateTranslation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC3D6A622024EB300CE91D0 /* MaplyAnimateTranslation.h */; }; @@ -657,7 +657,7 @@ 2BE1E764220A43FD00815D9C /* WGInteractionLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE537F21D249A1200B60FAD /* WGInteractionLayer.mm */; }; 2BE1E766220A567100815D9C /* MaplyControllerLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE537D41D249A1200B60FAD /* MaplyControllerLayer.mm */; }; 2BE1E767220A567500815D9C /* WGViewControllerLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE537F41D249A1200B60FAD /* WGViewControllerLayer.mm */; }; - 2BE1E787221381B200815D9C /* MaplyQuadLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E786221381B200815D9C /* MaplyQuadLoader.h */; }; + 2BE1E787221381B200815D9C /* MaplyQuadLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E786221381B200815D9C /* MaplyQuadLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BE1E78B22138A8100815D9C /* MaplyQuadLoader_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E78A22138A8100815D9C /* MaplyQuadLoader_private.h */; }; 2BE1E7912213977F00815D9C /* LoadedTileNew.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E78E2213977F00815D9C /* LoadedTileNew.h */; }; 2BE1E7922213977F00815D9C /* QuadTileBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E78F2213977F00815D9C /* QuadTileBuilder.h */; }; @@ -668,49 +668,49 @@ 2BE537031D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537021D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BE5370A1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BE536FF1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework */; }; 2BE5370F1D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BE5370E1D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.m */; }; - 2BE537F71D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371B1D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h */; }; - 2BE537F81D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371C1D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h */; }; - 2BE537F91D249A1200B60FAD /* MaplyActiveObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371D1D249A1200B60FAD /* MaplyActiveObject.h */; }; - 2BE537FC1D249A1200B60FAD /* MaplyAnnotation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537201D249A1200B60FAD /* MaplyAnnotation.h */; }; - 2BE537FD1D249A1200B60FAD /* MaplyAtmosphere.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537211D249A1200B60FAD /* MaplyAtmosphere.h */; }; - 2BE537FE1D249A1200B60FAD /* MaplyBaseViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537221D249A1200B60FAD /* MaplyBaseViewController.h */; }; - 2BE537FF1D249A1200B60FAD /* MaplyBillboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537231D249A1200B60FAD /* MaplyBillboard.h */; }; - 2BE538011D249A1200B60FAD /* MaplyBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537251D249A1200B60FAD /* MaplyBridge.h */; }; - 2BE538021D249A1200B60FAD /* MaplyCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537261D249A1200B60FAD /* MaplyCluster.h */; }; - 2BE538031D249A1200B60FAD /* MaplyColorRampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537271D249A1200B60FAD /* MaplyColorRampGenerator.h */; }; - 2BE538041D249A1200B60FAD /* MaplyComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537281D249A1200B60FAD /* MaplyComponent.h */; }; - 2BE538051D249A1200B60FAD /* MaplyComponentObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537291D249A1200B60FAD /* MaplyComponentObject.h */; }; - 2BE538061D249A1200B60FAD /* MaplyCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5372A1D249A1200B60FAD /* MaplyCoordinate.h */; }; - 2BE538071D249A1200B60FAD /* MaplyCoordinateSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5372B1D249A1200B60FAD /* MaplyCoordinateSystem.h */; }; - 2BE5380B1D249A1200B60FAD /* MaplyGeomBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5372F1D249A1200B60FAD /* MaplyGeomBuilder.h */; }; - 2BE5380C1D249A1200B60FAD /* MaplyGeomModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537301D249A1200B60FAD /* MaplyGeomModel.h */; }; - 2BE5380D1D249A1200B60FAD /* MaplyIconManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537311D249A1200B60FAD /* MaplyIconManager.h */; }; - 2BE5380E1D249A1200B60FAD /* MaplyImageTile.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537321D249A1200B60FAD /* MaplyImageTile.h */; }; - 2BE5380F1D249A1200B60FAD /* MaplyLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537331D249A1200B60FAD /* MaplyLabel.h */; }; - 2BE538101D249A1200B60FAD /* MaplyLight.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537341D249A1200B60FAD /* MaplyLight.h */; }; - 2BE538111D249A1200B60FAD /* MaplyMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537351D249A1200B60FAD /* MaplyMarker.h */; }; - 2BE538121D249A1200B60FAD /* MaplyMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537361D249A1200B60FAD /* MaplyMatrix.h */; }; - 2BE538141D249A1200B60FAD /* MaplyMoon.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537381D249A1200B60FAD /* MaplyMoon.h */; }; - 2BE538181D249A1200B60FAD /* MaplyParticleSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5373C1D249A1200B60FAD /* MaplyParticleSystem.h */; }; - 2BE538191D249A1200B60FAD /* MaplyPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5373D1D249A1200B60FAD /* MaplyPoints.h */; }; - 2BE538201D249A1200B60FAD /* MaplyScreenLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537441D249A1200B60FAD /* MaplyScreenLabel.h */; }; - 2BE538211D249A1200B60FAD /* MaplyScreenMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537451D249A1200B60FAD /* MaplyScreenMarker.h */; }; - 2BE538221D249A1200B60FAD /* MaplyScreenObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537461D249A1200B60FAD /* MaplyScreenObject.h */; }; - 2BE538231D249A1200B60FAD /* MaplyShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537471D249A1200B60FAD /* MaplyShader.h */; }; - 2BE538241D249A1200B60FAD /* MaplyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537481D249A1200B60FAD /* MaplyShape.h */; }; - 2BE538251D249A1200B60FAD /* MaplySharedAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537491D249A1200B60FAD /* MaplySharedAttributes.h */; }; - 2BE538271D249A1200B60FAD /* MaplyStarsModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374B1D249A1200B60FAD /* MaplyStarsModel.h */; }; - 2BE538281D249A1200B60FAD /* MaplySticker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374C1D249A1200B60FAD /* MaplySticker.h */; }; - 2BE538291D249A1200B60FAD /* MaplySun.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374D1D249A1200B60FAD /* MaplySun.h */; }; - 2BE5382A1D249A1200B60FAD /* MaplyTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374E1D249A1200B60FAD /* MaplyTexture.h */; }; - 2BE5382B1D249A1200B60FAD /* MaplyTextureBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374F1D249A1200B60FAD /* MaplyTextureBuilder.h */; }; - 2BE5382D1D249A1200B60FAD /* MaplyUpdateLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537511D249A1200B60FAD /* MaplyUpdateLayer.h */; }; - 2BE5382E1D249A1200B60FAD /* MaplyVectorObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537521D249A1200B60FAD /* MaplyVectorObject.h */; }; - 2BE5382F1D249A1200B60FAD /* MaplyVertexAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537531D249A1200B60FAD /* MaplyVertexAttribute.h */; }; - 2BE538301D249A1200B60FAD /* MaplyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537541D249A1200B60FAD /* MaplyViewController.h */; }; - 2BE538311D249A1200B60FAD /* MaplyControllerLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537551D249A1200B60FAD /* MaplyControllerLayer.h */; }; - 2BE538321D249A1200B60FAD /* MaplyViewTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537561D249A1200B60FAD /* MaplyViewTracker.h */; }; - 2BE538341D249A1200B60FAD /* NSData+Zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537581D249A1200B60FAD /* NSData+Zlib.h */; }; + 2BE537F71D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371B1D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE537F81D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371C1D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE537F91D249A1200B60FAD /* MaplyActiveObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371D1D249A1200B60FAD /* MaplyActiveObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE537FC1D249A1200B60FAD /* MaplyAnnotation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537201D249A1200B60FAD /* MaplyAnnotation.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE537FD1D249A1200B60FAD /* MaplyAtmosphere.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537211D249A1200B60FAD /* MaplyAtmosphere.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE537FE1D249A1200B60FAD /* MaplyBaseViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537221D249A1200B60FAD /* MaplyBaseViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE537FF1D249A1200B60FAD /* MaplyBillboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537231D249A1200B60FAD /* MaplyBillboard.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538011D249A1200B60FAD /* MaplyBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537251D249A1200B60FAD /* MaplyBridge.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538021D249A1200B60FAD /* MaplyCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537261D249A1200B60FAD /* MaplyCluster.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538031D249A1200B60FAD /* MaplyColorRampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537271D249A1200B60FAD /* MaplyColorRampGenerator.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538041D249A1200B60FAD /* MaplyComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537281D249A1200B60FAD /* MaplyComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538051D249A1200B60FAD /* MaplyComponentObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537291D249A1200B60FAD /* MaplyComponentObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538061D249A1200B60FAD /* MaplyCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5372A1D249A1200B60FAD /* MaplyCoordinate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538071D249A1200B60FAD /* MaplyCoordinateSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5372B1D249A1200B60FAD /* MaplyCoordinateSystem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5380B1D249A1200B60FAD /* MaplyGeomBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5372F1D249A1200B60FAD /* MaplyGeomBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5380C1D249A1200B60FAD /* MaplyGeomModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537301D249A1200B60FAD /* MaplyGeomModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5380D1D249A1200B60FAD /* MaplyIconManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537311D249A1200B60FAD /* MaplyIconManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5380E1D249A1200B60FAD /* MaplyImageTile.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537321D249A1200B60FAD /* MaplyImageTile.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5380F1D249A1200B60FAD /* MaplyLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537331D249A1200B60FAD /* MaplyLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538101D249A1200B60FAD /* MaplyLight.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537341D249A1200B60FAD /* MaplyLight.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538111D249A1200B60FAD /* MaplyMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537351D249A1200B60FAD /* MaplyMarker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538121D249A1200B60FAD /* MaplyMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537361D249A1200B60FAD /* MaplyMatrix.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538141D249A1200B60FAD /* MaplyMoon.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537381D249A1200B60FAD /* MaplyMoon.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538181D249A1200B60FAD /* MaplyParticleSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5373C1D249A1200B60FAD /* MaplyParticleSystem.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538191D249A1200B60FAD /* MaplyPoints.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5373D1D249A1200B60FAD /* MaplyPoints.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538201D249A1200B60FAD /* MaplyScreenLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537441D249A1200B60FAD /* MaplyScreenLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538211D249A1200B60FAD /* MaplyScreenMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537451D249A1200B60FAD /* MaplyScreenMarker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538221D249A1200B60FAD /* MaplyScreenObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537461D249A1200B60FAD /* MaplyScreenObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538231D249A1200B60FAD /* MaplyShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537471D249A1200B60FAD /* MaplyShader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538241D249A1200B60FAD /* MaplyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537481D249A1200B60FAD /* MaplyShape.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538251D249A1200B60FAD /* MaplySharedAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537491D249A1200B60FAD /* MaplySharedAttributes.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538271D249A1200B60FAD /* MaplyStarsModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374B1D249A1200B60FAD /* MaplyStarsModel.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538281D249A1200B60FAD /* MaplySticker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374C1D249A1200B60FAD /* MaplySticker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538291D249A1200B60FAD /* MaplySun.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374D1D249A1200B60FAD /* MaplySun.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5382A1D249A1200B60FAD /* MaplyTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374E1D249A1200B60FAD /* MaplyTexture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5382B1D249A1200B60FAD /* MaplyTextureBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5374F1D249A1200B60FAD /* MaplyTextureBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5382D1D249A1200B60FAD /* MaplyUpdateLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537511D249A1200B60FAD /* MaplyUpdateLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5382E1D249A1200B60FAD /* MaplyVectorObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537521D249A1200B60FAD /* MaplyVectorObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5382F1D249A1200B60FAD /* MaplyVertexAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537531D249A1200B60FAD /* MaplyVertexAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538301D249A1200B60FAD /* MaplyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537541D249A1200B60FAD /* MaplyViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538311D249A1200B60FAD /* MaplyControllerLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537551D249A1200B60FAD /* MaplyControllerLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538321D249A1200B60FAD /* MaplyViewTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537561D249A1200B60FAD /* MaplyViewTracker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538341D249A1200B60FAD /* NSData+Zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537581D249A1200B60FAD /* NSData+Zlib.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BE538361D249A1200B60FAD /* ImageTexture_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5375B1D249A1200B60FAD /* ImageTexture_private.h */; }; 2BE538371D249A1200B60FAD /* MaplyActiveObject_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5375C1D249A1200B60FAD /* MaplyActiveObject_private.h */; }; 2BE538381D249A1200B60FAD /* MaplyAnnotation_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5375D1D249A1200B60FAD /* MaplyAnnotation_private.h */; }; @@ -737,19 +737,19 @@ 2BE538581D249A1200B60FAD /* WGInteractionLayer_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5377D1D249A1200B60FAD /* WGInteractionLayer_private.h */; }; 2BE5385A1D249A1200B60FAD /* WGViewControllerLayer_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5377F1D249A1200B60FAD /* WGViewControllerLayer_private.h */; }; 2BE5385B1D249A1200B60FAD /* WhirlyGlobeViewController_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537801D249A1200B60FAD /* WhirlyGlobeViewController_private.h */; }; - 2BE538641D249A1200B60FAD /* MaplyVectorStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378A1D249A1200B60FAD /* MaplyVectorStyle.h */; }; - 2BE538651D249A1200B60FAD /* MaplyVectorStyleSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378B1D249A1200B60FAD /* MaplyVectorStyleSimple.h */; }; - 2BE538661D249A1200B60FAD /* MaplyVectorTileLineStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378C1D249A1200B60FAD /* MaplyVectorTileLineStyle.h */; }; - 2BE538671D249A1200B60FAD /* MaplyVectorTileMarkerStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378D1D249A1200B60FAD /* MaplyVectorTileMarkerStyle.h */; }; - 2BE538681D249A1200B60FAD /* MaplyVectorTilePolygonStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378E1D249A1200B60FAD /* MaplyVectorTilePolygonStyle.h */; }; - 2BE5386A1D249A1200B60FAD /* MaplyVectorTileStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537901D249A1200B60FAD /* MaplyVectorTileStyle.h */; }; - 2BE5386B1D249A1200B60FAD /* MaplyVectorTileTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537911D249A1200B60FAD /* MaplyVectorTileTextStyle.h */; }; - 2BE5386C1D249A1200B60FAD /* MapnikStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537921D249A1200B60FAD /* MapnikStyle.h */; }; - 2BE5386D1D249A1200B60FAD /* MapnikStyleRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537931D249A1200B60FAD /* MapnikStyleRule.h */; }; - 2BE5386E1D249A1200B60FAD /* MapnikStyleSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537941D249A1200B60FAD /* MapnikStyleSet.h */; }; - 2BE538701D249A1200B60FAD /* WGCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537961D249A1200B60FAD /* WGCoordinate.h */; }; - 2BE538711D249A1200B60FAD /* WhirlyGlobeComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537971D249A1200B60FAD /* WhirlyGlobeComponent.h */; }; - 2BE538721D249A1200B60FAD /* WhirlyGlobeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537981D249A1200B60FAD /* WhirlyGlobeViewController.h */; }; + 2BE538641D249A1200B60FAD /* MaplyVectorStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378A1D249A1200B60FAD /* MaplyVectorStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538651D249A1200B60FAD /* MaplyVectorStyleSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378B1D249A1200B60FAD /* MaplyVectorStyleSimple.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538661D249A1200B60FAD /* MaplyVectorTileLineStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378C1D249A1200B60FAD /* MaplyVectorTileLineStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538671D249A1200B60FAD /* MaplyVectorTileMarkerStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378D1D249A1200B60FAD /* MaplyVectorTileMarkerStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538681D249A1200B60FAD /* MaplyVectorTilePolygonStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5378E1D249A1200B60FAD /* MaplyVectorTilePolygonStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5386A1D249A1200B60FAD /* MaplyVectorTileStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537901D249A1200B60FAD /* MaplyVectorTileStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5386B1D249A1200B60FAD /* MaplyVectorTileTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537911D249A1200B60FAD /* MaplyVectorTileTextStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5386C1D249A1200B60FAD /* MapnikStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537921D249A1200B60FAD /* MapnikStyle.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5386D1D249A1200B60FAD /* MapnikStyleRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537931D249A1200B60FAD /* MapnikStyleRule.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE5386E1D249A1200B60FAD /* MapnikStyleSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537941D249A1200B60FAD /* MapnikStyleSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538701D249A1200B60FAD /* WGCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537961D249A1200B60FAD /* WGCoordinate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538711D249A1200B60FAD /* WhirlyGlobeComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537971D249A1200B60FAD /* WhirlyGlobeComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2BE538721D249A1200B60FAD /* WhirlyGlobeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537981D249A1200B60FAD /* WhirlyGlobeViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BE5394E1D249BEF00B60FAD /* AA+.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE538D81D249BEF00B60FAD /* AA+.h */; }; 2BE5394F1D249BEF00B60FAD /* AA2DCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE538D91D249BEF00B60FAD /* AA2DCoordinate.h */; }; 2BE539501D249BEF00B60FAD /* AA3DCoordinate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE538DA1D249BEF00B60FAD /* AA3DCoordinate.h */; }; @@ -983,16 +983,18 @@ 3194300A254B77F00006B499 /* vector_tile.pb.c in Sources */ = {isa = PBXBuildFile; fileRef = 31943009254B77F00006B499 /* vector_tile.pb.c */; }; 31A2B37F26AA136A00221CFF /* Expect.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A2B37E26AA136900221CFF /* Expect.h */; }; 31CAB8DF2792126A00A5F744 /* GeographicLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */; }; + 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7E689E22A1E34B00BBFD9E /* MaplySimpleTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; C490572A265AB9E3001E4A98 /* bucketalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4905728265AB9E3001E4A98 /* bucketalloc.cpp */; }; C490572B265AB9E3001E4A98 /* bucketalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = C4905729265AB9E3001E4A98 /* bucketalloc.h */; }; C490572D265ABAB8001E4A98 /* glues.h in Headers */ = {isa = PBXBuildFile; fileRef = C490572C265ABAB8001E4A98 /* glues.h */; }; - E56DB3D51D6B1B17007000D2 /* SLDStyleSet.h in Headers */ = {isa = PBXBuildFile; fileRef = E56DB3D41D6B1B17007000D2 /* SLDStyleSet.h */; }; - E56E02A71E11F99500C1DD85 /* GeoJSONSource.h in Headers */ = {isa = PBXBuildFile; fileRef = E56E02A61E11F99500C1DD85 /* GeoJSONSource.h */; }; - E5D2D6631DE67B1400E02305 /* MaplyLocationTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = E5D2D6621DE67B1400E02305 /* MaplyLocationTracker.h */; }; - E5EB67AE1D6DD1C000FB3679 /* SLDWellKnownMarkers.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EB67AD1D6DD1C000FB3679 /* SLDWellKnownMarkers.h */; }; - E5EF69F61D6B931500A2A660 /* SLDExpressions.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EF69F31D6B931500A2A660 /* SLDExpressions.h */; }; - E5EF69F71D6B931500A2A660 /* SLDOperators.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EF69F41D6B931500A2A660 /* SLDOperators.h */; }; - E5EF69F81D6B931500A2A660 /* SLDSymbolizers.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EF69F51D6B931500A2A660 /* SLDSymbolizers.h */; }; + E56DB3D51D6B1B17007000D2 /* SLDStyleSet.h in Headers */ = {isa = PBXBuildFile; fileRef = E56DB3D41D6B1B17007000D2 /* SLDStyleSet.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E56E02A71E11F99500C1DD85 /* GeoJSONSource.h in Headers */ = {isa = PBXBuildFile; fileRef = E56E02A61E11F99500C1DD85 /* GeoJSONSource.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5D2D6631DE67B1400E02305 /* MaplyLocationTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = E5D2D6621DE67B1400E02305 /* MaplyLocationTracker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5EB67AE1D6DD1C000FB3679 /* SLDWellKnownMarkers.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EB67AD1D6DD1C000FB3679 /* SLDWellKnownMarkers.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5EF69F61D6B931500A2A660 /* SLDExpressions.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EF69F31D6B931500A2A660 /* SLDExpressions.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5EF69F71D6B931500A2A660 /* SLDOperators.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EF69F41D6B931500A2A660 /* SLDOperators.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5EF69F81D6B931500A2A660 /* SLDSymbolizers.h in Headers */ = {isa = PBXBuildFile; fileRef = E5EF69F51D6B931500A2A660 /* SLDSymbolizers.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -4167,6 +4169,7 @@ 2B446AFE21F79A600078A975 /* WhirlyGeometry.h in Headers */, 2B446B8321FB97C40078A975 /* ShapeReader.h in Headers */, 2B0D978924490B4B00F64852 /* MapboxVectorStyleSymbol.h in Headers */, + 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */, 2B446B4E21F7E7B80078A975 /* Drawable.h in Headers */, 2BD645EF25F1AF8C00727680 /* VectorOffset.h in Headers */, 2BE538071D249A1200B60FAD /* MaplyCoordinateSystem.h in Headers */, @@ -4272,6 +4275,7 @@ 2BE5382B1D249A1200B60FAD /* MaplyTextureBuilder.h in Headers */, 2BE539791D249BEF00B60FAD /* AAPhysicalMars.h in Headers */, 2BE538011D249A1200B60FAD /* MaplyBridge.h in Headers */, + 727E05F327158118005576CB /* MaplyRenderController.h in Headers */, 2B446B0121F79A600078A975 /* Tesselator.h in Headers */, 2B82B6101E82E2490095FB14 /* JSONNode.h in Headers */, 2B23131B21F8DD61006AA344 /* MaplyView.h in Headers */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h index 46d9dbb6d3..6a15483388 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h @@ -17,3 +17,4 @@ FOUNDATION_EXPORT const unsigned char WhirlyGlobeMaplyComponentVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import +#import "MaplyComponent.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh b/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh new file mode 100755 index 0000000000..950a2c05b4 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh @@ -0,0 +1,6 @@ +# builds iOS slice +xcodebuild archive -scheme WhirlyGlobeMaplyComponent -configuration Release -destination 'generic/platform=iOS' -archivePath './archives/WhirlyGlobeMaplyComponent.framework-iphoneos.xcarchive' SKIP_INSTALL=NO +# builds iOS simulator slice +xcodebuild archive -scheme WhirlyGlobeMaplyComponent -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './archives/WhirlyGlobeMaplyComponent.framework-iphonesimulator.xcarchive' SKIP_INSTALL=NO +# merges both into .xcframework +xcodebuild -create-xcframework -framework './archives/WhirlyGlobeMaplyComponent.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/WhirlyGlobeMaplyComponent.framework' -framework './archives/WhirlyGlobeMaplyComponent.framework-iphoneos.xcarchive/Products/Library/Frameworks/WhirlyGlobeMaplyComponent.framework' -output 'WhirlyGlobeMaplyComponent.xcframework' \ No newline at end of file diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h index cd3fb0ca2a..0ca6f39830 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h @@ -19,7 +19,7 @@ */ #import "MaplyComponent.h" -#import "control/MaplyBaseViewController.h" -#import "control/WhirlyGlobeViewController.h" -#import "control/MaplyGlobeRenderController.h" -#import "control/MaplyViewController.h" +#import "MaplyBaseViewController.h" +#import "WhirlyGlobeViewController.h" +#import "MaplyGlobeRenderController.h" +#import "MaplyViewController.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h index ee729c63d3..7c9d8d5310 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h @@ -20,84 +20,84 @@ #import "MaplySharedAttributes.h" -#import "UIKit/NSData+Zlib.h" -#import "UIKit/NSDictionary+StyleRules.h" +#import "NSData+Zlib.h" +#import "NSDictionary+StyleRules.h" -#import "helpers/MaplyGeomBuilder.h" -#import "helpers/MaplyIconManager.h" -#import "helpers/MaplyLocationTracker.h" -#import "helpers/MaplyTextureBuilder.h" +#import "MaplyGeomBuilder.h" +#import "MaplyIconManager.h" +#import "MaplyLocationTracker.h" +#import "MaplyTextureBuilder.h" -#import "math/MaplyCoordinate.h" -#import "math/MaplyCoordinateSystem.h" -#import "math/MaplyMatrix.h" +#import "MaplyCoordinate.h" +#import "MaplyCoordinateSystem.h" +#import "MaplyMatrix.h" -#import "control/MaplyActiveObject.h" -#import "control/MaplyAnnotation.h" -#import "control/MaplyRenderController.h" -#import "control/MaplyUpdateLayer.h" -#import "control/MaplyViewTracker.h" -#import "control/MaplyControllerLayer.h" -#import "control/MaplyViewController.h" -#import "control/MaplyBaseViewController.h" +#import "MaplyActiveObject.h" +#import "MaplyAnnotation.h" +#import "MaplyRenderController.h" +#import "MaplyUpdateLayer.h" +#import "MaplyViewTracker.h" +#import "MaplyControllerLayer.h" +#import "MaplyViewController.h" +#import "MaplyBaseViewController.h" -#import "visual_objects/MaplyComponentObject.h" -#import "visual_objects/MaplyBillboard.h" -#import "visual_objects/MaplyCluster.h" -#import "visual_objects/MaplyLabel.h" -#import "visual_objects/MaplyGeomModel.h" -#import "visual_objects/MaplyMarker.h" -#import "visual_objects/MaplyMoon.h" -#import "visual_objects/MaplyParticleSystem.h" -#import "visual_objects/MaplyPoints.h" -#import "visual_objects/MaplySticker.h" -#import "visual_objects/MaplyShape.h" -#import "visual_objects/MaplyScreenLabel.h" -#import "visual_objects/MaplySun.h" -#import "visual_objects/MaplyScreenObject.h" -#import "visual_objects/MaplyScreenMarker.h" -#import "visual_objects/MaplyStarsModel.h" -#import "visual_objects/MaplyTexture.h" -#import "visual_objects/MaplyVectorObject.h" +#import "MaplyComponentObject.h" +#import "MaplyBillboard.h" +#import "MaplyCluster.h" +#import "MaplyLabel.h" +#import "MaplyGeomModel.h" +#import "MaplyMarker.h" +#import "MaplyMoon.h" +#import "MaplyParticleSystem.h" +#import "MaplyPoints.h" +#import "MaplySticker.h" +#import "MaplyShape.h" +#import "MaplyScreenLabel.h" +#import "MaplySun.h" +#import "MaplyScreenObject.h" +#import "MaplyScreenMarker.h" +#import "MaplyStarsModel.h" +#import "MaplyTexture.h" +#import "MaplyVectorObject.h" -#import "vector_tiles/MapboxVectorTiles.h" -#import "vector_tiles/MapboxVectorInterpreter.h" +#import "MapboxVectorTiles.h" +#import "MapboxVectorInterpreter.h" -#import "vector_styles/SLDStyleSet.h" -#import "vector_styles/SLDExpressions.h" -#import "vector_styles/SLDOperators.h" -#import "vector_styles/SLDSymbolizers.h" -#import "vector_styles/SLDWellKnownMarkers.h" -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_styles/MaplyVectorStyleSimple.h" -#import "vector_styles/MaplyVectorTileLineStyle.h" -#import "vector_styles/MaplyVectorTileMarkerStyle.h" -#import "vector_styles/MaplyVectorTilePolygonStyle.h" -#import "vector_styles/MaplyVectorTileStyle.h" -#import "vector_styles/MaplyVectorTileTextStyle.h" -#import "vector_styles/MapboxVectorStyleSet.h" -#import "vector_styles/MapnikStyle.h" -#import "vector_styles/MapnikStyleRule.h" -#import "vector_styles/MapnikStyleSet.h" +#import "SLDStyleSet.h" +#import "SLDExpressions.h" +#import "SLDOperators.h" +#import "SLDSymbolizers.h" +#import "SLDWellKnownMarkers.h" +#import "MaplyVectorStyle.h" +#import "MaplyVectorStyleSimple.h" +#import "MaplyVectorTileLineStyle.h" +#import "MaplyVectorTileMarkerStyle.h" +#import "MaplyVectorTilePolygonStyle.h" +#import "MaplyVectorTileStyle.h" +#import "MaplyVectorTileTextStyle.h" +#import "MapboxVectorStyleSet.h" +#import "MapnikStyle.h" +#import "MapnikStyleRule.h" +#import "MapnikStyleSet.h" -#import "loading/MaplyQuadLoader.h" -#import "loading/MaplyImageTile.h" -#import "loading/MaplyQuadImageLoader.h" -#import "loading/MaplyQuadImageFrameLoader.h" -#import "loading/MaplyQuadPagingLoader.h" -#import "loading/MaplyTileSourceNew.h" -#import "loading/MaplySimpleTileFetcher.h" -#import "loading/MaplyQuadSampler.h" -#import "loading/MaplyRemoteTileFetcher.h" -#import "loading/GeoJSONSource.h" +#import "MaplyQuadLoader.h" +#import "MaplyImageTile.h" +#import "MaplyQuadImageLoader.h" +#import "MaplyQuadImageFrameLoader.h" +#import "MaplyQuadPagingLoader.h" +#import "MaplyTileSourceNew.h" +#import "MaplySimpleTileFetcher.h" +#import "MaplyQuadSampler.h" +#import "MaplyRemoteTileFetcher.h" +#import "GeoJSONSource.h" -#import "data_sources/MaplyWMSTileSource.h" -#import "data_sources/MaplyMBTileFetcher.h" +#import "MaplyWMSTileSource.h" +#import "MaplyMBTileFetcher.h" -#import "rendering/MaplyVariableTarget.h" -#import "rendering/MaplyAtmosphere.h" -#import "rendering/MaplyColorRampGenerator.h" -#import "rendering/MaplyLight.h" -#import "rendering/MaplyRenderTarget.h" -#import "rendering/MaplyShader.h" -#import "rendering/MaplyVertexAttribute.h" +#import "MaplyVariableTarget.h" +#import "MaplyAtmosphere.h" +#import "MaplyColorRampGenerator.h" +#import "MaplyLight.h" +#import "MaplyRenderTarget.h" +#import "MaplyShader.h" +#import "MaplyVertexAttribute.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h index 4faafd6995..070d8d88a6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h @@ -19,5 +19,5 @@ */ #import "MaplyComponent.h" -#import "control/MaplyGlobeRenderController.h" -#import "control/WhirlyGlobeViewController.h" +#import "MaplyGlobeRenderController.h" +#import "WhirlyGlobeViewController.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h index 271dbc9093..382d6b8d75 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" /** This object displays an annotation at a particular point and will track that point as the map or globe moves. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h index 9959b97399..7b82bd9fe1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h @@ -18,27 +18,27 @@ #import #import -#import "math/MaplyCoordinate.h" -#import "visual_objects/MaplyScreenMarker.h" -#import "visual_objects/MaplyVectorObject.h" -#import "control/MaplyViewTracker.h" -#import "visual_objects/MaplyComponentObject.h" +#import "MaplyCoordinate.h" +#import "MaplyScreenMarker.h" +#import "MaplyVectorObject.h" +#import "MaplyViewTracker.h" +#import "MaplyComponentObject.h" #import "MaplySharedAttributes.h" -#import "control/MaplyControllerLayer.h" -#import "rendering/MaplyLight.h" -#import "rendering/MaplyShader.h" -#import "control/MaplyActiveObject.h" -#import "visual_objects/MaplyTexture.h" -#import "control/MaplyAnnotation.h" -#import "visual_objects/MaplyParticleSystem.h" -#import "visual_objects/MaplyPoints.h" -#import "visual_objects/MaplyCluster.h" -#import "gestures/Maply3DTouchPreviewDatasource.h" -#import "helpers/MaplyLocationTracker.h" -#import "rendering/MaplyRenderTarget.h" -#import "control/MaplyRenderController.h" -#import "loading/MaplyRemoteTileFetcher.h" -#import "rendering/MaplyVertexAttribute.h" +#import "MaplyControllerLayer.h" +#import "MaplyLight.h" +#import "MaplyShader.h" +#import "MaplyActiveObject.h" +#import "MaplyTexture.h" +#import "MaplyAnnotation.h" +#import "MaplyParticleSystem.h" +#import "MaplyPoints.h" +#import "MaplyCluster.h" +#import "Maply3DTouchPreviewDatasource.h" +#import "MaplyLocationTracker.h" +#import "MaplyRenderTarget.h" +#import "MaplyRenderController.h" +#import "MaplyRemoteTileFetcher.h" +#import "MaplyVertexAttribute.h" typedef double (^ZoomEasingBlock)(double z0,double z1,double t); typedef void (__strong ^InitCompletionBlock)(void); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h index 27a9e33ca4..d76767675b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h @@ -19,8 +19,8 @@ */ #import -#import "control/MaplyRenderController.h" -#import "loading/MaplyRemoteTileFetcher.h" +#import "MaplyRenderController.h" +#import "MaplyRemoteTileFetcher.h" /** Animation State used by the WhirlyGlobeViewControllerAnimationDelegate. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h index 69ff44b5eb..c74afdac85 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h @@ -18,20 +18,20 @@ * */ -#import "math/MaplyCoordinate.h" -#import "visual_objects/MaplyScreenMarker.h" -#import "visual_objects/MaplyVectorObject.h" -#import "visual_objects/MaplyComponentObject.h" +#import "MaplyCoordinate.h" +#import "MaplyScreenMarker.h" +#import "MaplyVectorObject.h" +#import "MaplyComponentObject.h" #import "MaplySharedAttributes.h" -#import "rendering/MaplyLight.h" -#import "rendering/MaplyShader.h" -#import "visual_objects/MaplyTexture.h" -#import "visual_objects/MaplyParticleSystem.h" -#import "visual_objects/MaplyPoints.h" -#import "visual_objects/MaplyCluster.h" -#import "rendering/MaplyRenderTarget.h" -#import "control/MaplyActiveObject.h" -#import "control/MaplyControllerLayer.h" +#import "MaplyLight.h" +#import "MaplyShader.h" +#import "MaplyTexture.h" +#import "MaplyParticleSystem.h" +#import "MaplyPoints.h" +#import "MaplyCluster.h" +#import "MaplyRenderTarget.h" +#import "MaplyActiveObject.h" +#import "MaplyControllerLayer.h" @class MaplyRemoteTileFetcher; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h index d11f8ff778..73b0d49995 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h @@ -18,12 +18,12 @@ * */ -#import "visual_objects/MaplyComponentObject.h" -#import "control/MaplyControllerLayer.h" -#import "math/MaplyCoordinate.h" -#import "math/MaplyCoordinateSystem.h" -#import "loading/MaplyTileSourceNew.h" -#import "control/MaplyRenderController.h" +#import "MaplyComponentObject.h" +#import "MaplyControllerLayer.h" +#import "MaplyCoordinate.h" +#import "MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplyRenderController.h" @class MaplyUpdateLayer; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h index 90334ce41f..97358bb2c5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h @@ -17,13 +17,13 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "visual_objects/MaplyScreenMarker.h" -#import "visual_objects/MaplyVectorObject.h" -#import "control/MaplyViewTracker.h" -#import "visual_objects/MaplyComponentObject.h" +#import "MaplyCoordinate.h" +#import "MaplyScreenMarker.h" +#import "MaplyVectorObject.h" +#import "MaplyViewTracker.h" +#import "MaplyComponentObject.h" #import "MaplySharedAttributes.h" -#import "control/MaplyBaseViewController.h" +#import "MaplyBaseViewController.h" @class MaplyControllerLayer; @class MaplyViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h index b61634a833..7b1514c53c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" /** The View Tracker associates a view with a geographic location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h index 9e50b02689..6701d8f7ca 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h @@ -19,8 +19,8 @@ */ #import -#import "control/MaplyGlobeRenderController.h" -#import "control/MaplyBaseViewController.h" +#import "MaplyGlobeRenderController.h" +#import "MaplyBaseViewController.h" @class WGViewControllerLayer; @class WhirlyGlobeViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h index 21daca15e5..33f9bc3d1f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h @@ -16,9 +16,9 @@ * limitations under the License. */ -#import "loading/MaplyTileSourceNew.h" -#import "loading/MaplySimpleTileFetcher.h" -#import "math/MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplySimpleTileFetcher.h" +#import "MaplyCoordinateSystem.h" /** MBTiles tile fetcher. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h index 55a5397d57..7c33d429ed 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h @@ -18,8 +18,8 @@ * */ -#import "loading/MaplyTileSourceNew.h" -#import "math/MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplyCoordinateSystem.h" /** A bounding box for a specific CRS in that coordinate system. This is part of the Web Map Server parser. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h index 3162d69c21..05d4c52488 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h @@ -20,7 +20,7 @@ #import #import "GlobeView_iOS.h" -#import "gestures/GlobePinchDelegate.h" +#import "GlobePinchDelegate.h" #import "GlobeAnimateHeight.h" @interface WhirlyGlobeDoubleTapDelegate : NSObject diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h index 8446c236a0..7b7a9c3f0a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h @@ -20,7 +20,7 @@ #import #import "GlobeView.h" -#import "gestures/GlobePinchDelegate.h" +#import "GlobePinchDelegate.h" // Sent out when the double tap delegate takes control #define kGlobeDoubleTapDragDidStart @"WKGlobeDoubleTapDragStarted" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h index 738bec6e83..1c5a8a4a4b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h @@ -19,7 +19,7 @@ #import #import "WhirlyGlobe.h" -#import "gestures/GlobePinchDelegate.h" +#import "GlobePinchDelegate.h" #import "GlobeView_iOS.h" // Sent out when the tilt delegate takes control diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h index 9ea9c6d9e3..694b539aa6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h @@ -20,7 +20,7 @@ #import #import "GlobeView_iOS.h" -#import "gestures/GlobePinchDelegate.h" +#import "GlobePinchDelegate.h" @interface WhirlyGlobeTwoFingerTapDelegate : NSObject diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h index 4977004c08..b912c86438 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h @@ -8,7 +8,7 @@ #import #import -#import "gestures/Maply3DTouchPreviewDatasource.h" +#import "Maply3DTouchPreviewDatasource.h" @class MaplyBaseInteractionLayer; @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h index 720b7deec8..d4f78df206 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h @@ -20,7 +20,7 @@ #import #import "MapView_iOS.h" -#import "gestures/MaplyZoomGestureDelegate.h" +#import "MaplyZoomGestureDelegate.h" @interface MaplyDoubleTapDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h index 813523eec5..12cc594392 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h @@ -20,7 +20,7 @@ #import #import "MapView_iOS.h" -#import "gestures/MaplyZoomGestureDelegate.h" +#import "MaplyZoomGestureDelegate.h" // Sent out when the double tap delegate takes control #define kMaplyDoubleTapDragDidStart @"WKMaplyDoubleTapDragStarted" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h index 9c6144fc64..942f8505ef 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h @@ -17,7 +17,7 @@ */ #import -#import "gestures/MaplyZoomGestureDelegate.h" +#import "MaplyZoomGestureDelegate.h" @interface MaplyPinchDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h index 6f2187cbb6..fa561f1fc9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h @@ -21,7 +21,7 @@ #import #import "WhirlyVector.h" #import "MapView_iOS.h" -#import "gestures/MaplyTapMessage.h" +#import "MaplyTapMessage.h" /** Maply tap gesture delegate responds to a tap by sending out a notification. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h index 6adc6df56e..aa29b83344 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h @@ -20,7 +20,7 @@ #import #import "MapView_iOS.h" -#import "gestures/MaplyZoomGestureDelegate.h" +#import "MaplyZoomGestureDelegate.h" @interface MaplyTwoFingerTapDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h index d7562a0401..5824ac1c88 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h @@ -19,9 +19,9 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "control/MaplyRenderController.h" -#import "visual_objects/MaplyGeomModel.h" +#import "MaplyCoordinate.h" +#import "MaplyRenderController.h" +#import "MaplyGeomModel.h" /** Geometry State is used to describe the visual look of objects as they're added. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h index b97196eed1..b8f38d5b0e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h @@ -19,7 +19,7 @@ */ #import -#import "control/MaplyRenderController.h" +#import "MaplyRenderController.h" /** Holds info about a single style from the MaplySimpleStyleManager. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h index 485ab605ed..85e378a89f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h @@ -20,7 +20,7 @@ #import #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" #define LOC_TRACKER_POS_MARKER_SIZE 32 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h index 829aaaa2a0..67213b994b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h @@ -17,7 +17,7 @@ */ #import -#import "control/MaplyBaseViewController.h" +#import "MaplyBaseViewController.h" #define GEOJSON_MAX_POINTS 4096 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h index 5dcbe9bf15..fbc85c153f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h @@ -19,7 +19,7 @@ */ #import -#import "control/MaplyRenderController.h" +#import "MaplyRenderController.h" @class MaplyElevationChunk; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h index 45f1553c41..42a0f235b0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h @@ -17,8 +17,8 @@ * */ -#import "loading/MaplyQuadImageLoader.h" -#import "control/MaplyActiveObject.h" +#import "MaplyQuadImageLoader.h" +#import "MaplyActiveObject.h" @class MaplyQuadImageFrameLoader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h index ed1c9b6de5..d4cce744f7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h @@ -17,13 +17,13 @@ * */ -#import "control/MaplyControllerLayer.h" -#import "math/MaplyCoordinateSystem.h" -#import "loading/MaplyTileSourceNew.h" -#import "control/MaplyRenderController.h" -#import "loading/MaplyQuadSampler.h" -#import "loading/MaplyRemoteTileFetcher.h" -#import "loading/MaplyQuadLoader.h" +#import "MaplyControllerLayer.h" +#import "MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplyRenderController.h" +#import "MaplyQuadSampler.h" +#import "MaplyRemoteTileFetcher.h" +#import "MaplyQuadLoader.h" /** This version of the loader return is used by the MaplyImageLoaderInterpreter. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h index 5f9e49e971..3a57f4f9a2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h @@ -18,12 +18,12 @@ */ #import -#import "control/MaplyControllerLayer.h" -#import "math/MaplyCoordinateSystem.h" -#import "loading/MaplyTileSourceNew.h" -#import "control/MaplyRenderController.h" -#import "loading/MaplyQuadSampler.h" -#import "loading/MaplyRemoteTileFetcher.h" +#import "MaplyControllerLayer.h" +#import "MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplyRenderController.h" +#import "MaplyQuadSampler.h" +#import "MaplyRemoteTileFetcher.h" @class MaplyQuadLoaderBase; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h index adc40d5dd5..82e826c5b5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h @@ -17,7 +17,7 @@ * */ -#import "loading/MaplyQuadLoader.h" +#import "MaplyQuadLoader.h" /** This version of the loader return is used by the MaplyQuadPagingLoader. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h index 422a0a42ae..5528b9966d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h @@ -18,10 +18,10 @@ * */ -#import "control/MaplyControllerLayer.h" -#import "math/MaplyCoordinateSystem.h" -#import "loading/MaplyTileSourceNew.h" -#import "control/MaplyRenderController.h" +#import "MaplyControllerLayer.h" +#import "MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplyRenderController.h" /** Sampling parameters. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h index 109f764d66..a729ddabfb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h @@ -18,8 +18,8 @@ * */ -#import "loading/MaplyTileSourceNew.h" -#import "math/MaplyCoordinateSystem.h" +#import "MaplyTileSourceNew.h" +#import "MaplyCoordinateSystem.h" /** Remote Tile Info Object (New) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h index 94560e922e..84b51ae59b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h @@ -19,9 +19,9 @@ */ #import -#import "loading/MaplyImageTile.h" -#import "math/MaplyCoordinate.h" -#import "math/MaplyCoordinateSystem.h" +#import "MaplyImageTile.h" +#import "MaplyCoordinate.h" +#import "MaplyCoordinateSystem.h" /** This represents the indentifier for a unique tile in the pyramid. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h index 4339066391..488c36432d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" /** Coordinate system for tiling systems and data sources and such. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h index 82da582596..f51417509f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h @@ -18,7 +18,7 @@ * */ -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" /// WhirlyGlobe just takes geo coordinates. /// This contains lon and lat values in the x and y fields. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h index 93ff18767e..85a1ed5253 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h @@ -19,9 +19,9 @@ */ #import -#import "visual_objects/MaplyComponentObject.h" -#import "control/WhirlyGlobeViewController.h" -#import "rendering/MaplyLight.h" +#import "MaplyComponentObject.h" +#import "WhirlyGlobeViewController.h" +#import "MaplyLight.h" /** Sets up the objects and shaders to implement an atmosphere. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h index b45bdfbec8..178b827f6f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" /** The Light provides a simple interface to basic lighting within the toolkit. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h index 4754560fe8..d5bb242ff6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h @@ -19,7 +19,7 @@ */ #import -#import "visual_objects/MaplyTexture.h" +#import "MaplyTexture.h" typedef NS_ENUM(NSUInteger,MaplyMipmapType) { /// Don't generate a mipmap diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h index 0938db18e9..2317547f2f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h @@ -19,9 +19,9 @@ */ #import -#import "visual_objects/MaplyTexture.h" -#import "rendering/MaplyRenderTarget.h" -#import "control/MaplyRenderController.h" +#import "MaplyTexture.h" +#import "MaplyRenderTarget.h" +#import "MaplyRenderController.h" /** A variable target manages two pass rendering for one type of variable. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h index 310ed63501..63be20af46 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h @@ -19,8 +19,8 @@ */ #import -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_tiles/MapboxVectorTiles.h" +#import "MaplyVectorStyle.h" +#import "MapboxVectorTiles.h" typedef NS_ENUM(NSUInteger,MapboxLayerType) { MapboxLayerTypeBackground, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h index 378bff48a4..26d24d793d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h @@ -17,8 +17,8 @@ */ #import -#import "loading/MaplyTileSourceNew.h" -#import "control/MaplyBaseViewController.h" +#import "MaplyTileSourceNew.h" +#import "MaplyBaseViewController.h" @class MaplyVectorTileData; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h index 3897286390..36a716474a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h @@ -17,7 +17,7 @@ */ #import -#import "vector_tiles/MapboxVectorTiles.h" +#import "MapboxVectorTiles.h" /** Simple default style to see something in vector tile data. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h index 3576988dd1..c6c14f793e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_styles/MaplyVectorTileStyle.h" +#import "MaplyVectorStyle.h" +#import "MaplyVectorTileStyle.h" /** Implementation of the line style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h index 1675f9f91f..488e988214 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_styles/MaplyVectorTileStyle.h" +#import "MaplyVectorStyle.h" +#import "MaplyVectorTileStyle.h" /** Implementation of the marker style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h index 09d3bb1b03..64a375d90d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_styles/MaplyVectorTileStyle.h" +#import "MaplyVectorStyle.h" +#import "MaplyVectorTileStyle.h" /** Implementation of the polygon style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h index 0fec245322..70400fc6c9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h @@ -17,7 +17,7 @@ */ #import -#import "vector_styles/MaplyVectorStyle.h" +#import "MaplyVectorStyle.h" /** The Maply Vector Tile Style is an internal representation of the style JSON coming out of a Maply Vector Tile database. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h index 21d491ca81..c03f9124d3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_styles/MaplyVectorTileStyle.h" +#import "MaplyVectorStyle.h" +#import "MaplyVectorTileStyle.h" /** Implementation of the text style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h index 4f51fd323b..1a4e53fafb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h @@ -19,7 +19,7 @@ */ #import -#import "vector_styles/MapnikStyleRule.h" +#import "MapnikStyleRule.h" @interface MapnikStyle : NSObject diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h index 38b07fb89e..9ed6d2c5d4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h @@ -20,7 +20,7 @@ #import -#import "vector_tiles/MapboxVectorTiles.h" +#import "MapboxVectorTiles.h" @class MaplyVectorStyleSettings; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h index c9202129de..4532286858 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h @@ -7,7 +7,7 @@ // #import -#import "vector_styles/SLDExpressions.h" +#import "SLDExpressions.h" /** @brief Base class for elements of ogc:comparisonOps or ogc:logicOps. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h index f4d4dd4658..4edb5a1f19 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h @@ -7,7 +7,7 @@ // #import -#import "vector_tiles/MapboxVectorTiles.h" +#import "MapboxVectorTiles.h" /** @brief Class corresponding to the sld:NamedLayer element @see http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd for SLD v1.1.0 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h index c0e16c04ae..e62f898cf1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h @@ -9,7 +9,7 @@ #import @class DDXMLNode; @class DDXMLElement; -#import "vector_styles/MaplyVectorTileStyle.h" +#import "MaplyVectorTileStyle.h" /** @brief Base class for Symbolizer elements @see http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd for SLD v1.1.0 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h index 56cee83a47..3d3795b327 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h @@ -20,11 +20,11 @@ #import -#import "loading/MaplyTileSourceNew.h" -#import "math/MaplyCoordinate.h" -#import "vector_styles/MaplyVectorStyle.h" -#import "vector_tiles/MapboxVectorTiles.h" -#import "loading/MaplyQuadImageFrameLoader.h" +#import "MaplyTileSourceNew.h" +#import "MaplyCoordinate.h" +#import "MaplyVectorStyle.h" +#import "MapboxVectorTiles.h" +#import "MaplyQuadImageFrameLoader.h" @class MapboxVectorStyleSet; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h index 727478c07b..6fb6aba81f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h @@ -18,10 +18,10 @@ * */ -#import "vector_styles/MaplyVectorTileStyle.h" -#import "loading/MaplyTileSourceNew.h" -#import "math/MaplyCoordinate.h" -#import "vector_styles/MaplyVectorStyle.h" +#import "MaplyVectorTileStyle.h" +#import "MaplyTileSourceNew.h" +#import "MaplyCoordinate.h" +#import "MaplyVectorStyle.h" typedef NS_ENUM(NSInteger,MapboxGeometryType) { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h index 55b7b86bd0..f847cc69df 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h @@ -19,8 +19,8 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "visual_objects/MaplyScreenObject.h" +#import "MaplyCoordinate.h" +#import "MaplyScreenObject.h" /** A billboard is tied to a specific point, but rotates to face the user. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h index 8b2164d355..7c34237b9c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h @@ -19,9 +19,9 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "visual_objects/MaplyScreenMarker.h" -#import "rendering/MaplyShader.h" +#import "MaplyCoordinate.h" +#import "MaplyScreenMarker.h" +#import "MaplyShader.h" @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h index bd61158db8..37be575cb2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h @@ -19,9 +19,9 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "math/MaplyMatrix.h" -#import "visual_objects/MaplyShape.h" +#import "MaplyCoordinate.h" +#import "MaplyMatrix.h" +#import "MaplyShape.h" @class MaplyShader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h index b3bc093eaf..5e1e8fad39 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" typedef NS_ENUM(NSInteger, MaplyLabelJustify) { MaplyLabelJustifyLeft, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h index d5b58d3625..61ce56b5fc 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" /** The Marker places a UIImage on the globe or map at a given location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h index 555060feed..f0a9010451 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h @@ -17,9 +17,9 @@ */ #import -#import "visual_objects/MaplyComponentObject.h" -#import "control/WhirlyGlobeViewController.h" -#import "rendering/MaplyLight.h" +#import "MaplyComponentObject.h" +#import "WhirlyGlobeViewController.h" +#import "MaplyLight.h" /** Utility for calculating moon position. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h index 5fd2b0b3b3..7b90252081 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h @@ -19,9 +19,9 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "rendering/MaplyShader.h" -#import "rendering/MaplyRenderTarget.h" +#import "MaplyCoordinate.h" +#import "MaplyShader.h" +#import "MaplyRenderTarget.h" typedef NS_ENUM(NSInteger, MaplyParticleSystemType) { MaplyParticleSystemTypePoint, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h index 2a6088d59f..3f02e018f3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h @@ -19,9 +19,9 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "control/MaplyRenderController.h" -#import "math/MaplyMatrix.h" +#import "MaplyCoordinate.h" +#import "MaplyRenderController.h" +#import "MaplyMatrix.h" /** The Maply Points object is used to add a large number of static points to the scene. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h index c1da2be74c..08f90bcec4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h index 8a57790569..4bbb27ef42 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h @@ -19,7 +19,7 @@ */ #import -#import "math/MaplyCoordinate.h" +#import "MaplyCoordinate.h" @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h index 2de0e50357..b0f7bc6e77 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h @@ -19,8 +19,8 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "control/MaplyRenderController.h" +#import "MaplyCoordinate.h" +#import "MaplyRenderController.h" /** The Maply Screen Object is used to build up a more complex screen object from multiple pieces. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h index d4097de059..5100078bab 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h @@ -19,9 +19,9 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "math/MaplyMatrix.h" -#import "visual_objects/MaplyTexture.h" +#import "MaplyCoordinate.h" +#import "MaplyMatrix.h" +#import "MaplyTexture.h" /** Maply Shape is the base class for the actual shape objects. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h index 7acb0839d5..305a004513 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h @@ -17,8 +17,8 @@ */ #import -#import "visual_objects/MaplyComponentObject.h" -#import "control/WhirlyGlobeViewController.h" +#import "MaplyComponentObject.h" +#import "WhirlyGlobeViewController.h" /** The Stars Model parses and then displays a star field. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h index a13d5d66ac..fd7947a8b3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h @@ -19,8 +19,8 @@ */ #import -#import "math/MaplyCoordinate.h" -#import "control/MaplyRenderController.h" +#import "MaplyCoordinate.h" +#import "MaplyRenderController.h" /** Stickers are rectangles placed on the globe with an image. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h index e493f74311..501b6fc116 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h @@ -17,9 +17,9 @@ */ #import -#import "visual_objects/MaplyComponentObject.h" -#import "control/WhirlyGlobeViewController.h" -#import "rendering/MaplyLight.h" +#import "MaplyComponentObject.h" +#import "WhirlyGlobeViewController.h" +#import "MaplyLight.h" /** Utility for calculating sun position and shading info. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h index 81561a5a09..3cdd13a04e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h @@ -18,8 +18,8 @@ #import #import -#import "math/MaplyCoordinate.h" -#import "math/MaplyCoordinateSystem.h" +#import "MaplyCoordinate.h" +#import "MaplyCoordinateSystem.h" @class MaplyBaseViewController; From ab86d66309a13a184bbef5ecf6fb7f20521904c5 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 27 Jan 2022 10:19:17 -0800 Subject: [PATCH 02/78] Get the framework building... which breaks AutoTester --- .../AutoTester.xcodeproj/project.pbxproj | 10 -- .../AutoTester/AutoTester/MaplyTesterBridge.h | 2 +- .../AutoTester/testCases/MaplyTestCase.h | 2 +- .../project.pbxproj | 10 ++ .../WhirlyGlobeMaplyComponent.h | 105 +++++++++++++++++- .../include/MaplyComponent.h | 5 +- .../include/WhirlyGlobe-Maply-Umbrella.h | 100 +++++++++++++++++ .../include/control/MaplyAnnotation.h | 2 +- .../include/control/MaplyBaseViewController.h | 42 +++---- .../control/MaplyGlobeRenderController.h | 4 +- .../include/control/MaplyRenderController.h | 28 ++--- .../include/control/MaplyViewController.h | 14 +-- .../include/control/MaplyViewTracker.h | 2 +- .../control/WhirlyGlobeViewController.h | 4 +- .../include/helpers/MaplyLocationTracker.h | 2 +- .../include/loading/MaplyImageTile.h | 2 +- .../loading/MaplyQuadImageFrameLoader.h | 4 +- .../include/loading/MaplyQuadImageLoader.h | 14 +-- .../include/loading/MaplyQuadLoader.h | 12 +- .../include/loading/MaplyQuadSampler.h | 8 +- .../include/loading/MaplyRemoteTileFetcher.h | 4 +- .../include/loading/MaplySimpleTileFetcher.h | 2 +- .../include/loading/MaplyTileSourceNew.h | 6 +- .../include/math/MaplyCoordinateSystem.h | 2 +- .../include/math/WGCoordinate.h | 2 +- .../include/rendering/MaplyLight.h | 2 +- .../include/rendering/MaplyRenderTarget.h | 2 +- .../vector_styles/MapboxVectorStyleSet.h | 4 +- .../include/vector_styles/MaplyVectorStyle.h | 4 +- .../vector_styles/MaplyVectorTileStyle.h | 2 +- .../include/vector_tiles/MapboxVectorTiles.h | 8 +- .../include/visual_objects/MaplyCluster.h | 6 +- .../include/visual_objects/MaplyGeomModel.h | 6 +- .../visual_objects/MaplyParticleSystem.h | 6 +- .../include/visual_objects/MaplyPoints.h | 6 +- .../visual_objects/MaplyScreenMarker.h | 2 +- .../include/visual_objects/MaplyShape.h | 6 +- .../visual_objects/MaplyVectorObject.h | 4 +- .../module.modulemap | 6 + .../WhirlyGlobeLib/include/GlobeView_iOS.h | 2 +- 40 files changed, 330 insertions(+), 124 deletions(-) create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/module.modulemap diff --git a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj index 16e59e6aa3..4968ec524a 100644 --- a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj +++ b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj @@ -2831,12 +2831,7 @@ DEVELOPMENT_TEAM = BFXSGS6V8N; HEADER_SEARCH_PATHS = ( "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include/\"/**", "\"$(SRCROOT)/../../../common/local_libs/KissXML\"", - "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include/vector_tiles\"", - "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include/private\"", - "\"$(SRCROOT)/../../library/WhirlyGlobeLib/include/\"", "\"$(SRCROOT)/../../../common/local_libs/eigen\"", ); INFOPLIST_FILE = AutoTester/Info.plist; @@ -2868,12 +2863,7 @@ DEVELOPMENT_TEAM = BFXSGS6V8N; HEADER_SEARCH_PATHS = ( "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include/\"/**", "\"$(SRCROOT)/../../../common/local_libs/KissXML\"", - "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include/vector_tiles\"", - "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include/private\"", - "\"$(SRCROOT)/../../library/WhirlyGlobeLib/include/\"", "\"$(SRCROOT)/../../../common/local_libs/eigen\"", ); INFOPLIST_FILE = AutoTester/Info.plist; diff --git a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h index 6942e91eea..271a43954c 100644 --- a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h +++ b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h @@ -9,7 +9,7 @@ #ifndef AutoTester_MaplyTesterBridge_h #define AutoTester_MaplyTesterBridge_h -#import "MaplyBridge.h" +//#import #import "GeoJSONSource.h" #import "GeographicLib.h" diff --git a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h index bf848ca8bd..8d82bb627e 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h +++ b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h @@ -7,7 +7,7 @@ // #import -#import "WhirlyGlobeComponent.h" +#import #import "MaplyComponent.h" @class MaplyViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index aea97ba400..7b7a93b4c8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -887,6 +887,7 @@ 2BE7E7B9221B22DE00E4EFBA /* QuadImageFrameLoader_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE7E7B8221B22DE00E4EFBA /* QuadImageFrameLoader_iOS.h */; }; 2BE7E7BB221B22E500E4EFBA /* QuadImageFrameLoader_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE7E7BA221B22E500E4EFBA /* QuadImageFrameLoader_iOS.mm */; }; 2BE7E7BC221B99FA00E4EFBA /* MaplyQuadLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE1E7A22216163A00815D9C /* MaplyQuadLoader.mm */; }; + 310419E027A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 310419DF27A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h */; }; 313363AB253E5A2B007C2F27 /* WorkRegion_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 313363AA253E5A24007C2F27 /* WorkRegion_private.h */; }; 315082CA254CD29000A0A2B2 /* VectorTilePBFParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */; }; 315082D0254CD2BF00A0A2B2 /* VectorTilePBFParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */; }; @@ -1895,6 +1896,8 @@ 2BE7E7B22214C6EB00E4EFBA /* QuadDisplayControllerNew.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QuadDisplayControllerNew.cpp; path = ../../../../common/WhirlyGlobeLib/src/QuadDisplayControllerNew.cpp; sourceTree = ""; }; 2BE7E7B8221B22DE00E4EFBA /* QuadImageFrameLoader_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuadImageFrameLoader_iOS.h; sourceTree = ""; }; 2BE7E7BA221B22E500E4EFBA /* QuadImageFrameLoader_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuadImageFrameLoader_iOS.mm; sourceTree = ""; }; + 310419DF27A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WhirlyGlobe-Maply-Umbrella.h"; sourceTree = ""; }; + 310419E127A31464004B25E1 /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; 313363AA253E5A24007C2F27 /* WorkRegion_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WorkRegion_private.h; sourceTree = ""; }; 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = VectorTilePBFParser.cpp; path = ../../../../common/WhirlyGlobeLib/src/VectorTilePBFParser.cpp; sourceTree = ""; }; 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorTilePBFParser.h; path = ../../../../common/WhirlyGlobeLib/include/VectorTilePBFParser.h; sourceTree = ""; }; @@ -3377,6 +3380,7 @@ 2BE536F51D2499E500B60FAD = { isa = PBXGroup; children = ( + 310419E127A31464004B25E1 /* module.modulemap */, 2BE53AC61D249E1500B60FAD /* CoreLocation.framework */, 2BE53AC41D249E0600B60FAD /* libz.tbd */, 2BE53AC21D249DDE00B60FAD /* libsqlite3.tbd */, @@ -3427,6 +3431,7 @@ 2BE537191D249A1200B60FAD /* include */ = { isa = PBXGroup; children = ( + 310419DF27A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h */, 2BE537971D249A1200B60FAD /* WhirlyGlobeComponent.h */, 2BE537281D249A1200B60FAD /* MaplyComponent.h */, 2BE537251D249A1200B60FAD /* MaplyBridge.h */, @@ -4065,6 +4070,7 @@ 2BE539521D249BEF00B60FAD /* AAAngularSeparation.h in Headers */, 2B82B5FD1E82E2490095FB14 /* internalJSONNode.h in Headers */, 2BE538391D249A1200B60FAD /* MaplyBaseInteractionLayer_private.h in Headers */, + 310419E027A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h in Headers */, 3183312E259112BA005FEF70 /* AzimuthalEquidistant.hpp in Headers */, 2BE538241D249A1200B60FAD /* MaplyShape.h in Headers */, 2BE538411D249A1200B60FAD /* MaplyInteractionLayer_private.h in Headers */, @@ -5100,6 +5106,7 @@ 2BE537141D2499E500B60FAD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -5142,6 +5149,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; + MODULEMAP_FILE = module.modulemap; MTL_COMPILER_FLAGS = "-fpreserve-invariance"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_LANGUAGE_REVISION = Metal21; @@ -5157,6 +5165,7 @@ 2BE537151D2499E500B60FAD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -5197,6 +5206,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; + MODULEMAP_FILE = module.modulemap; MTL_COMPILER_FLAGS = "-fpreserve-invariance"; MTL_LANGUAGE_REVISION = Metal21; OTHER_CFLAGS = ""; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h index 6a15483388..f1f1feb057 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h @@ -3,7 +3,7 @@ // WhirlyGlobeMaplyComponent // // Created by Steve Gifford on 6/29/16. -// Copyright 2016-2019 mousebird consulting. +// Copyright © 2016-2019 mousebird consulting. // #import @@ -17,4 +17,105 @@ FOUNDATION_EXPORT const unsigned char WhirlyGlobeMaplyComponentVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import -#import "MaplyComponent.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h index 7c9d8d5310..044b028e23 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h @@ -1,5 +1,4 @@ -/* - * MaplyComponent.h +/* MaplyComponent.h * MaplyComponent * * Created by Steve Gifford on 9/6/12. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "MaplySharedAttributes.h" @@ -101,3 +99,4 @@ #import "MaplyRenderTarget.h" #import "MaplyShader.h" #import "MaplyVertexAttribute.h" + diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobe-Maply-Umbrella.h b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobe-Maply-Umbrella.h index f539ecd33f..abc69418b3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobe-Maply-Umbrella.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobe-Maply-Umbrella.h @@ -1 +1,101 @@ #import "WhirlyGlobeComponent.h" + +#import "MaplySticker.h" +#import "WGCoordinate.h" +#import "GlobePinchDelegate.h" +#import "MaplySharedAttributes.h" +#import "MaplyDoubleTapDelegate.h" +#import "GlobeTwoFingerTapDelegate.h" +#import "MapboxVectorTiles.h" +#import "MaplySun.h" +#import "MapboxVectorInterpreter.h" +#import "MaplyTexture.h" +#import "NSDictionary+StyleRules.h" +#import "SLDExpressions.h" +#import "MaplyTileSourceNew.h" +#import "MaplyGlobeRenderController.h" +#import "SLDOperators.h" +#import "MaplyControllerLayer.h" +#import "MaplyVectorTileStyle.h" +#import "MapnikStyleRule.h" +#import "MaplyRenderController.h" +#import "MaplyVectorTileTextStyle.h" +#import "MaplyAnnotation.h" +#import "MaplyScreenLabel.h" +#import "SLDWellKnownMarkers.h" +#import "MaplyUpdateLayer.h" +#import "MaplyVectorStyleSimple.h" +#import "GlobeTiltDelegate.h" +#import "MaplyVectorTileMarkerStyle.h" +#import "MaplyPoints.h" +#import "MaplyStarsModel.h" +#import "GeoJSONSource.h" +#import "MaplyImageTile.h" +#import "GlobePanDelegate.h" +#import "MaplyTextureBuilder.h" +#import "MaplyActiveObject.h" +#import "MapboxVectorStyleSet.h" +#import "MaplyScreenMarker.h" +#import "MaplyViewTracker.h" +#import "MaplyParticleSystem.h" +#import "MaplyCoordinateSystem.h" +#import "MaplyVectorTilePolygonStyle.h" +#import "Maply3dTouchPreviewDelegate.h" +#import "MaplyDoubleTapDragDelegate.h" +#import "MaplyTapDelegate.h" +#import "MapnikStyle.h" +#import "MaplyTwoFingerTapDelegate.h" +#import "MaplyLocationTracker.h" +#import "NSData+Zlib.h" +#import "MaplyScreenObject.h" +#import "MaplyVertexAttribute.h" +#import "MaplyVectorTileLineStyle.h" +#import "MaplyMoon.h" +#import "MaplyVariableTarget.h" +#import "MaplyComponentObject.h" +#import "MaplyIconManager.h" +#import "MaplyLight.h" +#import "MaplyQuadPagingLoader.h" +#import "MaplyRemoteTileFetcher.h" +#import "GlobeDoubleTapDragDelegate.h" +#import "MaplyMBTileFetcher.h" +#import "MaplySimpleTileFetcher.h" +#import "MaplyComponent.h" +#import "MaplyQuadImageFrameLoader.h" +#import "GlobeRotateDelegate.h" +#import "MapnikStyleSet.h" +#import "GlobeDoubleTapDelegate.h" +#import "MaplyLabel.h" +#import "MaplyWMSTileSource.h" +#import "MaplyViewController.h" +#import "MaplyBridge.h" +#import "MaplyQuadLoader.h" +#import "MaplyShader.h" +#import "MaplyCoordinate.h" +#import "MaplyTouchCancelAnimationDelegate.h" +#import "MaplyBaseViewController.h" +#import "MaplyMarker.h" +#import "MaplyPinchDelegate.h" +#import "MaplyQuadImageLoader.h" +#import "MaplyPanDelegate.h" +#import "MaplyBillboard.h" +#import "Maply3DTouchPreviewDatasource.h" +#import "MaplyVectorObject.h" +#import "WhirlyGlobeViewController.h" +#import "SLDStyleSet.h" +#import "MaplyAtmosphere.h" +#import "MaplyShape.h" +#import "SLDSymbolizers.h" +#import "MaplyTapMessage.h" +#import "MaplyQuadSampler.h" +#import "MaplyRenderTarget.h" +#import "GlobeTapDelegate.h" +#import "MaplyCluster.h" +#import "MaplyVectorStyle.h" +#import "MaplyGeomModel.h" +#import "MaplyMatrix.h" +#import "MaplyColorRampGenerator.h" +#import "MaplyGeomBuilder.h" +#import "MaplyRotateDelegate.h" +#import "MaplyZoomGestureDelegate.h" +#import "WhirlyGlobeComponent.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h index 382d6b8d75..7c0632875c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import /** This object displays an annotation at a particular point and will track that point as the map or globe moves. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h index 7b82bd9fe1..feb24c66b7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h @@ -18,27 +18,27 @@ #import #import -#import "MaplyCoordinate.h" -#import "MaplyScreenMarker.h" -#import "MaplyVectorObject.h" -#import "MaplyViewTracker.h" -#import "MaplyComponentObject.h" -#import "MaplySharedAttributes.h" -#import "MaplyControllerLayer.h" -#import "MaplyLight.h" -#import "MaplyShader.h" -#import "MaplyActiveObject.h" -#import "MaplyTexture.h" -#import "MaplyAnnotation.h" -#import "MaplyParticleSystem.h" -#import "MaplyPoints.h" -#import "MaplyCluster.h" -#import "Maply3DTouchPreviewDatasource.h" -#import "MaplyLocationTracker.h" -#import "MaplyRenderTarget.h" -#import "MaplyRenderController.h" -#import "MaplyRemoteTileFetcher.h" -#import "MaplyVertexAttribute.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import typedef double (^ZoomEasingBlock)(double z0,double z1,double t); typedef void (__strong ^InitCompletionBlock)(void); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h index d76767675b..67eaa38295 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h @@ -19,8 +19,8 @@ */ #import -#import "MaplyRenderController.h" -#import "MaplyRemoteTileFetcher.h" +#import +#import /** Animation State used by the WhirlyGlobeViewControllerAnimationDelegate. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h index c74afdac85..17cbfe6632 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h @@ -18,20 +18,20 @@ * */ -#import "MaplyCoordinate.h" -#import "MaplyScreenMarker.h" -#import "MaplyVectorObject.h" -#import "MaplyComponentObject.h" -#import "MaplySharedAttributes.h" -#import "MaplyLight.h" -#import "MaplyShader.h" -#import "MaplyTexture.h" -#import "MaplyParticleSystem.h" -#import "MaplyPoints.h" -#import "MaplyCluster.h" -#import "MaplyRenderTarget.h" -#import "MaplyActiveObject.h" -#import "MaplyControllerLayer.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import @class MaplyRemoteTileFetcher; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h index 97358bb2c5..bb25cfc528 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h @@ -17,13 +17,13 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyScreenMarker.h" -#import "MaplyVectorObject.h" -#import "MaplyViewTracker.h" -#import "MaplyComponentObject.h" -#import "MaplySharedAttributes.h" -#import "MaplyBaseViewController.h" +#import +#import +#import +#import +#import +#import +#import @class MaplyControllerLayer; @class MaplyViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h index 7b1514c53c..24510a686a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import /** The View Tracker associates a view with a geographic location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h index 6701d8f7ca..7f9fbffde0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h @@ -19,8 +19,8 @@ */ #import -#import "MaplyGlobeRenderController.h" -#import "MaplyBaseViewController.h" +#import +#import @class WGViewControllerLayer; @class WhirlyGlobeViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h index 85e378a89f..c73a734345 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h @@ -20,7 +20,7 @@ #import #import -#import "MaplyCoordinate.h" +#import #define LOC_TRACKER_POS_MARKER_SIZE 32 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h index fbc85c153f..7d8e6df1a0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyRenderController.h" +#import @class MaplyElevationChunk; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h index 42a0f235b0..a65b28287a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h @@ -17,8 +17,8 @@ * */ -#import "MaplyQuadImageLoader.h" -#import "MaplyActiveObject.h" +#import +#import @class MaplyQuadImageFrameLoader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h index d4cce744f7..b32e119d2a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h @@ -17,13 +17,13 @@ * */ -#import "MaplyControllerLayer.h" -#import "MaplyCoordinateSystem.h" -#import "MaplyTileSourceNew.h" -#import "MaplyRenderController.h" -#import "MaplyQuadSampler.h" -#import "MaplyRemoteTileFetcher.h" -#import "MaplyQuadLoader.h" +#import +#import +#import +#import +#import +#import +#import /** This version of the loader return is used by the MaplyImageLoaderInterpreter. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h index 3a57f4f9a2..78e9756ed5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h @@ -18,12 +18,12 @@ */ #import -#import "MaplyControllerLayer.h" -#import "MaplyCoordinateSystem.h" -#import "MaplyTileSourceNew.h" -#import "MaplyRenderController.h" -#import "MaplyQuadSampler.h" -#import "MaplyRemoteTileFetcher.h" +#import +#import +#import +#import +#import +#import @class MaplyQuadLoaderBase; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h index 5528b9966d..7fa8ea093c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h @@ -18,10 +18,10 @@ * */ -#import "MaplyControllerLayer.h" -#import "MaplyCoordinateSystem.h" -#import "MaplyTileSourceNew.h" -#import "MaplyRenderController.h" +#import +#import +#import +#import /** Sampling parameters. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h index a729ddabfb..1f5e40b122 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h @@ -18,8 +18,8 @@ * */ -#import "MaplyTileSourceNew.h" -#import "MaplyCoordinateSystem.h" +#import +#import /** Remote Tile Info Object (New) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h index 58f3910e75..669dae76ab 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h @@ -18,7 +18,7 @@ * */ -#import "MaplyTileSourceNew.h" +#import /** Simple Tile Fetcher is meant for sub classing. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h index 84b51ae59b..0c8ba1b325 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyImageTile.h" -#import "MaplyCoordinate.h" -#import "MaplyCoordinateSystem.h" +#import +#import +#import /** This represents the indentifier for a unique tile in the pyramid. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h index 488c36432d..93bac03654 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import /** Coordinate system for tiling systems and data sources and such. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h index f51417509f..6bb2ee3690 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h @@ -18,7 +18,7 @@ * */ -#import "MaplyCoordinate.h" +#import /// WhirlyGlobe just takes geo coordinates. /// This contains lon and lat values in the x and y fields. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h index 178b827f6f..d8746031a7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import /** The Light provides a simple interface to basic lighting within the toolkit. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h index d5bb242ff6..400e044138 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyTexture.h" +#import typedef NS_ENUM(NSUInteger,MaplyMipmapType) { /// Don't generate a mipmap diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h index 63be20af46..84ce4c13d9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h @@ -19,8 +19,8 @@ */ #import -#import "MaplyVectorStyle.h" -#import "MapboxVectorTiles.h" +#import +#import typedef NS_ENUM(NSUInteger,MapboxLayerType) { MapboxLayerTypeBackground, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h index 26d24d793d..bbc91d9e71 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h @@ -17,8 +17,8 @@ */ #import -#import "MaplyTileSourceNew.h" -#import "MaplyBaseViewController.h" +#import +#import @class MaplyVectorTileData; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h index 70400fc6c9..eb51b2eaf3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h @@ -17,7 +17,7 @@ */ #import -#import "MaplyVectorStyle.h" +#import /** The Maply Vector Tile Style is an internal representation of the style JSON coming out of a Maply Vector Tile database. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h index 6fb6aba81f..3563d9b8e1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h @@ -18,10 +18,10 @@ * */ -#import "MaplyVectorTileStyle.h" -#import "MaplyTileSourceNew.h" -#import "MaplyCoordinate.h" -#import "MaplyVectorStyle.h" +#import +#import +#import +#import typedef NS_ENUM(NSInteger,MapboxGeometryType) { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h index 7c34237b9c..45c4759ebf 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyScreenMarker.h" -#import "MaplyShader.h" +#import +#import +#import @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h index 37be575cb2..5fde6b31ef 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyMatrix.h" -#import "MaplyShape.h" +#import +#import +#import @class MaplyShader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h index 7b90252081..4ed5729808 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyShader.h" -#import "MaplyRenderTarget.h" +#import +#import +#import typedef NS_ENUM(NSInteger, MaplyParticleSystemType) { MaplyParticleSystemTypePoint, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h index 3f02e018f3..9279db06c1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyRenderController.h" -#import "MaplyMatrix.h" +#import +#import +#import /** The Maply Points object is used to add a large number of static points to the scene. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h index 4bbb27ef42..9dc022e4e6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h index 5100078bab..1431d32bf9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyMatrix.h" -#import "MaplyTexture.h" +#import +#import +#import /** Maply Shape is the base class for the actual shape objects. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h index 3cdd13a04e..fb75019a06 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h @@ -18,8 +18,8 @@ #import #import -#import "MaplyCoordinate.h" -#import "MaplyCoordinateSystem.h" +#import +#import @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/module.modulemap b/ios/library/WhirlyGlobe-MaplyComponent/module.modulemap new file mode 100644 index 0000000000..85d15cc9c1 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/module.modulemap @@ -0,0 +1,6 @@ +framework module WhirlyGlobeMaplyComponent { + umbrella header "WhirlyGlobeMaplyComponent.h" + + export * + module * { export * } +} diff --git a/ios/library/WhirlyGlobeLib/include/GlobeView_iOS.h b/ios/library/WhirlyGlobeLib/include/GlobeView_iOS.h index f8b2c4c2a8..a81083e75c 100644 --- a/ios/library/WhirlyGlobeLib/include/GlobeView_iOS.h +++ b/ios/library/WhirlyGlobeLib/include/GlobeView_iOS.h @@ -18,7 +18,7 @@ * */ -#import "GlobeView.h" +#import // Sent when a WhirlyKitView animation starts #define kWKViewAnimationStarted @"WKViewAnimationStarted" From b07f5071ca7b51ce5d94774cd657af23a566fd66 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 27 Jan 2022 10:24:56 -0800 Subject: [PATCH 03/78] Building again, remove all mention of private types and headers from module-public headers --- WhirlyGlobe.podspec | 13 +- common/WhirlyGlobeLib/include/GeographicLib.h | 6 +- .../src/MaplyAnimateTranslation.cpp | 7 +- .../AutoTester.xcodeproj/project.pbxproj | 12 +- .../AutoTester/AutoTester/MaplyTesterBridge.h | 13 +- .../AutoTester/testCases/CartoDBTestCase.m | 2 - .../testCases/ChangeVectorsTestCase.mm | 3 - .../testCases/ExtrudedModelTestCase.m | 1 - .../AutoTester/testCases/FindHeightTestCase.m | 3 - .../AutoTester/testCases/LIDARTestCase.mm | 1 - .../testCases/LabelAnimationTestCase.m | 4 - .../AutoTester/testCases/LabelsTestCase.m | 4 - .../testCases/LoftedPolysTestCase.m | 3 - .../AutoTester/testCases/MaplyTestCase.h | 12 +- .../AutoTester/testCases/MaplyTestCase.m | 3 - .../testCases/MegaMarkersTestCase.m | 3 - .../testCases/RepresentationsTestCase.mm | 3 - .../testCases/ScreenMarkersTestCase.h | 1 - .../testCases/ScreenMarkersTestCase.m | 4 - .../AutoTester/testCases/ShapesTestCase.mm | 9 +- .../AutoTester/testCases/VectorsTestCase.mm | 6 +- .../AutoTester/testCases/WMSTestCase.m | 5 - .../testCases/WideVectorsTestCase.mm | 5 - .../project.pbxproj | 108 +++++++-- .../WhirlyGlobeMaplyComponent.h | 205 +++++++++--------- .../include/MaplyBridge.h | 14 +- .../include/MaplyComponent.h | 146 ++++++------- .../include/WhirlyGlobeComponent.h | 6 +- .../include/control/MaplyAnnotation.h | 2 +- .../include/control/MaplyBaseViewController.h | 42 ++-- .../control/MaplyGlobeRenderController.h | 4 +- .../include/control/MaplyRenderController.h | 28 +-- .../include/control/MaplyUpdateLayer.h | 12 +- .../include/control/MaplyViewController.h | 14 +- .../include/control/MaplyViewTracker.h | 2 +- .../control/WhirlyGlobeViewController.h | 6 +- .../include/data_sources/MaplyMBTileFetcher.h | 6 +- .../include/data_sources/MaplyWMSTileSource.h | 8 +- .../include/gestures/GlobeDoubleTapDelegate.h | 15 +- .../gestures/GlobeDoubleTapDragDelegate.h | 14 +- .../include/gestures/GlobePanDelegate.h | 5 +- .../include/gestures/GlobePinchDelegate.h | 13 +- .../include/gestures/GlobeRotateDelegate.h | 22 +- .../include/gestures/GlobeTapDelegate.h | 8 +- .../include/{ => gestures}/GlobeTapMessage.h | 0 .../include/gestures/GlobeTiltDelegate.h | 19 +- .../gestures/GlobeTwoFingerTapDelegate.h | 14 +- .../gestures/Maply3dTouchPreviewDelegate.h | 2 +- .../include/gestures/MaplyDoubleTapDelegate.h | 12 +- .../gestures/MaplyDoubleTapDragDelegate.h | 17 +- .../include/gestures/MaplyPanDelegate.h | 22 +- .../include/gestures/MaplyPinchDelegate.h | 6 +- .../include/gestures/MaplyRotateDelegate.h | 14 +- .../include/gestures/MaplyTapDelegate.h | 11 +- .../include/gestures/MaplyTapMessage.h | 12 +- .../MaplyTouchCancelAnimationDelegate.h | 11 +- .../gestures/MaplyTwoFingerTapDelegate.h | 13 +- .../gestures/MaplyZoomGestureDelegate.h | 18 +- .../include/helpers/MaplyGeomBuilder.h | 6 +- .../include/helpers/MaplyIconManager.h | 2 +- .../include/helpers/MaplyLocationTracker.h | 2 +- .../include/loading/GeoJSONSource.h | 2 +- .../include/loading/MaplyImageTile.h | 2 +- .../loading/MaplyQuadImageFrameLoader.h | 4 +- .../include/loading/MaplyQuadImageLoader.h | 14 +- .../include/loading/MaplyQuadLoader.h | 12 +- .../include/loading/MaplyQuadPagingLoader.h | 2 +- .../include/loading/MaplyQuadSampler.h | 8 +- .../include/loading/MaplyRemoteTileFetcher.h | 4 +- .../include/loading/MaplySimpleTileFetcher.h | 2 +- .../include/loading/MaplyTileSourceNew.h | 6 +- .../include/math/MaplyCoordinateSystem.h | 6 +- .../include/math/WGCoordinate.h | 2 +- .../private/GlobeDoubleTapDelegate_private.h | 30 +++ .../GlobeDoubleTapDragDelegate_private.h | 31 +++ .../private/GlobePanDelegate_private.h | 28 +++ .../private/GlobePinchDelegate_private.h | 31 +++ .../private/GlobeRotateDelegate_private.h | 42 ++++ .../private/GlobeTapDelegate_private.h | 29 +++ .../private/GlobeTiltDelegate_private.h | 36 +++ .../GlobeTwoFingerTapDelegate_private.h | 31 +++ .../private/MaplyDoubleTapDelegate_private.h | 26 +++ .../MaplyDoubleTapDragDelegate_private.h | 31 +++ .../private/MaplyPanDelegate_private.h | 51 +++++ .../private/MaplyPinchDelegate_private.h | 28 +++ .../private/MaplyRotateDelegate_private.h | 33 +++ .../private/MaplyTapDelegate_private.h | 29 +++ .../include/private/MaplyTapMessage_private.h | 34 +++ ...aplyTouchCancelAnimationDelegate_private.h | 32 +++ .../MaplyTwoFingerTapDelegate_private.h | 27 +++ .../MaplyZoomGestureDelegate_private.h | 23 +- .../include/rendering/MaplyAtmosphere.h | 6 +- .../include/rendering/MaplyLight.h | 5 +- .../include/rendering/MaplyRenderTarget.h | 2 +- .../include/rendering/MaplyVariableTarget.h | 6 +- .../vector_styles/MapboxVectorStyleSet.h | 4 +- .../include/vector_styles/MaplyVectorStyle.h | 4 +- .../vector_styles/MaplyVectorStyleSimple.h | 2 +- .../vector_styles/MaplyVectorTileLineStyle.h | 4 +- .../MaplyVectorTileMarkerStyle.h | 4 +- .../MaplyVectorTilePolygonStyle.h | 4 +- .../vector_styles/MaplyVectorTileStyle.h | 2 +- .../vector_styles/MaplyVectorTileTextStyle.h | 4 +- .../include/vector_styles/MapnikStyle.h | 2 +- .../include/vector_styles/MapnikStyleSet.h | 2 +- .../include/vector_styles/SLDOperators.h | 2 +- .../include/vector_styles/SLDStyleSet.h | 2 +- .../include/vector_styles/SLDSymbolizers.h | 2 +- .../vector_tiles/MapboxVectorInterpreter.h | 10 +- .../include/vector_tiles/MapboxVectorTiles.h | 8 +- .../include/visual_objects/MaplyBillboard.h | 4 +- .../include/visual_objects/MaplyCluster.h | 6 +- .../include/visual_objects/MaplyGeomModel.h | 6 +- .../include/visual_objects/MaplyLabel.h | 2 +- .../include/visual_objects/MaplyMarker.h | 2 +- .../include/visual_objects/MaplyMoon.h | 6 +- .../visual_objects/MaplyParticleSystem.h | 6 +- .../include/visual_objects/MaplyPoints.h | 6 +- .../include/visual_objects/MaplyScreenLabel.h | 2 +- .../visual_objects/MaplyScreenMarker.h | 6 +- .../visual_objects/MaplyScreenObject.h | 4 +- .../include/visual_objects/MaplyShape.h | 6 +- .../include/visual_objects/MaplyStarsModel.h | 4 +- .../include/visual_objects/MaplySticker.h | 4 +- .../include/visual_objects/MaplySun.h | 6 +- .../visual_objects/MaplyVectorObject.h | 4 +- .../module.modulemap | 6 - .../src/control/MaplyInteractionLayer.mm | 1 + .../src/control/MaplyViewController.mm | 29 ++- .../src/control/WhirlyGlobeViewController.mm | 10 +- .../src/gestures/GlobeDoubleTapDelegate.mm | 3 +- .../gestures/GlobeDoubleTapDragDelegate.mm | 7 +- .../src/gestures/GlobePanDelegate.mm | 9 +- .../src/gestures/GlobePinchDelegate.mm | 9 +- .../src/gestures/GlobeRotateDelegate.mm | 5 +- .../src/gestures/GlobeTapDelegate.mm | 5 +- .../src/gestures/GlobeTiltDelegate.mm | 5 +- .../src/gestures/GlobeTwoFingerTapDelegate.mm | 5 +- .../src/gestures/MaplyDoubleTapDelegate.mm | 8 +- .../gestures/MaplyDoubleTapDragDelegate.mm | 10 +- .../src/gestures/MaplyPanDelegate.mm | 21 +- .../src/gestures/MaplyPinchDelegate.mm | 7 +- .../src/gestures/MaplyRotateDelegate.mm | 5 +- .../src/gestures/MaplyTapDelegate.mm | 7 +- .../src/gestures/MaplyTapMessage.mm | 4 +- .../MaplyTouchCancelAnimationDelegate.mm | 5 +- .../src/gestures/MaplyTwoFingerTapDelegate.mm | 10 +- .../src/gestures/MaplyZoomGestureDelegate.mm | 24 +- .../WhirlyGlobeLib/include/GeographicLib.h | 2 +- 149 files changed, 1185 insertions(+), 781 deletions(-) rename ios/library/WhirlyGlobe-MaplyComponent/include/{ => gestures}/GlobeTapMessage.h (100%) create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDragDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePanDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePinchDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTwoFingerTapDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTouchCancelAnimationDelegate_private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h delete mode 100644 ios/library/WhirlyGlobe-MaplyComponent/module.modulemap diff --git a/WhirlyGlobe.podspec b/WhirlyGlobe.podspec index c85790eed5..3b098d7950 100644 --- a/WhirlyGlobe.podspec +++ b/WhirlyGlobe.podspec @@ -63,23 +63,20 @@ Pod::Spec.new do |s| mc.source_files = 'common/WhirlyGlobeLib/src/*.{c,cpp}', 'common/WhirlyGlobeLib/include/*.h', - 'common/WhirlyGlobeLib/include/vector_tile.pb.h', 'ios/library/WhirlyGlobeLib/src/*.{mm,m,cpp,metal}', 'ios/library/WhirlyGlobeLib/include/*.h', 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', - 'ios/library/WhirlyGlobe-MaplyComponent/src/**/*.{mm,m,cpp,metal}', - 'ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h' + 'ios/library/WhirlyGlobe-MaplyComponent/src/**/*.{mm,m,cpp,metal}' mc.preserve_paths = 'common/local_libs/eigen/Eigen/**' mc.public_header_files = 'common/WhirlyGlobeLib/include/*.h', - 'ios/library/WhirlyGlobe-MaplyComponent/include/*.h', - "ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/*.h", + 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', + 'ios/library/WhirlyGlobe-MaplyComponent/include/UIKit/NSData+Zlib.h', 'ios/library/WhirlyGlobeLib/include/GeographicLib.h' # That we have to name it here means it probably belongs somewhere else... mc.private_header_files = - 'common/WhirlyGlobeLib/include/vector_tile.pb.h', - 'ios/library/WhirlyGlobeLib/include/*.h', - 'ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h' + 'common/WhirlyGlobeLib/include/**/*.h', + 'ios/library/WhirlyGlobeLib/include/*.h' mc.dependency 'WhirlyGlobe/locallibs' mc.dependency 'WhirlyGlobe/glues' mc.dependency 'SMCalloutView' diff --git a/common/WhirlyGlobeLib/include/GeographicLib.h b/common/WhirlyGlobeLib/include/GeographicLib.h index 263d74005e..4ce61819ec 100644 --- a/common/WhirlyGlobeLib/include/GeographicLib.h +++ b/common/WhirlyGlobeLib/include/GeographicLib.h @@ -19,6 +19,8 @@ #ifndef GeographicLib_h #define GeographicLib_h +#if defined __cplusplus + #import "WhirlyVector.h" #import @@ -67,11 +69,7 @@ extern std::tuple OrthoDist(const Point3d &gca, const Poin }} -#if defined __cplusplus extern "C" { -#endif - -#if defined __cplusplus } // extern "C" #endif diff --git a/common/WhirlyGlobeLib/src/MaplyAnimateTranslation.cpp b/common/WhirlyGlobeLib/src/MaplyAnimateTranslation.cpp index b7a7afcaea..df92ec36e0 100644 --- a/common/WhirlyGlobeLib/src/MaplyAnimateTranslation.cpp +++ b/common/WhirlyGlobeLib/src/MaplyAnimateTranslation.cpp @@ -24,8 +24,11 @@ using namespace Eigen; namespace Maply { -bool MaplyGestureWithinBounds(const Point2dVector &bounds,const Point3d &loc, - SceneRenderer *sceneRender,MapView *testMapView,Point3d *newCenter) +bool MaplyGestureWithinBounds(const Point2dVector &bounds, + const Point3d &loc, + SceneRenderer *sceneRender, + MapView *testMapView, + Point3d *newCenter) { if (newCenter) *newCenter = loc; diff --git a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj index 4968ec524a..b86757c403 100644 --- a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj +++ b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj @@ -88,7 +88,6 @@ 2B81009D221F4EA900CFF779 /* CartoDBTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = D84433EA1C14E4E700A52117 /* CartoDBTestCase.m */; }; 2B8849FB1E37F9B30027C397 /* stadium-utm-quad-data.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 2B8849FA1E37F9B30027C397 /* stadium-utm-quad-data.sqlite */; }; 2BA827CD225EBDBF00324594 /* GeoJSONStyleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5941DC01E0CEE7300E1C8B3 /* GeoJSONStyleTestCase.swift */; }; - 2BB4766920004763006AAACB /* WhirlyGlobeMaplyComponent.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobeMaplyComponent.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 2BB8A40021ED46E10025DA98 /* StamenWatercolorRemote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BF115E1BCDA9730002205E /* StamenWatercolorRemote.swift */; }; 2BBB70831D5E9079009B67A6 /* VectorStyleTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB70821D5E9079009B67A6 /* VectorStyleTestCase.m */; }; 2BBCE41C2220A4170013E158 /* PagingLayerTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BC2DCEF1D2345AF0088D350 /* PagingLayerTestCase.m */; }; @@ -109,6 +108,7 @@ 2BF29B8F24D226B000553963 /* LegendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF29B8E24D226B000553963 /* LegendViewController.swift */; }; 2BFC7E511D132DCB0040E2A3 /* ScreenMarkersTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */; }; 31041A3E27A4AE76004B25E1 /* ActiveObjectTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */; }; + 31041A2227A36D53004B25E1 /* WhirlyGlobeMaplyComponent.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobeMaplyComponent.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 311E0A9C2680F597007BE16F /* ATS_Route.shp in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A902680F597007BE16F /* ATS_Route.shp */; }; 311E0A9D2680F597007BE16F /* Airspace_Boundary.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */; }; 311E0A9E2680F597007BE16F /* Airspace_Boundary.shx in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A922680F597007BE16F /* Airspace_Boundary.shx */; }; @@ -608,7 +608,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 2BB4766920004763006AAACB /* WhirlyGlobeMaplyComponent.framework in Embed Frameworks */, + 31041A2227A36D53004B25E1 /* WhirlyGlobeMaplyComponent.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -2833,6 +2833,10 @@ "$(inherited)", "\"$(SRCROOT)/../../../common/local_libs/KissXML\"", "\"$(SRCROOT)/../../../common/local_libs/eigen\"", + "\"$(SRCROOT)/../../library/WhirlyGlobeLib/include\"", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include\"/**", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent\"", + "\"$(SRCROOT)/../../../common/WhirlyGlobeLib/include\"", ); INFOPLIST_FILE = AutoTester/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; @@ -2865,6 +2869,10 @@ "$(inherited)", "\"$(SRCROOT)/../../../common/local_libs/KissXML\"", "\"$(SRCROOT)/../../../common/local_libs/eigen\"", + "\"$(SRCROOT)/../../library/WhirlyGlobeLib/include\"", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include\"/**", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent\"", + "\"$(SRCROOT)/../../../common/WhirlyGlobeLib/include\"", ); INFOPLIST_FILE = AutoTester/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; diff --git a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h index 271a43954c..652997a430 100644 --- a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h +++ b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h @@ -9,10 +9,14 @@ #ifndef AutoTester_MaplyTesterBridge_h #define AutoTester_MaplyTesterBridge_h -//#import +#import +#import +#import +#import +#import +#import +#import -#import "GeoJSONSource.h" -#import "GeographicLib.h" #import "MaplyTestCase.h" #import "VectorsTestCase.h" @@ -33,10 +37,13 @@ #import "PagingLayerTestCase.h" #import "VectorHoleTestCase.h" #import "VectorStyleTestCase.h" +#import "ActiveObjectTestCase.h" #import "GlyphProblemTestCase.h" #import "ChangeVectorsTestCase.h" #import "RepresentationsTestCase.h" #import "LIDARTestCase.h" #import "ParticleTest.h" +#import "GeographicLib.h" + #endif diff --git a/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m index 0b0d6153fa..e293d6bd8f 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m @@ -7,8 +7,6 @@ // #import "CartoDBTestCase.h" -#import "MaplyBaseViewController.h" -#import "WhirlyGlobeViewController.h" #import "CartoDBInterpreter.h" #import "AutoTester-Swift.h" diff --git a/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm index cc16e47805..ff158f79fb 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm @@ -8,9 +8,6 @@ #import "VectorsTestCase.h" #import "ChangeVectorsTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyViewController.h" -#import "WhirlyGlobeViewController.h" #import "AutoTester-Swift.h" #include diff --git a/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m index faa6c8acc2..fb818f90ff 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m @@ -6,7 +6,6 @@ // Copyright 2016-2022 mousebird consulting. // -#import #import "ExtrudedModelTestCase.h" #import "AutoTester-Swift.h" diff --git a/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m index ee4fe3d3ec..c663b70939 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m @@ -7,9 +7,6 @@ // #import "FindHeightTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyViewController.h" -#import "WhirlyGlobeViewController.h" #import "AutoTester-Swift.h" @implementation FindHeightTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/LIDARTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/LIDARTestCase.mm index fa587fa48d..9f4572ba22 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LIDARTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/LIDARTestCase.mm @@ -7,7 +7,6 @@ // #import "LIDARTestCase.h" -#import "WhirlyGlobeComponent.h" @implementation LIDARTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m index 25bb158bdd..90f3b5d974 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m @@ -7,10 +7,6 @@ // #import "LabelAnimationTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyViewController.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyScreenLabel.h" #import "AutoTester-Swift.h" @implementation LabelAnimationTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/LabelsTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/LabelsTestCase.m index 62b87c6dc4..9a783e61ee 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LabelsTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/LabelsTestCase.m @@ -7,11 +7,7 @@ // #import "LabelsTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyLabel.h" #import "VectorsTestCase.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyViewController.h" @implementation LabelsTestCase diff --git a/ios/apps/AutoTester/AutoTester/testCases/LoftedPolysTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/LoftedPolysTestCase.m index e56053b86a..e1703d1ff6 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LoftedPolysTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/LoftedPolysTestCase.m @@ -7,9 +7,6 @@ // #import "LoftedPolysTestCase.h" -#import "MaplyVectorObject.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyComponentObject.h" #import "VectorsTestCase.h" @implementation LoftedPolysTestCase diff --git a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h index 8d82bb627e..529381b12e 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h +++ b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h @@ -3,17 +3,23 @@ // AutoTester // // Created by jmnavarro on 13/10/15. -// Copyright 2015-2022 mousebird consulting. +// Copyright 2015-2017 mousebird consulting. // #import -#import -#import "MaplyComponent.h" +#import +#import +#import +#import +#import @class MaplyViewController; +@class MaplyBaseViewController; @class WhirlyGlobeViewController; @class MaplyTestCase; @class MaplyCoordinateSystem; +@protocol WhirlyGlobeViewControllerDelegate; +@protocol MaplyViewControllerDelegate; typedef void (^TestCaseResult)(MaplyTestCase * _Nonnull testCase); diff --git a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.m index 078c7cb61a..9cd47c69b8 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.m @@ -7,9 +7,6 @@ // #import "MaplyTestCase.h" -#import "WhirlyGlobeComponent.h" -#import "MaplyComponent.h" - @implementation MaplyTestCase diff --git a/ios/apps/AutoTester/AutoTester/testCases/MegaMarkersTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/MegaMarkersTestCase.m index 3db4f621d8..e52006d918 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MegaMarkersTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/MegaMarkersTestCase.m @@ -7,10 +7,7 @@ // #import "MegaMarkersTestCase.h" -#import "MaplyBaseViewController.h" #import "VectorsTestCase.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyViewController.h" @implementation MegaMarkersTestCase diff --git a/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm index 17a96bede6..a745d022e5 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm @@ -8,9 +8,6 @@ #import "VectorsTestCase.h" #import "RepresentationsTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyViewController.h" -#import "WhirlyGlobeViewController.h" #import "AutoTester-Swift.h" #include diff --git a/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.h b/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.h index 3be1f94caf..51c81ec9ef 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.h +++ b/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.h @@ -7,7 +7,6 @@ // #import "MaplyTestCase.h" -#import "MaplyComponentObject.h" @interface ScreenMarkersTestCase : MaplyTestCase diff --git a/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.m index ac2404a479..41f2fb13b0 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/ScreenMarkersTestCase.m @@ -7,11 +7,7 @@ // #import "ScreenMarkersTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyMarker.h" #import "VectorsTestCase.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyViewController.h" @implementation ScreenMarkersTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm index f4aef2c7c6..e0d5adfe1b 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm @@ -7,14 +7,11 @@ // #import "ShapesTestCase.h" -#import "MaplyShape.h" -#import "MaplyBaseViewController.h" -#import "MaplyGeomModel.h" -#import "MaplyMatrix.h" -#import "MaplyViewController.h" #import "AutoTester-Swift.h" -#import "../../../common/WhirlyGlobeLib/include/WhirlyVector.h" +#import "WhirlyVector.h" + +#import // Simple representation of locations and name for testing typedef struct diff --git a/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm index 4e00985b48..212d356f0c 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm @@ -7,12 +7,10 @@ // #import "VectorsTestCase.h" -#import "MaplyBaseViewController.h" -#include -#import "MaplyViewController.h" -#import "WhirlyGlobeViewController.h" #import "AutoTester-Swift.h" +#include + @interface VectorsTestCase() @property (strong, nonatomic) MaplyVectorObject * selectedCountry; diff --git a/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m index 18f83ac44a..5a5704ad88 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m @@ -7,11 +7,6 @@ // #import "WMSTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyViewController.h" -#import "WhirlyGlobeViewController.h" - -#import "MaplyWMSTileSource.h" #import "DDXML.h" #import "AutoTester-Swift.h" diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm index 150a0bbd94..637f246d96 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm @@ -7,11 +7,6 @@ // #import "WideVectorsTestCase.h" -#import "MaplyBaseViewController.h" -#import "MaplyTextureBuilder.h" -#import "MaplyScreenLabel.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyViewController.h" #import "AutoTester-Swift.h" @implementation WideVectorsTestCase diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index 7b7a93b4c8..ffea5780e1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -606,7 +606,6 @@ 2BC3D6EC220B713700CE91D0 /* sqlhelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC3D6EB220B713700CE91D0 /* sqlhelpers.h */; }; 2BC3D6EE220B714100CE91D0 /* sqlhelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BC3D6ED220B714100CE91D0 /* sqlhelpers.mm */; }; 2BC3D6F8220CAAC700CE91D0 /* WhirlyKitLog.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BC3D6F7220CAAC700CE91D0 /* WhirlyKitLog.mm */; }; - 2BC90D5122319FD700D8B606 /* WhirlyGlobe_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D5022319FD700D8B606 /* WhirlyGlobe_iOS.h */; }; 2BC90D532231A30F00D8B606 /* WhirlyGlobe.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D522231A30F00D8B606 /* WhirlyGlobe.h */; }; 2BC90D58223306D300D8B606 /* ScreenObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D57223306D300D8B606 /* ScreenObject.h */; }; 2BC90D5A223306EA00D8B606 /* ScreenObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BC90D59223306EA00D8B606 /* ScreenObject.cpp */; }; @@ -888,6 +887,24 @@ 2BE7E7BB221B22E500E4EFBA /* QuadImageFrameLoader_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE7E7BA221B22E500E4EFBA /* QuadImageFrameLoader_iOS.mm */; }; 2BE7E7BC221B99FA00E4EFBA /* MaplyQuadLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE1E7A22216163A00815D9C /* MaplyQuadLoader.mm */; }; 310419E027A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 310419DF27A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h */; }; + 310419F427A330A9004B25E1 /* GlobeTapMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 310419F327A330A9004B25E1 /* GlobeTapMessage.h */; }; + 310419FF27A34FEE004B25E1 /* GlobePanDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 310419FE27A34FED004B25E1 /* GlobePanDelegate_private.h */; }; + 31041A0127A35086004B25E1 /* GlobeDoubleTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0027A35086004B25E1 /* GlobeDoubleTapDelegate_private.h */; }; + 31041A0327A35219004B25E1 /* GlobeDoubleTapDragDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0227A35218004B25E1 /* GlobeDoubleTapDragDelegate_private.h */; }; + 31041A0527A3528F004B25E1 /* GlobePinchDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0427A3528F004B25E1 /* GlobePinchDelegate_private.h */; }; + 31041A0727A35591004B25E1 /* GlobeTwoFingerTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0627A35591004B25E1 /* GlobeTwoFingerTapDelegate_private.h */; }; + 31041A0A27A35AD4004B25E1 /* GlobeRotateDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0927A35AD4004B25E1 /* GlobeRotateDelegate_private.h */; }; + 31041A0C27A35C59004B25E1 /* GlobeTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0B27A35C59004B25E1 /* GlobeTapDelegate_private.h */; }; + 31041A0E27A35D2C004B25E1 /* GlobeTiltDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0D27A35D2C004B25E1 /* GlobeTiltDelegate_private.h */; }; + 31041A1027A35E98004B25E1 /* MaplyDoubleTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A0F27A35E98004B25E1 /* MaplyDoubleTapDelegate_private.h */; }; + 31041A1227A361EA004B25E1 /* MaplyPinchDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1127A361E9004B25E1 /* MaplyPinchDelegate_private.h */; }; + 31041A1427A364AC004B25E1 /* MaplyDoubleTapDragDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1327A364AC004B25E1 /* MaplyDoubleTapDragDelegate_private.h */; }; + 31041A1627A36586004B25E1 /* MaplyPanDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1527A36586004B25E1 /* MaplyPanDelegate_private.h */; }; + 31041A1827A3669A004B25E1 /* MaplyRotateDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1727A3669A004B25E1 /* MaplyRotateDelegate_private.h */; }; + 31041A1A27A3672D004B25E1 /* MaplyTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1927A3672D004B25E1 /* MaplyTapDelegate_private.h */; }; + 31041A1C27A36842004B25E1 /* MaplyTapMessage_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1B27A36842004B25E1 /* MaplyTapMessage_private.h */; }; + 31041A1E27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1D27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h */; }; + 31041A2027A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */; }; 313363AB253E5A2B007C2F27 /* WorkRegion_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 313363AA253E5A24007C2F27 /* WorkRegion_private.h */; }; 315082CA254CD29000A0A2B2 /* VectorTilePBFParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */; }; 315082D0254CD2BF00A0A2B2 /* VectorTilePBFParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */; }; @@ -1578,7 +1595,6 @@ 2BC3D6EB220B713700CE91D0 /* sqlhelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqlhelpers.h; sourceTree = ""; }; 2BC3D6ED220B714100CE91D0 /* sqlhelpers.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = sqlhelpers.mm; sourceTree = ""; }; 2BC3D6F7220CAAC700CE91D0 /* WhirlyKitLog.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WhirlyKitLog.mm; sourceTree = ""; }; - 2BC90D5022319FD700D8B606 /* WhirlyGlobe_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe_iOS.h; sourceTree = ""; }; 2BC90D522231A30F00D8B606 /* WhirlyGlobe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WhirlyGlobe.h; path = ../../../../common/WhirlyGlobeLib/include/WhirlyGlobe.h; sourceTree = ""; }; 2BC90D57223306D300D8B606 /* ScreenObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenObject.h; path = ../../../../common/WhirlyGlobeLib/include/ScreenObject.h; sourceTree = ""; }; 2BC90D59223306EA00D8B606 /* ScreenObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScreenObject.cpp; path = ../../../../common/WhirlyGlobeLib/src/ScreenObject.cpp; sourceTree = ""; }; @@ -1897,7 +1913,24 @@ 2BE7E7B8221B22DE00E4EFBA /* QuadImageFrameLoader_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuadImageFrameLoader_iOS.h; sourceTree = ""; }; 2BE7E7BA221B22E500E4EFBA /* QuadImageFrameLoader_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuadImageFrameLoader_iOS.mm; sourceTree = ""; }; 310419DF27A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WhirlyGlobe-Maply-Umbrella.h"; sourceTree = ""; }; - 310419E127A31464004B25E1 /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; + 310419F327A330A9004B25E1 /* GlobeTapMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeTapMessage.h; sourceTree = ""; }; + 310419FE27A34FED004B25E1 /* GlobePanDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobePanDelegate_private.h; sourceTree = ""; }; + 31041A0027A35086004B25E1 /* GlobeDoubleTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeDoubleTapDelegate_private.h; sourceTree = ""; }; + 31041A0227A35218004B25E1 /* GlobeDoubleTapDragDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeDoubleTapDragDelegate_private.h; sourceTree = ""; }; + 31041A0427A3528F004B25E1 /* GlobePinchDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobePinchDelegate_private.h; sourceTree = ""; }; + 31041A0627A35591004B25E1 /* GlobeTwoFingerTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeTwoFingerTapDelegate_private.h; sourceTree = ""; }; + 31041A0927A35AD4004B25E1 /* GlobeRotateDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeRotateDelegate_private.h; sourceTree = ""; }; + 31041A0B27A35C59004B25E1 /* GlobeTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeTapDelegate_private.h; sourceTree = ""; }; + 31041A0D27A35D2C004B25E1 /* GlobeTiltDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeTiltDelegate_private.h; sourceTree = ""; }; + 31041A0F27A35E98004B25E1 /* MaplyDoubleTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyDoubleTapDelegate_private.h; sourceTree = ""; }; + 31041A1127A361E9004B25E1 /* MaplyPinchDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyPinchDelegate_private.h; sourceTree = ""; }; + 31041A1327A364AC004B25E1 /* MaplyDoubleTapDragDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyDoubleTapDragDelegate_private.h; sourceTree = ""; }; + 31041A1527A36586004B25E1 /* MaplyPanDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyPanDelegate_private.h; sourceTree = ""; }; + 31041A1727A3669A004B25E1 /* MaplyRotateDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyRotateDelegate_private.h; sourceTree = ""; }; + 31041A1927A3672D004B25E1 /* MaplyTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTapDelegate_private.h; sourceTree = ""; }; + 31041A1B27A36842004B25E1 /* MaplyTapMessage_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTapMessage_private.h; sourceTree = ""; }; + 31041A1D27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTouchCancelAnimationDelegate_private.h; sourceTree = ""; }; + 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTwoFingerTapDelegate_private.h; sourceTree = ""; }; 313363AA253E5A24007C2F27 /* WorkRegion_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WorkRegion_private.h; sourceTree = ""; }; 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = VectorTilePBFParser.cpp; path = ../../../../common/WhirlyGlobeLib/src/VectorTilePBFParser.cpp; sourceTree = ""; }; 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorTilePBFParser.h; path = ../../../../common/WhirlyGlobeLib/include/VectorTilePBFParser.h; sourceTree = ""; }; @@ -2751,7 +2784,6 @@ 2B82B5461E82E2490095FB14 /* include */ = { isa = PBXGroup; children = ( - 2BC90D5022319FD700D8B606 /* WhirlyGlobe_iOS.h */, 2B82B5141E82E2490095FB14 /* WhirlyKit */, ); name = include; @@ -3131,6 +3163,7 @@ 2BC41C8921F0FEE8002926B7 /* gestures */ = { isa = PBXGroup; children = ( + 310419F327A330A9004B25E1 /* GlobeTapMessage.h */, 2B7B84D92122403700D11447 /* MaplyTapMessage.h */, 2BE5371B1D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h */, 2BE5371C1D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h */, @@ -3380,7 +3413,6 @@ 2BE536F51D2499E500B60FAD = { isa = PBXGroup; children = ( - 310419E127A31464004B25E1 /* module.modulemap */, 2BE53AC61D249E1500B60FAD /* CoreLocation.framework */, 2BE53AC41D249E0600B60FAD /* libz.tbd */, 2BE53AC21D249DDE00B60FAD /* libsqlite3.tbd */, @@ -3456,43 +3488,60 @@ 2BE5375A1D249A1200B60FAD /* private */ = { isa = PBXGroup; children = ( - 2B3F451B243F968200F85414 /* MaplyVectorStyle_private.h */, + 31041A0027A35086004B25E1 /* GlobeDoubleTapDelegate_private.h */, + 31041A0227A35218004B25E1 /* GlobeDoubleTapDragDelegate_private.h */, + 310419FE27A34FED004B25E1 /* GlobePanDelegate_private.h */, + 31041A0427A3528F004B25E1 /* GlobePinchDelegate_private.h */, + 31041A0927A35AD4004B25E1 /* GlobeRotateDelegate_private.h */, + 31041A0B27A35C59004B25E1 /* GlobeTapDelegate_private.h */, + 31041A0D27A35D2C004B25E1 /* GlobeTiltDelegate_private.h */, + 31041A0627A35591004B25E1 /* GlobeTwoFingerTapDelegate_private.h */, + 2BE5375B1D249A1200B60FAD /* ImageTexture_private.h */, 2B63C462243E474E002B481C /* MapboxVectorStyleSet_private.h */, - 2B092BB32373574E00E27CD8 /* MaplyGlobeRenderController_private.h */, 2BA827CA225E719D00324594 /* MapboxVectorTiles_private.h */, - 2BE1E78A22138A8100815D9C /* MaplyQuadLoader_private.h */, - 2BC3D6EB220B713700CE91D0 /* sqlhelpers.h */, - 2B7B84D721223F0200D11447 /* MaplyTextureAtlas_private.h */, - 2BB8A3D121ED43BF0025DA98 /* MaplyVariableTarget_private.h */, - 2BB8A3D621ED43C00025DA98 /* MaplyZoomGestureDelegate_private.h */, - 2BB8A3D521ED43C00025DA98 /* ViewPlacementActiveModel.h */, - 2B8E608820D458A500FB96F0 /* MaplyQuadSampler_private.h */, - 2B73D6C1207D224100AF5095 /* MaplyQuadImageLoader_private.h */, - 2B127BFA2012A1390099F405 /* MaplyRenderTarget_private.h */, - 2B127BF82012A12A0099F405 /* MaplyRenderController_private.h */, - 2BE5375B1D249A1200B60FAD /* ImageTexture_private.h */, 2BE5375C1D249A1200B60FAD /* MaplyActiveObject_private.h */, 2BE5375D1D249A1200B60FAD /* MaplyAnnotation_private.h */, 2BE5375E1D249A1200B60FAD /* MaplyBaseInteractionLayer_private.h */, 2BE5375F1D249A1200B60FAD /* MaplyBaseViewController_private.h */, 2BE537601D249A1200B60FAD /* MaplyComponentObject_private.h */, + 2BE537781D249A1200B60FAD /* MaplyControllerLayer_private.h */, 2BE537611D249A1200B60FAD /* MaplyCoordinateSystem_private.h */, + 31041A0F27A35E98004B25E1 /* MaplyDoubleTapDelegate_private.h */, + 31041A1327A364AC004B25E1 /* MaplyDoubleTapDragDelegate_private.h */, 2BE537631D249A1200B60FAD /* MaplyGeomBuilder_private.h */, 2BE537641D249A1200B60FAD /* MaplyGeomModel_private.h */, + 2B092BB32373574E00E27CD8 /* MaplyGlobeRenderController_private.h */, 2BE537651D249A1200B60FAD /* MaplyImageTile_private.h */, 2BE537661D249A1200B60FAD /* MaplyInteractionLayer_private.h */, 2BE537671D249A1200B60FAD /* MaplyMatrix_private.h */, + 31041A1527A36586004B25E1 /* MaplyPanDelegate_private.h */, 2BE537681D249A1200B60FAD /* MaplyParticleSystem_private.h */, + 31041A1127A361E9004B25E1 /* MaplyPinchDelegate_private.h */, 2BE537691D249A1200B60FAD /* MaplyPoints_private.h */, + 2B73D6C1207D224100AF5095 /* MaplyQuadImageLoader_private.h */, + 2BE1E78A22138A8100815D9C /* MaplyQuadLoader_private.h */, + 2B8E608820D458A500FB96F0 /* MaplyQuadSampler_private.h */, + 2B127BF82012A12A0099F405 /* MaplyRenderController_private.h */, + 2B127BFA2012A1390099F405 /* MaplyRenderTarget_private.h */, + 31041A1727A3669A004B25E1 /* MaplyRotateDelegate_private.h */, 2BE5376E1D249A1200B60FAD /* MaplyScreenObject_private.h */, 2BE5376F1D249A1200B60FAD /* MaplyShader_private.h */, 2BE537701D249A1200B60FAD /* MaplyShape_private.h */, + 31041A1927A3672D004B25E1 /* MaplyTapDelegate_private.h */, + 31041A1B27A36842004B25E1 /* MaplyTapMessage_private.h */, 2BE537721D249A1200B60FAD /* MaplyTexture_private.h */, + 2B7B84D721223F0200D11447 /* MaplyTextureAtlas_private.h */, + 31041A1D27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h */, + 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */, 2BE537741D249A1200B60FAD /* MaplyUpdateLayer_private.h */, + 2BB8A3D121ED43BF0025DA98 /* MaplyVariableTarget_private.h */, 2BE537751D249A1200B60FAD /* MaplyVectorObject_private.h */, + 2B3F451B243F968200F85414 /* MaplyVectorStyle_private.h */, 2BE537761D249A1200B60FAD /* MaplyVertexAttribute_private.h */, 2BE537771D249A1200B60FAD /* MaplyViewController_private.h */, - 2BE537781D249A1200B60FAD /* MaplyControllerLayer_private.h */, + 2BB8A3D621ED43C00025DA98 /* MaplyZoomGestureDelegate_private.h */, + 2BC3D6EB220B713700CE91D0 /* sqlhelpers.h */, + 2BB8A3D521ED43C00025DA98 /* ViewPlacementActiveModel.h */, 2BE5377D1D249A1200B60FAD /* WGInteractionLayer_private.h */, 2BE5377F1D249A1200B60FAD /* WGViewControllerLayer_private.h */, 2BE537801D249A1200B60FAD /* WhirlyGlobeViewController_private.h */, @@ -3927,6 +3976,7 @@ 2B82B61A1E82E2490095FB14 /* JSONValidator.h in Headers */, 2B0D978724490B4B00F64852 /* MapboxVectorStyleRaster.h in Headers */, 2B846F0621F158E100EF2A82 /* ParticleSystemManager.h in Headers */, + 31041A1427A364AC004B25E1 /* MaplyDoubleTapDragDelegate_private.h in Headers */, 2BE539551D249BEF00B60FAD /* AADate.h in Headers */, 2BE539681D249BEF00B60FAD /* AAMars.h in Headers */, 2BB8A3F921ED43D10025DA98 /* GlobeTiltDelegate.h in Headers */, @@ -3946,6 +3996,7 @@ 2BE539511D249BEF00B60FAD /* AAAberration.h in Headers */, 31833114259112BA005FEF70 /* LocalCartesian.hpp in Headers */, 2BE538221D249A1200B60FAD /* MaplyScreenObject.h in Headers */, + 310419FF27A34FEE004B25E1 /* GlobePanDelegate_private.h in Headers */, 2B23133C21FA919E006AA344 /* Dictionary_NSDictionary.h in Headers */, 2B82B71D1E82E24A0095FB14 /* LayerThread.h in Headers */, 31942FE7254B5C0A0006B499 /* maply_pb_decode.h in Headers */, @@ -3975,10 +4026,12 @@ 313363AB253E5A2B007C2F27 /* WorkRegion_private.h in Headers */, 3183312F259112BA005FEF70 /* Constants.hpp in Headers */, 3183311F259112BA005FEF70 /* TransverseMercatorExact.hpp in Headers */, + 31041A1827A3669A004B25E1 /* MaplyRotateDelegate_private.h in Headers */, 2B8E608B20D47FEE00FB96F0 /* MaplyRemoteTileFetcher.h in Headers */, 2BB8A3CD21ED43A40025DA98 /* MaplyTileSourceNew.h in Headers */, 2BE538031D249A1200B60FAD /* MaplyColorRampGenerator.h in Headers */, 2B82B5FE1E82E2490095FB14 /* JSON_Base64.h in Headers */, + 31041A0E27A35D2C004B25E1 /* GlobeTiltDelegate_private.h in Headers */, 2BE539631D249BEF00B60FAD /* AAIlluminatedFraction.h in Headers */, 2BE539581D249BEF00B60FAD /* AAEarth.h in Headers */, 2BB8A3CF21ED43A40025DA98 /* MaplyVariableTarget.h in Headers */, @@ -3987,6 +4040,7 @@ 2BE538141D249A1200B60FAD /* MaplyMoon.h in Headers */, 2B446B5621F7E7B80078A975 /* BillboardDrawableBuilder.h in Headers */, 31833120259112BA005FEF70 /* Config.h in Headers */, + 31041A0127A35086004B25E1 /* GlobeDoubleTapDelegate_private.h in Headers */, 2B446B4A21F7E7B80078A975 /* ParticleSystemDrawable.h in Headers */, 2BE538181D249A1200B60FAD /* MaplyParticleSystem.h in Headers */, 3183312D259112BA005FEF70 /* Geodesic.hpp in Headers */, @@ -4044,7 +4098,6 @@ 2B446B9A21FBA9D50078A975 /* PerformanceTimer.h in Headers */, 2BB8A3F321ED43D10025DA98 /* MaplyTapDelegate.h in Headers */, 2BE539751D249BEF00B60FAD /* AAParabolic.h in Headers */, - 2BC90D5122319FD700D8B606 /* WhirlyGlobe_iOS.h in Headers */, 3183311E259112BA005FEF70 /* TransverseMercator.hpp in Headers */, 2B8A786B2284DACC008B0A1F /* VertexAttribute.h in Headers */, 2B82B5FA1E82E2490095FB14 /* libbase64++.h in Headers */, @@ -4086,6 +4139,7 @@ 2BE538671D249A1200B60FAD /* MaplyVectorTileMarkerStyle.h in Headers */, 2B82B6D91E82E24A0095FB14 /* UIImage+Stuff.h in Headers */, 2BC90D6622405DD200D8B606 /* Sun.h in Headers */, + 31041A1027A35E98004B25E1 /* MaplyDoubleTapDelegate_private.h in Headers */, 2B446B2721F7A0D70078A975 /* Platform.h in Headers */, 3183312A259112BA005FEF70 /* Accumulator.hpp in Headers */, 2B82B5EF1E82E2490095FB14 /* priorityq.h in Headers */, @@ -4103,6 +4157,7 @@ 2BB8A3EF21ED43D10025DA98 /* MaplyRotateDelegate.h in Headers */, 2BB4767B2000486F006AAACB /* MapboxVectorStyleSet.h in Headers */, 2B846F0C21F158E100EF2A82 /* SceneGraphManager.h in Headers */, + 31041A1E27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h in Headers */, 2BB8E1BD21FBCEA400154CDC /* SharedAttributes.h in Headers */, 2B446AFC21F79A600078A975 /* FlatMath.h in Headers */, 2BE5380E1D249A1200B60FAD /* MaplyImageTile.h in Headers */, @@ -4123,6 +4178,7 @@ 2BE539851D249BEF00B60FAD /* AASidereal.h in Headers */, 2B699853228DD31F00C31E3F /* VertexAttributeMTL.h in Headers */, 2BE539701D249BEF00B60FAD /* AAMoslemCalendar.h in Headers */, + 31041A0A27A35AD4004B25E1 /* GlobeRotateDelegate_private.h in Headers */, 2B82B5F91E82E2490095FB14 /* libjson.h in Headers */, 2BE53A961D249C9000B60FAD /* DDXMLElement.h in Headers */, 2BC90D532231A30F00D8B606 /* WhirlyGlobe.h in Headers */, @@ -4161,7 +4217,9 @@ 31833118259112BA005FEF70 /* Ellipsoid.hpp in Headers */, 31833122259112BA005FEF70 /* Geoid.hpp in Headers */, 2B846F1021F158E100EF2A82 /* LayoutManager.h in Headers */, + 31041A2027A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h in Headers */, 31833123259112BA005FEF70 /* Rhumb.hpp in Headers */, + 310419F427A330A9004B25E1 /* GlobeTapMessage.h in Headers */, 31833131259112BA005FEF70 /* GeoCoords.hpp in Headers */, 2B699848228DD31F00C31E3F /* BasicDrawableMTL.h in Headers */, 2BE537F81D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h in Headers */, @@ -4174,6 +4232,7 @@ 2BB8A3D721ED43C00025DA98 /* MaplyVariableTarget_private.h in Headers */, 2B446AFE21F79A600078A975 /* WhirlyGeometry.h in Headers */, 2B446B8321FB97C40078A975 /* ShapeReader.h in Headers */, + 31041A0727A35591004B25E1 /* GlobeTwoFingerTapDelegate_private.h in Headers */, 2B0D978924490B4B00F64852 /* MapboxVectorStyleSymbol.h in Headers */, 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */, 2B446B4E21F7E7B80078A975 /* Drawable.h in Headers */, @@ -4186,10 +4245,13 @@ 2BE5386D1D249A1200B60FAD /* MapnikStyleRule.h in Headers */, 2BBC339022178AFF0038A229 /* QuadImageFrameLoader.h in Headers */, 2BE537F71D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h in Headers */, + 31041A0C27A35C59004B25E1 /* GlobeTapDelegate_private.h in Headers */, 2BA827C7225E6F1700324594 /* MapboxVectorTiles.h in Headers */, 2BB8A3F621ED43D10025DA98 /* MaplyPinchDelegate.h in Headers */, + 31041A1A27A3672D004B25E1 /* MaplyTapDelegate_private.h in Headers */, 2B810091221E07EE00CFF779 /* VectorObject.h in Headers */, 2BE5383F1D249A1200B60FAD /* MaplyGeomModel_private.h in Headers */, + 31041A0527A3528F004B25E1 /* GlobePinchDelegate_private.h in Headers */, 2BC90D5D223308C700D8B606 /* ScreenObject_iOS.h in Headers */, 2BE539671D249BEF00B60FAD /* AAKepler.h in Headers */, 2BE5385B1D249A1200B60FAD /* WhirlyGlobeViewController_private.h in Headers */, @@ -4200,6 +4262,7 @@ 2B846F0F21F158E100EF2A82 /* LabelManager.h in Headers */, 2B446AE121F288090078A975 /* LabelRenderer.h in Headers */, 2BE1E7922213977F00815D9C /* QuadTileBuilder.h in Headers */, + 31041A1C27A36842004B25E1 /* MaplyTapMessage_private.h in Headers */, 3183311C259112BA005FEF70 /* MagneticModel.hpp in Headers */, 2B82B5F81E82E2490095FB14 /* JSONOptions.h in Headers */, 2BE538371D249A1200B60FAD /* MaplyActiveObject_private.h in Headers */, @@ -4271,9 +4334,11 @@ 2B82B5FB1E82E2490095FB14 /* mempool.h in Headers */, 2BE539571D249BEF00B60FAD /* AADynamicalTime.h in Headers */, 2B446B0021F79A600078A975 /* Proj4CoordSystem.h in Headers */, + 31041A1227A361EA004B25E1 /* MaplyPinchDelegate_private.h in Headers */, 2B68A43F225D4469009CC720 /* MapboxVectorTileParser.h in Headers */, 2BE5396E1D249BEF00B60FAD /* AAMoonPerigeeApogee.h in Headers */, 31872FD52550ED71002C9C73 /* maply_pb_names.h in Headers */, + 31041A0327A35219004B25E1 /* GlobeDoubleTapDragDelegate_private.h in Headers */, 2BB8A3FC21ED43D10025DA98 /* MaplyTwoFingerTapDelegate.h in Headers */, 2B0D979B24490FFB00F64852 /* MapboxVectorFilter.h in Headers */, 2B82B6841E82E24A0095FB14 /* pj_list.h in Headers */, @@ -4287,6 +4352,7 @@ 2B23131B21F8DD61006AA344 /* MaplyView.h in Headers */, 2BE5384D1D249A1200B60FAD /* MaplyTexture_private.h in Headers */, 31833137259112BA005FEF70 /* Georef.hpp in Headers */, + 31041A1627A36586004B25E1 /* MaplyPanDelegate_private.h in Headers */, 2B7B84D821223F0300D11447 /* MaplyTextureAtlas_private.h in Headers */, 2BBC337B22163AE90038A229 /* QuadSamplingParams.h in Headers */, 2B846F0821F158E100EF2A82 /* SelectionManager.h in Headers */, @@ -5149,7 +5215,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; - MODULEMAP_FILE = module.modulemap; MTL_COMPILER_FLAGS = "-fpreserve-invariance"; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_LANGUAGE_REVISION = Metal21; @@ -5206,7 +5271,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = mh_dylib; - MODULEMAP_FILE = module.modulemap; MTL_COMPILER_FLAGS = "-fpreserve-invariance"; MTL_LANGUAGE_REVISION = Metal21; OTHER_CFLAGS = ""; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h index f1f1feb057..b2bff11782 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h @@ -16,106 +16,105 @@ FOUNDATION_EXPORT const unsigned char WhirlyGlobeMaplyComponentVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h index 0ca6f39830..152d869003 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h @@ -1,5 +1,4 @@ -/* - * MaplyBridge.h +/* MaplyBridge.h * MaplyBridge * * Created by jmnavarro on 7/19/15. @@ -15,11 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import "MaplyComponent.h" -#import "MaplyBaseViewController.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyGlobeRenderController.h" -#import "MaplyViewController.h" +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h index 044b028e23..8dcb73c347 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h @@ -16,87 +16,87 @@ * limitations under the License. */ -#import "MaplySharedAttributes.h" +#import -#import "NSData+Zlib.h" -#import "NSDictionary+StyleRules.h" +#import +#import -#import "MaplyGeomBuilder.h" -#import "MaplyIconManager.h" -#import "MaplyLocationTracker.h" -#import "MaplyTextureBuilder.h" +#import +#import +#import +#import -#import "MaplyCoordinate.h" -#import "MaplyCoordinateSystem.h" -#import "MaplyMatrix.h" +#import +#import +#import -#import "MaplyActiveObject.h" -#import "MaplyAnnotation.h" -#import "MaplyRenderController.h" -#import "MaplyUpdateLayer.h" -#import "MaplyViewTracker.h" -#import "MaplyControllerLayer.h" -#import "MaplyViewController.h" -#import "MaplyBaseViewController.h" +#import +#import +#import +#import +#import +#import +#import +#import -#import "MaplyComponentObject.h" -#import "MaplyBillboard.h" -#import "MaplyCluster.h" -#import "MaplyLabel.h" -#import "MaplyGeomModel.h" -#import "MaplyMarker.h" -#import "MaplyMoon.h" -#import "MaplyParticleSystem.h" -#import "MaplyPoints.h" -#import "MaplySticker.h" -#import "MaplyShape.h" -#import "MaplyScreenLabel.h" -#import "MaplySun.h" -#import "MaplyScreenObject.h" -#import "MaplyScreenMarker.h" -#import "MaplyStarsModel.h" -#import "MaplyTexture.h" -#import "MaplyVectorObject.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import -#import "MapboxVectorTiles.h" -#import "MapboxVectorInterpreter.h" +#import +#import -#import "SLDStyleSet.h" -#import "SLDExpressions.h" -#import "SLDOperators.h" -#import "SLDSymbolizers.h" -#import "SLDWellKnownMarkers.h" -#import "MaplyVectorStyle.h" -#import "MaplyVectorStyleSimple.h" -#import "MaplyVectorTileLineStyle.h" -#import "MaplyVectorTileMarkerStyle.h" -#import "MaplyVectorTilePolygonStyle.h" -#import "MaplyVectorTileStyle.h" -#import "MaplyVectorTileTextStyle.h" -#import "MapboxVectorStyleSet.h" -#import "MapnikStyle.h" -#import "MapnikStyleRule.h" -#import "MapnikStyleSet.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import -#import "MaplyQuadLoader.h" -#import "MaplyImageTile.h" -#import "MaplyQuadImageLoader.h" -#import "MaplyQuadImageFrameLoader.h" -#import "MaplyQuadPagingLoader.h" -#import "MaplyTileSourceNew.h" -#import "MaplySimpleTileFetcher.h" -#import "MaplyQuadSampler.h" -#import "MaplyRemoteTileFetcher.h" -#import "GeoJSONSource.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import -#import "MaplyWMSTileSource.h" -#import "MaplyMBTileFetcher.h" +#import +#import -#import "MaplyVariableTarget.h" -#import "MaplyAtmosphere.h" -#import "MaplyColorRampGenerator.h" -#import "MaplyLight.h" -#import "MaplyRenderTarget.h" -#import "MaplyShader.h" -#import "MaplyVertexAttribute.h" +#import +#import +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h index 070d8d88a6..51427344d2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h @@ -18,6 +18,6 @@ * */ -#import "MaplyComponent.h" -#import "MaplyGlobeRenderController.h" -#import "WhirlyGlobeViewController.h" +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h index 7c0632875c..0a305248a2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h @@ -19,7 +19,7 @@ */ #import -#import +#import /** This object displays an annotation at a particular point and will track that point as the map or globe moves. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h index feb24c66b7..7adaf92b64 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h @@ -18,27 +18,27 @@ #import #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import typedef double (^ZoomEasingBlock)(double z0,double z1,double t); typedef void (__strong ^InitCompletionBlock)(void); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h index 67eaa38295..95d1b61520 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import /** Animation State used by the WhirlyGlobeViewControllerAnimationDelegate. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h index 17cbfe6632..cddd63d859 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h @@ -18,20 +18,20 @@ * */ -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import @class MaplyRemoteTileFetcher; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h index 73b0d49995..4ff9ede068 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h @@ -18,12 +18,12 @@ * */ -#import "MaplyComponentObject.h" -#import "MaplyControllerLayer.h" -#import "MaplyCoordinate.h" -#import "MaplyCoordinateSystem.h" -#import "MaplyTileSourceNew.h" -#import "MaplyRenderController.h" +#import +#import +#import +#import +#import +#import @class MaplyUpdateLayer; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h index bb25cfc528..fc5b2eb575 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h @@ -17,13 +17,13 @@ */ #import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import @class MaplyControllerLayer; @class MaplyViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h index 24510a686a..b54b45cbc4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h @@ -19,7 +19,7 @@ */ #import -#import +#import /** The View Tracker associates a view with a geographic location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h index 7f9fbffde0..ae3c444a02 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h @@ -1,5 +1,5 @@ /* - * GlobeViewController.h + * WhirlyGlobeViewController.h * WhirlyGlobeComponent * * Created by Steve Gifford on 7/21/12. @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import @class WGViewControllerLayer; @class WhirlyGlobeViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h index 33f9bc3d1f..84cfab6912 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h @@ -16,9 +16,9 @@ * limitations under the License. */ -#import "MaplyTileSourceNew.h" -#import "MaplySimpleTileFetcher.h" -#import "MaplyCoordinateSystem.h" +#import +#import +#import /** MBTiles tile fetcher. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h index 7c33d429ed..0c25ea3809 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h @@ -1,5 +1,4 @@ -/* - * MaplyWMSTileSource.h +/* MaplyWMSTileSource.h * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 7/25/13. @@ -15,11 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import "MaplyTileSourceNew.h" -#import "MaplyCoordinateSystem.h" +#import +#import /** A bounding box for a specific CRS in that coordinate system. This is part of the Web Map Server parser. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h index 05d4c52488..ea1b93439a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDelegate.h @@ -1,6 +1,4 @@ -/* - * GlobeDoubleTapDelegate.h - * +/* GlobeDoubleTapDelegate.h * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -15,19 +13,13 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "GlobeView_iOS.h" -#import "GlobePinchDelegate.h" -#import "GlobeAnimateHeight.h" +#import @interface WhirlyGlobeDoubleTapDelegate : NSObject -/// Create a double tap gesture and a delegate and wire them up to the given UIView -+ (WhirlyGlobeDoubleTapDelegate *)doubleTapDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; // How much we zoom in by @@ -39,7 +31,4 @@ /// Zoom limits @property (nonatomic) float minZoom,maxZoom; -// If set, we calculate the tilt every time we update -@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h index 7b7a9c3f0a..7df7f123c4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h @@ -1,6 +1,4 @@ -/* - * GlobeDoubleTapDragDelegate.h - * +/* GlobeDoubleTapDragDelegate.h * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -15,12 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "GlobeView.h" -#import "GlobePinchDelegate.h" +#import // Sent out when the double tap delegate takes control #define kGlobeDoubleTapDragDidStart @"WKGlobeDoubleTapDragStarted" @@ -29,15 +25,9 @@ @interface WhirlyGlobeDoubleTapDragDelegate : NSObject -/// Create a double tap gesture and a delegate and wire them up to the given UIView -+ (WhirlyGlobeDoubleTapDragDelegate *)doubleTapDragDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; /// Zoom limits @property (nonatomic) float minZoom,maxZoom; -// If set, we calculate the tilt every time we update -@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePanDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePanDelegate.h index b02de88529..02d2249d1f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePanDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePanDelegate.h @@ -1,5 +1,5 @@ /* - * PanDelegateFixed.h + * GlobePanDelegate.h * WhirlyGlobeApp * * Created by Stephen Gifford on 4/28/11. @@ -19,7 +19,6 @@ */ #import -#import "WhirlyGlobe_iOS.h" // Sent out when the pan delegate takes control #define kPanDelegateDidStart @"WKPanDelegateStarted" @@ -44,8 +43,6 @@ @property(nonatomic,assign) bool northUp; -+ (WhirlyGlobePanDelegate *)panDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOSRef)globeView useCustomPanRecognizer:(bool)useCustomPanRecognizer; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePinchDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePinchDelegate.h index 3c6c2e1ebd..35d40d8508 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePinchDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobePinchDelegate.h @@ -1,5 +1,4 @@ -/* - * PinchDelegateFixed.h +/* GlobePinchDelegate.h * WhirlyGlobeLib * * Created by Steve Gifford on 8/22/12. @@ -15,12 +14,9 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "GlobeView_iOS.h" -#import "GlobeAnimateHeight.h" @class WhirlyGlobeRotateDelegate; @@ -41,10 +37,6 @@ /// If set we're cooperating with the rotation delegate (HACK!) @property (nonatomic,weak) WhirlyGlobeRotateDelegate *rotateDelegate; -/// Create a pinch gesture and a delegate and wire them up to the given UIView -/// Also need the view parameters in WhirlyGlobeView -+ (WhirlyGlobePinchDelegate *)pinchDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOSRef)globeView; - /// If set, we'll zoom around the pinch, rather than the center of the view @property (nonatomic,assign) bool zoomAroundPinch; @@ -59,9 +51,6 @@ @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; -// If set, we calculate the tilt every time we update -@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; - // If set, we'll keep track up rather than north up - (void)setTrackUp:(double)trackUp; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeRotateDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeRotateDelegate.h index 847483e953..9e57c3acf3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeRotateDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeRotateDelegate.h @@ -1,5 +1,4 @@ -/* - * RotateDelegate.h +/* GlobeRotateDelegate.h * WhirlyGlobeLib * * Created by Steve Gifford on 6/10/11. @@ -15,36 +14,17 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "GlobeView_iOS.h" @protocol WhirlyKitViewWrapper; -namespace WhirlyGlobe -{ - -// Sent out when the rotation delegate takes control -#define kRotateDelegateDidStart @"WKRotateDelegateStarted" -// Sent out when the rotation delegate finished (but hands off to momentum) -#define kRotateDelegateDidEnd @"WKRotateDelegateEnded" - -/// The state of our rotation -/// which is not currently in use. -typedef enum {RotNone,RotFree} RotationType; - -} - /** Rotation delegate is for two fingered rotation around the axis at the middle of the screen */ @interface WhirlyGlobeRotateDelegate : NSObject -/// Create a rotation gesture and a delegate and write them up to the given UIView -+ (WhirlyGlobeRotateDelegate *)rotateDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; - /// If set, the rotation will occur around the center between the two fingers rather than the current viewpoint @property (nonatomic) bool rotateAroundCenter; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapDelegate.h index fde8b8d044..61e3492062 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapDelegate.h @@ -1,5 +1,4 @@ -/* - * TapDelegate.h +/* GlobeTapDelegate.h * WhirlyGlobeLib * * Created by Steve Gifford on 2/3/11. @@ -19,17 +18,12 @@ */ #import -#import "GlobeView_iOS.h" -#import "GlobeTapMessage.h" /** WhirlyGlobe tap gesture delegate responds to taps by blasting out a notification. */ @interface WhirlyGlobeTapDelegate : NSObject -/// Create a tap gesture recognizer and a delegate and wire them up to the given UIView -+ (WhirlyGlobeTapDelegate *)tapDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/GlobeTapMessage.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapMessage.h similarity index 100% rename from ios/library/WhirlyGlobe-MaplyComponent/include/GlobeTapMessage.h rename to ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapMessage.h diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h index 1c5a8a4a4b..f326c3ed28 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h @@ -1,5 +1,4 @@ -/* - * TiltDelegate.h +/* GlobeTiltDelegate.h * * Created by Stephen Gifford on 1/5/15. * Copyright 2011-2022 mousebird consulting @@ -14,30 +13,16 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import -#import "WhirlyGlobe.h" -#import "GlobePinchDelegate.h" -#import "GlobeView_iOS.h" - -// Sent out when the tilt delegate takes control -#define kTiltDelegateDidStart @"WKTiltDelegateStarted" -// Sent out when the tilt delegate finished (but hands off to momentum) -#define kTiltDelegateDidEnd @"WKTiltDelegateEnded" +#import // The tilt delegate handle the 3D camera tilt @interface WhirlyGlobeTiltDelegate : NSObject -+ (WhirlyGlobeTiltDelegate *)tiltDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; // Set so we can turn off the pinch delegate when we're working @property (nonatomic,weak) WhirlyGlobePinchDelegate *pinchDelegate; -// Calculator delegate for tilt constraints -@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltCalcDelegate; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h index 694b539aa6..93bea5e7aa 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTwoFingerTapDelegate.h @@ -1,6 +1,4 @@ -/* - * GlobeTwoFingerTapDelegate.h - * +/* GlobeTwoFingerTapDelegate.h * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -15,18 +13,13 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "GlobeView_iOS.h" -#import "GlobePinchDelegate.h" +#import @interface WhirlyGlobeTwoFingerTapDelegate : NSObject -/// Create a double tap gesture and a delegate and wire them up to the given UIView -+ (WhirlyGlobeTwoFingerTapDelegate *)twoFingerTapDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; // How much we zoom in by @@ -38,7 +31,4 @@ /// Zoom limits @property (nonatomic) float minZoom,maxZoom; -// If set, we calculate the tilt every time we update -@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h index b912c86438..5986f3848b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h @@ -8,7 +8,7 @@ #import #import -#import "Maply3DTouchPreviewDatasource.h" +#import @class MaplyBaseInteractionLayer; @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h index d4f78df206..45329e17c5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h @@ -1,6 +1,4 @@ -/* - * MaplyDoubleTapDelegate.mm - * +/* MaplyDoubleTapDelegate.h * * Created by Jesse Crocker on 2/3/14. * Copyright 2011-2022 mousebird consulting @@ -15,18 +13,12 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import -#import "MapView_iOS.h" -#import "MaplyZoomGestureDelegate.h" +#import @interface MaplyDoubleTapDelegate : MaplyZoomGestureDelegate -/// Create a double tap gesture and a delegate and wire them up to the given UIView -+ (MaplyDoubleTapDelegate *)doubleTapDelegateForView:(UIView *)view mapView:(Maply::MapView_iOSRef)mapView; - /// How long we animate from starting to end point @property (nonatomic) float animTime; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h index 12cc594392..5e55d23a1b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h @@ -1,6 +1,4 @@ -/* - * MaplyDoubleTapDragDelegate.h - * +/* MaplyDoubleTapDragDelegate.h * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -15,21 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import -#import "MapView_iOS.h" -#import "MaplyZoomGestureDelegate.h" - -// Sent out when the double tap delegate takes control -#define kMaplyDoubleTapDragDidStart @"WKMaplyDoubleTapDragStarted" -// Sent out when the double tap delegate finished (but hands off to momentum) -#define kMaplyDoubleTapDragDidEnd @"WKMaplyDoubleTapDragEnded" +#import @interface MaplyDoubleTapDragDelegate : MaplyZoomGestureDelegate -/// Create a 2 finger tap gesture and a delegate and wire them up to the given UIView -+ (MaplyDoubleTapDragDelegate *)doubleTapDragDelegateForView:(UIView *)view mapView:(Maply::MapView_iOSRef)mapView; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPanDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPanDelegate.h index 3206eb3894..bf3dc43fb8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPanDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPanDelegate.h @@ -1,4 +1,4 @@ -/* MaplyPanDelegateMap.h +/* MaplyPanDelegate.h * WhirlyGlobeLib * * Created by Steve Gifford on 1/10/12. @@ -17,21 +17,9 @@ */ #import -#import -#import "MapView_iOS.h" - -// Sent out when the pan delegate takes control -#define kPanDelegateDidStart @"WKPanDelegateStarted" -// Sent out when the pan delegate finished (but hands off to momentum) -#define kPanDelegateDidEnd @"WKPanDelegateEnded" - -#define kPanDelegateMinTime 0.1 // Custom pan gesture recognizer that plays well with scroll views. -@interface MinDelay2DPanGestureRecognizer : UIPanGestureRecognizer { - // time of start of gesture - CFTimeInterval startTime; -} +@interface MinDelay2DPanGestureRecognizer : UIPanGestureRecognizer - (void)forceEnd; @@ -39,12 +27,6 @@ @interface MaplyPanDelegate : NSObject -/// Create a pinch gesture and a delegate and wire them up to the given UIView -+ (MaplyPanDelegate *)panDelegateForView:(UIView *)view mapView:(Maply::MapView_iOSRef)mapView useCustomPanRecognizer:(bool)useCustomPanRecognizer; - @property (nonatomic,weak) UIGestureRecognizer *gestureRecognizer; -/// Set the bounding rectangle -- (void)setBounds:(WhirlyKit::Point2d *)bounds; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h index 942f8505ef..01c0b9e3ab 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h @@ -16,12 +16,8 @@ * limitations under the License. */ -#import -#import "MaplyZoomGestureDelegate.h" +#import @interface MaplyPinchDelegate : MaplyZoomGestureDelegate -/// Create a pinch gesture and a delegate and wire them up to the given UIView -+ (MaplyPinchDelegate *)pinchDelegateForView:(UIView *)view mapView:(Maply::MapView_iOSRef)mapView; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyRotateDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyRotateDelegate.h index 4f8db0cb0d..2cb073bfb4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyRotateDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyRotateDelegate.h @@ -1,5 +1,4 @@ -/* - * MaplyRotateDelegate.h +/* MaplyRotateDelegate.h * WhirlyGlobeLib * * Created by rghosh0 around 9/26/13. @@ -15,18 +14,9 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "MapView_iOS.h" - - -namespace Maply -{ - /// The state of our rotation - typedef enum {RotNone,RotFree} RotationType; -} @interface MaplyRotateDelegate : NSObject @@ -36,6 +26,4 @@ namespace Maply /// The minimum angle (degrees) that must be subtended before rotation begins @property(nonatomic,assign) float rotateThreshold; -+ (MaplyRotateDelegate *)rotateDelegateForView:(UIView *)view mapView:(Maply::MapView_iOS *)mapView; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h index fa561f1fc9..34589f1a22 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h @@ -1,5 +1,4 @@ -/* - * MaplyTapDelegate.h +/* MaplyTapDelegate.h * WhirlyGlobeLib * * Created by Steve Gifford on 1/20/12. @@ -15,22 +14,16 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "WhirlyVector.h" -#import "MapView_iOS.h" -#import "MaplyTapMessage.h" +#import /** Maply tap gesture delegate responds to a tap by sending out a notification. */ @interface MaplyTapDelegate : NSObject -/// Create a tap gesture recognizer and a delegate, then wire them up to the given UIView -+ (MaplyTapDelegate *)tapDelegateForView:(UIView *)view mapView:(Maply::MapView_iOS *)mapView; - /// Gesture recognizer created for the delegate @property (nonatomic,weak) UITapGestureRecognizer *gestureRecognizer; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapMessage.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapMessage.h index 3fa054eb69..6500e2f5a4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapMessage.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapMessage.h @@ -1,5 +1,4 @@ -/* - * MaplyTapMessage.h +/* MaplyTapMessage.h * WhirlyGlobeLib * * Created by Steve Gifford on 9/19/11. @@ -19,11 +18,6 @@ */ #import -#import "WhirlyVector.h" -#import "MapView_iOS.h" - -/// This is the notification you get for a tap on the map -#define MaplyTapMsg @"MaplyTap" /** Tap Message is an indication that the user tapped on the map. @@ -35,10 +29,6 @@ @property (nonatomic,retain) UIView *view; //// Touch location on view in 2D @property (nonatomic,assign) CGPoint touchLoc; -/// Lon/Lat -@property (nonatomic,assign) WhirlyKit::GeoCoord whereGeo; -/// 3D coordinates in the view -@property (nonatomic,assign) WhirlyKit::Point3f worldLoc; /// Where the eye was. @property (nonatomic,assign) float heightAboveSurface; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTouchCancelAnimationDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTouchCancelAnimationDelegate.h index 8f8f835310..74c13911c6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTouchCancelAnimationDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTouchCancelAnimationDelegate.h @@ -1,5 +1,4 @@ -/* - * MaplyTouchCancelAnimationDelegate.mm +/* MaplyTouchCancelAnimationDelegate.h * WhirlyGlobeLib * * Created by Jesse Crocker on 7/15/14. @@ -15,21 +14,13 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "MapView_iOS.h" @interface MaplyTouchCancelAnimationDelegate : NSObject /// The gesture recognizer @property (nonatomic,strong) UIGestureRecognizer *gestureRecognizer; -@property (nonatomic) Maply::MapView_iOS *mapView; - -/// Create a touch gesture and a delegate and wire them up to the given UIView -+ (MaplyTouchCancelAnimationDelegate*)touchDelegateForView:(UIView *)view mapView:(Maply::MapView_iOS *)mapView; - -- (instancetype)initWithMapView:(Maply::MapView_iOS *)inView; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h index aa29b83344..ad373c846d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h @@ -1,6 +1,4 @@ -/* - * MaplyTwoFingerTapDelegate.h - * +/* MaplyTwoFingerTapDelegate.h * * Created by Jesse Crocker on 2/4/14. * Copyright 2011-2022 mousebird consulting @@ -15,20 +13,13 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import -#import "MapView_iOS.h" -#import "MaplyZoomGestureDelegate.h" +#import @interface MaplyTwoFingerTapDelegate : MaplyZoomGestureDelegate -/// Create a 2 finger tap gesture and a delegate and wire them up to the given UIView -+ (MaplyTwoFingerTapDelegate *)twoFingerTapDelegateForView:(UIView *)view mapView:(Maply::MapView_iOSRef)mapView; - // How long we animate from one place to the next @property (nonatomic) float animTime; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyZoomGestureDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyZoomGestureDelegate.h index 574c5e5609..442a976329 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyZoomGestureDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyZoomGestureDelegate.h @@ -13,33 +13,19 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "MapView_iOS.h" - -#define kZoomGestureDelegateDidStart @"WKZoomDelegateStarted" -// Sent out when the pan delegate finished (but hands off to momentum) -#define kZoomGestureDelegateDidEnd @"WKZoomDelegateEnded" @interface MaplyZoomGestureDelegate : NSObject -{ - /// Boundary quad that we're to stay within - WhirlyKit::Point2dVector bounds; -} /// Minimum allowable zoom level @property (nonatomic,assign) float minZoom; /// Maximum allowable zoom level + @property (nonatomic,assign) float maxZoom; + //The gesture recognizer @property (nonatomic,strong) UIGestureRecognizer *gestureRecognizer; -@property (nonatomic) Maply::MapView_iOSRef mapView; - -/// Set the bounding rectangle -- (void)setBounds:(WhirlyKit::Point2d *)bounds; - -- (instancetype)initWithMapView:(Maply::MapView_iOSRef)inView; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h index 5824ac1c88..2f05d3848d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyRenderController.h" -#import "MaplyGeomModel.h" +#import +#import +#import /** Geometry State is used to describe the visual look of objects as they're added. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h index b8f38d5b0e..e6f545a4dd 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyRenderController.h" +#import /** Holds info about a single style from the MaplySimpleStyleManager. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h index c73a734345..d759183fe7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h @@ -20,7 +20,7 @@ #import #import -#import +#import #define LOC_TRACKER_POS_MARKER_SIZE 32 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h index 67213b994b..55c1446d0b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h @@ -17,7 +17,7 @@ */ #import -#import "MaplyBaseViewController.h" +#import #define GEOJSON_MAX_POINTS 4096 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h index 7d8e6df1a0..a1a99033fc 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h @@ -19,7 +19,7 @@ */ #import -#import +#import @class MaplyElevationChunk; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h index a65b28287a..b1da668424 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h @@ -17,8 +17,8 @@ * */ -#import -#import +#import +#import @class MaplyQuadImageFrameLoader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h index b32e119d2a..b524401a7e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h @@ -17,13 +17,13 @@ * */ -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import /** This version of the loader return is used by the MaplyImageLoaderInterpreter. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h index 78e9756ed5..3ef22cd6ec 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h @@ -18,12 +18,12 @@ */ #import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import @class MaplyQuadLoaderBase; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h index 82e826c5b5..e08a04d066 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h @@ -17,7 +17,7 @@ * */ -#import "MaplyQuadLoader.h" +#import /** This version of the loader return is used by the MaplyQuadPagingLoader. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h index 7fa8ea093c..2f9ec391e2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h @@ -18,10 +18,10 @@ * */ -#import -#import -#import -#import +#import +#import +#import +#import /** Sampling parameters. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h index 1f5e40b122..32dba80280 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h @@ -18,8 +18,8 @@ * */ -#import -#import +#import +#import /** Remote Tile Info Object (New) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h index 669dae76ab..f500c6874a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h @@ -18,7 +18,7 @@ * */ -#import +#import /** Simple Tile Fetcher is meant for sub classing. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h index 0c8ba1b325..81000071ce 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** This represents the indentifier for a unique tile in the pyramid. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h index 93bac03654..6778bd3e30 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h @@ -1,5 +1,4 @@ -/* - * MaplyCoordinateSystem.h +/* MaplyCoordinateSystem.h * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 5/13/13. @@ -15,11 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import +#import /** Coordinate system for tiling systems and data sources and such. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h index 6bb2ee3690..39b882ff87 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h @@ -18,7 +18,7 @@ * */ -#import +#import /// WhirlyGlobe just takes geo coordinates. /// This contains lon and lat values in the x and y fields. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDelegate_private.h new file mode 100644 index 0000000000..feca344b81 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDelegate_private.h @@ -0,0 +1,30 @@ +/* GlobeDoubleTapDelegate_private.h + * + * Created by Steve Gifford on 2/7/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "GlobeView_iOS.h" +#import "GlobeAnimateHeight.h" + +@interface WhirlyGlobeDoubleTapDelegate () + +// If set, we calculate the tilt every time we update +@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; + +/// Create a double tap gesture and a delegate and wire them up to the given UIView ++ (WhirlyGlobeDoubleTapDelegate *)doubleTapDelegateForView:(UIView *)view + globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDragDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDragDelegate_private.h new file mode 100644 index 0000000000..dbded1a0bb --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeDoubleTapDragDelegate_private.h @@ -0,0 +1,31 @@ +/* GlobeDoubleTapDragDelegate_private.h + * + * Created by Steve Gifford on 2/7/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "GlobeView_iOS.h" +#import "GlobeAnimateHeight.h" + +@interface WhirlyGlobeDoubleTapDragDelegate () + +// If set, we calculate the tilt every time we update +@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; + +/// Create a double tap gesture and a delegate and wire them up to the given UIView ++ (WhirlyGlobeDoubleTapDragDelegate *)doubleTapDragDelegateForView:(UIView *)wrapView + globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePanDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePanDelegate_private.h new file mode 100644 index 0000000000..3651059245 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePanDelegate_private.h @@ -0,0 +1,28 @@ +/* + * GlobePanDelegate_private.h + * WhirlyGlobeApp + * + * Created by Stephen Gifford on 4/28/11. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import "WhirlyGlobe_iOS.h" + +// The pan delegate handles panning and rotates the globe accordingly +@interface WhirlyGlobePanDelegate () + ++ (WhirlyGlobePanDelegate *)panDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOSRef)globeView useCustomPanRecognizer:(bool)useCustomPanRecognizer; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePinchDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePinchDelegate_private.h new file mode 100644 index 0000000000..40b8383a2b --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobePinchDelegate_private.h @@ -0,0 +1,31 @@ +/* GlobePinchDelegate_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 8/22/12. + * Copyright 2012-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "GlobeView_iOS.h" +#import "GlobeAnimateHeight.h" + +@interface WhirlyGlobePinchDelegate () + +// If set, we calculate the tilt every time we update +@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; + ++ (WhirlyGlobePinchDelegate *)pinchDelegateForView:(UIView *)view + globeView:(WhirlyGlobe::GlobeView_iOSRef)globeView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h new file mode 100644 index 0000000000..5952ad8fd6 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h @@ -0,0 +1,42 @@ +/* RotateDelegate_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 6/10/11. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +namespace WhirlyGlobe +{ + +// Sent out when the rotation delegate takes control +#define kRotateDelegateDidStart @"WKRotateDelegateStarted" +// Sent out when the rotation delegate finished (but hands off to momentum) +#define kRotateDelegateDidEnd @"WKRotateDelegateEnded" + +/// The state of our rotation +/// which is not currently in use. +typedef enum {RotNone,RotFree} RotationType; + +} + +@interface WhirlyGlobeRotateDelegate () + +/// Create a rotation gesture and a delegate and write them up to the given UIView ++ (WhirlyGlobeRotateDelegate *)rotateDelegateForView:(UIView *)view + globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapDelegate_private.h new file mode 100644 index 0000000000..57b19e625e --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapDelegate_private.h @@ -0,0 +1,29 @@ +/* GlobeTapDelegate_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 2/3/11. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "GlobeView_iOS.h" +#import "GlobeTapMessage.h" + +@interface WhirlyGlobeTapDelegate () + +/// Create a tap gesture recognizer and a delegate and wire them up to the given UIView ++ (WhirlyGlobeTapDelegate *)tapDelegateForView:(UIView *)view + globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h new file mode 100644 index 0000000000..e78753f7c9 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h @@ -0,0 +1,36 @@ +/* GlobeTiltDelegate_private.h + * + * Created by Stephen Gifford on 1/5/15. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import +#import +#import + +// Sent out when the tilt delegate takes control +#define kTiltDelegateDidStart @"WKTiltDelegateStarted" +// Sent out when the tilt delegate finished (but hands off to momentum) +#define kTiltDelegateDidEnd @"WKTiltDelegateEnded" + +// The tilt delegate handle the 3D camera tilt +@interface WhirlyGlobeTiltDelegate () + ++ (WhirlyGlobeTiltDelegate *)tiltDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; + +// Calculator delegate for tilt constraints +@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltCalcDelegate; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTwoFingerTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTwoFingerTapDelegate_private.h new file mode 100644 index 0000000000..93b664f4ff --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTwoFingerTapDelegate_private.h @@ -0,0 +1,31 @@ +/* GlobeTwoFingerTapDelegate_private.h + * + * Created by Steve Gifford on 2/7/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "GlobeView_iOS.h" +#import "GlobeAnimateHeight.h" + +@interface WhirlyGlobeTwoFingerTapDelegate () + +/// Create a double tap gesture and a delegate and wire them up to the given UIView ++ (WhirlyGlobeTwoFingerTapDelegate *)twoFingerTapDelegateForView:(UIView *)view + globeView:(WhirlyGlobe::GlobeView_iOS *)globeView; + +// If set, we calculate the tilt every time we update +@property (nonatomic) WhirlyGlobe::TiltCalculatorRef tiltDelegate; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h new file mode 100644 index 0000000000..9c91ded5d2 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h @@ -0,0 +1,26 @@ +/* MaplyDoubleTapDelegate_private.h + * + * Created by Jesse Crocker on 2/3/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +@interface MaplyDoubleTapDelegate () + +/// Create a double tap gesture and a delegate and wire them up to the given UIView ++ (MaplyDoubleTapDelegate *)doubleTapDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOSRef)mapView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h new file mode 100644 index 0000000000..cc666aa37e --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h @@ -0,0 +1,31 @@ +/* MaplyDoubleTapDragDelegate_private.h + * + * Created by Steve Gifford on 2/7/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import + +// Sent out when the double tap delegate takes control +#define kMaplyDoubleTapDragDidStart @"WKMaplyDoubleTapDragStarted" +// Sent out when the double tap delegate finished (but hands off to momentum) +#define kMaplyDoubleTapDragDidEnd @"WKMaplyDoubleTapDragEnded" + +@interface MaplyDoubleTapDragDelegate () + +/// Create a 2 finger tap gesture and a delegate and wire them up to the given UIView ++ (MaplyDoubleTapDragDelegate *)doubleTapDragDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOSRef)mapView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h new file mode 100644 index 0000000000..da143e1329 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h @@ -0,0 +1,51 @@ +/* MaplyPanDelegate_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 1/10/12. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "MaplyPanDelegate.h" +#import +#import + +// Sent out when the pan delegate takes control +#define kPanDelegateDidStart @"WKPanDelegateStarted" +// Sent out when the pan delegate finished (but hands off to momentum) +#define kPanDelegateDidEnd @"WKPanDelegateEnded" + +#define kPanDelegateMinTime 0.1 + +// Custom pan gesture recognizer that plays well with scroll views. +@interface MinDelay2DPanGestureRecognizer () { + // time of start of gesture + CFTimeInterval startTime; +} + +- (void)forceEnd; + +@end + +@interface MaplyPanDelegate () + +/// Create a pinch gesture and a delegate and wire them up to the given UIView ++ (MaplyPanDelegate *)panDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOSRef)mapView + useCustomPanRecognizer:(bool)useCustomPanRecognizer; + +- (const WhirlyKit::Point2dVector &)getBounds; +- (void)setBounds:(const WhirlyKit::Point2d *)bounds; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h new file mode 100644 index 0000000000..f15e567878 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h @@ -0,0 +1,28 @@ +/* MaplyPinchDelegate_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 1/10/12. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "MapView_iOS.h" + +@interface MaplyPinchDelegate () + +/// Create a pinch gesture and a delegate and wire them up to the given UIView ++ (MaplyPinchDelegate *)pinchDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOSRef)mapView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h new file mode 100644 index 0000000000..4e5983fa96 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h @@ -0,0 +1,33 @@ +/* MaplyRotateDelegate_private.h + * WhirlyGlobeLib + * + * Created by rghosh0 around 9/26/13. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +namespace Maply +{ + /// The state of our rotation + typedef enum {RotNone,RotFree} RotationType; +} + +@interface MaplyRotateDelegate () + ++ (MaplyRotateDelegate *)rotateDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOS *)mapView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapDelegate_private.h new file mode 100644 index 0000000000..b2c9026103 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapDelegate_private.h @@ -0,0 +1,29 @@ +/* MaplyTapDelegate_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 1/20/12. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MaplyTapDelegate.h" +#import "WhirlyVector.h" +#import "MapView_iOS.h" + +@interface MaplyTapDelegate () + +/// Create a tap gesture recognizer and a delegate, then wire them up to the given UIView ++ (MaplyTapDelegate *)tapDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOS *)mapView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h new file mode 100644 index 0000000000..3faa73b358 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h @@ -0,0 +1,34 @@ +/* MaplyTapMessage_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 9/19/11. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#import +#import +#import + +/// This is the notification you get for a tap on the map +#define MaplyTapMsg @"MaplyTap" + +@interface MaplyTapMessage () + +/// Lon/Lat +@property (nonatomic,assign) WhirlyKit::GeoCoord whereGeo; +/// 3D coordinates in the view +@property (nonatomic,assign) WhirlyKit::Point3f worldLoc; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTouchCancelAnimationDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTouchCancelAnimationDelegate_private.h new file mode 100644 index 0000000000..c6f1a656ed --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTouchCancelAnimationDelegate_private.h @@ -0,0 +1,32 @@ +/* MaplyTouchCancelAnimationDelegate_private.h + * WhirlyGlobeLib + * + * Created by Jesse Crocker on 7/15/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "MapView_iOS.h" + +@interface MaplyTouchCancelAnimationDelegate () + +@property (nonatomic) Maply::MapView_iOS *mapView; + +/// Create a touch gesture and a delegate and wire them up to the given UIView ++ (MaplyTouchCancelAnimationDelegate*)touchDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOS *)mapView; + +- (instancetype)initWithMapView:(Maply::MapView_iOS *)inView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h new file mode 100644 index 0000000000..ca0df27547 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h @@ -0,0 +1,27 @@ +/* MaplyTwoFingerTapDelegate_private.h + * + * Created by Jesse Crocker on 2/4/14. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import + +@interface MaplyTwoFingerTapDelegate () + +/// Create a 2 finger tap gesture and a delegate and wire them up to the given UIView ++ (MaplyTwoFingerTapDelegate *)twoFingerTapDelegateForView:(UIView *)view + mapView:(Maply::MapView_iOSRef)mapView; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h index dd0f5684ce..156c0b8a67 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h @@ -1,6 +1,4 @@ -/* - * MaplyZoomGestureDelegate_private.h - * +/* MaplyZoomGestureDelegate_private.h * * Created by Jesse Crocker on 2/4/14. * Copyright 2011-2022 mousebird consulting @@ -15,17 +13,28 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import #import "MaplyView.h" #import "SceneRenderer.h" +#import + +#define kZoomGestureDelegateDidStart @"WKZoomDelegateStarted" +// Sent out when the pan delegate finished (but hands off to momentum) +#define kZoomGestureDelegateDidEnd @"WKZoomDelegateEnded" + +@interface MaplyZoomGestureDelegate () +{ +/// Boundary quad that we're to stay within + WhirlyKit::Point2dVector bounds; +} -using namespace WhirlyKit; +@property (nonatomic) Maply::MapView_iOSRef mapView; -@interface MaplyZoomGestureDelegate (_private) +- (const WhirlyKit::Point2dVector &)getBounds; -- (bool)withinBounds:(Point3d &)loc view:(UIView *)view renderer:(SceneRenderer *)sceneRender mapView:(Maply::MapView *)testMapView newCenter:(Point3d *)newCenter; +- (void)setBounds:(const WhirlyKit::Point2d *)bounds; +- (instancetype)initWithMapView:(Maply::MapView_iOSRef)inView; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h index 85a1ed5253..3af444ffb2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyComponentObject.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyLight.h" +#import +#import +#import /** Sets up the objects and shaders to implement an atmosphere. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h index d8746031a7..4c83fca606 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h @@ -1,5 +1,4 @@ -/* - * MaplyLight.h +/* MaplyLight.h * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 1/30/13. @@ -19,7 +18,7 @@ */ #import -#import +#import /** The Light provides a simple interface to basic lighting within the toolkit. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h index 400e044138..82b283f671 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h @@ -19,7 +19,7 @@ */ #import -#import +#import typedef NS_ENUM(NSUInteger,MaplyMipmapType) { /// Don't generate a mipmap diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h index 2317547f2f..d6ba4908f5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h @@ -19,9 +19,9 @@ */ #import -#import "MaplyTexture.h" -#import "MaplyRenderTarget.h" -#import "MaplyRenderController.h" +#import +#import +#import /** A variable target manages two pass rendering for one type of variable. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h index 84ce4c13d9..acf5d30da7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import typedef NS_ENUM(NSUInteger,MapboxLayerType) { MapboxLayerTypeBackground, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h index bbc91d9e71..cecf6d991b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h @@ -17,8 +17,8 @@ */ #import -#import -#import +#import +#import @class MaplyVectorTileData; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h index 36a716474a..3543e30057 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h @@ -17,7 +17,7 @@ */ #import -#import "MapboxVectorTiles.h" +#import /** Simple default style to see something in vector tile data. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h index c6c14f793e..ce3984a418 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "MaplyVectorStyle.h" -#import "MaplyVectorTileStyle.h" +#import +#import /** Implementation of the line style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h index 488e988214..9dac65a41f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "MaplyVectorStyle.h" -#import "MaplyVectorTileStyle.h" +#import +#import /** Implementation of the marker style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h index 64a375d90d..509916af0e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "MaplyVectorStyle.h" -#import "MaplyVectorTileStyle.h" +#import +#import /** Implementation of the polygon style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h index eb51b2eaf3..c9178597b9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h @@ -17,7 +17,7 @@ */ #import -#import +#import /** The Maply Vector Tile Style is an internal representation of the style JSON coming out of a Maply Vector Tile database. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h index c03f9124d3..b69b826efa 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import "MaplyVectorStyle.h" -#import "MaplyVectorTileStyle.h" +#import +#import /** Implementation of the text style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h index 1a4e53fafb..3f489ef3c2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h @@ -19,7 +19,7 @@ */ #import -#import "MapnikStyleRule.h" +#import @interface MapnikStyle : NSObject diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h index 9ed6d2c5d4..0d615f5fa0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h @@ -20,7 +20,7 @@ #import -#import "MapboxVectorTiles.h" +#import @class MaplyVectorStyleSettings; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h index 4532286858..245797902f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h @@ -7,7 +7,7 @@ // #import -#import "SLDExpressions.h" +#import /** @brief Base class for elements of ogc:comparisonOps or ogc:logicOps. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h index 4edb5a1f19..2000b20470 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h @@ -7,7 +7,7 @@ // #import -#import "MapboxVectorTiles.h" +#import /** @brief Class corresponding to the sld:NamedLayer element @see http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd for SLD v1.1.0 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h index e62f898cf1..4eb71515f0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h @@ -9,7 +9,7 @@ #import @class DDXMLNode; @class DDXMLElement; -#import "MaplyVectorTileStyle.h" +#import /** @brief Base class for Symbolizer elements @see http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd for SLD v1.1.0 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h index 3d3795b327..622960488a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h @@ -20,11 +20,11 @@ #import -#import "MaplyTileSourceNew.h" -#import "MaplyCoordinate.h" -#import "MaplyVectorStyle.h" -#import "MapboxVectorTiles.h" -#import "MaplyQuadImageFrameLoader.h" +#import +#import +#import +#import +#import @class MapboxVectorStyleSet; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h index 3563d9b8e1..b52cd5b799 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h @@ -18,10 +18,10 @@ * */ -#import -#import -#import -#import +#import +#import +#import +#import typedef NS_ENUM(NSInteger,MapboxGeometryType) { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h index f847cc69df..3a24e43c0d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h @@ -19,8 +19,8 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyScreenObject.h" +#import +#import /** A billboard is tied to a specific point, but rotates to face the user. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h index 45c4759ebf..aea79cf3c5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h index 5fde6b31ef..82a3db9b5b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import @class MaplyShader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h index 5e1e8fad39..38af6a760b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import typedef NS_ENUM(NSInteger, MaplyLabelJustify) { MaplyLabelJustifyLeft, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h index 61ce56b5fc..04d5e598a0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import /** The Marker places a UIImage on the globe or map at a given location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h index f0a9010451..f55f616257 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h @@ -17,9 +17,9 @@ */ #import -#import "MaplyComponentObject.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyLight.h" +#import +#import +#import /** Utility for calculating moon position. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h index 4ed5729808..ac92b21794 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import typedef NS_ENUM(NSInteger, MaplyParticleSystemType) { MaplyParticleSystemTypePoint, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h index 9279db06c1..ee59f356a9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** The Maply Points object is used to add a large number of static points to the scene. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h index 08f90bcec4..3893d2f95a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h @@ -19,7 +19,7 @@ */ #import -#import "MaplyCoordinate.h" +#import @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h index 9dc022e4e6..3481876d5c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h @@ -1,5 +1,4 @@ -/* - * WGScreenMarker.h +/* MaplyScreenMarker.h * WhirlyGlobeComponent * * Created by Steve Gifford on 7/21/12. @@ -15,11 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import +#import @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h index b0f7bc6e77..48028ae378 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h @@ -19,8 +19,8 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyRenderController.h" +#import +#import /** The Maply Screen Object is used to build up a more complex screen object from multiple pieces. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h index 1431d32bf9..baed55f882 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** Maply Shape is the base class for the actual shape objects. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h index 305a004513..951afbcf49 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h @@ -17,8 +17,8 @@ */ #import -#import "MaplyComponentObject.h" -#import "WhirlyGlobeViewController.h" +#import +#import /** The Stars Model parses and then displays a star field. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h index fd7947a8b3..91e886b837 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h @@ -19,8 +19,8 @@ */ #import -#import "MaplyCoordinate.h" -#import "MaplyRenderController.h" +#import +#import /** Stickers are rectangles placed on the globe with an image. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h index 501b6fc116..c106a090c8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h @@ -17,9 +17,9 @@ */ #import -#import "MaplyComponentObject.h" -#import "WhirlyGlobeViewController.h" -#import "MaplyLight.h" +#import +#import +#import /** Utility for calculating sun position and shading info. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h index fb75019a06..e85aeb429b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h @@ -18,8 +18,8 @@ #import #import -#import -#import +#import +#import @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/module.modulemap b/ios/library/WhirlyGlobe-MaplyComponent/module.modulemap deleted file mode 100644 index 85d15cc9c1..0000000000 --- a/ios/library/WhirlyGlobe-MaplyComponent/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module WhirlyGlobeMaplyComponent { - umbrella header "WhirlyGlobeMaplyComponent.h" - - export * - module * { export * } -} diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm index 5217e3c8b7..4957deb855 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm @@ -26,6 +26,7 @@ #import "MaplyVectorObject_private.h" #import "math/MaplyCoordinate.h" #import "ImageTexture_private.h" +#import "private/MaplyTapMessage_private.h" #import using namespace Eigen; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm index 8eb3ae66d3..dec202cec5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm @@ -18,12 +18,22 @@ #import #import "MaplyViewController.h" -#import "MaplyViewController_private.h" -#import "MaplyInteractionLayer_private.h" -#import "MaplyCoordinateSystem_private.h" -#import "MaplyAnnotation_private.h" #import "MaplyAnimateTranslateMomentum.h" #import "GlobeView_iOS.h" +#import "private/MaplyViewController_private.h" +#import "private/MaplyInteractionLayer_private.h" +#import "private/MaplyCoordinateSystem_private.h" +#import "private/MaplyAnnotation_private.h" +#import "private/MaplyDoubleTapDelegate_private.h" +#import "private/MaplyDoubleTapDragDelegate_private.h" +#import "private/MaplyPanDelegate_private.h" +#import "private/MaplyPinchDelegate_private.h" +#import "private/MaplyRotateDelegate_private.h" +#import "private/MaplyTapDelegate_private.h" +#import "private/MaplyTapMessage_private.h" +#import "private/MaplyTouchCancelAnimationDelegate_private.h" +#import "private/MaplyTwoFingerTapDelegate_private.h" +#import "private/MaplyZoomGestureDelegate_private.h" using namespace Eigen; using namespace WhirlyKit; @@ -958,12 +968,13 @@ - (bool)animateToPosition:(MaplyCoordinate)newPos } // Bounds check on a single point -- (bool)withinBounds:(Point3d &)loc view:(UIView *)view renderer:(SceneRenderer *)sceneRender mapView:(Maply::MapView *)testMapView newCenter:(Point3d *)newCenter +- (bool)withinBounds:(const Point3d &)loc + view:(UIView *)view + renderer:(SceneRenderer *)sceneRender + mapView:(Maply::MapView *)testMapView + newCenter:(Point3d *)newCenter { - if (bounds.empty()) - return true; - - return MaplyGestureWithinBounds(bounds,loc,sceneRender,testMapView,newCenter); + return bounds.empty() || MaplyGestureWithinBounds(bounds,loc,sceneRender,testMapView,newCenter); } // External facing set position diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm index 26ce563bef..4753102f3d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm @@ -18,7 +18,15 @@ #import #import "control/WhirlyGlobeViewController.h" -#import "WhirlyGlobeViewController_private.h" +#import "private/WhirlyGlobeViewController_private.h" +#import "private/GlobeDoubleTapDelegate_private.h" +#import "private/GlobeDoubleTapDragDelegate_private.h" +#import "private/GlobePanDelegate_private.h" +#import "private/GlobePinchDelegate_private.h" +#import "private/GlobeRotateDelegate_private.h" +#import "private/GlobeTapDelegate_private.h" +#import "private/GlobeTiltDelegate_private.h" +#import "private/GlobeTwoFingerTapDelegate_private.h" using namespace Eigen; using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDelegate.mm index 8b29bc7ba1..ad49484897 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDelegate.mm @@ -15,7 +15,8 @@ * limitations under the License. */ -#import "gestures/GlobeDoubleTapDelegate.h" +#import "GlobeDoubleTapDelegate.h" +#import "GlobeDoubleTapDelegate_private.h" #import "GlobeAnimateHeight.h" #import "ViewWrapper.h" #import "SceneRenderer.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDragDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDragDelegate.mm index 688c0359c4..80fefe98d5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDragDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeDoubleTapDragDelegate.mm @@ -1,6 +1,4 @@ -/* - * GlobeDoubleTapDragDelegate.mm - * +/* GlobeDoubleTapDragDelegate.mm * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -15,13 +13,14 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import #import "GlobeMath.h" #import "gestures/GlobeDoubleTapDragDelegate.h" +#import "private/GlobeDoubleTapDragDelegate_private.h" #import "GlobeView.h" +#import "GlobeView_iOS.h" #import "ViewWrapper.h" #import "SceneRenderer.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePanDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePanDelegate.mm index 018f41d6c0..8d24d8095b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePanDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePanDelegate.mm @@ -1,5 +1,5 @@ /* - * PanDelegateFixed.m + * GlobePanDelegate.mm * WhirlyGlobeApp * * Created by Stephen Gifford on 4/28/11. @@ -18,8 +18,9 @@ * */ -#import "gestures/GlobePanDelegate.h" #import +#import "GlobePanDelegate.h" +#import "GlobePanDelegate_private.h" #import "ViewWrapper.h" using namespace Eigen; @@ -49,6 +50,10 @@ - (void)forceEnd { @end +@interface WhirlyGlobePanDelegate () ++ (WhirlyGlobePanDelegate *)panDelegateForView:(UIView *)view globeView:(WhirlyGlobe::GlobeView_iOSRef)globeView useCustomPanRecognizer:(bool)useCustomPanRecognizer; +@end + @implementation WhirlyGlobePanDelegate { GlobeView_iOSRef globeView; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePinchDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePinchDelegate.mm index 80d211188b..2690c9d840 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePinchDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobePinchDelegate.mm @@ -1,5 +1,4 @@ -/* - * PinchDelegateFixed.mm +/* GlobePinchDelegate.mm * WhirlyGlobeComponent * * Created by Steve Gifford on 8/22/12. @@ -15,13 +14,15 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/GlobePinchDelegate.h" +#import "private/GlobePinchDelegate_private.h" #import "gestures/GlobeRotateDelegate.h" +#import "private/GlobeRotateDelegate_private.h" #import "gestures/GlobeTiltDelegate.h" #import "ViewWrapper.h" +#import "IntersectionManager.h" using namespace Eigen; using namespace WhirlyKit; @@ -128,7 +129,7 @@ - (void)pinchGesture:(id)sender return; } - IntersectionManagerRef intManager = std::dynamic_pointer_cast(sceneRender->getScene()->getManager(kWKIntersectionManager)); + const auto intManager = sceneRender->getScene()->getManager(kWKIntersectionManager); if (!intManager) return; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeRotateDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeRotateDelegate.mm index e30ca40ec9..15b973b021 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeRotateDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeRotateDelegate.mm @@ -1,5 +1,4 @@ -/* - * RotateDelegate.mm +/* GlobeRotateDelegate.mm * WhirlyGlobeLib * * Created by Steve Gifford on 6/10/11. @@ -15,11 +14,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "WhirlyVector.h" #import "gestures/GlobeRotateDelegate.h" +#import "private/GlobeRotateDelegate_private.h" #import "SceneRenderer.h" #import "IntersectionManager.h" #import "ViewWrapper.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm index 62958b21e4..346e6aae02 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm @@ -1,5 +1,4 @@ -/* - * TapDelegate.mm +/* GlobeTapDelegate.mm * WhirlyGlobeLib * * Created by Steve Gifford on 2/3/11. @@ -15,10 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/GlobeTapDelegate.h" +#import "private/GlobeTapDelegate_private.h" #import "SceneRenderer.h" #import "GlobeMath.h" #import "ViewWrapper.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTiltDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTiltDelegate.mm index 62ec44fc9e..9e975795cc 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTiltDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTiltDelegate.mm @@ -1,5 +1,4 @@ -/* - * TiltDelegate.mm +/* GlobeTiltDelegate.mm * * Created by Stephen Gifford on 1/5/15. * Copyright 2011-2022 mousebird consulting @@ -14,10 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/GlobeTiltDelegate.h" +#import "private/GlobeTiltDelegate_private.h" #import "gestures/GlobePinchDelegate.h" #import "ViewWrapper.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTwoFingerTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTwoFingerTapDelegate.mm index aa0a232cb0..428ad907fb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTwoFingerTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTwoFingerTapDelegate.mm @@ -1,5 +1,4 @@ -/* - * GlobeTwoFingerTapDelegate.mm +/* GlobeTwoFingerTapDelegate.mm * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -14,10 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/GlobeTwoFingerTapDelegate.h" +#import "private/GlobeTwoFingerTapDelegate_private.h" #import "GlobeAnimateHeight.h" #import "ViewWrapper.h" #import "SceneRenderer.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDelegate.mm index 87f5abb688..d128771873 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDelegate.mm @@ -1,6 +1,4 @@ -/* - * MaplyDoubleTapDelegate.mm - * +/* MaplyDoubleTapDelegate.mm * * Created by Jesse Crocker on 2/3/14. * Copyright 2011-2022 mousebird consulting @@ -15,10 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyDoubleTapDelegate.h" +#import "private/MaplyDoubleTapDelegate_private.h" #import "MaplyZoomGestureDelegate_private.h" #import "MaplyAnimateTranslation.h" #import "ViewWrapper.h" @@ -68,7 +66,7 @@ - (void)tapGesture:(id)sender Point3d newCenter; MapView testMapView(*(self.mapView)); // Check if we're still within bounds - if (MaplyGestureWithinBounds(bounds, newLoc, sceneRenderer, &testMapView, &newCenter)) + if (MaplyGestureWithinBounds([self getBounds], newLoc, sceneRenderer, &testMapView, &newCenter)) { self.mapView->setDelegate(std::make_shared( self.mapView,sceneRenderer,newCenter,_animTime)); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDragDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDragDelegate.mm index f9cb582a30..3a489fdf5c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDragDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyDoubleTapDragDelegate.mm @@ -1,6 +1,4 @@ -/* - * MaplyDoubleTapDragDelegate.mm - * +/* MaplyDoubleTapDragDelegate.mm * * Created by Steve Gifford on 2/7/14. * Copyright 2011-2022 mousebird consulting @@ -15,13 +13,13 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import #import "gestures/MaplyZoomGestureDelegate.h" -#import "MaplyZoomGestureDelegate_private.h" +#import "private/MaplyZoomGestureDelegate_private.h" #import "gestures/MaplyDoubleTapDragDelegate.h" +#import "private/MaplyDoubleTapDragDelegate_private.h" #import "MaplyAnimateTranslation.h" #import "ViewWrapper.h" @@ -86,7 +84,7 @@ - (void)pressGesture:(id)sender Point3d newCenter; // Check if we're still within bounds - if (MaplyGestureWithinBounds(bounds,newLoc,sceneRenderer,&testMapView,&newCenter)) + if (MaplyGestureWithinBounds([self getBounds],newLoc,sceneRenderer,&testMapView,&newCenter)) { newLoc = newCenter; self.mapView->setLoc(newLoc); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPanDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPanDelegate.mm index 860666262b..eead992646 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPanDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPanDelegate.mm @@ -16,11 +16,13 @@ * limitations under the License. */ -#import "SceneRenderer.h" +#import + #import "gestures/MaplyPanDelegate.h" +#import "private/MaplyPanDelegate_private.h" #import "MaplyAnimateTranslation.h" #import "MaplyAnimateTranslateMomentum.h" -#import +#import "SceneRenderer.h" #import "ViewWrapper.h" #import "WhirlyKitLog.h" @@ -98,16 +100,19 @@ + (MaplyPanDelegate *)panDelegateForView:(UIView *)view mapView:(MapView_iOSRef) } // We'll let other gestures run -- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer -{ - return TRUE; +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer + shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { + return true; +} + +- (const Point2dVector &)getBounds { + return bounds; } -- (void)setBounds:(WhirlyKit::Point2d *)inBounds +- (void)setBounds:(const WhirlyKit::Point2d *)inBounds { bounds.clear(); - for (unsigned int ii=0;ii<4;ii++) - bounds.push_back(Point2d(inBounds[ii].x(),inBounds[ii].y())); + bounds.insert(bounds.end(), &inBounds[0], &inBounds[4]); } // How long we'll animate the gesture ending diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm index 72fc81e348..c476d04f8e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm @@ -17,9 +17,10 @@ */ #import "gestures/MaplyPinchDelegate.h" -#import "SceneRenderer.h" -#import "MaplyZoomGestureDelegate_private.h" +#import "private/MaplyPinchDelegate_private.h" +#import "private/MaplyZoomGestureDelegate_private.h" #import "MaplyAnimateTranslation.h" +#import "SceneRenderer.h" #import "ViewWrapper.h" using namespace WhirlyKit; @@ -99,7 +100,7 @@ Point2f newMapCenterPoint((wrapView.frame.size.width/2.0) - screenOffset.x(), testMapView.setLoc(newLoc, false); Point3d newCenter; - if (MaplyGestureWithinBounds(bounds,newLoc,sceneRenderer,&testMapView,&newCenter)) + if (MaplyGestureWithinBounds([self getBounds],newLoc,sceneRenderer,&testMapView,&newCenter)) { self.mapView->setLoc(newCenter, true); } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyRotateDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyRotateDelegate.mm index 88d881140c..a279d93253 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyRotateDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyRotateDelegate.mm @@ -1,5 +1,4 @@ -/* - * MaplyRotateDelegate.mm +/* MaplyRotateDelegate.mm * WhirlyGlobeLib * * Created by rghosh0 around 9/26/13. @@ -15,10 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyRotateDelegate.h" +#import "private/MaplyRotateDelegate_private.h" using namespace WhirlyKit; using namespace Maply; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm index f4eb5f949c..8cf433d39b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm @@ -1,5 +1,4 @@ -/* - * MaplyTapDelegate.mm +/* MaplyTapDelegate.mm * WhirlyGlobeLib * * Created by Steve Gifford on 1/20/12. @@ -15,10 +14,12 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyTapDelegate.h" +#import "private/MaplyTapDelegate_private.h" +#import "gestures/MaplyTapMessage.h" +#import "private/MaplyTapMessage_private.h" #import "SceneRenderer.h" #import "MaplyView.h" #import "GlobeMath.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm index c253d344ca..a6f355fcd1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm @@ -1,5 +1,4 @@ -/* - * MaplyTapMessage.mm +/* MaplyTapMessage.mm * WhirlyGlobeLib * * Created by Steve Gifford on 9/19/11. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyTapMessage.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTouchCancelAnimationDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTouchCancelAnimationDelegate.mm index b55c5af886..9a69f03525 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTouchCancelAnimationDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTouchCancelAnimationDelegate.mm @@ -1,5 +1,4 @@ -/* - * MaplyTouchCancelAnimationDelegate.mm +/* MaplyTouchCancelAnimationDelegate.mm * WhirlyGlobeLib * * Created by Jesse Crocker on 7/15/14. @@ -15,11 +14,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyTouchCancelAnimationDelegate.h" +#import "private/MaplyTouchCancelAnimationDelegate_private.h" @implementation MaplyTouchCancelAnimationDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTwoFingerTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTwoFingerTapDelegate.mm index 1afe51c9de..91f95ea7b9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTwoFingerTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTwoFingerTapDelegate.mm @@ -1,6 +1,4 @@ -/* - * MaplyTwoFingerTapDelegate.m - * +/* MaplyTwoFingerTapDelegate.mm * * Created by Jesse Crocker on 2/4/14. * Copyright 2011-2022 mousebird consulting @@ -15,11 +13,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyTwoFingerTapDelegate.h" -#import "MaplyZoomGestureDelegate_private.h" +#import "private/MaplyTwoFingerTapDelegate_private.h" +#import "private/MaplyZoomGestureDelegate_private.h" #import "MaplyAnimateTranslation.h" #import "ViewWrapper.h" @@ -68,7 +66,7 @@ - (void)tapGesture:(id)sender Maply::MapView testMapView(*(self.mapView)); // Check if we're still within bounds - if (MaplyGestureWithinBounds(bounds,newLoc,sceneRenderer,&testMapView,&newCenter)) + if (MaplyGestureWithinBounds([self getBounds],newLoc,sceneRenderer,&testMapView,&newCenter)) { AnimateViewTranslation x(self.mapView,sceneRenderer,newCenter,_animTime); self.mapView->setDelegate(std::make_shared( diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyZoomGestureDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyZoomGestureDelegate.mm index c61a4d7b7a..aa16ac5d41 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyZoomGestureDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyZoomGestureDelegate.mm @@ -1,6 +1,4 @@ -/* - * MaplyZoomGestureDelegate.mm - * +/* MaplyZoomGestureDelegate.mm * * Created by Jesse Crocker on 2/4/14. * Copyright 2011-2022 mousebird consulting @@ -15,10 +13,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "gestures/MaplyZoomGestureDelegate.h" +#import "private/MaplyZoomGestureDelegate_private.h" #import "gestures/MaplyPanDelegate.h" #import "MaplyAnimateTranslation.h" #import "ViewWrapper.h" @@ -41,21 +39,23 @@ - (instancetype)initWithMapView:(Maply::MapView_iOSRef)inView } // We'll let other gestures run -- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer -{ - return TRUE; +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer + shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { + return true; } -- (void)setBounds:(WhirlyKit::Point2d *)inBounds +- (const WhirlyKit::Point2dVector &)getBounds { + return bounds; +} + +- (void)setBounds:(const WhirlyKit::Point2d *)inBounds { bounds.clear(); - for (unsigned int ii=0;ii<4;ii++) - bounds.push_back(inBounds[ii]); + bounds.insert(bounds.end(), &inBounds[0], &inBounds[4]); } // Called for double tap actions -- (void)tapGesture:(id)sender -{ +- (void)tapGesture:(id)sender { UITapGestureRecognizer *tap = sender; UIView *wrapView = (UIView *)tap.view; SceneRenderer *sceneRenderer = wrapView.renderer; diff --git a/ios/library/WhirlyGlobeLib/include/GeographicLib.h b/ios/library/WhirlyGlobeLib/include/GeographicLib.h index df2a077077..e57a3d25a1 100644 --- a/ios/library/WhirlyGlobeLib/include/GeographicLib.h +++ b/ios/library/WhirlyGlobeLib/include/GeographicLib.h @@ -9,7 +9,7 @@ #ifndef GeographicLib_Wrapper_h #define GeographicLib_Wrapper_h -#import "math/MaplyCoordinate.h" +#import typedef struct GeoLibInv_t { double distance; // meters From 2254ee3368c55b2156b28a2214d3f977f33628b1 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 28 Jan 2022 08:11:19 -0800 Subject: [PATCH 04/78] Rename and move header file to avoid conflicts when headers are flattened and keep simple geodesy functions available from Swift --- WhirlyGlobe.podspec | 15 +++++++++------ .../AutoTester/AutoTester/MaplyTesterBridge.h | 1 + .../project.pbxproj | 16 ++++++++-------- .../WhirlyGlobeMaplyComponent.h | 1 + .../include/helpers/GeographicLib_ObjC.h} | 0 .../src/helpers}/GeographicLib.mm | 6 +++--- 6 files changed, 22 insertions(+), 17 deletions(-) rename ios/library/{WhirlyGlobeLib/include/GeographicLib.h => WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h} (100%) rename ios/library/{WhirlyGlobeLib/src => WhirlyGlobe-MaplyComponent/src/helpers}/GeographicLib.mm (99%) diff --git a/WhirlyGlobe.podspec b/WhirlyGlobe.podspec index 3b098d7950..77ac5ea7fb 100644 --- a/WhirlyGlobe.podspec +++ b/WhirlyGlobe.podspec @@ -27,10 +27,14 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'develop' } s.compiler_flags = '-D__USE_SDL_GLES__ -D__IPHONEOS__ -DSQLITE_OPEN_READONLY -DHAVE_PTHREAD=1 -DUNORDERED=1 ' - s.xcconfig = { "HEADER_SEARCH_PATHS" => " \"$(SDKROOT)/usr/include/libxml2\" \"$(PODS_ROOT)/KissXML/KissXML/\" \"$(PODS_ROOT)/WhirlyGlobe/common/local_libs/eigen/\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/nanopb/\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/clipper\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/lodepng\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/glues/include/\" \"$(PODS_ROOT)/WhirlyGlobe/common/local_libs/GeographicLib/include/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/private/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/\" ", - "MTL_LANGUAGE_REVISION" => "Metal21" } + s.xcconfig = { + "HEADER_SEARCH_PATHS" => " \"$(SDKROOT)/usr/include/libxml2\" \"$(PODS_ROOT)/KissXML/KissXML/\" \"$(PODS_ROOT)/WhirlyGlobe/common/local_libs/eigen/\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/nanopb/\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/clipper\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/lodepng\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/glues/include/\" \"$(PODS_ROOT)/WhirlyGlobe/common/local_libs/GeographicLib/include/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/private/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/\" ", + "MTL_LANGUAGE_REVISION" => "Metal21", + "DEFINES_MODULE" => "YES" + } s.default_subspec = 'MaplyComponent' + s.module_name = "WhirlyGlobeMaplyComponent" s.subspec 'locallibs' do |ll| ll.source_files = @@ -66,14 +70,13 @@ Pod::Spec.new do |s| 'ios/library/WhirlyGlobeLib/src/*.{mm,m,cpp,metal}', 'ios/library/WhirlyGlobeLib/include/*.h', 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', - 'ios/library/WhirlyGlobe-MaplyComponent/src/**/*.{mm,m,cpp,metal}' + 'ios/library/WhirlyGlobe-MaplyComponent/src/**/*.{mm,m,cpp,metal}', + 'ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/*.h' mc.preserve_paths = 'common/local_libs/eigen/Eigen/**' mc.public_header_files = - 'common/WhirlyGlobeLib/include/*.h', 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', - 'ios/library/WhirlyGlobe-MaplyComponent/include/UIKit/NSData+Zlib.h', - 'ios/library/WhirlyGlobeLib/include/GeographicLib.h' # That we have to name it here means it probably belongs somewhere else... + 'ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/*.h' mc.private_header_files = 'common/WhirlyGlobeLib/include/**/*.h', 'ios/library/WhirlyGlobeLib/include/*.h' diff --git a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h index 652997a430..193fe93dce 100644 --- a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h +++ b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h @@ -16,6 +16,7 @@ #import #import #import +#import #import "MaplyTestCase.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index ffea5780e1..7d657878fa 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -905,6 +905,8 @@ 31041A1C27A36842004B25E1 /* MaplyTapMessage_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1B27A36842004B25E1 /* MaplyTapMessage_private.h */; }; 31041A1E27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1D27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h */; }; 31041A2027A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */; }; + 31041A3327A45A56004B25E1 /* GeographicLib_ObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A3227A45A56004B25E1 /* GeographicLib_ObjC.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 31041A3527A45A68004B25E1 /* GeographicLib.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31041A3427A45A68004B25E1 /* GeographicLib.mm */; }; 313363AB253E5A2B007C2F27 /* WorkRegion_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 313363AA253E5A24007C2F27 /* WorkRegion_private.h */; }; 315082CA254CD29000A0A2B2 /* VectorTilePBFParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */; }; 315082D0254CD2BF00A0A2B2 /* VectorTilePBFParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */; }; @@ -990,8 +992,6 @@ 31833161259112BA005FEF70 /* TransverseMercator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3183310F259112BA005FEF70 /* TransverseMercator.cpp */; }; 31833162259112BA005FEF70 /* TransverseMercatorExact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31833110259112BA005FEF70 /* TransverseMercatorExact.cpp */; }; 31833163259112BA005FEF70 /* Geoid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31833111259112BA005FEF70 /* Geoid.cpp */; }; - 31833167259114A0005FEF70 /* GeographicLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 31833166259114A0005FEF70 /* GeographicLib.h */; }; - 3183316B259114B0005FEF70 /* GeographicLib.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3183316A259114B0005FEF70 /* GeographicLib.mm */; }; 31872FD52550ED71002C9C73 /* maply_pb_names.h in Headers */ = {isa = PBXBuildFile; fileRef = 31872FD42550ED71002C9C73 /* maply_pb_names.h */; }; 31942FC6254B5C0A0006B499 /* maply_pb_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 31942F9C254B5C0A0006B499 /* maply_pb_common.c */; }; 31942FCD254B5C0A0006B499 /* maply_pb_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = 31942FA4254B5C0A0006B499 /* maply_pb_decode.c */; }; @@ -1931,6 +1931,8 @@ 31041A1B27A36842004B25E1 /* MaplyTapMessage_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTapMessage_private.h; sourceTree = ""; }; 31041A1D27A368E7004B25E1 /* MaplyTouchCancelAnimationDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTouchCancelAnimationDelegate_private.h; sourceTree = ""; }; 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTwoFingerTapDelegate_private.h; sourceTree = ""; }; + 31041A3227A45A56004B25E1 /* GeographicLib_ObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeographicLib_ObjC.h; sourceTree = ""; }; + 31041A3427A45A68004B25E1 /* GeographicLib.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GeographicLib.mm; sourceTree = ""; }; 313363AA253E5A24007C2F27 /* WorkRegion_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WorkRegion_private.h; sourceTree = ""; }; 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = VectorTilePBFParser.cpp; path = ../../../../common/WhirlyGlobeLib/src/VectorTilePBFParser.cpp; sourceTree = ""; }; 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorTilePBFParser.h; path = ../../../../common/WhirlyGlobeLib/include/VectorTilePBFParser.h; sourceTree = ""; }; @@ -2016,8 +2018,6 @@ 3183310F259112BA005FEF70 /* TransverseMercator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransverseMercator.cpp; sourceTree = ""; }; 31833110259112BA005FEF70 /* TransverseMercatorExact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransverseMercatorExact.cpp; sourceTree = ""; }; 31833111259112BA005FEF70 /* Geoid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Geoid.cpp; sourceTree = ""; }; - 31833166259114A0005FEF70 /* GeographicLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeographicLib.h; sourceTree = ""; }; - 3183316A259114B0005FEF70 /* GeographicLib.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GeographicLib.mm; sourceTree = ""; }; 31872FD42550ED71002C9C73 /* maply_pb_names.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = maply_pb_names.h; sourceTree = ""; }; 31942F9C254B5C0A0006B499 /* maply_pb_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = maply_pb_common.c; sourceTree = ""; }; 31942FA4254B5C0A0006B499 /* maply_pb_decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = maply_pb_decode.c; sourceTree = ""; }; @@ -3113,6 +3113,7 @@ 2B8797102203B5A400EF801D /* helpers */ = { isa = PBXGroup; children = ( + 31041A3427A45A68004B25E1 /* GeographicLib.mm */, 2BC3D6ED220B714100CE91D0 /* sqlhelpers.mm */, 2BE537AE1D249A1200B60FAD /* MaplyIconManager.mm */, 2BE537A51D249A1200B60FAD /* MaplyColorRampGenerator.mm */, @@ -3284,6 +3285,7 @@ 2BC41C9021F10179002926B7 /* helpers */ = { isa = PBXGroup; children = ( + 31041A3227A45A56004B25E1 /* GeographicLib_ObjC.h */, 2BE5372F1D249A1200B60FAD /* MaplyGeomBuilder.h */, 2BE537311D249A1200B60FAD /* MaplyIconManager.h */, E5D2D6621DE67B1400E02305 /* MaplyLocationTracker.h */, @@ -3327,7 +3329,6 @@ 2BC90D5B223308B900D8B606 /* geometry utils */ = { isa = PBXGroup; children = ( - 31833166259114A0005FEF70 /* GeographicLib.h */, 2BC90D5C223308C700D8B606 /* ScreenObject_iOS.h */, ); name = "geometry utils"; @@ -3336,7 +3337,6 @@ 2BC90D5E223308CF00D8B606 /* geometry utils */ = { isa = PBXGroup; children = ( - 3183316A259114B0005FEF70 /* GeographicLib.mm */, 2BC90D5F223308DB00D8B606 /* ScreenObject_iOS.mm */, ); name = "geometry utils"; @@ -4150,6 +4150,7 @@ 2B846F0B21F158E100EF2A82 /* GeometryManager.h in Headers */, 2BE5396B1D249BEF00B60FAD /* AAMoonIlluminatedFraction.h in Headers */, 2B846F0521F158E100EF2A82 /* WideVectorManager.h in Headers */, + 31041A3327A45A56004B25E1 /* GeographicLib_ObjC.h in Headers */, 2BE5396C1D249BEF00B60FAD /* AAMoonMaxDeclinations.h in Headers */, 2B446B4F21F7E7B80078A975 /* WideVectorDrawableBuilder.h in Headers */, 2B699855228DD31F00C31E3F /* SceneRendererMTL.h in Headers */, @@ -4305,7 +4306,6 @@ 2B69984A228DD31F00C31E3F /* BasicDrawableInstanceBuilderMTL.h in Headers */, 2B82B5E31E82E2490095FB14 /* dict.h in Headers */, 3183313D259112BA005FEF70 /* EllipticFunction.hpp in Headers */, - 31833167259114A0005FEF70 /* GeographicLib.h in Headers */, 2BB8A3F421ED43D10025DA98 /* MaplyZoomGestureDelegate.h in Headers */, 2B699852228DD31F00C31E3F /* WrapperMTL.h in Headers */, 2BE539831D249BEF00B60FAD /* AASaturnMoons.h in Headers */, @@ -4587,6 +4587,7 @@ 2B8A788B228607B3008B0A1F /* Program.cpp in Sources */, 2B8797222203BF7900EF801D /* MaplyBillboard.mm in Sources */, 2BC90D60223308DB00D8B606 /* ScreenObject_iOS.mm in Sources */, + 31041A3527A45A68004B25E1 /* GeographicLib.mm in Sources */, 31833141259112BA005FEF70 /* GravityModel.cpp in Sources */, 2BE1E766220A567100815D9C /* MaplyControllerLayer.mm in Sources */, 2B60F43E24523FAB00CF9339 /* MapboxVectorStyleSet.mm in Sources */, @@ -4651,7 +4652,6 @@ 2B82B5F21E82E2490095FB14 /* sweep.cpp in Sources */, 2B82B6A81E82E24A0095FB14 /* pj_qsfn.c in Sources */, 2B3F451D243FD82200F85414 /* GeoJSONSource.mm in Sources */, - 3183316B259114B0005FEF70 /* GeographicLib.mm in Sources */, 2BE539971D249BEF00B60FAD /* AAElliptical.cpp in Sources */, 2BE539B21D249BEF00B60FAD /* AAPhysicalJupiter.cpp in Sources */, 2BE1E75B2208F33900815D9C /* SingleLabel_iOS.mm in Sources */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h index b2bff11782..e15c8e8454 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h @@ -16,6 +16,7 @@ FOUNDATION_EXPORT const unsigned char WhirlyGlobeMaplyComponentVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import +#import #import #import #import diff --git a/ios/library/WhirlyGlobeLib/include/GeographicLib.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h similarity index 100% rename from ios/library/WhirlyGlobeLib/include/GeographicLib.h rename to ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h diff --git a/ios/library/WhirlyGlobeLib/src/GeographicLib.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm similarity index 99% rename from ios/library/WhirlyGlobeLib/src/GeographicLib.mm rename to ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm index c2c4c96790..2666e5df95 100644 --- a/ios/library/WhirlyGlobeLib/src/GeographicLib.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm @@ -1,5 +1,5 @@ // -// geowrap.c +// GeographicLib.mm // WhirlyGlobeLib // // Created by Tim Sylvester on 12/14/20. @@ -9,8 +9,8 @@ #import "GeographicLib/Geodesic.hpp" #import "GeographicLib/Geocentric.hpp" -#import "../../../../common/WhirlyGlobeLib/include/GeographicLib.h" -#import "../include/GeographicLib.h" +#import "GeographicLib.h" +#import "GeographicLib_ObjC.h" #import "CoordSystem.h" #import "WhirlyGeometry.h" #import "WhirlyKitLog.h" From 52f1cc000065d5b9685163c11ce04267cfb7c99e Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 28 Jan 2022 10:30:40 -0800 Subject: [PATCH 05/78] Fix un-implemented private properties --- .../include/private/MaplyTapMessage_private.h | 1 - .../src/control/MaplyInteractionLayer.mm | 4 +--- .../src/gestures/MaplyTapDelegate.mm | 11 ++++++----- .../src/gestures/MaplyTapMessage.mm | 3 +-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h index 3faa73b358..255f38b750 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h @@ -14,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm index 4957deb855..412c7287db 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyInteractionLayer.mm @@ -1,5 +1,4 @@ -/* - * MaplyInteractionLayer_private.h +/* MaplyInteractionLayer_private.h * WhirlyGlobeComponent * * Created by Steve Gifford on 7/21/12. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "MaplyInteractionLayer_private.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm index 8cf433d39b..8ae0bc27b1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapDelegate.mm @@ -75,12 +75,13 @@ - (void)tapAction:(id)sender auto frameSizeScaled = sceneRender->getFramebufferSizeScaled(); if (mapView->pointOnPlaneFromScreen(touchLoc2f, &theTransform, frameSizeScaled, &hit, true)) { + const Point3d localPt = coordAdapter->displayToLocal(hit); + MaplyTapMessage *msg = [[MaplyTapMessage alloc] init]; - [msg setTouchLoc:touchLoc]; - [msg setView:tap.view]; - [msg setWorldLoc:Point3f(hit.x(),hit.y(),hit.z())]; - Point3d localPt = coordAdapter->displayToLocal(hit); - [msg setWhereGeo:coordAdapter->getCoordSystem()->localToGeographic(localPt)]; + msg.view = tap.view; + msg.touchLoc = touchLoc; + msg.worldLoc = Point3f(hit.x(),hit.y(),hit.z()); + msg.whereGeo = coordAdapter->getCoordSystem()->localToGeographic(localPt); msg.heightAboveSurface = hit.z(); [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:MaplyTapMsg object:msg]]; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm index a6f355fcd1..589286eccc 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyTapMessage.mm @@ -17,8 +17,7 @@ */ #import "gestures/MaplyTapMessage.h" +#import "private/MaplyTapMessage_private.h" @implementation MaplyTapMessage - - @end From 731e697c987907a53e7f7dc12fbfc9656769f2ff Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 28 Jan 2022 16:56:41 -0800 Subject: [PATCH 06/78] More public/private issues that somehow only show up in cocoapod builds --- .../project.pbxproj | 4 ++ .../include/gestures/GlobeTapMessage.h | 23 +---------- .../include/private/GlobeTapMessage_private.h | 41 +++++++++++++++++++ .../src/control/WGInteractionLayer.mm | 8 ++-- .../src/control/WhirlyGlobeViewController.mm | 2 + .../src/gestures/GlobeTapDelegate.mm | 1 + .../src/gestures/GlobeTapMessage.mm | 7 ++-- 7 files changed, 57 insertions(+), 29 deletions(-) create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapMessage_private.h diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index 7d657878fa..b9036e6068 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -907,6 +907,7 @@ 31041A2027A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */; }; 31041A3327A45A56004B25E1 /* GeographicLib_ObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A3227A45A56004B25E1 /* GeographicLib_ObjC.h */; settings = {ATTRIBUTES = (Public, ); }; }; 31041A3527A45A68004B25E1 /* GeographicLib.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31041A3427A45A68004B25E1 /* GeographicLib.mm */; }; + 31041A4327A4C3F8004B25E1 /* GlobeTapMessage_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 31041A4227A4C3F8004B25E1 /* GlobeTapMessage_private.h */; }; 313363AB253E5A2B007C2F27 /* WorkRegion_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 313363AA253E5A24007C2F27 /* WorkRegion_private.h */; }; 315082CA254CD29000A0A2B2 /* VectorTilePBFParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */; }; 315082D0254CD2BF00A0A2B2 /* VectorTilePBFParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */; }; @@ -1933,6 +1934,7 @@ 31041A1F27A36989004B25E1 /* MaplyTwoFingerTapDelegate_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTwoFingerTapDelegate_private.h; sourceTree = ""; }; 31041A3227A45A56004B25E1 /* GeographicLib_ObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeographicLib_ObjC.h; sourceTree = ""; }; 31041A3427A45A68004B25E1 /* GeographicLib.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GeographicLib.mm; sourceTree = ""; }; + 31041A4227A4C3F8004B25E1 /* GlobeTapMessage_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobeTapMessage_private.h; sourceTree = ""; }; 313363AA253E5A24007C2F27 /* WorkRegion_private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WorkRegion_private.h; sourceTree = ""; }; 315082C9254CD29000A0A2B2 /* VectorTilePBFParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = VectorTilePBFParser.cpp; path = ../../../../common/WhirlyGlobeLib/src/VectorTilePBFParser.cpp; sourceTree = ""; }; 315082CF254CD2BF00A0A2B2 /* VectorTilePBFParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorTilePBFParser.h; path = ../../../../common/WhirlyGlobeLib/include/VectorTilePBFParser.h; sourceTree = ""; }; @@ -3494,6 +3496,7 @@ 31041A0427A3528F004B25E1 /* GlobePinchDelegate_private.h */, 31041A0927A35AD4004B25E1 /* GlobeRotateDelegate_private.h */, 31041A0B27A35C59004B25E1 /* GlobeTapDelegate_private.h */, + 31041A4227A4C3F8004B25E1 /* GlobeTapMessage_private.h */, 31041A0D27A35D2C004B25E1 /* GlobeTiltDelegate_private.h */, 31041A0627A35591004B25E1 /* GlobeTwoFingerTapDelegate_private.h */, 2BE5375B1D249A1200B60FAD /* ImageTexture_private.h */, @@ -3962,6 +3965,7 @@ 2B846F0A21F158E100EF2A82 /* VectorManager.h in Headers */, 2B446AE621F299E50078A975 /* ShapeDrawableBuilder.h in Headers */, 2B846F1121F158E100EF2A82 /* BillboardManager.h in Headers */, + 31041A4327A4C3F8004B25E1 /* GlobeTapMessage_private.h in Headers */, 2B82B6DA1E82E24A0095FB14 /* NSDictionary+Stuff.h in Headers */, 2B82B6141E82E2490095FB14 /* JSONSharedString.h in Headers */, 3183313B259112BA005FEF70 /* CircularEngine.hpp in Headers */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapMessage.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapMessage.h index c61b3a58fe..bd71c27a7f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapMessage.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTapMessage.h @@ -1,5 +1,4 @@ -/* - * TapMessage.h +/* GlobeTapMessage.h * WhirlyGlobeLib * * Created by Steve Gifford on 2/3/11. @@ -15,22 +14,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import -#import "WhirlyVector.h" -#import "GlobeView.h" - -/// This is the notification you get for a tap on the globe -#define WhirlyGlobeTapMsg @"WhirlyGlobeTap" -/// This is the notification you get for a tap outside the globe -#define WhirlyGlobeTapOutsideMsg @"WhirlyGlobeTapOutside" -/// This is the notification you get from a long press on the globe -#define WhirlyGlobeLongPressMsg @"WhirlyGlobeLongPress" -/** Tap Message is an - indication that the user tapped on the globe. +/** Tap Message is an indication that the user tapped on the globe. It's passed as the object in a notification. Note: Split this up a bit for globe vs. map */ @@ -40,14 +28,7 @@ @property (nonatomic,retain) UIView *view; //// Touch location on view in 2D @property (nonatomic,assign) CGPoint touchLoc; -/// Lon/Lat -@property (nonatomic,assign) WhirlyKit::GeoCoord whereGeo; -/// 3D coordinates in the view -@property (nonatomic,assign) WhirlyKit::Point3f worldLoc; /// Where the eye was. 0 is sea level. @property (nonatomic,assign) float heightAboveSurface; -/// This version of set takes a set of doubles -- (void)setWorldLocD:(WhirlyKit::Point3d)newLoc; - @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapMessage_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapMessage_private.h new file mode 100644 index 0000000000..536bc6b675 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTapMessage_private.h @@ -0,0 +1,41 @@ +/* GlobeTapMessage_private.h + * WhirlyGlobeLib + * + * Created by Steve Gifford on 2/3/11. + * Copyright 2011-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import +#import "gestures/GlobeTapMessage.h" +#import "WhirlyVector.h" +#import "GlobeView.h" + +/// This is the notification you get for a tap on the globe +#define WhirlyGlobeTapMsg @"WhirlyGlobeTap" +/// This is the notification you get for a tap outside the globe +#define WhirlyGlobeTapOutsideMsg @"WhirlyGlobeTapOutside" +/// This is the notification you get from a long press on the globe +#define WhirlyGlobeLongPressMsg @"WhirlyGlobeLongPress" + +@interface WhirlyGlobeTapMessage () + +/// Lon/Lat +@property (nonatomic,assign) WhirlyKit::GeoCoord whereGeo; +/// 3D coordinates in the view +@property (nonatomic,assign) WhirlyKit::Point3f worldLoc; + +/// This version of set takes a set of doubles +- (void)setWorldLocD:(WhirlyKit::Point3d)newLoc; + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WGInteractionLayer.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WGInteractionLayer.mm index 52d411ef85..d0a3d268f0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WGInteractionLayer.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WGInteractionLayer.mm @@ -1,5 +1,4 @@ -/* - * WGInteractionLayer_private.h +/* WGInteractionLayer_private.h * WhirlyGlobeComponent * * Created by Steve Gifford on 7/21/12. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "WGInteractionLayer_private.h" @@ -23,10 +21,12 @@ #import "visual_objects/MaplyMarker.h" #import "visual_objects/MaplyScreenLabel.h" #import "visual_objects/MaplyLabel.h" -#import "MaplyVectorObject_private.h" #import "visual_objects/MaplyShape.h" #import "visual_objects/MaplySticker.h" +#import "private/MaplyVectorObject_private.h" #import "math/MaplyCoordinate.h" +#import "gestures/GlobeTapMessage.h" +#import "private/GlobeTapMessage_private.h" using namespace Eigen; using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm index 4753102f3d..55b7661346 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm @@ -27,6 +27,8 @@ #import "private/GlobeTapDelegate_private.h" #import "private/GlobeTiltDelegate_private.h" #import "private/GlobeTwoFingerTapDelegate_private.h" +#import "gestures/GlobeTapMessage.h" +#import "private/GlobeTapMessage_private.h" using namespace Eigen; using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm index 346e6aae02..982293bdd2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapDelegate.mm @@ -18,6 +18,7 @@ #import "gestures/GlobeTapDelegate.h" #import "private/GlobeTapDelegate_private.h" +#import "private/GlobeTapMessage_private.h" #import "SceneRenderer.h" #import "GlobeMath.h" #import "ViewWrapper.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapMessage.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapMessage.mm index d5db85e9d1..e28cece6ba 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapMessage.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/GlobeTapMessage.mm @@ -1,5 +1,4 @@ -/* - * TapMessage.mm +/* GlobeTapMessage.mm * WhirlyGlobeLib * * Created by Steve Gifford on 2/3/11. @@ -15,10 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import "GlobeTapMessage.h" +#import "gestures/GlobeTapMessage.h" +#import "private/GlobeTapMessage_private.h" using namespace WhirlyKit; From b74bd892429256c065e7113b73dbda28fd68bcf7 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 28 Jan 2022 17:22:48 -0800 Subject: [PATCH 07/78] Headers in WGMC/include/private were not treated as such. Remove duplicate Eigen spec. Exclude OpenGL stuff. Disable warnings for pod builds. Cleanup and formatting. Bump version. With this, `pod lib lint` finally passes, at least with `--allow-warnings --use-static-frameworks`. --- WhirlyGlobe.podspec | 46 ++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/WhirlyGlobe.podspec b/WhirlyGlobe.podspec index 77ac5ea7fb..a11a1ee5d7 100644 --- a/WhirlyGlobe.podspec +++ b/WhirlyGlobe.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "WhirlyGlobe" - s.version = "3.4" + s.version = "3.5" s.summary = "WhirlyGlobe-Maply: Geospatial visualization for iOS and Android." s.description = <<-DESC WhirlyGlobe-Maply is a high performance geospatial display toolkit for iOS and Android. @@ -20,21 +20,36 @@ Pod::Spec.new do |s| s.license = 'Apache 2.0' s.author = { "Steve Gifford" => "contact@mousebirdconsulting.com" } s.social_media_url = 'https://twitter.com/@mousebirdc' - s.platform = :ios, '12.0' s.requires_arc = true + s.source = { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'topic/temp' } + s.module_name = "WhirlyGlobeMaplyComponent" + s.default_subspec = 'MaplyComponent' + s.compiler_flags = '-D__USE_SDL_GLES__ -D__IPHONEOS__ -DSQLITE_OPEN_READONLY -DHAVE_PTHREAD=1 -DUNORDERED=1 ' - s.source = { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'develop' } - - s.compiler_flags = '-D__USE_SDL_GLES__ -D__IPHONEOS__ -DSQLITE_OPEN_READONLY -DHAVE_PTHREAD=1 -DUNORDERED=1 ' - s.xcconfig = { - "HEADER_SEARCH_PATHS" => " \"$(SDKROOT)/usr/include/libxml2\" \"$(PODS_ROOT)/KissXML/KissXML/\" \"$(PODS_ROOT)/WhirlyGlobe/common/local_libs/eigen/\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/nanopb/\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/clipper\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/lodepng\" \"${PODS_ROOT}/WhirlyGlobe/common/local_libs/glues/include/\" \"$(PODS_ROOT)/WhirlyGlobe/common/local_libs/GeographicLib/include/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/private/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/\" \"$(PODS_ROOT)/WhirlyGlobe/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/\" ", - "MTL_LANGUAGE_REVISION" => "Metal21", - "DEFINES_MODULE" => "YES" - } + s.pod_target_xcconfig = { + "HEADER_SEARCH_PATHS" => %w( + "$(SDKROOT)/usr/include/libxml2" + "$(PODS_ROOT)/KissXML/KissXML/" + "${PODS_TARGET_SRCROOT}/common/local_libs/eigen/" + "${PODS_TARGET_SRCROOT}/common/local_libs/nanopb/" + "${PODS_TARGET_SRCROOT}/common/local_libs/clipper" + "${PODS_TARGET_SRCROOT}/common/local_libs/lodepng" + "${PODS_TARGET_SRCROOT}/common/local_libs/glues/include/" + "${PODS_TARGET_SRCROOT}/common/local_libs/GeographicLib/include/" + "${PODS_TARGET_SRCROOT}/ios/library/WhirlyGlobe-MaplyComponent/include/private/" + "${PODS_TARGET_SRCROOT}/ios/library/WhirlyGlobe-MaplyComponent/include/" + "${PODS_TARGET_SRCROOT}/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/" + ).join(" "), + # For angle-bracket includes + "SYSTEM_HEADER_SEARCH_PATHS" => %w( + ).join(" "), + "MTL_LANGUAGE_REVISION" => "Metal21", + "DEFINES_MODULE" => "YES", + "CLANG_WARN_DOCUMENTATION_COMMENTS" => "NO", + "GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" + } - s.default_subspec = 'MaplyComponent' - s.module_name = "WhirlyGlobeMaplyComponent" s.subspec 'locallibs' do |ll| ll.source_files = @@ -72,14 +87,15 @@ Pod::Spec.new do |s| 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', 'ios/library/WhirlyGlobe-MaplyComponent/src/**/*.{mm,m,cpp,metal}', 'ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/*.h' - mc.preserve_paths = - 'common/local_libs/eigen/Eigen/**' + mc.exclude_files = + 'common/WhirlyGlobeLib/src/*GLES.{h,cpp}' mc.public_header_files = 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', 'ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/*.h' mc.private_header_files = 'common/WhirlyGlobeLib/include/**/*.h', - 'ios/library/WhirlyGlobeLib/include/*.h' + 'ios/library/WhirlyGlobeLib/include/*.h', + 'ios/library/WhirlyGlobe-MaplyComponent/include/private/*.h' mc.dependency 'WhirlyGlobe/locallibs' mc.dependency 'WhirlyGlobe/glues' mc.dependency 'SMCalloutView' From 1055075f415d12b797e408ae3108da45dbdc25f4 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 28 Jan 2022 17:52:52 -0800 Subject: [PATCH 08/78] Exclude more OpenGL stuff --- WhirlyGlobe.podspec | 7 ++++--- .../WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/WhirlyGlobe.podspec b/WhirlyGlobe.podspec index a11a1ee5d7..8ba50a4bea 100644 --- a/WhirlyGlobe.podspec +++ b/WhirlyGlobe.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.social_media_url = 'https://twitter.com/@mousebirdc' s.platform = :ios, '12.0' s.requires_arc = true - s.source = { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'topic/temp' } + s.source = { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'topic/xcframework' } s.module_name = "WhirlyGlobeMaplyComponent" s.default_subspec = 'MaplyComponent' s.compiler_flags = '-D__USE_SDL_GLES__ -D__IPHONEOS__ -DSQLITE_OPEN_READONLY -DHAVE_PTHREAD=1 -DUNORDERED=1 ' @@ -50,7 +50,6 @@ Pod::Spec.new do |s| "GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" } - s.subspec 'locallibs' do |ll| ll.source_files = 'common/local_libs/aaplus/**/*.{h,cpp}', @@ -88,7 +87,9 @@ Pod::Spec.new do |s| 'ios/library/WhirlyGlobe-MaplyComponent/src/**/*.{mm,m,cpp,metal}', 'ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/*.h' mc.exclude_files = - 'common/WhirlyGlobeLib/src/*GLES.{h,cpp}' + 'common/WhirlyGlobeLib/src/*GLES.{h,cpp}', + 'ios/library/WhirlyGlobeLib/src/Texture_iOS.mm', + 'ios/library/WhirlyGlobeLib/include/TextureGLES_iOS.h' mc.public_header_files = 'ios/library/WhirlyGlobe-MaplyComponent/include/**/*.h', 'ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/*.h' diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index b9036e6068..366c757dbf 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -1002,6 +1002,7 @@ 3194300A254B77F00006B499 /* vector_tile.pb.c in Sources */ = {isa = PBXBuildFile; fileRef = 31943009254B77F00006B499 /* vector_tile.pb.c */; }; 31A2B37F26AA136A00221CFF /* Expect.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A2B37E26AA136900221CFF /* Expect.h */; }; 31CAB8DF2792126A00A5F744 /* GeographicLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */; }; + 31DDA0A627A4D3B800865ECE /* WhirlyGlobe_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */; }; 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7E689E22A1E34B00BBFD9E /* MaplySimpleTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; C490572A265AB9E3001E4A98 /* bucketalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4905728265AB9E3001E4A98 /* bucketalloc.cpp */; }; @@ -2030,6 +2031,7 @@ 31A2B37E26AA136900221CFF /* Expect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Expect.h; path = ../../../../common/WhirlyGlobeLib/include/Expect.h; sourceTree = ""; }; 31CAB8DD27920F4A00A5F744 /* GeographicLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GeographicLib.h; path = ../../../../common/WhirlyGlobeLib/include/GeographicLib.h; sourceTree = ""; }; 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GeographicLib.cpp; path = ../../../../common/WhirlyGlobeLib/src/GeographicLib.cpp; sourceTree = ""; }; + 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe_iOS.h; sourceTree = ""; }; C4905728265AB9E3001E4A98 /* bucketalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bucketalloc.cpp; sourceTree = ""; }; C4905729265AB9E3001E4A98 /* bucketalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bucketalloc.h; sourceTree = ""; }; C490572C265ABAB8001E4A98 /* glues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glues.h; path = ../../include/glues.h; sourceTree = ""; }; @@ -2786,6 +2788,7 @@ 2B82B5461E82E2490095FB14 /* include */ = { isa = PBXGroup; children = ( + 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */, 2B82B5141E82E2490095FB14 /* WhirlyKit */, ); name = include; @@ -4393,6 +4396,7 @@ 2B7B84DA2122403700D11447 /* MaplyTapMessage.h in Headers */, 2B23131C21F8DD61006AA344 /* WhirlyKitView.h in Headers */, 2BE538021D249A1200B60FAD /* MaplyCluster.h in Headers */, + 31DDA0A627A4D3B800865ECE /* WhirlyGlobe_iOS.h in Headers */, 2BE539861D249BEF00B60FAD /* AAStellarMagnitudes.h in Headers */, E5EB67AE1D6DD1C000FB3679 /* SLDWellKnownMarkers.h in Headers */, 2BE5395A1D249BEF00B60FAD /* AAEclipses.h in Headers */, From d8d2325219f26c4046a34774706450a5c818da4c Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 31 Jan 2022 08:32:45 -0800 Subject: [PATCH 09/78] =?UTF-8?q?Change=20target/module=20name=20to=20matc?= =?UTF-8?q?h=20pod=20name=20to=20make=20it=20work=20in=20both=20places=20w?= =?UTF-8?q?ithout=20requiring=20=E2=80=9Cuse=5Fframeworks!=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 - README.md | 10 +- WhirlyGlobe.podspec | 23 ++- .../include/FontTextureManager_Android.h | 2 +- .../include/GreatCircle_Android.h | 2 +- .../include/ImageTile_Android.h | 2 +- .../WhirlyGlobeLib/include/ImageWrapper.h | 2 +- .../include/LabelInfo_Android.h | 2 +- .../include/MapboxVectorStyleSet_Android.h | 2 +- .../WhirlyGlobeLib/include/Shader_Android.h | 2 +- .../include/SingleLabel_Android.h | 2 +- .../include/VectorStyleSet_Android.h | 2 +- .../include/WhirlyGlobe_Android.h | 2 +- .../src/layoutSelection/LayoutManager_jni.cpp | 2 +- .../maply/jni/src/math/Point4d_jni.cpp | 2 +- .../include/MaplyElevationSource_private.h | 2 +- .../MaplyQuadImageTilesLayer_private.h | 2 +- .../include/MaplyQuadPagingLayer_private.h | 2 +- .../include/MaplyQuadTracker_private.h | 2 +- .../src/MaplyLAZQuadReader.mm | 2 +- .../src/MaplyMBTileSource.mm | 2 +- .../src/MaplyQuadImageOfflineLayer.mm | 2 +- .../src/MaplyQuadImageTilesLayer.mm | 2 +- .../src/MaplyRemoteTileElevationSource.mm | 2 +- .../src/MaplyRemoteTileSource.mm | 2 +- .../src/MaplyTileSource.mm | 2 +- .../{WhirlyGlobe.h => WhirlyGlobeLib.h} | 0 .../AutoTester/LegendViewController.swift | 2 +- .../AutoTester/AutoTester/MaplyTesterBridge.h | 20 ++- .../testCases/ActiveObjectTestCase.swift | 1 + .../AutoTester/testCases/AirwayTestCase.swift | 5 +- .../testCases/AnimatedBasemapTestCase.swift | 1 + .../testCases/AnimatedMarkersTestCase.swift | 1 + .../testCases/AnimationDelegateTestCase.swift | 1 + .../testCases/BNGCustomMapTestCase.swift | 2 +- .../AutoTester/testCases/BNGTestCase.swift | 1 + .../testCases/BillboardTestCase.swift | 1 + .../testCases/CartoDBLightTestCase.swift | 1 + .../testCases/ClusteredMarkersTestCase.swift | 1 + .../testCases/ESRIRemoteTestCase.swift | 1 + .../testCases/GeoJSONStyleTestCase.swift | 1 + .../AutoTester/testCases/GeographyClass.swift | 1 + .../testCases/GlobeSamplerTestCase.swift | 1 + .../testCases/GreatCircleTestCase.swift | 1 + .../testCases/ImageReloadTestCase.swift | 1 + .../testCases/Issue721TestCase.swift | 1 + .../LayerStartupShutdownTestCase.swift | 1 + .../LocationTrackingRealTestCase.swift | 1 + .../LocationTrackingSimTestCase.swift | 1 + .../testCases/MapTilerCircleTestCase.swift | 1 + .../testCases/MapTilerTestCase.swift | 1 + .../AutoTester/testCases/MapboxTestCase.swift | 1 + .../AutoTester/testCases/MaplyTestCase.h | 10 +- .../testCases/MarkersTestCase.swift | 1 + .../AutoTester/testCases/ModelsTestCase.swift | 2 +- .../MovingScreenLabelsTestCase.swift | 1 + .../MovingScreenMarkersTestCase.swift | 1 + .../testCases/NASAGIBSTestCase.swift | 1 + .../testCases/OfflineRenderTestCase.swift | 1 + .../testCases/ParticleTestCase.swift | 1 + .../testCases/ScreenLabelsTestCase.swift | 1 + .../testCases/SimpleStyleTestCase.swift | 3 +- .../testCases/StamenWatercolorRemote.swift | 1 + .../testCases/StarsSunTestCase.swift | 1 + .../testCases/StartupShutdownTestCase.swift | 1 + .../testCases/StickersTestCase.swift | 1 + .../testCases/VectorMBTilesTestCase.swift | 1 + .../WhirlyGraph/Classes/InteractionLayer.h | 2 +- .../WhirlyGraph/Classes/PanDelegateFixed.h | 2 +- .../Classes/WhirlyGlobeAppViewController.h | 2 +- .../WhirlyGlobeApp/InteractionLayer.h | 2 +- .../WhirlyGlobeApp/PanDelegateFixed.h | 2 +- .../WhirlyGlobeAppViewController.h | 2 +- .../WhirlyGlobeTester/GlobeViewController.h | 2 +- .../WhirlyGlobeTester/InteractionLayer.h | 2 +- .../WhirlyGlobeTester/PanDelegateFixed.h | 2 +- .../WhirlyGlobe-MaplyComponent/.gitignore | 4 + .../project.pbxproj | 40 +++-- .../WhirlyGlobeMaplyComponent.xcscheme | 16 +- .../WhirlyGlobeMaplyComponent/WhirlyGlobe.h | 121 +++++++++++++++ .../WhirlyGlobeMaplyComponent.h | 121 --------------- .../buildFramework.sh | 75 --------- .../buildXCFramework.sh | 12 +- .../include/MaplyBridge.h | 10 +- .../include/MaplyComponent.h | 146 +++++++++--------- .../include/WhirlyGlobeComponent.h | 6 +- .../include/control/MaplyAnnotation.h | 2 +- .../include/control/MaplyBaseViewController.h | 42 ++--- .../control/MaplyGlobeRenderController.h | 4 +- .../include/control/MaplyRenderController.h | 28 ++-- .../include/control/MaplyUpdateLayer.h | 12 +- .../include/control/MaplyViewController.h | 14 +- .../include/control/MaplyViewTracker.h | 2 +- .../control/WhirlyGlobeViewController.h | 4 +- .../include/data_sources/MaplyMBTileFetcher.h | 6 +- .../include/data_sources/MaplyWMSTileSource.h | 4 +- .../gestures/GlobeDoubleTapDragDelegate.h | 2 +- .../include/gestures/GlobeTiltDelegate.h | 2 +- .../gestures/Maply3dTouchPreviewDelegate.h | 2 +- .../include/gestures/MaplyDoubleTapDelegate.h | 2 +- .../gestures/MaplyDoubleTapDragDelegate.h | 2 +- .../include/gestures/MaplyPinchDelegate.h | 2 +- .../include/gestures/MaplyTapDelegate.h | 2 +- .../gestures/MaplyTwoFingerTapDelegate.h | 2 +- .../include/helpers/GeographicLib_ObjC.h | 2 +- .../include/helpers/MaplyGeomBuilder.h | 6 +- .../include/helpers/MaplyIconManager.h | 2 +- .../include/helpers/MaplyLocationTracker.h | 2 +- .../include/loading/GeoJSONSource.h | 2 +- .../include/loading/MaplyImageTile.h | 2 +- .../loading/MaplyQuadImageFrameLoader.h | 4 +- .../include/loading/MaplyQuadImageLoader.h | 14 +- .../include/loading/MaplyQuadLoader.h | 12 +- .../include/loading/MaplyQuadPagingLoader.h | 2 +- .../include/loading/MaplyQuadSampler.h | 8 +- .../include/loading/MaplyRemoteTileFetcher.h | 4 +- .../include/loading/MaplySimpleTileFetcher.h | 2 +- .../include/loading/MaplyTileSourceNew.h | 6 +- .../include/math/MaplyCoordinate.h | 16 +- .../include/math/MaplyCoordinateSystem.h | 2 +- .../include/math/WGCoordinate.h | 2 +- .../private/GlobeRotateDelegate_private.h | 2 +- .../private/GlobeTiltDelegate_private.h | 7 +- .../private/MapboxVectorTiles_private.h | 2 +- .../private/MaplyActiveObject_private.h | 2 +- .../private/MaplyCoordinateSystem_private.h | 2 +- .../private/MaplyDoubleTapDelegate_private.h | 2 +- .../MaplyDoubleTapDragDelegate_private.h | 2 +- .../include/private/MaplyImageTile_private.h | 2 +- .../private/MaplyPanDelegate_private.h | 2 +- .../private/MaplyParticleSystem_private.h | 2 +- .../private/MaplyPinchDelegate_private.h | 2 +- .../private/MaplyQuadSampler_private.h | 2 +- .../private/MaplyRenderTarget_private.h | 2 +- .../private/MaplyRotateDelegate_private.h | 2 +- .../include/private/MaplyShape_private.h | 2 +- .../include/private/MaplyTapMessage_private.h | 4 +- .../include/private/MaplyTexture_private.h | 2 +- .../MaplyTwoFingerTapDelegate_private.h | 4 +- .../private/MaplyVectorStyle_private.h | 2 +- .../private/MaplyVertexAttribute_private.h | 2 +- .../MaplyZoomGestureDelegate_private.h | 2 +- .../include/rendering/MaplyAtmosphere.h | 6 +- .../include/rendering/MaplyLight.h | 2 +- .../include/rendering/MaplyRenderTarget.h | 2 +- .../include/rendering/MaplyVariableTarget.h | 6 +- .../vector_styles/MapboxVectorStyleSet.h | 4 +- .../include/vector_styles/MaplyVectorStyle.h | 4 +- .../vector_styles/MaplyVectorStyleSimple.h | 2 +- .../vector_styles/MaplyVectorTileLineStyle.h | 4 +- .../MaplyVectorTileMarkerStyle.h | 4 +- .../MaplyVectorTilePolygonStyle.h | 4 +- .../vector_styles/MaplyVectorTileStyle.h | 2 +- .../vector_styles/MaplyVectorTileTextStyle.h | 4 +- .../include/vector_styles/MapnikStyle.h | 2 +- .../include/vector_styles/MapnikStyleSet.h | 2 +- .../include/vector_styles/SLDOperators.h | 2 +- .../include/vector_styles/SLDStyleSet.h | 2 +- .../include/vector_styles/SLDSymbolizers.h | 2 +- .../vector_tiles/MapboxVectorInterpreter.h | 10 +- .../include/vector_tiles/MapboxVectorTiles.h | 8 +- .../include/visual_objects/MaplyBillboard.h | 4 +- .../include/visual_objects/MaplyCluster.h | 6 +- .../include/visual_objects/MaplyGeomModel.h | 6 +- .../include/visual_objects/MaplyLabel.h | 2 +- .../include/visual_objects/MaplyMarker.h | 2 +- .../include/visual_objects/MaplyMoon.h | 6 +- .../visual_objects/MaplyParticleSystem.h | 6 +- .../include/visual_objects/MaplyPoints.h | 6 +- .../include/visual_objects/MaplyScreenLabel.h | 2 +- .../visual_objects/MaplyScreenMarker.h | 2 +- .../visual_objects/MaplyScreenObject.h | 4 +- .../include/visual_objects/MaplyShape.h | 6 +- .../include/visual_objects/MaplyStarsModel.h | 4 +- .../include/visual_objects/MaplySticker.h | 4 +- .../include/visual_objects/MaplySun.h | 6 +- .../visual_objects/MaplyVectorObject.h | 4 +- .../src/control/MaplyAnnotation.mm | 2 +- .../src/data_sources/MaplyMBTileFetcher.mm | 2 +- .../src/helpers/MapboxKindaMap.swift | 1 + .../src/helpers/MaplyQuadSampler.mm | 2 +- .../src/loading/MaplyImageTile.mm | 2 +- .../src/loading/MaplySimpleTileFetcher.mm | 2 +- .../src/math/MaplyCoordinate.mm | 6 + .../src/math/WGCoordinate.mm | 10 +- .../vector_tiles/MapboxVectorInterpreter.mm | 2 +- .../src/vector_tiles/MaplyVectorStyle.mm | 2 +- .../src/vector_tiles/MaplyVectorTileStyle.mm | 2 +- .../src/vector_tiles/SLDStyleSet.mm | 2 +- .../src/visual_objects/MaplyMarker.mm | 6 +- .../src/visual_objects/MaplyShape.mm | 2 +- .../WhirlyGlobeLib/include/ImageTile_iOS.h | 2 +- .../WhirlyGlobeLib/include/ScreenObject_iOS.h | 2 +- .../WhirlyGlobeLib/include/WhirlyGlobe_iOS.h | 2 +- 194 files changed, 584 insertions(+), 609 deletions(-) rename common/WhirlyGlobeLib/include/{WhirlyGlobe.h => WhirlyGlobeLib.h} (100%) create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/.gitignore create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobe.h delete mode 100644 ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h delete mode 100755 ios/library/WhirlyGlobe-MaplyComponent/buildFramework.sh diff --git a/.gitignore b/.gitignore index 8ee5034a0a..e9c11de818 100644 --- a/.gitignore +++ b/.gitignore @@ -27,10 +27,6 @@ WhirlyGlobeSrc/AutoTester/AutoTester.xcworkspace android/**/local.properties android/library/Android/.gradle android/library/maply/.cxx -ios/library/WhirlyGlobe-MaplyComponent/build -ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.framework -ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcframework -ios/library/WhirlyGlobe-MaplyComponent/archives podlint\.txt diff --git a/README.md b/README.md index f6b81b58f8..b7627a7f35 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Builds -: | :- [![Android Build Status](https://app.bitrise.io/app/36f069a6fbd58b11.svg?token=XD5YnMiUwnj0169yhIOkPQ)](https://app.bitrise.io/app/36f069a6fbd58b11) | Android Main -This is the main branch of the WhirlyGlobe-Maply Component and API version 3.4. It should be easy to compile, as all the crazy dependencies are in submodules. You can also get a [precompiled version](https://mousebird-consulting-inc.github.io/WhirlyGlobe/builds/builds.html). +This is the main branch of the WhirlyGlobe-Maply Component and API version 3.5. It should be easy to compile, as all the crazy dependencies are in submodules. You can also get a [precompiled version](https://mousebird-consulting-inc.github.io/WhirlyGlobe/builds/builds.html). WhirlyGlobe-Maply uses a bunch of submodules, which you'll need to get. Like so: @@ -48,6 +48,14 @@ Once you get all this synced, try to build AutoTester. If it builds, you're good Want more detail? Go read the [Tutorials](http://mousebird-consulting-inc.github.io/WhirlyGlobe/tutorial/) on the WhirlyGlobe-Maply site. +Breaking Changes +--- + +If you're upgrading from 3.4, you will need to make some adjustments due to the switch to xcframework and modular headers: + +- When embedding the framework as is done in AutoTester, Swift no longer automatically imports the module because it doesn't match the project name. You will need an additional `import WhirlyGlobe` at the top of Swift files using the API. +- If you're including header files from Obj-C++ code, you'll need to use the modular include style, `#import `, and using quoted includes will produce a compile error. + More Information --- diff --git a/WhirlyGlobe.podspec b/WhirlyGlobe.podspec index 8ba50a4bea..1227752caa 100644 --- a/WhirlyGlobe.podspec +++ b/WhirlyGlobe.podspec @@ -23,11 +23,20 @@ Pod::Spec.new do |s| s.platform = :ios, '12.0' s.requires_arc = true s.source = { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'topic/xcframework' } - s.module_name = "WhirlyGlobeMaplyComponent" - s.default_subspec = 'MaplyComponent' - s.compiler_flags = '-D__USE_SDL_GLES__ -D__IPHONEOS__ -DSQLITE_OPEN_READONLY -DHAVE_PTHREAD=1 -DUNORDERED=1 ' + s.module_name = "WhirlyGlobe" + s.default_subspec = "WhirlyGlobe" + s.compiler_flags = "" s.pod_target_xcconfig = { + "DEFINES_MODULE" => "YES", + "MTL_LANGUAGE_REVISION" => "Metal21", + "GCC_PREPROCESSOR_DEFINITIONS" => %w( + __USE_SDL_GLES__ + __IPHONEOS__ + SQLITE_OPEN_READONLY + HAVE_PTHREAD=1 + UNORDERED=1 + ).join(" "), "HEADER_SEARCH_PATHS" => %w( "$(SDKROOT)/usr/include/libxml2" "$(PODS_ROOT)/KissXML/KissXML/" @@ -40,12 +49,10 @@ Pod::Spec.new do |s| "${PODS_TARGET_SRCROOT}/ios/library/WhirlyGlobe-MaplyComponent/include/private/" "${PODS_TARGET_SRCROOT}/ios/library/WhirlyGlobe-MaplyComponent/include/" "${PODS_TARGET_SRCROOT}/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/" - ).join(" "), + ).join(" "), # For angle-bracket includes "SYSTEM_HEADER_SEARCH_PATHS" => %w( - ).join(" "), - "MTL_LANGUAGE_REVISION" => "Metal21", - "DEFINES_MODULE" => "YES", + ).join(" "), "CLANG_WARN_DOCUMENTATION_COMMENTS" => "NO", "GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" } @@ -77,7 +84,7 @@ Pod::Spec.new do |s| gl.private_header_files = 'common/local_libs/glues/**/*.h' end - s.subspec 'MaplyComponent' do |mc| + s.subspec 'WhirlyGlobe' do |mc| mc.source_files = 'common/WhirlyGlobeLib/src/*.{c,cpp}', 'common/WhirlyGlobeLib/include/*.h', diff --git a/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h b/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h index e5bfaa0877..1bc3b06730 100644 --- a/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h @@ -17,7 +17,7 @@ */ #import "Maply_jni.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/GreatCircle_Android.h b/android/library/maply/WhirlyGlobeLib/include/GreatCircle_Android.h index 3b0b8c1c66..18240056ad 100644 --- a/android/library/maply/WhirlyGlobeLib/include/GreatCircle_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/GreatCircle_Android.h @@ -20,7 +20,7 @@ #import #endif #import "Maply_jni.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/ImageTile_Android.h b/android/library/maply/WhirlyGlobeLib/include/ImageTile_Android.h index 31554204ac..2193348041 100644 --- a/android/library/maply/WhirlyGlobeLib/include/ImageTile_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/ImageTile_Android.h @@ -22,7 +22,7 @@ #import #endif #import "Maply_jni.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/ImageWrapper.h b/android/library/maply/WhirlyGlobeLib/include/ImageWrapper.h index 1c02ff80b0..9ab76cb798 100644 --- a/android/library/maply/WhirlyGlobeLib/include/ImageWrapper.h +++ b/android/library/maply/WhirlyGlobeLib/include/ImageWrapper.h @@ -23,7 +23,7 @@ #import #import "Maply_jni.h" #endif -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/LabelInfo_Android.h b/android/library/maply/WhirlyGlobeLib/include/LabelInfo_Android.h index c85453dcda..dac92d5cf6 100644 --- a/android/library/maply/WhirlyGlobeLib/include/LabelInfo_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/LabelInfo_Android.h @@ -22,7 +22,7 @@ #import #endif #import "Maply_jni.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/MapboxVectorStyleSet_Android.h b/android/library/maply/WhirlyGlobeLib/include/MapboxVectorStyleSet_Android.h index aac24419ea..13f1d9ef9e 100644 --- a/android/library/maply/WhirlyGlobeLib/include/MapboxVectorStyleSet_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/MapboxVectorStyleSet_Android.h @@ -17,7 +17,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "LabelInfo_Android.h" namespace WhirlyKit diff --git a/android/library/maply/WhirlyGlobeLib/include/Shader_Android.h b/android/library/maply/WhirlyGlobeLib/include/Shader_Android.h index dd5c7a4b74..e3612df2a3 100644 --- a/android/library/maply/WhirlyGlobeLib/include/Shader_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/Shader_Android.h @@ -19,7 +19,7 @@ */ #import "Maply_jni.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/SingleLabel_Android.h b/android/library/maply/WhirlyGlobeLib/include/SingleLabel_Android.h index e1bbf10496..ea1ddd5b60 100644 --- a/android/library/maply/WhirlyGlobeLib/include/SingleLabel_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/SingleLabel_Android.h @@ -16,7 +16,7 @@ * limitations under the License. */ -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/WhirlyGlobeLib/include/VectorStyleSet_Android.h b/android/library/maply/WhirlyGlobeLib/include/VectorStyleSet_Android.h index ed4cdc2f3e..73d552c404 100644 --- a/android/library/maply/WhirlyGlobeLib/include/VectorStyleSet_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/VectorStyleSet_Android.h @@ -17,7 +17,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import namespace WhirlyKit diff --git a/android/library/maply/WhirlyGlobeLib/include/WhirlyGlobe_Android.h b/android/library/maply/WhirlyGlobeLib/include/WhirlyGlobe_Android.h index a467ee0cfa..fb0a141885 100644 --- a/android/library/maply/WhirlyGlobeLib/include/WhirlyGlobe_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/WhirlyGlobe_Android.h @@ -16,7 +16,7 @@ * limitations under the License. */ -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "ComponentManager_Android.h" #import "Dictionary_Android.h" diff --git a/android/library/maply/jni/src/layoutSelection/LayoutManager_jni.cpp b/android/library/maply/jni/src/layoutSelection/LayoutManager_jni.cpp index 8b6faa1438..f6fb27490e 100644 --- a/android/library/maply/jni/src/layoutSelection/LayoutManager_jni.cpp +++ b/android/library/maply/jni/src/layoutSelection/LayoutManager_jni.cpp @@ -22,7 +22,7 @@ #import "View_jni.h" #import "Renderer_jni.h" #import "com_mousebird_maply_LayoutManager.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import using namespace WhirlyKit; diff --git a/android/library/maply/jni/src/math/Point4d_jni.cpp b/android/library/maply/jni/src/math/Point4d_jni.cpp index f1fdf7e12a..d8cc44c101 100644 --- a/android/library/maply/jni/src/math/Point4d_jni.cpp +++ b/android/library/maply/jni/src/math/Point4d_jni.cpp @@ -18,7 +18,7 @@ #import #import "Geometry_jni.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" template<> Point4dClassInfo *Point4dClassInfo::classInfoObj = nullptr; diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyElevationSource_private.h b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyElevationSource_private.h index 2ac6217e0f..6a46bccc51 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyElevationSource_private.h +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyElevationSource_private.h @@ -19,7 +19,7 @@ */ #import "MaplyElevationSource.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" /** An adapter object that converts Maply elevation chunks (the simple version) to WhirlyKitElevationChunk data. diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadImageTilesLayer_private.h b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadImageTilesLayer_private.h index f47dc9d3c9..6e07d180dd 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadImageTilesLayer_private.h +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadImageTilesLayer_private.h @@ -20,7 +20,7 @@ #import "MaplyQuadImageTilesLayer.h" #import "MaplyViewControllerLayer_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyQuadImageTilesLayer() diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadPagingLayer_private.h b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadPagingLayer_private.h index c00f040fc8..87970f265b 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadPagingLayer_private.h +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadPagingLayer_private.h @@ -19,7 +19,7 @@ */ #import "MaplyQuadPagingLayer.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyQuadPagingLayer() diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadTracker_private.h b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadTracker_private.h index 137812fef9..7a7eb95c11 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadTracker_private.h +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyQuadTracker_private.h @@ -19,7 +19,7 @@ */ #import "MaplyQuadTracker.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyQuadTracker() diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyLAZQuadReader.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyLAZQuadReader.mm index 11e3503cf6..e9393d679b 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyLAZQuadReader.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyLAZQuadReader.mm @@ -19,7 +19,7 @@ #import "FMDatabase.h" #import "FMDatabaseQueue.h" #import "laszip_api.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyLAZMeshBuilder.h" #import "WhirlyGlobeViewController_private.h" #import "MaplyCoordinateSystem_private.h" diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyMBTileSource.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyMBTileSource.mm index 86dcafcafa..ff9c358f73 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyMBTileSource.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyMBTileSource.mm @@ -20,7 +20,7 @@ #import "MaplyMBTileSource.h" #import "MaplyCoordinateSystem.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyCoordinateSystem_private.h" #include diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageOfflineLayer.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageOfflineLayer.mm index 1baa6e002e..1f71b5f78e 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageOfflineLayer.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageOfflineLayer.mm @@ -25,7 +25,7 @@ #import "QuadDisplayLayer.h" #import "MaplyActiveObject.h" #import "MaplyActiveObject_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyImageTile_private.h" #import "MaplyTexture_private.h" #import "MaplyRenderController_private.h" diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageTilesLayer.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageTilesLayer.mm index 113e95f358..b04adc5167 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageTilesLayer.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyQuadImageTilesLayer.mm @@ -24,7 +24,7 @@ #import "MaplyActiveObject.h" #import "MaplyActiveObject_private.h" #import "MaplyBaseViewController_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyImageTile_private.h" #import "MaplyElevationSource_private.h" diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileElevationSource.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileElevationSource.mm index dc7c68a800..319052197e 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileElevationSource.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileElevationSource.mm @@ -19,7 +19,7 @@ */ #import "MaplyRemoteTileElevationSource.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyCoordinateSystem_private.h" #import "MaplyQuadImageTilesLayer.h" #import "MaplyRemoteTileSource_private.h" diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileSource.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileSource.mm index d2b3ca8a95..fc54bb303d 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileSource.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyRemoteTileSource.mm @@ -19,7 +19,7 @@ */ #import "MaplyRemoteTileSource.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyCoordinateSystem_private.h" #import "MaplyQuadImageTilesLayer.h" #import "MaplyRemoteTileSource_private.h" diff --git a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyTileSource.mm b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyTileSource.mm index a99351f5cb..aee6c32787 100644 --- a/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyTileSource.mm +++ b/code graveyard/ios/library/WhirlyGlobe-MaplyComponent/src/MaplyTileSource.mm @@ -19,7 +19,7 @@ */ #import "MaplyTileSource.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyCoordinateSystem_private.h" @implementation MaplyFrameStatus diff --git a/common/WhirlyGlobeLib/include/WhirlyGlobe.h b/common/WhirlyGlobeLib/include/WhirlyGlobeLib.h similarity index 100% rename from common/WhirlyGlobeLib/include/WhirlyGlobe.h rename to common/WhirlyGlobeLib/include/WhirlyGlobeLib.h diff --git a/ios/apps/AutoTester/AutoTester/LegendViewController.swift b/ios/apps/AutoTester/AutoTester/LegendViewController.swift index 053f26fa4c..952447d6d1 100644 --- a/ios/apps/AutoTester/AutoTester/LegendViewController.swift +++ b/ios/apps/AutoTester/AutoTester/LegendViewController.swift @@ -7,7 +7,7 @@ // import Foundation -import WhirlyGlobeMaplyComponent +import WhirlyGlobe class LegendCell: UITableViewCell { diff --git a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h index 193fe93dce..be24ff37e8 100644 --- a/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h +++ b/ios/apps/AutoTester/AutoTester/MaplyTesterBridge.h @@ -3,21 +3,20 @@ // WhirlyGlobeSwiftTester // // Created by jmnavarro on 16/09/15. -// Copyright (c) 2015-2020 mousebird consulting. All rights reserved. +// Copyright 2015-2022 mousebird consulting. All rights reserved. // #ifndef AutoTester_MaplyTesterBridge_h #define AutoTester_MaplyTesterBridge_h -#import -#import -#import -#import -#import -#import -#import -#import - +#import +#import +#import +#import +#import +#import +#import +#import #import "MaplyTestCase.h" #import "VectorsTestCase.h" @@ -38,7 +37,6 @@ #import "PagingLayerTestCase.h" #import "VectorHoleTestCase.h" #import "VectorStyleTestCase.h" -#import "ActiveObjectTestCase.h" #import "GlyphProblemTestCase.h" #import "ChangeVectorsTestCase.h" #import "RepresentationsTestCase.h" diff --git a/ios/apps/AutoTester/AutoTester/testCases/ActiveObjectTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ActiveObjectTestCase.swift index 414cb58d2d..9a622271e7 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ActiveObjectTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ActiveObjectTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class ActiveObjectTestCase : MaplyTestCase { override init() { diff --git a/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift index 3ec0f0887a..b6d896bb30 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe // A very dumb graph builder class GraphBuilder { @@ -54,7 +55,7 @@ class AirwayTestCase: MaplyTestCase { func setupAirways(_ viewC: MaplyBaseViewController) { DispatchQueue.global(qos: .default).async { - guard let vecObj = MaplyVectorObject(fromShapeFile: "ATS_Route") else { + guard let vecObj = MaplyVectorObject(shapeFile: "ATS_Route") else { print("Failed to load ATS_Route shapefile") return } @@ -174,7 +175,7 @@ class AirwayTestCase: MaplyTestCase { } func setupAirspaces(_ viewC: MaplyBaseViewController) { - guard let vecObj = MaplyVectorObject(fromShapeFile: "Airspace_Boundary") else { + guard let vecObj = MaplyVectorObject(shapeFile: "Airspace_Boundary") else { print("Failed to load Airspace_Boundary shapefile") return } diff --git a/ios/apps/AutoTester/AutoTester/testCases/AnimatedBasemapTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/AnimatedBasemapTestCase.swift index a57e4b41ad..d27f410418 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/AnimatedBasemapTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/AnimatedBasemapTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class AnimatedBasemapTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/AnimatedMarkersTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/AnimatedMarkersTestCase.swift index e0e0aaf785..f248bdaeb4 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/AnimatedMarkersTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/AnimatedMarkersTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class AnimatedMarkersTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/AnimationDelegateTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/AnimationDelegateTestCase.swift index af776b5e4a..0a6255b57e 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/AnimationDelegateTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/AnimationDelegateTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class AnimationDelegateTestCase: MaplyTestCase { override init() { diff --git a/ios/apps/AutoTester/AutoTester/testCases/BNGCustomMapTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/BNGCustomMapTestCase.swift index 9bb211cbd6..bb3254f2f4 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/BNGCustomMapTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/BNGCustomMapTestCase.swift @@ -7,7 +7,7 @@ // import UIKit - +import WhirlyGlobe class BNGCustomMapTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/BNGTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/BNGTestCase.swift index 6a383806f5..0421978261 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/BNGTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/BNGTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class BNGTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/BillboardTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/BillboardTestCase.swift index aced3c484c..6c784a31a0 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/BillboardTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/BillboardTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class BillboardTestCase : MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/CartoDBLightTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/CartoDBLightTestCase.swift index 5218ca2ec8..12bb548b47 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/CartoDBLightTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/CartoDBLightTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class CartoDBLightTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ClusteredMarkersTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ClusteredMarkersTestCase.swift index 4b721cf424..c7164729e8 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ClusteredMarkersTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ClusteredMarkersTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class ClusteredMarkersTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ESRIRemoteTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ESRIRemoteTestCase.swift index 77f6eea6b4..da54f8c3d0 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ESRIRemoteTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ESRIRemoteTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe /** This ESRI Bathymetry tile suite consists of two layers, a base layer and a labels layer. We create an diff --git a/ios/apps/AutoTester/AutoTester/testCases/GeoJSONStyleTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/GeoJSONStyleTestCase.swift index d47e099ef4..d5f41aac13 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/GeoJSONStyleTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/GeoJSONStyleTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class GeoJSONStyleTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift b/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift index f9442a3609..b59a709908 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe public class GeographyClassTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/GlobeSamplerTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/GlobeSamplerTestCase.swift index 36b4d702eb..4883e05243 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/GlobeSamplerTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/GlobeSamplerTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class GlobeSamplerTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/GreatCircleTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/GreatCircleTestCase.swift index 41b7abaca5..bc604f7443 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/GreatCircleTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/GreatCircleTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class GreatCircleTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ImageReloadTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ImageReloadTestCase.swift index 4645a0c2af..22933ae6df 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ImageReloadTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ImageReloadTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class ImageReloadTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/Issue721TestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/Issue721TestCase.swift index 0b1412bdd3..f966e26f78 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/Issue721TestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/Issue721TestCase.swift @@ -6,6 +6,7 @@ // Copyright 2016-2022 mousebird consulting. // import Foundation +import WhirlyGlobe class Issue721TestCase : MaplyTestCase{ diff --git a/ios/apps/AutoTester/AutoTester/testCases/LayerStartupShutdownTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/LayerStartupShutdownTestCase.swift index afe5891c93..62e975015a 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LayerStartupShutdownTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/LayerStartupShutdownTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class LayerStartupShutdownTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingRealTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingRealTestCase.swift index a9bcd87da7..e0c471f8aa 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingRealTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingRealTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class LocationTrackingRealTestCase: MaplyTestCase, MaplyLocationTrackerDelegate { diff --git a/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingSimTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingSimTestCase.swift index c948cda951..dc24b407ff 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingSimTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/LocationTrackingSimTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class LocationTrackingSimTestCase: MaplyTestCase, MaplyLocationTrackerDelegate, MaplyLocationSimulatorDelegate { diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapTilerCircleTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapTilerCircleTestCase.swift index 232d53af16..998e616ae7 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapTilerCircleTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapTilerCircleTestCase.swift @@ -6,6 +6,7 @@ // Copyright 2021-2022 mousebird consulting. All rights reserved. // import UIKit +import WhirlyGlobe class MapTilerCircleTestCase: MapTilerTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift index fab0d89196..33df81ef0a 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class MapTilerTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift index 7545bed003..c361cda0ac 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class MapboxTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h index 529381b12e..29669c65a5 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h +++ b/ios/apps/AutoTester/AutoTester/testCases/MaplyTestCase.h @@ -7,11 +7,11 @@ // #import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import @class MaplyViewController; @class MaplyBaseViewController; diff --git a/ios/apps/AutoTester/AutoTester/testCases/MarkersTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MarkersTestCase.swift index 0241ec5827..3b5d7d6bde 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MarkersTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MarkersTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class MarkersTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift index 4bd93f8f10..417654818c 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift @@ -7,7 +7,7 @@ // import UIKit - +import WhirlyGlobe struct LocationInfo { var name: String diff --git a/ios/apps/AutoTester/AutoTester/testCases/MovingScreenLabelsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MovingScreenLabelsTestCase.swift index dadd5fd9fb..33f6962087 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MovingScreenLabelsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MovingScreenLabelsTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class MovingScreenLabelsTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/MovingScreenMarkersTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MovingScreenMarkersTestCase.swift index 292a436d95..35add74cb0 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MovingScreenMarkersTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MovingScreenMarkersTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class MovingScreenMarkersTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/NASAGIBSTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/NASAGIBSTestCase.swift index e888cccbb3..0fb90a61f0 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/NASAGIBSTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/NASAGIBSTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class NASAGIBSTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/OfflineRenderTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/OfflineRenderTestCase.swift index e2aaf5c79a..fbfe10a4b1 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/OfflineRenderTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/OfflineRenderTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class OfflineRenderTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ParticleTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ParticleTestCase.swift index 2c4e934b46..5fdcf69130 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ParticleTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ParticleTestCase.swift @@ -6,6 +6,7 @@ // Copyright 2016-2022 mousebird consulting. // import UIKit +import WhirlyGlobe class ParticleTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ScreenLabelsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ScreenLabelsTestCase.swift index 6db5e45cbc..6cd357e7e2 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ScreenLabelsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ScreenLabelsTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class ScreenLabelsTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/SimpleStyleTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/SimpleStyleTestCase.swift index 7ca53f2ad2..67f91d8ea3 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/SimpleStyleTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/SimpleStyleTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class SimpleStyleTestCase: MaplyTestCase { @@ -181,7 +182,7 @@ class SimpleStyleTestCase: MaplyTestCase { { let styleMan = MaplySimpleStyleManager(viewC: vc) if let data = geoJSON.data(using: .utf8), - let vecObj = MaplyVectorObject(fromGeoJSON: data) { + let vecObj = MaplyVectorObject(geoJSON: data) { vecObj.selectable = true styleMan.addFeatures([vecObj], mode: .current) } diff --git a/ios/apps/AutoTester/AutoTester/testCases/StamenWatercolorRemote.swift b/ios/apps/AutoTester/AutoTester/testCases/StamenWatercolorRemote.swift index 38b02c4a41..8dffbfc089 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/StamenWatercolorRemote.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/StamenWatercolorRemote.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class StamenWatercolorRemote: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift index ddad806598..4f6eb531dd 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class StarsSunTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/StartupShutdownTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/StartupShutdownTestCase.swift index 228d88258c..ed8dc1059c 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/StartupShutdownTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/StartupShutdownTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class StartupShutdownTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/StickersTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/StickersTestCase.swift index fbc35e961a..b75b0b4d90 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/StickersTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/StickersTestCase.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe class StickersTestCase: MaplyTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/VectorMBTilesTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/VectorMBTilesTestCase.swift index 06b57092d1..eeee47e786 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/VectorMBTilesTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/VectorMBTilesTestCase.swift @@ -7,6 +7,7 @@ // import Foundation +import WhirlyGlobe class VectorMBTilesTestCase: MaplyTestCase { diff --git a/ios/apps/Contributed/WhirlyGraph/Classes/InteractionLayer.h b/ios/apps/Contributed/WhirlyGraph/Classes/InteractionLayer.h index 4ed8329bd8..ae6ff739ca 100644 --- a/ios/apps/Contributed/WhirlyGraph/Classes/InteractionLayer.h +++ b/ios/apps/Contributed/WhirlyGraph/Classes/InteractionLayer.h @@ -20,7 +20,7 @@ #import #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" typedef enum {FeatRepCountry,FeatRepOcean} FeatureRepType; diff --git a/ios/apps/Contributed/WhirlyGraph/Classes/PanDelegateFixed.h b/ios/apps/Contributed/WhirlyGraph/Classes/PanDelegateFixed.h index b4466720b4..c7d0128c31 100644 --- a/ios/apps/Contributed/WhirlyGraph/Classes/PanDelegateFixed.h +++ b/ios/apps/Contributed/WhirlyGraph/Classes/PanDelegateFixed.h @@ -19,7 +19,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" // Kind of panning we're in the middle of typedef enum {PanNone,PanFree,PanSuspended} PanningType; diff --git a/ios/apps/Contributed/WhirlyGraph/Classes/WhirlyGlobeAppViewController.h b/ios/apps/Contributed/WhirlyGraph/Classes/WhirlyGlobeAppViewController.h index c6f9cb775d..507ad60041 100644 --- a/ios/apps/Contributed/WhirlyGraph/Classes/WhirlyGlobeAppViewController.h +++ b/ios/apps/Contributed/WhirlyGraph/Classes/WhirlyGlobeAppViewController.h @@ -19,7 +19,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "InteractionLayer.h" #import "PanDelegateFixed.h" #import "WebViewController.h" diff --git a/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/InteractionLayer.h b/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/InteractionLayer.h index a8624798b1..1555c0c17f 100644 --- a/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/InteractionLayer.h +++ b/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/InteractionLayer.h @@ -20,7 +20,7 @@ #import #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" typedef std::set SimpleIDSet; diff --git a/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/PanDelegateFixed.h b/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/PanDelegateFixed.h index 402eb377a3..47d5c1a383 100644 --- a/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/PanDelegateFixed.h +++ b/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/PanDelegateFixed.h @@ -19,7 +19,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" // Kind of panning we're in the middle of typedef enum {PanNone,PanFree,PanSuspended} PanningType; diff --git a/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/WhirlyGlobeAppViewController.h b/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/WhirlyGlobeAppViewController.h index 7d04462af8..7ae64a8250 100644 --- a/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/WhirlyGlobeAppViewController.h +++ b/ios/apps/code graveyard/WhirlyGlobeApp/WhirlyGlobeApp/WhirlyGlobeAppViewController.h @@ -19,7 +19,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "InteractionLayer.h" #import "PanDelegateFixed.h" diff --git a/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/GlobeViewController.h b/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/GlobeViewController.h index a5073f9bc2..80834039b8 100644 --- a/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/GlobeViewController.h +++ b/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/GlobeViewController.h @@ -20,7 +20,7 @@ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "InteractionLayer.h" #import "OptionsViewController.h" #import "PanDelegateFixed.h" diff --git a/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/InteractionLayer.h b/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/InteractionLayer.h index 7ffc027f70..67a1b47340 100644 --- a/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/InteractionLayer.h +++ b/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/InteractionLayer.h @@ -19,7 +19,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" // Notification for control dictionary changes #define kWGControlChange @"WGControlChange" diff --git a/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/PanDelegateFixed.h b/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/PanDelegateFixed.h index 6043ef9231..25bc284d5f 100644 --- a/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/PanDelegateFixed.h +++ b/ios/apps/code graveyard/WhirlyGlobeTester/WhirlyGlobeTester/PanDelegateFixed.h @@ -19,7 +19,7 @@ */ #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" // Kind of panning we're in the middle of typedef enum {PanNone,PanFree,PanSuspended} PanningType; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/.gitignore b/ios/library/WhirlyGlobe-MaplyComponent/.gitignore new file mode 100644 index 0000000000..e5589c0cff --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/.gitignore @@ -0,0 +1,4 @@ +build/ +archives/ +WhirlyGlobe.xcframework + diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index 366c757dbf..ef8597e41b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -606,7 +606,7 @@ 2BC3D6EC220B713700CE91D0 /* sqlhelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC3D6EB220B713700CE91D0 /* sqlhelpers.h */; }; 2BC3D6EE220B714100CE91D0 /* sqlhelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BC3D6ED220B714100CE91D0 /* sqlhelpers.mm */; }; 2BC3D6F8220CAAC700CE91D0 /* WhirlyKitLog.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BC3D6F7220CAAC700CE91D0 /* WhirlyKitLog.mm */; }; - 2BC90D532231A30F00D8B606 /* WhirlyGlobe.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D522231A30F00D8B606 /* WhirlyGlobe.h */; }; + 2BC90D532231A30F00D8B606 /* WhirlyGlobeLib.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D522231A30F00D8B606 /* WhirlyGlobeLib.h */; }; 2BC90D58223306D300D8B606 /* ScreenObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D57223306D300D8B606 /* ScreenObject.h */; }; 2BC90D5A223306EA00D8B606 /* ScreenObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2BC90D59223306EA00D8B606 /* ScreenObject.cpp */; }; 2BC90D5D223308C700D8B606 /* ScreenObject_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BC90D5C223308C700D8B606 /* ScreenObject_iOS.h */; }; @@ -664,8 +664,7 @@ 2BE1E79F2215F6FC00815D9C /* ImageTile_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E79E2215F6FC00815D9C /* ImageTile_iOS.h */; }; 2BE1E7A12215F70400815D9C /* ImageTile_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2BE1E7A02215F70400815D9C /* ImageTile_iOS.mm */; }; 2BE1E7A522161BD600815D9C /* QuadLoaderReturn.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE1E7A422161BD600815D9C /* QuadLoaderReturn.h */; }; - 2BE537031D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE537021D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2BE5370A1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BE536FF1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework */; }; + 2BE5370A1D2499E500B60FAD /* WhirlyGlobe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BE536FF1D2499E500B60FAD /* WhirlyGlobe.framework */; }; 2BE5370F1D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BE5370E1D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.m */; }; 2BE537F71D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371B1D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2BE537F81D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2BE5371C1D249A1200B60FAD /* Maply3dTouchPreviewDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -1003,6 +1002,7 @@ 31A2B37F26AA136A00221CFF /* Expect.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A2B37E26AA136900221CFF /* Expect.h */; }; 31CAB8DF2792126A00A5F744 /* GeographicLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */; }; 31DDA0A627A4D3B800865ECE /* WhirlyGlobe_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */; }; + 31DDA4BA27A8787D00865ECE /* WhirlyGlobe.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */; settings = {ATTRIBUTES = (Public, ); }; }; 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7E689E22A1E34B00BBFD9E /* MaplySimpleTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; C490572A265AB9E3001E4A98 /* bucketalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4905728265AB9E3001E4A98 /* bucketalloc.cpp */; }; @@ -1597,7 +1597,7 @@ 2BC3D6EB220B713700CE91D0 /* sqlhelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sqlhelpers.h; sourceTree = ""; }; 2BC3D6ED220B714100CE91D0 /* sqlhelpers.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = sqlhelpers.mm; sourceTree = ""; }; 2BC3D6F7220CAAC700CE91D0 /* WhirlyKitLog.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WhirlyKitLog.mm; sourceTree = ""; }; - 2BC90D522231A30F00D8B606 /* WhirlyGlobe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WhirlyGlobe.h; path = ../../../../common/WhirlyGlobeLib/include/WhirlyGlobe.h; sourceTree = ""; }; + 2BC90D522231A30F00D8B606 /* WhirlyGlobeLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WhirlyGlobeLib.h; path = ../../../../common/WhirlyGlobeLib/include/WhirlyGlobeLib.h; sourceTree = ""; }; 2BC90D57223306D300D8B606 /* ScreenObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenObject.h; path = ../../../../common/WhirlyGlobeLib/include/ScreenObject.h; sourceTree = ""; }; 2BC90D59223306EA00D8B606 /* ScreenObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScreenObject.cpp; path = ../../../../common/WhirlyGlobeLib/src/ScreenObject.cpp; sourceTree = ""; }; 2BC90D5C223308C700D8B606 /* ScreenObject_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenObject_iOS.h; sourceTree = ""; }; @@ -1629,8 +1629,7 @@ 2BE1E7A22216163A00815D9C /* MaplyQuadLoader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MaplyQuadLoader.mm; sourceTree = ""; }; 2BE1E7A422161BD600815D9C /* QuadLoaderReturn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuadLoaderReturn.h; path = ../../../../common/WhirlyGlobeLib/include/QuadLoaderReturn.h; sourceTree = ""; }; 2BE1E7A622161C0200815D9C /* QuadLoaderReturn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QuadLoaderReturn.cpp; path = ../../../../common/WhirlyGlobeLib/src/QuadLoaderReturn.cpp; sourceTree = ""; }; - 2BE536FF1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WhirlyGlobeMaplyComponent.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2BE537021D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobeMaplyComponent.h; sourceTree = ""; }; + 2BE536FF1D2499E500B60FAD /* WhirlyGlobe.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WhirlyGlobe.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2BE537041D2499E500B60FAD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2BE537091D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WhirlyGlobeMaplyComponentTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 2BE5370E1D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WhirlyGlobeMaplyComponentTests.m; sourceTree = ""; }; @@ -2032,6 +2031,7 @@ 31CAB8DD27920F4A00A5F744 /* GeographicLib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = GeographicLib.h; path = ../../../../common/WhirlyGlobeLib/include/GeographicLib.h; sourceTree = ""; }; 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GeographicLib.cpp; path = ../../../../common/WhirlyGlobeLib/src/GeographicLib.cpp; sourceTree = ""; }; 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe_iOS.h; sourceTree = ""; }; + 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe.h; sourceTree = ""; }; C4905728265AB9E3001E4A98 /* bucketalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bucketalloc.cpp; sourceTree = ""; }; C4905729265AB9E3001E4A98 /* bucketalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bucketalloc.h; sourceTree = ""; }; C490572C265ABAB8001E4A98 /* glues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glues.h; path = ../../include/glues.h; sourceTree = ""; }; @@ -2075,7 +2075,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2BE5370A1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework in Frameworks */, + 2BE5370A1D2499E500B60FAD /* WhirlyGlobe.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2896,7 +2896,7 @@ 2B846EF421F158CD00EF2A82 /* include */ = { isa = PBXGroup; children = ( - 2BC90D522231A30F00D8B606 /* WhirlyGlobe.h */, + 2BC90D522231A30F00D8B606 /* WhirlyGlobeLib.h */, 2B23133121F9371F006AA344 /* util */, 2B446AEC21F79A390078A975 /* geometry utils */, 2B446B0621F79A8B0078A975 /* coord systems */, @@ -3439,7 +3439,7 @@ 2BE537001D2499E500B60FAD /* Products */ = { isa = PBXGroup; children = ( - 2BE536FF1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework */, + 2BE536FF1D2499E500B60FAD /* WhirlyGlobe.framework */, 2BE537091D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests.xctest */, ); name = Products; @@ -3448,7 +3448,7 @@ 2BE537011D2499E500B60FAD /* WhirlyGlobeMaplyComponent */ = { isa = PBXGroup; children = ( - 2BE537021D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h */, + 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */, 2BE537191D249A1200B60FAD /* include */, 2BE537991D249A1200B60FAD /* src */, 2BE537041D2499E500B60FAD /* Info.plist */, @@ -4189,7 +4189,7 @@ 31041A0A27A35AD4004B25E1 /* GlobeRotateDelegate_private.h in Headers */, 2B82B5F91E82E2490095FB14 /* libjson.h in Headers */, 2BE53A961D249C9000B60FAD /* DDXMLElement.h in Headers */, - 2BC90D532231A30F00D8B606 /* WhirlyGlobe.h in Headers */, + 2BC90D532231A30F00D8B606 /* WhirlyGlobeLib.h in Headers */, 2BE538191D249A1200B60FAD /* MaplyPoints.h in Headers */, 2B0D978824490B4B00F64852 /* MapboxVectorStyleCircle.h in Headers */, 2BB8A3EE21ED43D10025DA98 /* MaplyDoubleTapDragDelegate.h in Headers */, @@ -4215,7 +4215,6 @@ 2BE539871D249BEF00B60FAD /* AASun.h in Headers */, 2BE538201D249A1200B60FAD /* MaplyScreenLabel.h in Headers */, 2BE539611D249BEF00B60FAD /* AAGalileanMoons.h in Headers */, - 2BE537031D2499E500B60FAD /* WhirlyGlobeMaplyComponent.h in Headers */, 2B699856228DD31F00C31E3F /* DynamicTextureAtlasMTL.h in Headers */, 2BE538581D249A1200B60FAD /* WGInteractionLayer_private.h in Headers */, 2BE1E79F2215F6FC00815D9C /* ImageTile_iOS.h in Headers */, @@ -4255,6 +4254,7 @@ 2BE537F71D249A1200B60FAD /* Maply3DTouchPreviewDatasource.h in Headers */, 31041A0C27A35C59004B25E1 /* GlobeTapDelegate_private.h in Headers */, 2BA827C7225E6F1700324594 /* MapboxVectorTiles.h in Headers */, + 31DDA4BA27A8787D00865ECE /* WhirlyGlobe.h in Headers */, 2BB8A3F621ED43D10025DA98 /* MaplyPinchDelegate.h in Headers */, 31041A1A27A3672D004B25E1 /* MaplyTapDelegate_private.h in Headers */, 2B810091221E07EE00CFF779 /* VectorObject.h in Headers */, @@ -4409,9 +4409,9 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 2BE536FE1D2499E500B60FAD /* WhirlyGlobeMaplyComponent */ = { + 2BE536FE1D2499E500B60FAD /* WhirlyGlobe */ = { isa = PBXNativeTarget; - buildConfigurationList = 2BE537131D2499E500B60FAD /* Build configuration list for PBXNativeTarget "WhirlyGlobeMaplyComponent" */; + buildConfigurationList = 2BE537131D2499E500B60FAD /* Build configuration list for PBXNativeTarget "WhirlyGlobe" */; buildPhases = ( 2BE536FA1D2499E500B60FAD /* Sources */, 2BE536FB1D2499E500B60FAD /* Frameworks */, @@ -4422,9 +4422,9 @@ ); dependencies = ( ); - name = WhirlyGlobeMaplyComponent; + name = WhirlyGlobe; productName = WhirlyGlobeMaplyComponent; - productReference = 2BE536FF1D2499E500B60FAD /* WhirlyGlobeMaplyComponent.framework */; + productReference = 2BE536FF1D2499E500B60FAD /* WhirlyGlobe.framework */; productType = "com.apple.product-type.framework"; }; 2BE537081D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests */ = { @@ -4475,7 +4475,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 2BE536FE1D2499E500B60FAD /* WhirlyGlobeMaplyComponent */, + 2BE536FE1D2499E500B60FAD /* WhirlyGlobe */, 2BE537081D2499E500B60FAD /* WhirlyGlobeMaplyComponentTests */, ); }; @@ -5049,7 +5049,7 @@ /* Begin PBXTargetDependency section */ 2BE5370C1D2499E500B60FAD /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 2BE536FE1D2499E500B60FAD /* WhirlyGlobeMaplyComponent */; + target = 2BE536FE1D2499E500B60FAD /* WhirlyGlobe */; targetProxy = 2BE5370B1D2499E500B60FAD /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -5180,7 +5180,6 @@ 2BE537141D2499E500B60FAD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -5238,7 +5237,6 @@ 2BE537151D2499E500B60FAD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -5324,7 +5322,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2BE537131D2499E500B60FAD /* Build configuration list for PBXNativeTarget "WhirlyGlobeMaplyComponent" */ = { + 2BE537131D2499E500B60FAD /* Build configuration list for PBXNativeTarget "WhirlyGlobe" */ = { isa = XCConfigurationList; buildConfigurations = ( 2BE537141D2499E500B60FAD /* Debug */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/xcshareddata/xcschemes/WhirlyGlobeMaplyComponent.xcscheme b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/xcshareddata/xcschemes/WhirlyGlobeMaplyComponent.xcscheme index 57f32663c0..8bac7bc6f6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/xcshareddata/xcschemes/WhirlyGlobeMaplyComponent.xcscheme +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/xcshareddata/xcschemes/WhirlyGlobeMaplyComponent.xcscheme @@ -15,8 +15,8 @@ @@ -31,8 +31,8 @@ @@ -63,8 +63,8 @@ @@ -79,8 +79,8 @@ diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobe.h b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobe.h new file mode 100644 index 0000000000..4fc8123325 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobe.h @@ -0,0 +1,121 @@ +// +// WhirlyGlobeMaplyComponent.h +// WhirlyGlobeMaplyComponent +// +// Created by Steve Gifford on 6/29/16. +// Copyright © 2016-2019 mousebird consulting. +// + +#import + +//! Project version number for WhirlyGlobeMaplyComponent. +FOUNDATION_EXPORT double WhirlyGlobeMaplyComponentVersionNumber; + +//! Project version string for WhirlyGlobeMaplyComponent. +FOUNDATION_EXPORT const unsigned char WhirlyGlobeMaplyComponentVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h deleted file mode 100644 index e15c8e8454..0000000000 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent/WhirlyGlobeMaplyComponent.h +++ /dev/null @@ -1,121 +0,0 @@ -// -// WhirlyGlobeMaplyComponent.h -// WhirlyGlobeMaplyComponent -// -// Created by Steve Gifford on 6/29/16. -// Copyright © 2016-2019 mousebird consulting. -// - -#import - -//! Project version number for WhirlyGlobeMaplyComponent. -FOUNDATION_EXPORT double WhirlyGlobeMaplyComponentVersionNumber; - -//! Project version string for WhirlyGlobeMaplyComponent. -FOUNDATION_EXPORT const unsigned char WhirlyGlobeMaplyComponentVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/buildFramework.sh b/ios/library/WhirlyGlobe-MaplyComponent/buildFramework.sh deleted file mode 100755 index e7c3abdff0..0000000000 --- a/ios/library/WhirlyGlobe-MaplyComponent/buildFramework.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# Most of this borrowed from http://www.cocoanetics.com/2010/04/making-your-own-iphone-frameworks/ - -BUILDTYPE=${1:-build} - -TARGETOPTS="-target WhirlyGlobeMaplyComponent -scheme WhirlyGlobeMaplyComponent" -SIM_CONFIG="-sdk iphonesimulator -arch x86_64" -DEV_CONFIG="-sdk iphoneos" - -# Locations for build products -BUILT_PRODUCTS_SIMULATOR=`xcodebuild $TARGETOPTS -configuration Release -sdk iphonesimulator -showBuildSettings OTHER_CFLAGS='-fembed-bitcode' | grep -m 1 "BUILT_PRODUCTS_DIR" | grep -oEi "\/.*"` -echo Simulator products: $BUILT_PRODUCTS_SIMULATOR - -BUILT_PRODUCTS_IPHONEOS=`xcodebuild $TARGETOPTS -configuration Release -sdk iphoneos -showBuildSettings OTHER_CFLAGS='-fembed-bitcode' | grep -m 1 "BUILT_PRODUCTS_DIR" | grep -oEi "\/.*"` -echo iPhoneOS products: $BUILT_PRODUCTS_IPHONEOS - -echo Available Simulator Destinations: -xcodebuild $TARGETOPTS $SIM_CONFIG -configuration Release -showdestinations - -#DEST="platform=iOS Simulator,name=iPhone 12" -#echo Building for $DEST ... -# Can't specify an architecture and a destination at the same time -echo Building for simulator -xcodebuild $TARGETOPTS -configuration Archive $SIM_CONFIG OTHER_CFLAGS='-fembed-bitcode' $BUILDTYPE - -echo Building for iPhoneOS -xcodebuild $TARGETOPTS -configuration Archive $DEV_CONFIG -DONLY_ACTIVE_ARCH=NO OTHER_CFLAGS='-fembed-bitcode' $BUILDTYPE - -echo Constructing Framework... - -# name and build location -PROJECT_NAME=WhirlyGlobeMaplyComponent -FRAMEWORK_NAME=WhirlyGlobeMaplyComponent -FRAMEWORK_BUILD_PATH="./build/Framework" - -# these never change -FRAMEWORK_VERSION=A -FRAMEWORK_CURRENT_VERSION=1 -FRAMEWORK_COMPATIBILITY_VERSION=1 - -# Clean any existing framework that might be there -if [ -d "$FRAMEWORK_BUILD_PATH" ]; then - echo "Framework: Cleaning $FRAMEWORK_BUILD_PATH" - rm -rf "$FRAMEWORK_BUILD_PATH" -fi - -# Build the canonical Framework bundle directory structure -FRAMEWORK_DIR=$FRAMEWORK_BUILD_PATH/$FRAMEWORK_NAME.framework -echo "Framework: Setting up directories in $FRAMEWORK_DIR" -mkdir -p $FRAMEWORK_DIR/Headers -mkdir -p $FRAMEWORK_DIR/Modules - -# combine lib files for various platforms into one -echo "Framework: Creating library..." -# lipo -create build/Debug-iphoneos/libWhirlyGlobeLib.a build/Debug-iphonesimulator/libWhirlyGlobeLib.a -output "$FRAMEWORK_DIR/Versions/Current/$FRAMEWORK_NAME" -echo " Linking libraries in $BUILT_PRODUCTS_IPHONEOS and $BUILT_PRODUCTS_SIMULATOR" -lipo -create $BUILT_PRODUCTS_IPHONEOS/WhirlyGlobeMaplyComponent.framework/WhirlyGlobeMaplyComponent $BUILT_PRODUCTS_SIMULATOR/WhirlyGlobeMaplyComponent.framework/WhirlyGlobeMaplyComponent -output "$FRAMEWORK_DIR/${FRAMEWORK_NAME}" - -if [ $? -ne 0 ]; then - # Lipo failed, assume that's because the outputs are the same architecture, and just use one as-is - cp "$BUILT_PRODUCTS_IPHONEOS/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "$FRAMEWORK_DIR/${FRAMEWORK_NAME}" -fi - -# lipo -create "${PROJECT_DIR}/build/${BUILD_STYLE}-iphoneos/lib${PROJECT_NAME}.a" "${PROJECT_DIR}/build/${BUILD_STYLE}-iphonesimulator/lib${PROJECT_NAME}.a" -o "$FRAMEWORK_DIR/Versions/Current/$FRAMEWORK_NAME" - -echo "Framework: Copying assets into current version..." -cp -r include/ $FRAMEWORK_DIR/Headers/ - -#replace placeholder in plist with project name -cp $BUILT_PRODUCTS_IPHONEOS/WhirlyGlobeMaplyComponent.framework/Modules/module.modulemap $FRAMEWORK_DIR/Modules/ -cp $BUILT_PRODUCTS_IPHONEOS/WhirlyGlobeMaplyComponent.framework/default.metallib $FRAMEWORK_DIR/ -cp $BUILT_PRODUCTS_IPHONEOS/WhirlyGlobeMaplyComponent.framework/Info.plist $FRAMEWORK_DIR/Info.plist - -mv $FRAMEWORK_DIR WhirlyGlobeMaplyComponent.framework - diff --git a/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh b/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh index 950a2c05b4..d65956a3f8 100755 --- a/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh +++ b/ios/library/WhirlyGlobe-MaplyComponent/buildXCFramework.sh @@ -1,6 +1,12 @@ +FW=WhirlyGlobe.framework +XFW=WhirlyGlobe.xcframework + # builds iOS slice -xcodebuild archive -scheme WhirlyGlobeMaplyComponent -configuration Release -destination 'generic/platform=iOS' -archivePath './archives/WhirlyGlobeMaplyComponent.framework-iphoneos.xcarchive' SKIP_INSTALL=NO +xcodebuild archive -scheme WhirlyGlobeMaplyComponent -configuration Release -destination 'generic/platform=iOS' -archivePath "./archives/$FW-iphoneos.xcarchive" SKIP_INSTALL=NO # builds iOS simulator slice -xcodebuild archive -scheme WhirlyGlobeMaplyComponent -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath './archives/WhirlyGlobeMaplyComponent.framework-iphonesimulator.xcarchive' SKIP_INSTALL=NO +xcodebuild archive -scheme WhirlyGlobeMaplyComponent -configuration Release -destination 'generic/platform=iOS Simulator' -archivePath "./archives/$FW-iphonesimulator.xcarchive" SKIP_INSTALL=NO # merges both into .xcframework -xcodebuild -create-xcframework -framework './archives/WhirlyGlobeMaplyComponent.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/WhirlyGlobeMaplyComponent.framework' -framework './archives/WhirlyGlobeMaplyComponent.framework-iphoneos.xcarchive/Products/Library/Frameworks/WhirlyGlobeMaplyComponent.framework' -output 'WhirlyGlobeMaplyComponent.xcframework' \ No newline at end of file +rm -rf "$XFW" +xcodebuild -create-xcframework -framework "./archives/$FW-iphonesimulator.xcarchive/Products/Library/Frameworks/$FW" \ + -framework "./archives/$FW-iphoneos.xcarchive/Products/Library/Frameworks/$FW" \ + -output "$XFW" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h index 152d869003..d0e983245b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyBridge.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h index 8dcb73c347..1d51b1ba0d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h @@ -16,87 +16,87 @@ * limitations under the License. */ -#import +#import -#import -#import +#import +#import -#import -#import -#import -#import +#import +#import +#import +#import -#import -#import -#import +#import +#import +#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import -#import -#import +#import +#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import -#import -#import +#import +#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h index 51427344d2..babfdf7259 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h @@ -18,6 +18,6 @@ * */ -#import -#import -#import +#import +#import +#import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h index 0a305248a2..1337cc33e1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyAnnotation.h @@ -19,7 +19,7 @@ */ #import -#import +#import /** This object displays an annotation at a particular point and will track that point as the map or globe moves. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h index 7adaf92b64..119b330f78 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h @@ -18,27 +18,27 @@ #import #import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import typedef double (^ZoomEasingBlock)(double z0,double z1,double t); typedef void (__strong ^InitCompletionBlock)(void); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h index 95d1b61520..27c7afdbf7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyGlobeRenderController.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import /** Animation State used by the WhirlyGlobeViewControllerAnimationDelegate. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h index cddd63d859..0c7c36de71 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h @@ -18,20 +18,20 @@ * */ -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import @class MaplyRemoteTileFetcher; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h index 4ff9ede068..772cea143b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyUpdateLayer.h @@ -18,12 +18,12 @@ * */ -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import @class MaplyUpdateLayer; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h index fc5b2eb575..c49ae410db 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewController.h @@ -17,13 +17,13 @@ */ #import -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import @class MaplyControllerLayer; @class MaplyViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h index b54b45cbc4..9317c009d5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyViewTracker.h @@ -19,7 +19,7 @@ */ #import -#import +#import /** The View Tracker associates a view with a geographic location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h index ae3c444a02..f2e3b82e9e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import @class WGViewControllerLayer; @class WhirlyGlobeViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h index 84cfab6912..278e5dceb7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyMBTileFetcher.h @@ -16,9 +16,9 @@ * limitations under the License. */ -#import -#import -#import +#import +#import +#import /** MBTiles tile fetcher. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h index 0c25ea3809..4b9d3172f2 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/data_sources/MaplyWMSTileSource.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import -#import +#import +#import /** A bounding box for a specific CRS in that coordinate system. This is part of the Web Map Server parser. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h index 7df7f123c4..295fff8a0a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeDoubleTapDragDelegate.h @@ -16,7 +16,7 @@ */ #import -#import +#import // Sent out when the double tap delegate takes control #define kGlobeDoubleTapDragDidStart @"WKGlobeDoubleTapDragStarted" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h index f326c3ed28..09cf3ebd09 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/GlobeTiltDelegate.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import // The tilt delegate handle the 3D camera tilt @interface WhirlyGlobeTiltDelegate : NSObject diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h index 5986f3848b..1957e103f4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/Maply3dTouchPreviewDelegate.h @@ -8,7 +8,7 @@ #import #import -#import +#import @class MaplyBaseInteractionLayer; @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h index 45329e17c5..963d1088fa 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDelegate.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import @interface MaplyDoubleTapDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h index 5e55d23a1b..53b4233da1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyDoubleTapDragDelegate.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import @interface MaplyDoubleTapDragDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h index 01c0b9e3ab..06c35b2000 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyPinchDelegate.h @@ -16,7 +16,7 @@ * limitations under the License. */ -#import +#import @interface MaplyPinchDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h index 34589f1a22..2acf07776c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTapDelegate.h @@ -17,7 +17,7 @@ */ #import -#import +#import /** Maply tap gesture delegate responds to a tap by sending out a notification. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h index ad373c846d..0e8fe6e1b8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/gestures/MaplyTwoFingerTapDelegate.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import @interface MaplyTwoFingerTapDelegate : MaplyZoomGestureDelegate diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h index e57a3d25a1..22bd915d2a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h @@ -9,7 +9,7 @@ #ifndef GeographicLib_Wrapper_h #define GeographicLib_Wrapper_h -#import +#import typedef struct GeoLibInv_t { double distance; // meters diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h index 2f05d3848d..65a43740b5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyGeomBuilder.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** Geometry State is used to describe the visual look of objects as they're added. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h index e6f545a4dd..7e19b44763 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyIconManager.h @@ -19,7 +19,7 @@ */ #import -#import +#import /** Holds info about a single style from the MaplySimpleStyleManager. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h index d759183fe7..76e6ebc0a8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/MaplyLocationTracker.h @@ -20,7 +20,7 @@ #import #import -#import +#import #define LOC_TRACKER_POS_MARKER_SIZE 32 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h index 55c1446d0b..ff801729dd 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/GeoJSONSource.h @@ -17,7 +17,7 @@ */ #import -#import +#import #define GEOJSON_MAX_POINTS 4096 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h index a1a99033fc..808634df4c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyImageTile.h @@ -19,7 +19,7 @@ */ #import -#import +#import @class MaplyElevationChunk; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h index b1da668424..b4fea4ce55 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageFrameLoader.h @@ -17,8 +17,8 @@ * */ -#import -#import +#import +#import @class MaplyQuadImageFrameLoader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h index b524401a7e..d5b346d5e6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadImageLoader.h @@ -17,13 +17,13 @@ * */ -#import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import +#import /** This version of the loader return is used by the MaplyImageLoaderInterpreter. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h index 3ef22cd6ec..65ad61fe40 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h @@ -18,12 +18,12 @@ */ #import -#import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import +#import @class MaplyQuadLoaderBase; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h index e08a04d066..18d8b18680 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadPagingLoader.h @@ -17,7 +17,7 @@ * */ -#import +#import /** This version of the loader return is used by the MaplyQuadPagingLoader. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h index 2f9ec391e2..5381a95c32 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadSampler.h @@ -18,10 +18,10 @@ * */ -#import -#import -#import -#import +#import +#import +#import +#import /** Sampling parameters. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h index 32dba80280..cc26370548 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyRemoteTileFetcher.h @@ -18,8 +18,8 @@ * */ -#import -#import +#import +#import /** Remote Tile Info Object (New) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h index f500c6874a..78307c28d4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplySimpleTileFetcher.h @@ -18,7 +18,7 @@ * */ -#import +#import /** Simple Tile Fetcher is meant for sub classing. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h index 81000071ce..8c5bcd06f3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyTileSourceNew.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** This represents the indentifier for a unique tile in the pyramid. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h index d1c01e8a6d..753b77e74e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h @@ -35,7 +35,7 @@ typedef struct } MaplyCoordinate; -static const MaplyCoordinate kMaplyNullCoordinate = {.x = FLT_MIN, .y = FLT_MIN}; +extern const MaplyCoordinate kMaplyNullCoordinate; /** @@ -49,7 +49,7 @@ typedef struct double x,y; } MaplyCoordinateD; -static const MaplyCoordinateD kMaplyNullCoordinateD = {.x = DBL_MIN, .y = DBL_MIN}; +extern const MaplyCoordinateD kMaplyNullCoordinateD; /** @@ -84,7 +84,7 @@ typedef struct double x,y,z; } MaplyCoordinate3dD; -static const MaplyCoordinate3dD kMaplyNullCoordinate3dD = {.x = DBL_MIN, .y = DBL_MIN, .z = DBL_MIN}; +extern const MaplyCoordinate3dD kMaplyNullCoordinate3dD; /** An NSObject based wrapper for 3D coordinates. @@ -112,10 +112,7 @@ typedef struct MaplyCoordinate ur; } MaplyBoundingBox; -static const MaplyBoundingBox kMaplyNullBoundingBox = { - .ll = {.x = FLT_MIN, .y = FLT_MIN}, - .ur = {.x = FLT_MIN, .y = FLT_MIN} -}; +extern const MaplyBoundingBox kMaplyNullBoundingBox; /** A category that uses NSValue to store MaplyCoordinate data @@ -152,10 +149,7 @@ typedef struct MaplyCoordinateD ur; } MaplyBoundingBoxD; -static const MaplyBoundingBoxD kMaplyNullBoundingBoxD = { - .ll = {.x = DBL_MIN, .y = DBL_MIN}, - .ur = {.x = DBL_MIN, .y = DBL_MIN} -}; +extern const MaplyBoundingBoxD kMaplyNullBoundingBoxD; #if __cplusplus extern "C" { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h index 6778bd3e30..d1ddf69678 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinateSystem.h @@ -17,7 +17,7 @@ */ #import -#import +#import /** Coordinate system for tiling systems and data sources and such. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h index 39b882ff87..8b79f7b42e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/WGCoordinate.h @@ -18,7 +18,7 @@ * */ -#import +#import /// WhirlyGlobe just takes geo coordinates. /// This contains lon and lat values in the x and y fields. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h index 5952ad8fd6..4e2f19dfad 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeRotateDelegate_private.h @@ -17,7 +17,7 @@ */ #import -#import +#import namespace WhirlyGlobe { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h index e78753f7c9..ed55914bbd 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/GlobeTiltDelegate_private.h @@ -16,9 +16,10 @@ */ #import -#import -#import -#import +#import +#import +#import +#import "GlobeAnimateHeight.h" // Sent out when the tilt delegate takes control #define kTiltDelegateDidStart @"WKTiltDelegateStarted" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MapboxVectorTiles_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MapboxVectorTiles_private.h index c3d6c600ce..20da82b554 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MapboxVectorTiles_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MapboxVectorTiles_private.h @@ -19,7 +19,7 @@ */ #import "vector_tiles/MapboxVectorTiles.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyVectorTileData() { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyActiveObject_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyActiveObject_private.h index 02250d9fd5..5bb04e5de9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyActiveObject_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyActiveObject_private.h @@ -19,7 +19,7 @@ */ #import "control/MaplyActiveObject.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "control/MaplyBaseViewController.h" // Fill in the Active Model protocol from the API diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyCoordinateSystem_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyCoordinateSystem_private.h index 4f4829bd38..76ab6a171c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyCoordinateSystem_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyCoordinateSystem_private.h @@ -20,7 +20,7 @@ #import "math/MaplyCoordinateSystem.h" #import "math/MaplyCoordinate.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyCoordinateSystem() { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h index 9c91ded5d2..fce229b2c6 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDelegate_private.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import @interface MaplyDoubleTapDelegate () diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h index cc666aa37e..432e00d346 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyDoubleTapDragDelegate_private.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#import +#import // Sent out when the double tap delegate takes control #define kMaplyDoubleTapDragDidStart @"WKMaplyDoubleTapDragStarted" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyImageTile_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyImageTile_private.h index ea4830ecef..13bf6e4435 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyImageTile_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyImageTile_private.h @@ -19,7 +19,7 @@ */ #import "loading/MaplyImageTile.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "ImageTile_iOS.h" @interface MaplyImageTile() diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h index da143e1329..a223a8e538 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPanDelegate_private.h @@ -18,7 +18,7 @@ #import #import "MaplyPanDelegate.h" -#import +#import #import // Sent out when the pan delegate takes control diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyParticleSystem_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyParticleSystem_private.h index 9b902a0933..a9f25a5a90 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyParticleSystem_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyParticleSystem_private.h @@ -20,7 +20,7 @@ #import #import "visual_objects/MaplyParticleSystem.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h index f15e567878..cd5de9a77e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyPinchDelegate_private.h @@ -16,7 +16,7 @@ * limitations under the License. */ -#import +#import #import "MapView_iOS.h" @interface MaplyPinchDelegate () diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadSampler_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadSampler_private.h index d364d6c488..97a98c810f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadSampler_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadSampler_private.h @@ -18,7 +18,7 @@ * */ -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "loading/MaplyQuadSampler.h" #import "QuadTileBuilder.h" #import "QuadDisplayLayerNew.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderTarget_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderTarget_private.h index f85ce0541b..fbd312ed4a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderTarget_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderTarget_private.h @@ -20,7 +20,7 @@ #import "rendering/MaplyRenderTarget.h" #import "MaplyRenderController_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyRenderTarget() diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h index 4e5983fa96..678f0ab4f7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRotateDelegate_private.h @@ -17,7 +17,7 @@ */ #import -#import +#import "MapView_iOS.h" namespace Maply { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyShape_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyShape_private.h index c4e31ae238..67df3a3afb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyShape_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyShape_private.h @@ -19,7 +19,7 @@ */ #import "visual_objects/MaplyShape.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyShapeCircle() diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h index 255f38b750..96794a7e51 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTapMessage_private.h @@ -17,8 +17,8 @@ */ #import -#import -#import +#import +#import /// This is the notification you get for a tap on the map #define MaplyTapMsg @"MaplyTap" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTexture_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTexture_private.h index 496c797468..792bd43fb0 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTexture_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTexture_private.h @@ -21,7 +21,7 @@ #import #import "visual_objects/MaplyTexture.h" #import "control/MaplyRenderController.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @class MaplyBaseInteractionLayer; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h index ca0df27547..acdeab5092 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyTwoFingerTapDelegate_private.h @@ -15,8 +15,8 @@ * limitations under the License. */ -#import -#import +#import +#import @interface MaplyTwoFingerTapDelegate () diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVectorStyle_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVectorStyle_private.h index 47ec96c283..f6d6e96a7e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVectorStyle_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVectorStyle_private.h @@ -17,7 +17,7 @@ */ #import "MaplyVectorStyle.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "Dictionary_NSDictionary.h" @interface MaplyVectorStyleSettings() diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVertexAttribute_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVertexAttribute_private.h index db777d451d..e964dabefd 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVertexAttribute_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyVertexAttribute_private.h @@ -19,7 +19,7 @@ */ #import "rendering/MaplyVertexAttribute.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @interface MaplyVertexAttribute() { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h index 156c0b8a67..03293699b7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyZoomGestureDelegate_private.h @@ -18,7 +18,7 @@ #import #import "MaplyView.h" #import "SceneRenderer.h" -#import +#import #define kZoomGestureDelegateDidStart @"WKZoomDelegateStarted" // Sent out when the pan delegate finished (but hands off to momentum) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h index 3af444ffb2..f5de72d27e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** Sets up the objects and shaders to implement an atmosphere. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h index 4c83fca606..31c415f742 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyLight.h @@ -18,7 +18,7 @@ */ #import -#import +#import /** The Light provides a simple interface to basic lighting within the toolkit. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h index 82b283f671..5f6034cedb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyRenderTarget.h @@ -19,7 +19,7 @@ */ #import -#import +#import typedef NS_ENUM(NSUInteger,MaplyMipmapType) { /// Don't generate a mipmap diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h index d6ba4908f5..925982607e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyVariableTarget.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** A variable target manages two pass rendering for one type of variable. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h index acf5d30da7..1f5c9ae02e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapboxVectorStyleSet.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import typedef NS_ENUM(NSUInteger,MapboxLayerType) { MapboxLayerTypeBackground, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h index cecf6d991b..2d30fab660 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h @@ -17,8 +17,8 @@ */ #import -#import -#import +#import +#import @class MaplyVectorTileData; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h index 3543e30057..ccb309edfb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyleSimple.h @@ -17,7 +17,7 @@ */ #import -#import +#import /** Simple default style to see something in vector tile data. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h index ce3984a418..f56dd071f8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileLineStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import -#import +#import +#import /** Implementation of the line style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h index 9dac65a41f..994307e105 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileMarkerStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import -#import +#import +#import /** Implementation of the marker style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h index 509916af0e..4d9d81f296 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTilePolygonStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import -#import +#import +#import /** Implementation of the polygon style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h index c9178597b9..5f4eed2339 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileStyle.h @@ -17,7 +17,7 @@ */ #import -#import +#import /** The Maply Vector Tile Style is an internal representation of the style JSON coming out of a Maply Vector Tile database. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h index b69b826efa..59b53c3071 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorTileTextStyle.h @@ -16,8 +16,8 @@ * limitations under the License. */ -#import -#import +#import +#import /** Implementation of the text style symbolizer for Maply Vector Tiles. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h index 3f489ef3c2..22e4cf0a46 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyle.h @@ -19,7 +19,7 @@ */ #import -#import +#import @interface MapnikStyle : NSObject diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h index 0d615f5fa0..86c54e7d3d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MapnikStyleSet.h @@ -20,7 +20,7 @@ #import -#import +#import @class MaplyVectorStyleSettings; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h index 245797902f..746695e1ed 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDOperators.h @@ -7,7 +7,7 @@ // #import -#import +#import /** @brief Base class for elements of ogc:comparisonOps or ogc:logicOps. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h index 2000b20470..4e705cf63a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDStyleSet.h @@ -7,7 +7,7 @@ // #import -#import +#import /** @brief Class corresponding to the sld:NamedLayer element @see http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd for SLD v1.1.0 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h index 4eb71515f0..78e2acb961 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/SLDSymbolizers.h @@ -9,7 +9,7 @@ #import @class DDXMLNode; @class DDXMLElement; -#import +#import /** @brief Base class for Symbolizer elements @see http://schemas.opengis.net/se/1.1.0/Symbolizer.xsd for SLD v1.1.0 diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h index 622960488a..25a3417911 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorInterpreter.h @@ -20,11 +20,11 @@ #import -#import -#import -#import -#import -#import +#import +#import +#import +#import +#import @class MapboxVectorStyleSet; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h index b52cd5b799..7b4cbef9ea 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_tiles/MapboxVectorTiles.h @@ -18,10 +18,10 @@ * */ -#import -#import -#import -#import +#import +#import +#import +#import typedef NS_ENUM(NSInteger,MapboxGeometryType) { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h index 3a24e43c0d..f29eb87b15 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyBillboard.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import /** A billboard is tied to a specific point, but rotates to face the user. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h index aea79cf3c5..d874bb368e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyCluster.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h index 82a3db9b5b..7e41021106 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyGeomModel.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import @class MaplyShader; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h index 38af6a760b..ddd52a227b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyLabel.h @@ -19,7 +19,7 @@ */ #import -#import +#import typedef NS_ENUM(NSInteger, MaplyLabelJustify) { MaplyLabelJustifyLeft, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h index 04d5e598a0..ea31c2d195 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMarker.h @@ -19,7 +19,7 @@ */ #import -#import +#import /** The Marker places a UIImage on the globe or map at a given location. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h index f55f616257..ee967b817d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h @@ -17,9 +17,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** Utility for calculating moon position. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h index ac92b21794..b5f603cf32 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import typedef NS_ENUM(NSInteger, MaplyParticleSystemType) { MaplyParticleSystemTypePoint, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h index ee59f356a9..2b2e6fd6cb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyPoints.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** The Maply Points object is used to add a large number of static points to the scene. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h index 3893d2f95a..f0c00e6cec 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenLabel.h @@ -19,7 +19,7 @@ */ #import -#import +#import @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h index 3481876d5c..8ed1babe0a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenMarker.h @@ -17,7 +17,7 @@ */ #import -#import +#import @class MaplyVectorObject; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h index 48028ae378..477974686d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyScreenObject.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import /** The Maply Screen Object is used to build up a more complex screen object from multiple pieces. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h index baed55f882..51dc1eb6c9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyShape.h @@ -19,9 +19,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** Maply Shape is the base class for the actual shape objects. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h index 951afbcf49..0cbf7aa0b4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyStarsModel.h @@ -17,8 +17,8 @@ */ #import -#import -#import +#import +#import /** The Stars Model parses and then displays a star field. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h index 91e886b837..5ccf386bfb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySticker.h @@ -19,8 +19,8 @@ */ #import -#import -#import +#import +#import /** Stickers are rectangles placed on the globe with an image. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h index c106a090c8..a7722ebcc8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h @@ -17,9 +17,9 @@ */ #import -#import -#import -#import +#import +#import +#import /** Utility for calculating sun position and shading info. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h index e85aeb429b..80b2ca4154 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyVectorObject.h @@ -18,8 +18,8 @@ #import #import -#import -#import +#import +#import @class MaplyBaseViewController; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyAnnotation.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyAnnotation.mm index aeb32bae9a..27233fd6cf 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyAnnotation.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyAnnotation.mm @@ -19,7 +19,7 @@ */ #import "MaplyAnnotation_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" @implementation MaplyAnnotation diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/data_sources/MaplyMBTileFetcher.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/data_sources/MaplyMBTileFetcher.mm index 0a6bd8cb5a..9c5195c238 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/data_sources/MaplyMBTileFetcher.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/data_sources/MaplyMBTileFetcher.mm @@ -18,7 +18,7 @@ #import "data_sources/MaplyMBTileFetcher.h" #import "MaplyCoordinateSystem_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "sqlhelpers.h" using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift index 05459f88bd..c49506729a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift @@ -7,6 +7,7 @@ // import UIKit +import WhirlyGlobe /** Convenience class for loading a Mapbox-style vector tiles-probably kinda map. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MaplyQuadSampler.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MaplyQuadSampler.mm index 5d0c72d6c1..860d548c42 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MaplyQuadSampler.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MaplyQuadSampler.mm @@ -21,7 +21,7 @@ #import "MaplyQuadSampler_private.h" #import "MaplyCoordinateSystem_private.h" #import "MaplyBaseViewController_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyImageTile.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyImageTile.mm index 12d7a242de..fb49305710 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyImageTile.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyImageTile.mm @@ -21,7 +21,7 @@ #import "loading/MaplyImageTile.h" #import "MaplyImageTile_private.h" #import "MaplyRenderController_private.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm index 2fc20bcb41..b4fed5f119 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm @@ -19,7 +19,7 @@ */ #import "MaplySimpleTileFetcher.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm index 2683bc9519..6368d3e80f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm @@ -21,6 +21,12 @@ using namespace WhirlyKit; +const MaplyCoordinate kMaplyNullCoordinate = {.x = FLT_MIN, .y = FLT_MIN}; +const MaplyCoordinateD kMaplyNullCoordinateD = {.x = DBL_MIN, .y = DBL_MIN}; +const MaplyCoordinate3dD kMaplyNullCoordinate3dD = {.x = DBL_MIN, .y = DBL_MIN, .z = DBL_MIN}; +const MaplyBoundingBox kMaplyNullBoundingBox = { .ll = {.x = FLT_MIN, .y = FLT_MIN}, .ur = {.x = FLT_MIN, .y = FLT_MIN} }; +const MaplyBoundingBoxD kMaplyNullBoundingBoxD = { .ll = {.x = DBL_MIN, .y = DBL_MIN}, .ur = {.x = DBL_MIN, .y = DBL_MIN} }; + MaplyCoordinate MaplyCoordinateMake(float radLon,float radLat) { return { radLon, radLat }; } MaplyCoordinateD MaplyCoordinateDMake(double radLon,double radLat) { return { radLon, radLat }; } MaplyCoordinate MaplyCoordinateMakeWithDegrees(float degLon,float degLat) { return { DegToRad(degLon), DegToRad(degLat) }; } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/math/WGCoordinate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/math/WGCoordinate.mm index bfe632ed66..5f470ab808 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/math/WGCoordinate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/math/WGCoordinate.mm @@ -1,5 +1,4 @@ -/* - * WGCoordinate.m +/* WGCoordinate.mm * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 9/17/12. @@ -15,12 +14,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import "WGCoordinate.h" -#import "math/MaplyCoordinate.h" -#import +#import +#import +#import "WhirlyGlobe_iOS.h" using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorInterpreter.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorInterpreter.mm index 3618ee2ba0..9c767e92af 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorInterpreter.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorInterpreter.mm @@ -35,7 +35,7 @@ #include #import -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "vector_styles/MaplyVectorStyle.h" #import "private/MaplyVectorStyle_private.h" #import "MaplyVectorObject_private.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm index 2e6221b327..d13b457931 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm @@ -21,7 +21,7 @@ #import "private/MapboxVectorTiles_private.h" #import "private/MaplyVectorObject_private.h" #import "helpers/MaplyTextureBuilder.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplyTexture_private.h" #import "Dictionary_NSDictionary.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorTileStyle.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorTileStyle.mm index 885d434a3b..ef64791279 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorTileStyle.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorTileStyle.mm @@ -21,7 +21,7 @@ #import "vector_styles/MaplyVectorTileMarkerStyle.h" #import "vector_styles/MaplyVectorTilePolygonStyle.h" #import "vector_styles/MaplyVectorTileTextStyle.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "control/MaplyBaseViewController.h" using namespace WhirlyKit; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDStyleSet.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDStyleSet.mm index df3d7e440e..f050ea7bec 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDStyleSet.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDStyleSet.mm @@ -6,7 +6,7 @@ // Copyright © 2016-2019 mousebird consulting. // -#import "vector_styles/SLDStyleSet.h" +#import #import "vector_styles/SLDExpressions.h" #import "vector_styles/SLDOperators.h" #import "vector_styles/SLDSymbolizers.h" diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMarker.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMarker.mm index 89ddcedbbc..f7a325ab73 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMarker.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMarker.mm @@ -1,5 +1,4 @@ -/* - * WGMarker.m +/* MaplyMarker.mm * WhirlyGlobeComponent * * Created by Steve Gifford on 7/24/12. @@ -15,10 +14,9 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ -#import "visual_objects/MaplyMarker.h" +#import @implementation MaplyMarker diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyShape.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyShape.mm index f7b6021ba5..e6b0c3769b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyShape.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyShape.mm @@ -19,7 +19,7 @@ */ #import "visual_objects/MaplyShape.h" -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "MaplySharedAttributes.h" #import "MaplyMatrix_private.h" #import "UIColor+Stuff.h" diff --git a/ios/library/WhirlyGlobeLib/include/ImageTile_iOS.h b/ios/library/WhirlyGlobeLib/include/ImageTile_iOS.h index 7f0e7aade3..d955d78b88 100644 --- a/ios/library/WhirlyGlobeLib/include/ImageTile_iOS.h +++ b/ios/library/WhirlyGlobeLib/include/ImageTile_iOS.h @@ -18,7 +18,7 @@ * */ -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "SceneRenderer.h" namespace WhirlyKit diff --git a/ios/library/WhirlyGlobeLib/include/ScreenObject_iOS.h b/ios/library/WhirlyGlobeLib/include/ScreenObject_iOS.h index 953e6a1973..e8e7c8edc7 100644 --- a/ios/library/WhirlyGlobeLib/include/ScreenObject_iOS.h +++ b/ios/library/WhirlyGlobeLib/include/ScreenObject_iOS.h @@ -18,7 +18,7 @@ * */ -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import namespace WhirlyKit diff --git a/ios/library/WhirlyGlobeLib/include/WhirlyGlobe_iOS.h b/ios/library/WhirlyGlobeLib/include/WhirlyGlobe_iOS.h index efc5619d90..216abaf63f 100644 --- a/ios/library/WhirlyGlobeLib/include/WhirlyGlobe_iOS.h +++ b/ios/library/WhirlyGlobeLib/include/WhirlyGlobe_iOS.h @@ -18,7 +18,7 @@ * */ -#import "WhirlyGlobe.h" +#import "WhirlyGlobeLib.h" #import "Dictionary_NSDictionary.h" #import "RawData_NSData.h" From dc99b2a9509dd1c1056e650ffb203a35681c5b7a Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 31 Jan 2022 15:58:34 -0800 Subject: [PATCH 10/78] Fix Android build --- .../maply/WhirlyGlobeLib/include/SceneRenderer_Android.h | 2 +- android/library/maply/jni/include/classInfo/Maply_jni.h | 2 +- common/WhirlyGlobeLib/src/WideVectorDrawableBuilderGLES.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/library/maply/WhirlyGlobeLib/include/SceneRenderer_Android.h b/android/library/maply/WhirlyGlobeLib/include/SceneRenderer_Android.h index c62f2ac32b..b11e076335 100644 --- a/android/library/maply/WhirlyGlobeLib/include/SceneRenderer_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/SceneRenderer_Android.h @@ -19,7 +19,7 @@ */ #import "Maply_jni.h" -#import +#import "WhirlyGlobeLib.h" namespace WhirlyKit { diff --git a/android/library/maply/jni/include/classInfo/Maply_jni.h b/android/library/maply/jni/include/classInfo/Maply_jni.h index 0210fa497d..faad7ccd5b 100644 --- a/android/library/maply/jni/include/classInfo/Maply_jni.h +++ b/android/library/maply/jni/include/classInfo/Maply_jni.h @@ -23,7 +23,7 @@ #import #import #import -#import +#import #import #import diff --git a/common/WhirlyGlobeLib/src/WideVectorDrawableBuilderGLES.cpp b/common/WhirlyGlobeLib/src/WideVectorDrawableBuilderGLES.cpp index 1f7ef62fb6..d96c4eba2d 100644 --- a/common/WhirlyGlobeLib/src/WideVectorDrawableBuilderGLES.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorDrawableBuilderGLES.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#import +#import #import #import From 302cc4c5008d78119c437a1108d7c3dd543e5e7d Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 2 Feb 2022 08:44:34 -0800 Subject: [PATCH 11/78] Fix incorrect use of font texture manager --- common/WhirlyGlobeLib/include/ComponentManager.h | 1 - common/WhirlyGlobeLib/src/ComponentManager.cpp | 16 +++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/WhirlyGlobeLib/include/ComponentManager.h b/common/WhirlyGlobeLib/include/ComponentManager.h index 5ef6dd5af1..943a30859d 100644 --- a/common/WhirlyGlobeLib/include/ComponentManager.h +++ b/common/WhirlyGlobeLib/include/ComponentManager.h @@ -196,7 +196,6 @@ class ComponentManager : public SceneManager LoftManagerRef loftManager; BillboardManagerRef billManager; GeometryManagerRef geomManager; - FontTextureManagerRef fontTexManager; ParticleSystemManagerRef partSysManager; protected: diff --git a/common/WhirlyGlobeLib/src/ComponentManager.cpp b/common/WhirlyGlobeLib/src/ComponentManager.cpp index fcc5d75c12..34386986a2 100644 --- a/common/WhirlyGlobeLib/src/ComponentManager.cpp +++ b/common/WhirlyGlobeLib/src/ComponentManager.cpp @@ -82,7 +82,6 @@ void ComponentManager::setScene(Scene *scene) loftManager = scene ? scene->getManager(kWKLoftedPolyManager) : nullptr; billManager = scene ? scene->getManager(kWKBillboardManager) : nullptr; geomManager = scene ? scene->getManager(kWKGeometryManager) : nullptr; - fontTexManager = scene ? scene->getFontTextureManager() : nullptr; partSysManager = scene ? scene->getManager(kWKParticleSystemManager) : nullptr; } @@ -242,13 +241,16 @@ void ComponentManager::removeComponentObjects(PlatformThreadInfo *threadInfo, geomManager->removeGeometry(compObj->geomIDs, changes); if (!compObj->drawStringIDs.empty()) { - // Giving the fonts 2s to stick around - // This avoids problems with texture being paged out. - // Without this we lose the textures before we're done with them - const TimeInterval when = scene->getCurrentTime() + 2.0; - for (SimpleIdentity dStrID : compObj->drawStringIDs) + if (const auto ftm = scene ? scene->getFontTextureManager() : nullptr) { - fontTexManager->removeString(threadInfo, dStrID, changes, when); + // Giving the fonts 2s to stick around + // This avoids problems with texture being paged out. + // Without this we lose the textures before we're done with them + const TimeInterval when = scene->getCurrentTime() + 2.0; + for (SimpleIdentity dStrID : compObj->drawStringIDs) + { + ftm->removeString(threadInfo, dStrID, changes, when); + } } } for (const auto partSysID : compObj->partSysIDs) From 5f5bdb48453b10f1aa02afa69386647ab6a890c6 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 2 Feb 2022 13:40:13 -0800 Subject: [PATCH 12/78] Move some calculation from the fragment to the vertex shader --- .../WhirlyGlobeLib/src/TriangleShadersGLES.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/common/WhirlyGlobeLib/src/TriangleShadersGLES.cpp b/common/WhirlyGlobeLib/src/TriangleShadersGLES.cpp index bf8dcc7961..7c5538ab4c 100644 --- a/common/WhirlyGlobeLib/src/TriangleShadersGLES.cpp +++ b/common/WhirlyGlobeLib/src/TriangleShadersGLES.cpp @@ -538,8 +538,7 @@ attribute vec3 a_normal; varying mediump vec2 v_texCoord0; varying mediump vec2 v_texCoord1; varying mediump vec4 v_color; -varying mediump vec3 v_adjNorm; -varying mediump vec3 v_lightDir; +varying float v_ndotl; void main() { @@ -554,8 +553,9 @@ void main() v_texCoord1 = a_texCoord0; v_color = a_color; - v_adjNorm = light[0].viewdepend > 0.0 ? normalize((u_mvpMatrix * vec4(a_normal.xyz, 0.0)).xyz) : a_normal.xzy; - v_lightDir = (u_numLights > 0) ? light[0].direction : vec3(1,0,0); + vec3 adjNorm = light[0].viewdepend > 0.0 ? normalize((u_mvpMatrix * vec4(a_normal.xyz, 0.0)).xyz) : a_normal.xzy; + vec3 lightDir = (u_numLights > 0) ? light[0].direction : vec3(1,0,0); + v_ndotl = pow(max(0.0, dot(adjNorm, lightDir)), 0.5); v_color = vec4(light[0].ambient.xyz * material.ambient.xyz * a_color.xyz + light[0].diffuse.xyz * a_color.xyz,a_color.a) * u_fade; gl_Position = u_mvpMatrix * vec4(a_position,1.0); @@ -571,18 +571,14 @@ uniform sampler2D s_baseMap1; varying vec2 v_texCoord0; varying vec2 v_texCoord1; varying vec4 v_color; -varying vec3 v_adjNorm; -varying vec3 v_lightDir; +varying float v_ndotl; void main() { - float ndotl = max(0.0, dot(v_adjNorm, v_lightDir)); - ndotl = pow(ndotl,0.5); - // Note: Put the color back vec4 baseColor0 = texture2D(s_baseMap0, v_texCoord0); vec4 baseColor1 = texture2D(s_baseMap1, v_texCoord1); - gl_FragColor = mix(baseColor0,baseColor1,1.0-ndotl); + gl_FragColor = mix(baseColor0,baseColor1,1.0-v_ndotl); } )"; From 81e3d38d5944995f44d46b943179b1258954ba23 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 2 Feb 2022 13:47:57 -0800 Subject: [PATCH 13/78] Get the sun/stars test case to not crash --- .../src/visual_objects/MaplyStarsModel.mm | 2 +- ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyStarsModel.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyStarsModel.mm index 387f7d1d6b..6f07a16025 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyStarsModel.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyStarsModel.mm @@ -130,7 +130,7 @@ - (bool)addToViewC:(WhirlyGlobeViewController *)inViewC date:(NSDate *)date desc [partSys addTexture:starTex]; [partSys addAttribute:@"a_position" type:MaplyShaderAttrTypeFloat3]; [partSys addAttribute:@"a_size" type:MaplyShaderAttrTypeFloat]; - partSysObj = [inViewC addParticleSystem:partSys desc:desc mode:mode]; + //partSysObj = [inViewC addParticleSystem:partSys desc:desc mode:mode]; // Data arrays for particles // We'll clear them out in case we don't fill them out completely diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 805550a746..5f86159665 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1230,7 +1230,8 @@ struct VertexOut { }; vertex VertexOut vertStars(constant VertexIn* vertex_array [[ buffer(0) ]], - unsigned int vid [[ vertex_id ]]) { + unsigned int vid [[ vertex_id ]], + constant VertexArgBufferA & vertArgs [[buffer(WKSVertexArgBuffer)]]) { VertexIn v = vertex_array[vid]; VertexOut outVertex = VertexOut(); outVertex.computedPosition = float4(v.a_position, 1.0); From 1d2c133f781a0d251c9dfff73120ebb6ecaf2ad1 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 2 Feb 2022 13:48:32 -0800 Subject: [PATCH 14/78] Implement the night/day multi-texture shader --- .../include/DefaultShadersMTL.h | 8 ++ .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 83 ++++++++++++++++++- 2 files changed, 87 insertions(+), 4 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h index 9104cea9b4..ecb3ceab45 100644 --- a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h +++ b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h @@ -361,6 +361,14 @@ struct ProjVertexTriB { float2 texCoord1; }; +struct ProjVertexTriNightDay { + float4 position [[invariant]] [[position]]; + float4 color; + float2 texCoord0; + float2 texCoord1; + float ndotl; +}; + /** Wide Vector Shaders These work to build/render objects in 2D space, but based diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 5f86159665..b38d96a8b5 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -537,10 +537,11 @@ vertex ProjVertexTriB vertexTri_multiTex( } // Fragment shader that handles to two textures -fragment float4 fragmentTri_multiTex(ProjVertexTriB vert [[stage_in]], - constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], - constant FragTriArgBufferB & fragArgs [[buffer(WKSFragmentArgBuffer)]], - constant RegularTextures & texArgs [[buffer(WKSFragTextureArgBuffer)]]) +fragment float4 fragmentTri_multiTex( + ProjVertexTriB vert [[stage_in]], + constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], + constant FragTriArgBufferB & fragArgs [[buffer(WKSFragmentArgBuffer)]], + constant RegularTextures & texArgs [[buffer(WKSFragTextureArgBuffer)]]) { int numTextures = TexturesBase(texArgs.texPresent); @@ -559,6 +560,80 @@ fragment float4 fragmentTri_multiTex(ProjVertexTriB vert [[stage_in]], } } +vertex ProjVertexTriNightDay vertexTri_multiTex_nightDay( + VertexTriB vert [[stage_in]], + constant Uniforms &uniforms [[ buffer(WKSVertUniformArgBuffer) ]], + constant Lighting &lighting [[ buffer(WKSVertLightingArgBuffer) ]], + constant VertexTriArgBufferB & vertArgs [[buffer(WKSVertexArgBuffer)]], + constant RegularTextures & texArgs [[buffer(WKSVertTextureArgBuffer)]]) +{ + ProjVertexTriNightDay outVert; + + const float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; + if (vertArgs.uniDrawState.clipCoords) + outVert.position = float4(vertPos,1.0); + else { + const float4 v = vertArgs.uniDrawState.singleMat * float4(vert.position,1.0); + outVert.position = uniforms.pMatrix * (uniforms.mvMatrix * v + uniforms.mvMatrixDiff * v); + } + + outVert.color = resolveLighting(vertPos, vert.normal, float4(vert.color), + lighting, uniforms.mvpMatrix) * + calculateFade(uniforms,vertArgs.uniDrawState); + //outVert.color = float4(1,1,1,1); + + // Handle the various texture coordinate input options (none, 1, or 2) + const int numTextures = TexturesBase(texArgs.texPresent); + if (numTextures == 0) { + outVert.texCoord0 = float2(0.0,0.0); + outVert.texCoord1 = float2(0.0,0.0); + } else if (numTextures == 1) { + outVert.texCoord0 = resolveTexCoords(vert.texCoord0,texArgs,0); + outVert.texCoord1 = outVert.texCoord0; + } else { + outVert.texCoord0 = resolveTexCoords(vert.texCoord0,texArgs,0); + outVert.texCoord1 = resolveTexCoords(vert.texCoord0,texArgs,1); + } + + float3 adjNorm = vert.normal; + float3 lightDir = float3(1,0,0); + if (lighting.numLights > 0) { + const constant thread Light &light = lighting.lights[0]; + if (light.viewDepend) { + adjNorm = normalize((uniforms.mvpMatrix * float4(vert.normal.xyz, 0.0)).xyz); + } else { + adjNorm = vert.normal.xzy; + } + lightDir = light.direction; + } + outVert.ndotl = pow(max(0.0, dot(adjNorm, lightDir)), 0.5); + + return outVert; +} + +fragment float4 fragmentTri_multiTex_nightDay( + ProjVertexTriNightDay vert [[stage_in]], + constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], + constant FragTriArgBufferB & fragArgs [[buffer(WKSFragmentArgBuffer)]], + constant RegularTextures & texArgs [[buffer(WKSFragTextureArgBuffer)]]) +{ + int numTextures = TexturesBase(texArgs.texPresent); + + // Handle none, 1 or 2 textures + if (numTextures == 0) { + return vert.color; + } else if (numTextures == 1) { + constexpr sampler sampler2d(coord::normalized, filter::linear); + return vert.color * texArgs.tex[0].sample(sampler2d, vert.texCoord0); + } else { + // Note: There are times we may not want to reuse the same texture coordinates + constexpr sampler sampler2d(coord::normalized, filter::linear); + float4 color0 = texArgs.tex[0].sample(sampler2d, vert.texCoord0); + float4 color1 = texArgs.tex[1].sample(sampler2d, vert.texCoord0); + return vert.color * mix(color0,color1, 1.0 - vert.ndotl); + } +} + // Fragment shader that handles two textures and does a ramp lookup fragment float4 fragmentTri_multiTexRamp(ProjVertexTriB vert [[stage_in]], constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], From 9b0b7e9a55321686081d525b5da786bb634c0fff Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 2 Feb 2022 13:58:24 -0800 Subject: [PATCH 15/78] Get the day/night part of the sun and stars case working --- .../testCases/StarsSunTestCase.swift | 138 ++++++++++++----- .../control/WhirlyGlobeViewController.h | 5 + .../include/math/MaplyCoordinate.h | 2 + .../include/visual_objects/MaplyMoon.h | 18 ++- .../visual_objects/MaplyParticleSystem.h | 2 +- .../include/visual_objects/MaplySun.h | 15 +- .../src/control/MaplyRenderController.mm | 145 +++++++++--------- .../src/control/WhirlyGlobeViewController.mm | 5 + .../src/math/MaplyCoordinate.mm | 1 + .../src/visual_objects/MaplyMoon.mm | 65 ++++++-- .../src/visual_objects/MaplySun.mm | 70 ++++++--- 11 files changed, 306 insertions(+), 160 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift index 4f6eb531dd..9e840f80f4 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift @@ -12,9 +12,6 @@ import WhirlyGlobe class StarsSunTestCase: MaplyTestCase { override init() { - self.renderDate = Date() - self.sun = MaplySun(date: renderDate) - self.moon = MaplyMoon(date: renderDate) super.init(name: "Stars/Sun (broken)", supporting: [.globe]) } @@ -29,20 +26,27 @@ class StarsSunTestCase: MaplyTestCase { kMaplyEnable: true, kMaplyPointSize: 10, ] as [String : Any]; - stars.add(toViewC: globeVC, date: renderDate, desc: desc, mode: MaplyThreadMode.current) + stars.add(toViewC: globeVC, date: renderDate, desc: desc, mode: MaplyThreadMode.current) return stars } return nil } - func addSun(_ globeVC: WhirlyGlobeViewController) -> MaplyComponentObject? { - globeVC.clearLights() - globeVC.add(sun.makeLight()) - + func addSun(_ globeVC: WhirlyGlobeViewController, + _ sun: MaplySun, + ambient: Float = 0.1, + diffuse: Float = 0.8) -> MaplyComponentObject? { + + if let light = sun.makeLight(withAmbient: ambient, diffuse: diffuse) { + globeVC.add(light) + } + let bill = MaplyBillboard() - let centerGeo = sun.asPosition() + let centerGeo = sun.position + let maxDistRad = 5.0 // 0.9 * globeVC.getMaxHeightAboveGlobe() // need to compute from max view height... + let distance = maxDistRad * 6371009 // actually about 23,000 Earth radii - bill.center = MaplyCoordinate3dMake(centerGeo.x, centerGeo.y, 5.4*6371000) + bill.center = MaplyCoordinate3dMake(centerGeo.x, centerGeo.y, Float(distance)) bill.selectable = false bill.screenObj = MaplyScreenObject() @@ -51,37 +55,50 @@ class StarsSunTestCase: MaplyTestCase { return globeVC.addBillboards([bill], desc: [ + kMaplyEnable: false, kMaplyBillboardOrient: kMaplyBillboardOrientEye, kMaplyDrawPriority: NSNumber(value: kMaplySunDrawPriorityDefault as Int32) ], - mode: MaplyThreadMode.any) + mode: MaplyThreadMode.current) } - func addMoon(_ globeVC: WhirlyGlobeViewController) -> MaplyComponentObject? { - let centerGeoMoon = moon.asPosition() + func addMoon(_ globeVC: WhirlyGlobeViewController, + _ moon: MaplyMoon, + ambient: Float = 0.0, + diffuse: Float = 0.1) -> MaplyComponentObject? { + + let frac = Float(moon.illuminatedFraction) + if let light = moon.makeLight(withAmbient: ambient * frac, diffuse: diffuse * frac) { + globeVC.add(light) + } + + let centerGeoMoon = moon.position + let distance = 4.0 * 6371009 // actually about 58 Earth radii let billMoon = MaplyBillboard() - billMoon.center = MaplyCoordinate3dMake(centerGeoMoon.x, centerGeoMoon.y, 5.4*6371000) + billMoon.center = MaplyCoordinate3dMake(centerGeoMoon.x, centerGeoMoon.y, Float(distance)) billMoon.selectable = false billMoon.screenObj = MaplyScreenObject() let moonImage = UIImage(named: "moon") let moonColor = CGFloat(moon.illuminatedFraction * 0.9 + 0.1) // don't actually go to zero billMoon.screenObj?.addImage(moonImage, color: UIColor(white: moonColor, alpha: 1.0), - size: CGSize(width: 0.75, height: 0.75)) + size: CGSize(width: 0.5, height: 0.5)) return globeVC.addBillboards([billMoon], desc: [ + kMaplyEnable: false, kMaplyBillboardOrient: kMaplyBillboardOrientEye, kMaplyDrawPriority: NSNumber(value: kMaplyMoonDrawPriorityDefault as Int32) ], - mode: MaplyThreadMode.any) + mode: MaplyThreadMode.current) } - func addAtmosphere(_ globeVC: WhirlyGlobeViewController) -> MaplyAtmosphere? { + func addAtmosphere(_ globeVC: WhirlyGlobeViewController, + _ sun: MaplySun) -> MaplyAtmosphere? { // And some atmosphere, because the iDevice fill rate is just too fast guard let atmosObj = MaplyAtmosphere(viewC: globeVC) else { return nil } atmosObj.setWavelengthRed(0.650, green: 0.570, blue: 0.47) - atmosObj.setSunPosition(sun.getDirection()) + atmosObj.setSunPosition(sun.direction) return atmosObj } @@ -98,12 +115,7 @@ class StarsSunTestCase: MaplyTestCase { // Two tile sources, one night and one day let cacheDir = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0] - let dateFmt = DateFormatter() - dateFmt.timeZone = TimeZone(secondsFromGMT: 0) - //dateFmt.dateFormat = "yyyy-MM-dd'T'HH:00:00'Z'" - dateFmt.dateFormat = "yyyy-MM-dd" - let dateStr = dateFmt.string(from: renderDate) - + let dateStr = "2021-11-08T00:00:00Z" let layer = "VIIRS_NOAA20_CorrectedReflectance_TrueColor" let baseUrl = "http://map1.vis.earthdata.nasa.gov/wmts-webmerc/\(layer)/default/\(dateStr)/GoogleMapsCompatible_Level9/{z}/{y}/{x}.jpg" let tileSource1 = MaplyRemoteTileInfoNew( @@ -113,38 +125,77 @@ class StarsSunTestCase: MaplyTestCase { tileSource1.cacheDir = "\(cacheDir)/daytexture-\(dateStr)/" // TODO: Get the loader to respect missing tiles at the lowest levels - let lightUrl = "http://map1.vis.earthdata.nasa.gov/wmts-webmerc/VIIRS_CityLights_2012/default/2015-05-07/GoogleMapsCompatible_Level8/{z}/{y}/{x}.jpg" - let tileSource2 = MaplyRemoteTileInfoNew( - baseURL: lightUrl, - minZoom: 1, - maxZoom: 8) - tileSource2.cacheDir = "\(cacheDir)/nighttexture-2015-05-07-2/" + let nightDateStr = "2015-07-01"; + let nightUrl = "http://map1.vis.earthdata.nasa.gov/wmts-webmerc/VIIRS_CityLights_2012/default/\(nightDateStr)/GoogleMapsCompatible_Level8/{z}/{y}/{x}.jpg" + let tileSource2 = MaplyRemoteTileInfoNew(baseURL: nightUrl, minZoom: 1, maxZoom: 8) + tileSource2.cacheDir = "\(cacheDir)/nighttexture-\(nightDateStr)/" guard let imageLoader = MaplyQuadImageFrameLoader(params: sampleParams, tileInfos: [tileSource1, tileSource2], viewC: globeVC) else { return nil } imageLoader.setShader(globeVC.getShaderByName(kMaplyShaderDefaultTriNightDay)) + // This value isn't used directly, but a value between 0 and 1 is required to + // make the loader pass the tiles from both sources as textures to the shader. imageLoader.setCurrentImage(0.5) - + return imageLoader } + func setupSunAndMoon(_ globeVC: WhirlyGlobeViewController) -> MaplySun? { + guard let sun = MaplySun(date: renderDate), + let moon = MaplyMoon(date: renderDate) else { + return nil; + } + + let oldObjs = [sunObj, moonObj].compactMap { $0 } + + globeVC.clearLights() + sunObj = addSun(globeVC, sun, ambient: 0.0, diffuse: 0.5) + moonObj = addMoon(globeVC, moon, ambient: 0.0, diffuse: 0.2) + + let newObjs = [sunObj, moonObj].compactMap { $0 } + globeVC.enable(newObjs, mode: .current) + globeVC.remove(oldObjs, mode: .current) + + // Add some non-directional ambient light to make the night side visible + let light = MaplyLight() + light.ambient = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0); + light.viewDependent = false; + globeVC.add(light) + + return sun; + } + override func setUpWithGlobe(_ globeVC: WhirlyGlobeViewController) { + globeVC.clearColor = UIColor.black - atmosObj = addAtmosphere(globeVC) + + guard let sun = setupSunAndMoon(globeVC) else { return } + + atmosObj = addAtmosphere(globeVC, sun) imageLoader = turnOnNightDay(globeVC, atmosObj: atmosObj) - sunObj = addSun(globeVC) - moonObj = addMoon(globeVC) stars = addStars(globeVC) - let moonPos = moon.asPosition() - let pos = MaplyCoordinateMake(moonPos.x + Float.pi * 0.8, -moonPos.y) - globeVC.setPosition(pos, height: 3) + + // Put the terminator in view + globeVC.setPosition(MaplyCoordinateMake(sun.position.x + Float.pi * 0.3, 0.0), height: 2.0) + + // todo: use an active object to update more + timer = Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { [weak self, weak globeVC] (t) in + guard let self = self, let vc = globeVC, t.isValid else { return } + self.renderOffset = -self.startDate.timeIntervalSinceNow * self.timeFactor + _ = self.setupSunAndMoon(vc) + } } override func stop() { - if let sunObj = sunObj { baseViewController?.remove(sunObj) } + timer?.invalidate() + timer = nil + + if let vc = baseViewController { + vc.remove([sunObj, moonObj].compactMap { $0 }, mode: .current) + } + sunObj = nil - if let moonObj = moonObj { baseViewController?.remove(moonObj) } moonObj = nil atmosObj?.removeFromViewC() atmosObj = nil @@ -155,12 +206,15 @@ class StarsSunTestCase: MaplyTestCase { super.stop() } - let renderDate: Date - let sun: MaplySun + let startDate = Date() + var renderDate: Date { get { Date().addingTimeInterval(renderOffset) } } + var renderOffset: TimeInterval = 0.0 + let timeFactor = 2000.0 + var sunObj: MaplyComponentObject? - let moon: MaplyMoon var moonObj: MaplyComponentObject? var stars: MaplyStarsModel? var atmosObj: MaplyAtmosphere? var imageLoader: MaplyQuadImageFrameLoader? + var timer: Timer? } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h index f2e3b82e9e..2b0cb2417a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/WhirlyGlobeViewController.h @@ -421,6 +421,11 @@ */ - (void)setFarClipPlane:(double)farClipPlane; +/** + Get the maximum height (in radii) that will be visible, based on the current far-plane setting. + */ +- (double)getMaxHeightAboveGlobe; + /** Set the simplified tilt mode. We'll tilt toward the horizon as the user gets closer to the ground. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h index 753b77e74e..bb40620fcb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/math/MaplyCoordinate.h @@ -64,6 +64,8 @@ typedef struct float x,y,z; } MaplyCoordinate3d; +extern const MaplyCoordinate3d kMaplyNullCoordinate3d; + /** An NSObject based wrapper for 3D coordinates. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h index ee967b817d..6ed7ca0ada 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyMoon.h @@ -31,20 +31,26 @@ /** Initialize with a date. - Initialize with the given date. The moon position will correspond to that. Must be after 2000. + Initialize with the given date/time (UTC). The moon position will correspond to that. Must be after 2000. */ -- (nonnull instancetype)initWithDate:(NSDate *__nonnull)date; +- (instancetype _Nullable)initWithDate:(NSDate *__nonnull)date; /// Location on the globe where the moon would land if it fell straight down. Ouch. -- (MaplyCoordinate)asCoordinate; +@property (nonatomic, readonly) MaplyCoordinate coordinate; /// Return the location above the globe in lon/lat/distance. Yay geocentric! -- (MaplyCoordinate3d)asPosition; +@property (nonatomic, readonly) MaplyCoordinate3d position; /// Illuminated fraction of the moon -@property (readonly) double illuminatedFraction; +@property (nonatomic, readonly) double illuminatedFraction; /// Phase of the moon. -@property (readonly) double phase; +@property (nonatomic, readonly) double phase; + +/// Makes up a light that corresponds to the location at a given time +- (MaplyLight * _Nullable )makeLight; + +/// Makes up a light that corresponds to the location at a given time +- (MaplyLight * _Nullable)makeLightWithAmbient:(float)ambient diffuse:(float)diffuse; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h index b5f603cf32..ee727ba23c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplyParticleSystem.h @@ -115,7 +115,7 @@ typedef NS_ENUM(NSInteger, MaplyParticleSystemType) { The particle system needs the name for performance and debugging. The rest of the values can left to their defaults. */ -- (nonnull instancetype)initWithName:(NSString *__nonnull)name viewC:(NSObject * __nonnull)viewC; +- (nullable instancetype)initWithName:(NSString *__nonnull)name viewC:(NSObject * __nonnull)viewC; /** Add an attribute we'll be expecting in each batch. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h index a7722ebcc8..199c495e8a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/visual_objects/MaplySun.h @@ -31,17 +31,20 @@ /** Initialize with a date. - Initialize with the given date. The sun position will correspond to that. + Initialize with the given date/time (UTC). The sun position will correspond to that. */ -- (nonnull instancetype)initWithDate:(NSDate *__nonnull)date; +- (_Nullable instancetype)initWithDate:(NSDate *__nonnull)date; /// Return the vector corresponding to the sun location from the earth. -- (MaplyCoordinate3d)getDirection; +@property (nonatomic, readonly) MaplyCoordinate3d direction; + +/// Returns the location above the globe in lon/lat. Yay geocentrism! +@property (nonatomic, readonly) MaplyCoordinate3d position; /// Makes up a light that corresponds to the sun's location at a given time -- (nonnull MaplyLight *)makeLight; +- (MaplyLight * _Nullable)makeLight; -/// Returns the location above the globe in lon/lat. Yay geocentrism! -- (MaplyCoordinate3d)asPosition; +/// Makes up a light that corresponds to the sun's location at a given time +- (MaplyLight * _Nullable)makeLightWithAmbient:(float)ambient diffuse:(float)diffuse; @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm index 145aa70493..c3b386bfb8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm @@ -937,105 +937,110 @@ - (void)setupShadersMTL NSError *err = nil; id mtlLib = [mtlDevice newDefaultLibraryWithBundle:[NSBundle bundleForClass:[MaplyRenderController class]] error:&err]; - ProgramRef defaultLineShader = ProgramRef(new ProgramMTL([kMaplyShaderDefaultLine cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexLineOnly_globe"], - [mtlLib newFunctionWithName:@"fragmentLineOnly_globe"])); - ProgramRef defaultLineShaderNoBack = ProgramRef(new ProgramMTL([kMaplyShaderDefaultLineNoBackface cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexLineOnly_flat"], - [mtlLib newFunctionWithName:@"fragmentLineOnly_flat"])); - if (isGlobe) - [self addShader:kMaplyShaderDefaultLine program:defaultLineShader]; - else - [self addShader:kMaplyShaderDefaultLine program:defaultLineShaderNoBack]; + auto defaultLineShader = std::make_shared( + [kMaplyShaderDefaultLine cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexLineOnly_globe"], + [mtlLib newFunctionWithName:@"fragmentLineOnly_globe"]); + auto defaultLineShaderNoBack = std::make_shared( + [kMaplyShaderDefaultLineNoBackface cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexLineOnly_flat"], + [mtlLib newFunctionWithName:@"fragmentLineOnly_flat"]); + + [self addShader:kMaplyShaderDefaultLine program:isGlobe ? defaultLineShader : defaultLineShaderNoBack]; [self addShader:kMaplyShaderDefaultLineNoBackface program:defaultLineShaderNoBack]; // Default triangle shaders - [self addShader:kMaplyShaderDefaultTri - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultTri cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_light"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"]))]; - [self addShader:kMaplyShaderTriExp - program:ProgramRef(new ProgramMTL([kMaplyShaderTriExp cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_lightExp"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"]))]; - [self addShader:kMaplyShaderDefaultTriNoLighting - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultTriNoLighting cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_noLight"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"]))]; - [self addShader:kMaplyShaderNoLightTriangleExp - program:ProgramRef(new ProgramMTL([kMaplyShaderNoLightTriangleExp cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_noLightExp"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"]))]; + [self addShader:kMaplyShaderDefaultTri program: std::make_shared( + [kMaplyShaderDefaultTri cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_light"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"])]; + [self addShader:kMaplyShaderTriExp program: std::make_shared( + [kMaplyShaderTriExp cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_lightExp"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"])]; + [self addShader:kMaplyShaderDefaultTriNoLighting program: std::make_shared( + [kMaplyShaderDefaultTriNoLighting cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_noLight"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"])]; + [self addShader:kMaplyShaderNoLightTriangleExp program: std::make_shared( + [kMaplyShaderNoLightTriangleExp cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_noLightExp"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"])]; // TODO: Screen Space Texture application // Multitexture shader - Used for animation - [self addShader:kMaplyShaderDefaultTriMultiTex - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultTriMultiTex cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_multiTex"], - [mtlLib newFunctionWithName:@"fragmentTri_multiTex"]))]; + [self addShader:kMaplyShaderDefaultTriMultiTex program: std::make_shared( + [kMaplyShaderDefaultTriMultiTex cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_multiTex"], + [mtlLib newFunctionWithName:@"fragmentTri_multiTex"])]; // Multitexture ramp shader - Very simple implementation of animated color lookup - [self addShader:kMaplyShaderDefaultTriMultiTexRamp - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultTriMultiTexRamp cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_multiTex"], - [mtlLib newFunctionWithName:@"fragmentTri_multiTexRamp"]))]; + [self addShader:kMaplyShaderDefaultTriMultiTexRamp program: std::make_shared( + [kMaplyShaderDefaultTriMultiTexRamp cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_multiTex"], + [mtlLib newFunctionWithName:@"fragmentTri_multiTexRamp"])]; // MultiTexture for Markers - [self addShader:kMaplyShaderDefaultMarker - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultTriMultiTex cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_multiTex"], - [mtlLib newFunctionWithName:@"fragmentTri_multiTex"]))]; + [self addShader:kMaplyShaderDefaultMarker program: std::make_shared( + [kMaplyShaderDefaultTriMultiTex cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_multiTex"], + [mtlLib newFunctionWithName:@"fragmentTri_multiTex"])]; // Model Instancing - [self addShader:kMaplyShaderDefaultModelTri - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultModelTri cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_model"], - [mtlLib newFunctionWithName:@"fragmentTri_multiTex"]))]; + [self addShader:kMaplyShaderDefaultModelTri program: std::make_shared( + [kMaplyShaderDefaultModelTri cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_model"], + [mtlLib newFunctionWithName:@"fragmentTri_multiTex"])]; - // TODO: Night/Day Shader + // Night/Day Shader + [self addShader:kMaplyShaderDefaultTriNightDay program: std::make_shared( + [kMaplyShaderDefaultModelTri cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_multiTex_nightDay"], + [mtlLib newFunctionWithName:@"fragmentTri_multiTex_nightDay"])]; // Billboards - ProgramRef billboardProg(new ProgramMTL([kMaplyShaderBillboardGround cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_billboard"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"])); + auto billboardProg = std::make_shared( + [kMaplyShaderBillboardGround cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_billboard"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"]); [self addShader:kMaplyShaderBillboardGround program:billboardProg]; [self addShader:kMaplyShaderBillboardEye program:billboardProg]; // Wide vectors - [self addShader:kMaplyShaderDefaultWideVector - program:ProgramRef(new ProgramMTL([kMaplyShaderDefaultWideVector cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_wideVec"], - [mtlLib newFunctionWithName:@"fragmentTri_wideVec"]))]; - [self addShader:kMaplyShaderWideVectorExp - program:ProgramRef(new ProgramMTL([kMaplyShaderWideVectorExp cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_wideVecExp"], - [mtlLib newFunctionWithName:@"fragmentTri_wideVec"]))]; - [self addShader:kMaplyShaderWideVectorPerformance - program:ProgramRef(new ProgramMTL([kMaplyShaderWideVectorPerformance cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_wideVecPerf"], - [mtlLib newFunctionWithName:@"fragmentTri_wideVecPerf"]))]; + [self addShader:kMaplyShaderDefaultWideVector program: std::make_shared( + [kMaplyShaderDefaultWideVector cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_wideVec"], + [mtlLib newFunctionWithName:@"fragmentTri_wideVec"])]; + [self addShader:kMaplyShaderWideVectorExp program: std::make_shared( + [kMaplyShaderWideVectorExp cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_wideVecExp"], + [mtlLib newFunctionWithName:@"fragmentTri_wideVec"])]; + [self addShader:kMaplyShaderWideVectorPerformance program: std::make_shared( + [kMaplyShaderWideVectorPerformance cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_wideVecPerf"], + [mtlLib newFunctionWithName:@"fragmentTri_wideVecPerf"])]; // Screen Space (motion and regular are the same) - ProgramRef screenSpace = ProgramRef(new - ProgramMTL([kMaplyScreenSpaceDefaultProgram cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_screenSpace"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"])); + auto screenSpace = std::make_shared( + [kMaplyScreenSpaceDefaultProgram cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_screenSpace"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"]); [self addShader:kMaplyScreenSpaceDefaultProgram program:screenSpace]; [self addShader:kMaplyScreenSpaceDefaultMotionProgram program:screenSpace]; // Renders the mask ID to the screen - ProgramRef screenSpaceMask = ProgramRef(new - ProgramMTL(MaplyScreenSpaceMaskShader, - [mtlLib newFunctionWithName:@"vertexTri_screenSpace"], - [mtlLib newFunctionWithName:@"fragmentTri_mask"])); + auto screenSpaceMask = std::make_shared( + MaplyScreenSpaceMaskShader, + [mtlLib newFunctionWithName:@"vertexTri_screenSpace"], + [mtlLib newFunctionWithName:@"fragmentTri_mask"]); [self addShader:kMaplyScreenSpaceMaskProgram program:screenSpaceMask]; // Screen Space that handles expressions - ProgramRef screenSpaceExp = ProgramRef(new - ProgramMTL([kMaplyScreenSpaceExpProgram cStringUsingEncoding:NSASCIIStringEncoding], - [mtlLib newFunctionWithName:@"vertexTri_screenSpaceExp"], - [mtlLib newFunctionWithName:@"fragmentTri_basic"])); + auto screenSpaceExp = std::make_shared( + [kMaplyScreenSpaceExpProgram cStringUsingEncoding:NSASCIIStringEncoding], + [mtlLib newFunctionWithName:@"vertexTri_screenSpaceExp"], + [mtlLib newFunctionWithName:@"fragmentTri_basic"]); [self addShader:kMaplyScreenSpaceExpProgram program:screenSpaceExp]; // TODO: Particles diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm index 55b7661346..1293563050 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm @@ -590,6 +590,11 @@ - (void)setFarClipPlane:(double)farClipPlane globeView->setFarClippingPlane(farClipPlane); } +- (double)getMaxHeightAboveGlobe +{ + return globeView->maxHeightAboveGlobe(); +} + - (void)setTiltMinHeight:(float)minHeight maxHeight:(float)maxHeight minTilt:(float)minTilt maxTilt:(float)maxTilt { tiltControlDelegate = StandardTiltDelegateRef(new StandardTiltDelegate(globeView.get())); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm index 6368d3e80f..3702f0b965 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/math/MaplyCoordinate.mm @@ -23,6 +23,7 @@ const MaplyCoordinate kMaplyNullCoordinate = {.x = FLT_MIN, .y = FLT_MIN}; const MaplyCoordinateD kMaplyNullCoordinateD = {.x = DBL_MIN, .y = DBL_MIN}; +const MaplyCoordinate3d kMaplyNullCoordinate3d = {.x = FLT_MIN, .y = FLT_MIN, .z = FLT_MIN }; const MaplyCoordinate3dD kMaplyNullCoordinate3dD = {.x = DBL_MIN, .y = DBL_MIN, .z = DBL_MIN}; const MaplyBoundingBox kMaplyNullBoundingBox = { .ll = {.x = FLT_MIN, .y = FLT_MIN}, .ur = {.x = FLT_MIN, .y = FLT_MIN} }; const MaplyBoundingBoxD kMaplyNullBoundingBoxD = { .ll = {.x = DBL_MIN, .y = DBL_MIN}, .ur = {.x = DBL_MIN, .y = DBL_MIN} }; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMoon.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMoon.mm index 0870164c43..8ec5937b5a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMoon.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyMoon.mm @@ -24,40 +24,79 @@ @implementation MaplyMoon { - WhirlyKit::Moon *moon; - double moonLon,moonLat; + std::unique_ptr moon; + Point2d moonPos; } // Math borrowed from: http://www.lunar-occultations.com/rlo/ephemeris.htm -- (instancetype)initWithDate:(NSDate *)date +- (instancetype _Nullable)initWithDate:(NSDate *)date { - self = [super init]; + if (!(self = [super init])) + { + return nil; + } // Start with the Julian Date NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; calendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; - NSDateComponents *components = [calendar components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond) fromDate:date]; - moon = new Moon(components.year,components.month,components.day,components.hour,components.minute,components.second); + const NSCalendarUnit units = NSCalendarUnitYear | + NSCalendarUnitMonth | + NSCalendarUnitDay | + NSCalendarUnitHour | + NSCalendarUnitMinute | + NSCalendarUnitSecond; + NSDateComponents *components = [calendar components:units fromDate:date]; + if (!components) + { + return nil; + } + + moon = std::make_unique(components.year,components.month,components.day, + components.hour,components.minute,components.second); return self; } - (void)dealloc { - delete moon; - moon = nullptr; + moon.reset(); +} + +- (MaplyCoordinate)coordinate +{ + if (moon) + { + return MaplyCoordinateMake(moon->moonLon,moon->moonLat); + } + return kMaplyNullCoordinate; } -- (MaplyCoordinate)asCoordinate +- (MaplyCoordinate3d)position { - return MaplyCoordinateMake(moon->moonLon,moon->moonLat); + if (moon) + { + const auto height = 385000000 / EarthRadius; + return MaplyCoordinate3dMake(moon->moonLon,moon->moonLat, height); + } + return kMaplyNullCoordinate3d; } -- (MaplyCoordinate3d)asPosition +- (MaplyLight * _Nullable )makeLight { - const auto height = 385000000 / EarthRadius; - return MaplyCoordinate3dMake(moon->moonLon,moon->moonLat, height); + return [self makeLightWithAmbient:0.0f diffuse:0.1f]; +} + +- (MaplyLight * _Nullable)makeLightWithAmbient:(float)ambient diffuse:(float)diffuse +{ + MaplyLight *light = [[MaplyLight alloc] init]; + const MaplyCoordinate3d dir = self.position; + light.pos = MaplyCoordinate3dMake(dir.x, dir.z, dir.y); + light.ambient = [UIColor colorWithRed:ambient green:ambient blue:ambient alpha:1.0]; + light.diffuse = [UIColor colorWithRed:diffuse green:diffuse blue:diffuse alpha:1.0]; + light.viewDependent = true; + + return light; } - (double)illuminatedFraction diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplySun.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplySun.mm index bd0cc050b7..a77a7cfa97 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplySun.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplySun.mm @@ -24,51 +24,77 @@ @implementation MaplySun { - Sun *sun; + std::unique_ptr sun; } -- (instancetype)initWithDate:(NSDate *)date +- (_Nullable instancetype)initWithDate:(NSDate *)date { - self = [super init]; + if (!(self = [super init])) + { + return nil; + } // It all starts with the Julian date NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; calendar.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; - NSDateComponents *components = [calendar components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond) fromDate:date]; - sun = new Sun(components.year, components.month, components.day, components.hour, components.minute, components.second); + const NSCalendarUnit units = NSCalendarUnitYear | + NSCalendarUnitMonth | + NSCalendarUnitDay | + NSCalendarUnitHour | + NSCalendarUnitMinute | + NSCalendarUnitSecond; + NSDateComponents *components = [calendar components:units fromDate:date]; + if (!components) + { + return nil; + } + + sun = std::make_unique(components.year, components.month, components.day, + components.hour, components.minute, components.second); return self; } - (void)dealloc { - delete sun; - sun = nullptr; + sun.reset(); } -- (MaplyCoordinate3d)getDirection +- (MaplyCoordinate3d)direction { - Point3d dir = sun->getDirection(); - return MaplyCoordinate3dMake(dir.x(), dir.y(), dir.z()); + if (sun) + { + const Point3d dir = sun->getDirection(); + return MaplyCoordinate3dMake(dir.x(), dir.y(), dir.z()); + } + return kMaplyNullCoordinate3d; } -- (MaplyLight *)makeLight +- (MaplyCoordinate3d)position { - MaplyLight *sunLight = [[MaplyLight alloc] init]; - MaplyCoordinate3d dir = [self getDirection]; - sunLight.pos = MaplyCoordinate3dMake(dir.x, dir.z, dir.y); - sunLight.ambient = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1.0]; - sunLight.diffuse = [UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1.0]; - sunLight.viewDependent = true; - - return sunLight; + if (sun) + { + const auto height = 149.6 * 1000000 * 1000 / EarthRadius; + return MaplyCoordinate3dMake(sun->sunLon,sun->sunLat, height); + } + return kMaplyNullCoordinate3d; +} + +- (MaplyLight * _Nullable )makeLight +{ + return [self makeLightWithAmbient:0.1f diffuse:0.8f]; } -- (MaplyCoordinate3d)asPosition +- (MaplyLight * _Nullable)makeLightWithAmbient:(float)ambient diffuse:(float)diffuse { - const auto height = 149.6 * 1000000 * 1000 / EarthRadius; - return MaplyCoordinate3dMake(sun->sunLon,sun->sunLat, height); + MaplyLight *light = [[MaplyLight alloc] init]; + const MaplyCoordinate3d dir = self.direction; + light.pos = MaplyCoordinate3dMake(dir.x, dir.z, dir.y); + light.ambient = [UIColor colorWithRed:ambient green:ambient blue:ambient alpha:1.0]; + light.diffuse = [UIColor colorWithRed:diffuse green:diffuse blue:diffuse alpha:1.0]; + light.viewDependent = true; + return light; } @end From c08cf8ca4a0aab235cf2edabebe261460bb0f69d Mon Sep 17 00:00:00 2001 From: Alex Kovalov Date: Mon, 7 Feb 2022 16:09:49 +0200 Subject: [PATCH 16/78] Fix crash on pinch gesture --- .../src/gestures/MaplyPinchDelegate.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm index c476d04f8e..da8c905b32 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm @@ -47,6 +47,10 @@ + (MaplyPinchDelegate *)pinchDelegateForView:(UIView *)view mapView:(MapView_iOS - (void)pinchGesture:(id)sender { UIPinchGestureRecognizer *pinch = sender; + if ([pinch numberOfTouches] < 2) + { + return; + } UIGestureRecognizerState theState = pinch.state; UIView *wrapView = (UIView *)pinch.view; SceneRenderer *sceneRenderer = wrapView.renderer; From 26fa1fbd4ed30354b2fcd65f2e571c19dc7f3485 Mon Sep 17 00:00:00 2001 From: Alex Kovalov Date: Mon, 7 Feb 2022 16:10:39 +0200 Subject: [PATCH 17/78] Fix formatting --- .../src/gestures/MaplyPinchDelegate.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm index da8c905b32..fed401c3a5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/gestures/MaplyPinchDelegate.mm @@ -46,12 +46,12 @@ + (MaplyPinchDelegate *)pinchDelegateForView:(UIView *)view mapView:(MapView_iOS // Called for pinch actions - (void)pinchGesture:(id)sender { - UIPinchGestureRecognizer *pinch = sender; + UIPinchGestureRecognizer *pinch = sender; if ([pinch numberOfTouches] < 2) { return; } - UIGestureRecognizerState theState = pinch.state; + UIGestureRecognizerState theState = pinch.state; UIView *wrapView = (UIView *)pinch.view; SceneRenderer *sceneRenderer = wrapView.renderer; From f167870a3fdd7efbbce9f7152d7e2be26def73e2 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 2 Feb 2022 18:17:35 -0800 Subject: [PATCH 18/78] Implement the atmosphere shader, not working yet --- common/WhirlyGlobeLib/include/Program.h | 2 +- common/WhirlyGlobeLib/src/Program.cpp | 13 +- .../testCases/StarsSunTestCase.swift | 6 +- .../project.pbxproj | 10 + .../include/MaplySharedAttributes.h | 311 +++++------ .../include/control/MaplyBaseViewController.h | 2 +- .../include/control/MaplyRenderController.h | 2 +- .../private/MaplyRenderController_private.h | 7 +- .../include/rendering/MaplyAtmosphere.h | 9 +- .../src/control/MaplyBaseViewController.mm | 2 +- .../src/control/MaplyRenderController.mm | 4 +- .../src/control/MaplySharedAttributes.mm | 5 +- .../src/rendering/MaplyAtmosphere.mm | 516 +++++------------- .../src/rendering/MaplyShader.mm | 69 ++- .../src/rendering/MaplyVariableTarget.mm | 6 +- .../include/AtmosphereShadersMTL.h | 78 +++ .../src/AtmosphereShaders.metal | 161 ++++++ 17 files changed, 623 insertions(+), 580 deletions(-) create mode 100644 ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h create mode 100644 ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal diff --git a/common/WhirlyGlobeLib/include/Program.h b/common/WhirlyGlobeLib/include/Program.h index 8259a5ada8..07033d9cc3 100644 --- a/common/WhirlyGlobeLib/include/Program.h +++ b/common/WhirlyGlobeLib/include/Program.h @@ -115,7 +115,7 @@ class ShaderRemTextureReq : public ChangeRequest class ProgramUniformBlockSetRequest : public ChangeRequest { public: - ProgramUniformBlockSetRequest(SimpleIdentity progID,const RawDataRef &uniBlock,int bufferID); + ProgramUniformBlockSetRequest(SimpleIdentity progID,RawDataRef uniBlock,int bufferID); ~ProgramUniformBlockSetRequest() { } /// Remove from the renderer. Never call this. diff --git a/common/WhirlyGlobeLib/src/Program.cpp b/common/WhirlyGlobeLib/src/Program.cpp index 397ea1a066..bd1a7afe59 100644 --- a/common/WhirlyGlobeLib/src/Program.cpp +++ b/common/WhirlyGlobeLib/src/Program.cpp @@ -74,22 +74,23 @@ ShaderRemTextureReq::ShaderRemTextureReq(SimpleIdentity shaderID,SimpleIdentity void ShaderRemTextureReq::execute(Scene *scene,SceneRenderer *renderer,WhirlyKit::View *view) { - Program *prog = scene->getProgram(shaderID); - if (prog) + if (Program *prog = scene->getProgram(shaderID)) + { prog->clearTexture(texID); + } } -ProgramUniformBlockSetRequest::ProgramUniformBlockSetRequest(SimpleIdentity inProgID,const RawDataRef &uniData,int bufferID) +ProgramUniformBlockSetRequest::ProgramUniformBlockSetRequest(SimpleIdentity inProgID, RawDataRef uniData,int bufferID) { progID = inProgID; - uniBlock.blockData = uniData; + uniBlock.blockData = std::move(uniData); uniBlock.bufferID = bufferID; } void ProgramUniformBlockSetRequest::execute(Scene *scene,SceneRenderer *renderer,View *view) { - Program *prog = scene->getProgram(progID); - if (prog) { + if (Program *prog = scene->getProgram(progID)) + { prog->setUniBlock(uniBlock); } } diff --git a/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift index 9e840f80f4..9b4036bcb7 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/StarsSunTestCase.swift @@ -179,11 +179,13 @@ class StarsSunTestCase: MaplyTestCase { // Put the terminator in view globeVC.setPosition(MaplyCoordinateMake(sun.position.x + Float.pi * 0.3, 0.0), height: 2.0) - // todo: use an active object to update more + // todo: use an active object to update more smoothly timer = Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { [weak self, weak globeVC] (t) in guard let self = self, let vc = globeVC, t.isValid else { return } self.renderOffset = -self.startDate.timeIntervalSinceNow * self.timeFactor - _ = self.setupSunAndMoon(vc) + if let sun = self.setupSunAndMoon(vc) { + self.atmosObj?.setSunPosition(sun.direction) + } } } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index ef8597e41b..e653716326 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -1003,6 +1003,9 @@ 31CAB8DF2792126A00A5F744 /* GeographicLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */; }; 31DDA0A627A4D3B800865ECE /* WhirlyGlobe_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */; }; 31DDA4BA27A8787D00865ECE /* WhirlyGlobe.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 31DDA4CB27AB473A00865ECE /* AtmosphereShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 31DDA4CA27AB473A00865ECE /* AtmosphereShaders.metal */; }; + 31DDA4CD27AB476400865ECE /* AtmosphereShadersMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */; }; + 31DDA4CE27AB477300865ECE /* DefaultShadersMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B6998872293418F00C31E3F /* DefaultShadersMTL.h */; }; 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7E689E22A1E34B00BBFD9E /* MaplySimpleTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; C490572A265AB9E3001E4A98 /* bucketalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4905728265AB9E3001E4A98 /* bucketalloc.cpp */; }; @@ -2032,6 +2035,8 @@ 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GeographicLib.cpp; path = ../../../../common/WhirlyGlobeLib/src/GeographicLib.cpp; sourceTree = ""; }; 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe_iOS.h; sourceTree = ""; }; 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe.h; sourceTree = ""; }; + 31DDA4CA27AB473A00865ECE /* AtmosphereShaders.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; name = AtmosphereShaders.metal; path = ../src/AtmosphereShaders.metal; sourceTree = ""; }; + 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtmosphereShadersMTL.h; sourceTree = ""; }; C4905728265AB9E3001E4A98 /* bucketalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bucketalloc.cpp; sourceTree = ""; }; C4905729265AB9E3001E4A98 /* bucketalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bucketalloc.h; sourceTree = ""; }; C490572C265ABAB8001E4A98 /* glues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glues.h; path = ../../include/glues.h; sourceTree = ""; }; @@ -2406,6 +2411,8 @@ children = ( 2B6998872293418F00C31E3F /* DefaultShadersMTL.h */, 2B69987F228E26B500C31E3F /* wkDefaultShaders.metal */, + 31DDA4CA27AB473A00865ECE /* AtmosphereShaders.metal */, + 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */, ); name = "metal shaders"; sourceTree = ""; @@ -4130,6 +4137,7 @@ 2BE539521D249BEF00B60FAD /* AAAngularSeparation.h in Headers */, 2B82B5FD1E82E2490095FB14 /* internalJSONNode.h in Headers */, 2BE538391D249A1200B60FAD /* MaplyBaseInteractionLayer_private.h in Headers */, + 31DDA4CE27AB477300865ECE /* DefaultShadersMTL.h in Headers */, 310419E027A31020004B25E1 /* WhirlyGlobe-Maply-Umbrella.h in Headers */, 3183312E259112BA005FEF70 /* AzimuthalEquidistant.hpp in Headers */, 2BE538241D249A1200B60FAD /* MaplyShape.h in Headers */, @@ -4220,6 +4228,7 @@ 2BE1E79F2215F6FC00815D9C /* ImageTile_iOS.h in Headers */, 2BB8A3FD21ED43D10025DA98 /* MaplyDoubleTapDelegate.h in Headers */, 2B23131921F8DD61006AA344 /* GlobeView.h in Headers */, + 31DDA4CD27AB476400865ECE /* AtmosphereShadersMTL.h in Headers */, 2BD6FA64254B478000FD8374 /* DictionaryC.h in Headers */, 31833118259112BA005FEF70 /* Ellipsoid.hpp in Headers */, 31833122259112BA005FEF70 /* Geoid.hpp in Headers */, @@ -4591,6 +4600,7 @@ 3183313E259112BA005FEF70 /* DMS.cpp in Sources */, 2B82B6B41E82E24A0095FB14 /* PJ_tmerc.c in Sources */, 2B8796D321FFC59D00EF801D /* NSString+Stuff.mm in Sources */, + 31DDA4CB27AB473A00865ECE /* AtmosphereShaders.metal in Sources */, 2B3F451E243FD82200F85414 /* MaplyVectorStyle.mm in Sources */, 2B8A788B228607B3008B0A1F /* Program.cpp in Sources */, 2B8797222203BF7900EF801D /* MaplyBillboard.mm in Sources */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h index 00bd24d551..ae6187aba1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h @@ -1,5 +1,4 @@ -/* - * MaplySharedAttributes.h +/* MaplySharedAttributes.h * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 9/19/12. @@ -15,80 +14,79 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import /// Use this hint to turn the zbuffer on or off. Pass in an NSNumber boolean. Takes effect on the next frame. -extern NSString* const kMaplyRenderHintZBuffer; +extern NSString * const _Nonnull kMaplyRenderHintZBuffer; #define kWGRenderHintZBuffer kMaplyRenderHintZBuffer /// Use this hint to turn culling optimization on or off. Pass in an NSNumber boolean. -extern NSString* const kMaplyRenderHintCulling; +extern NSString * const _Nonnull kMaplyRenderHintCulling; #define kWGRenderHintCulling kMaplyRenderHintCulling /// These are options for lighting modes, basically different default shader programs. Only works with OpenGL ES 2.0 mode. /// Accepted values are: none,regular -extern NSString* const kMaplyRendererLightingMode; +extern NSString * const _Nonnull kMaplyRendererLightingMode; #define kWGRendererLightingMode kMaplyRendererLightingMode /// These are used for all object descriptions. /// If the z buffer is on, this will let you resolve. Takes an NSNumber boolean -extern NSString* const kMaplyDrawOffset; +extern NSString * const _Nonnull kMaplyDrawOffset; #define kWGDrawOffset kMaplyDrawOffset /// This helps decide what order things are drawn in. Useful when the z buffer is off or you're using transparency. /// Takes an NSNumber int. -extern NSString* const kMaplyDrawPriority; +extern NSString * const _Nonnull kMaplyDrawPriority; #define kWGDrawPriority kMaplyDrawPriority /// Minimum point at which a feature is visible. Takes an NSNumber float. The radius of the globe is 1.0 -extern NSString* const kMaplyMinVis; +extern NSString * const _Nonnull kMaplyMinVis; #define kWGMinVis kMaplyMinVis /// Maximum point at which a feature is visible. Takes an NSNumber float. The radius of the globe is 1.0 -extern NSString* const kMaplyMaxVis; +extern NSString * const _Nonnull kMaplyMaxVis; #define kWGMaxVis kMaplyMaxVis /// Minimum distance from the viewer at which to display geometry. -extern NSString* const kMaplyViewerMinDist; +extern NSString * const _Nonnull kMaplyViewerMinDist; /// Maximum distance from the viewer at which to display geometry. -extern NSString* const kMaplyViewerMaxDist; +extern NSString * const _Nonnull kMaplyViewerMaxDist; /// Center to use when evaluating distance to viewable geometry (X) -extern NSString* const kMaplyViewableCenterX; +extern NSString * const _Nonnull kMaplyViewableCenterX; /// Center to use when evaluating distance to viewable geometry (Y) -extern NSString* const kMaplyViewableCenterY; +extern NSString * const _Nonnull kMaplyViewableCenterY; /// Center to use when evaluating distance to viewable geometry (Z) -extern NSString* const kMaplyViewableCenterZ; +extern NSString * const _Nonnull kMaplyViewableCenterZ; /// The amount of time for a feature to fade in or out. Takes an NSNumber float for seconds. -extern NSString* const kMaplyFade; +extern NSString * const _Nonnull kMaplyFade; #define kWGFade kMaplyFade /// Fade the feature in over time. -extern NSString* const kMaplyFadeIn; +extern NSString * const _Nonnull kMaplyFadeIn; /// Fade the feature out over time -extern NSString* const kMaplyFadeOut; +extern NSString * const _Nonnull kMaplyFadeOut; /// When to start fading out -extern NSString* const kMaplyFadeOutTime; +extern NSString * const _Nonnull kMaplyFadeOutTime; /// Enable or disable an object. This can be used to create an object disabled. -extern NSString* const kMaplyEnable; +extern NSString * const _Nonnull kMaplyEnable; /// If set, we'll enable the objects only between the start and end time -extern NSString* const kMaplyEnableStart; +extern NSString * const _Nonnull kMaplyEnableStart; /// If set, we'll enable the objects only between the start and end time -extern NSString* const kMaplyEnableEnd; +extern NSString * const _Nonnull kMaplyEnableEnd; /// Request a given object take the z buffer into account -extern NSString* const kMaplyZBufferRead; +extern NSString * const _Nonnull kMaplyZBufferRead; /// Have a given object write itself to the z buffer -extern NSString* const kMaplyZBufferWrite; +extern NSString * const _Nonnull kMaplyZBufferWrite; /// Set the render target if the given geometry type supports it -extern NSString* const kMaplyRenderTarget; +extern NSString * const _Nonnull kMaplyRenderTarget; /// The the UUID of the object -extern NSString* const kMaplyUUID; +extern NSString * const _Nonnull kMaplyUUID; /// The representation of the UUID this object embodies -extern NSString* const kMaplyRepresentation; +extern NSString * const _Nonnull kMaplyRepresentation; /// Assign a shader program to a particular feature. Use the shader program's name -extern NSString* const kMaplyShader; +extern NSString * const _Nonnull kMaplyShader; /// An NSDictionary containing uniforms to apply to a shader before drawing -extern NSString* const kMaplyShaderUniforms; +extern NSString * const _Nonnull kMaplyShaderUniforms; /// Keep drawing for this number of frames after we'd normally stop -extern NSString* const kMaplyExtraFrames; +extern NSString * const _Nonnull kMaplyExtraFrames; /// Stars, moon, stars, atmosphere extern const int kMaplyStarsDrawPriorityDefault; @@ -117,290 +115,293 @@ extern const int kMaplyMaxDrawPriorityDefault; /// These are used just for the screen and regular labels /// Color of the text being rendered. Takes a UIColor. -extern NSString* const kMaplyTextColor; +extern NSString * const _Nonnull kMaplyTextColor; #define kWGTextColor kMaplyTextColor /// Background color for the text. Takes a UIColor. -extern NSString* const kMaplyBackgroundColor; +extern NSString * const _Nonnull kMaplyBackgroundColor; #define kWGBackgroundColor kMaplyBackgroundColor /// Font to use in rendering text. Takes a UIFont. -extern NSString* const kMaplyFont; +extern NSString * const _Nonnull kMaplyFont; #define kWGFont kMaplyFont /// Default height of the text. If for screen space, this in points. If for 3D, remember that // the radius of the globe is 1.0. Expects an NSNumber float. -extern NSString* const kMaplyLabelHeight; +extern NSString * const _Nonnull kMaplyLabelHeight; #define kWGLabelHeight kMaplyLabelHeight /// Default width of the text. See height for more info and, in general, use height instead. -extern NSString* const kMaplyLabelWidth; +extern NSString * const _Nonnull kMaplyLabelWidth; #define kWGLabelWidth kMaplyLabelWidth /// Justification for label placement. This takes an NSString with one of: /// middle, left, right -extern NSString* const kMaplyJustify; +extern NSString * const _Nonnull kMaplyJustify; #define kWGJustify kMaplyJustify /// If set, we'll draw a shadow behind each label with this as the stroke size -extern NSString* const kMaplyShadowSize; +extern NSString * const _Nonnull kMaplyShadowSize; #define kWGShadowSize kMaplyShadowSize /// If shadow size is being used, we can control the shadow color like so -extern NSString* const kMaplyShadowColor; +extern NSString * const _Nonnull kMaplyShadowColor; #define kWGShadowColor kMaplyShadowColor /// If outline is being used, we can control the color -extern NSString* const kMaplyTextOutlineSize; +extern NSString * const _Nonnull kMaplyTextOutlineSize; /// Vertical line spacing. Defaults to the Font's line spacing -extern NSString* const kMaplyTextLineSpacing; +extern NSString * const _Nonnull kMaplyTextLineSpacing; /// If outline is being used, we can control the stroke size -extern NSString* const kMaplyTextOutlineColor; +extern NSString * const _Nonnull kMaplyTextOutlineColor; /// When creating textures, we may pass in the size -extern NSString* const kMaplyTexSizeX; +extern NSString * const _Nonnull kMaplyTexSizeX; /// When creating textures, we may pass in the size -extern NSString* const kMaplyTexSizeY; +extern NSString * const _Nonnull kMaplyTexSizeY; /// How to justify multi-line text -extern NSString* const kMaplyTextJustify; +extern NSString * const _Nonnull kMaplyTextJustify; /// Justify text to the right -extern NSString* const kMaplyTextJustifyRight; +extern NSString * const _Nonnull kMaplyTextJustifyRight; /// Justify text to the left -extern NSString* const kMaplyTextJustifyLeft; +extern NSString * const _Nonnull kMaplyTextJustifyLeft; /// Justify text to the center -extern NSString* const kMaplyTextJustifyCenter; +extern NSString * const _Nonnull kMaplyTextJustifyCenter; /// Controls how text is laid out along a line or polygon. Set a number (- for left or inside, + for right or outside) -extern NSString* const kMaplyTextLayoutOffset; +extern NSString * const _Nonnull kMaplyTextLayoutOffset; /// If laying out along a line (or polygon), the amount of screen space to leave between labels -extern NSString* const kMaplyTextLayoutSpacing; +extern NSString * const _Nonnull kMaplyTextLayoutSpacing; /// Layout as many labels as possible along a line (or polygon). Set a number (0 for no repeat, -1 for as many as possible, or a number of instances) -extern NSString* const kMaplyTextLayoutRepeat; +extern NSString * const _Nonnull kMaplyTextLayoutRepeat; /// Turn on debugging lines for the layout engine -extern NSString* const kMaplyTextLayoutDebug; +extern NSString * const _Nonnull kMaplyTextLayoutDebug; /// These are used for screen and regular markers. -extern NSString* const kMaplyClusterGroup; +extern NSString * const _Nonnull kMaplyClusterGroup; /// Color is used for the polygon generated for a marker. It will combine with the image, /// if there is one or it will be visible if there is no texture. Takes a UIColor -extern NSString* const kMaplyColor; +extern NSString * const _Nonnull kMaplyColor; #define kWGColor kMaplyColor /// Width is used by the vector layer for line widths -extern NSString* const kMaplyVecWidth; +extern NSString * const _Nonnull kMaplyVecWidth; #define kWGVecWidth kMaplyVecWidth /// If filled is set, we draw the areals as filled polygons -extern NSString* const kMaplyFilled; +extern NSString * const _Nonnull kMaplyFilled; #define kWGFilled kMaplyFilled /// If set, the texture to apply to the feature -extern NSString* const kMaplyVecTexture; +extern NSString * const _Nonnull kMaplyVecTexture; /// The format of the image given by kMaplyVecTexture, default MaplyImage4Layer8Bit -extern NSString* const kMaplyVecTextureFormat; +extern NSString * const _Nonnull kMaplyVecTextureFormat; /// X scale for textures applied to vectors -extern NSString* const kMaplyVecTexScaleX; +extern NSString * const _Nonnull kMaplyVecTexScaleX; /// Y scale for textures applied to vectors -extern NSString* const kMaplyVecTexScaleY; +extern NSString * const _Nonnull kMaplyVecTexScaleY; /// The projection to use when generating texture coordinates -extern NSString* const kMaplyVecTextureProjection; +extern NSString * const _Nonnull kMaplyVecTextureProjection; /// Tangent plane projection for texture coordinates -extern NSString* const kMaplyProjectionTangentPlane; +extern NSString * const _Nonnull kMaplyProjectionTangentPlane; /// Screen space "projection" for texture coordinates -extern NSString* const kMaplyProjectionScreen; +extern NSString * const _Nonnull kMaplyProjectionScreen; /// No projection for texture coordinates -extern NSString* const kMaplyProjectionNone; +extern NSString * const _Nonnull kMaplyProjectionNone; /// If set to true we'll centered any drawables we create for features /// This fixes the jittering problem when zoomed in close -extern NSString* const kMaplyVecCentered; +extern NSString * const _Nonnull kMaplyVecCentered; /// Center of the feature, to use for texture calculations -extern NSString* const kMaplyVecCenterX; -extern NSString* const kMaplyVecCenterY; +extern NSString * const _Nonnull kMaplyVecCenterX; +extern NSString * const _Nonnull kMaplyVecCenterY; /// For wide vectors, we can widen them in screen space or display space -extern NSString* const kMaplyWideVecCoordType; +extern NSString * const _Nonnull kMaplyWideVecCoordType; /// Widened vectors are widened in real space. The width is in meters. -extern NSString* const kMaplyWideVecCoordTypeReal; +extern NSString * const _Nonnull kMaplyWideVecCoordTypeReal; /// Widened vectors are widened in screen space. The width is in pixels. -extern NSString* const kMaplyWideVecCoordTypeScreen; +extern NSString * const _Nonnull kMaplyWideVecCoordTypeScreen; /// Controls the wide vector implementation. Basic implementation by default. -extern NSString* const kMaplyWideVecImpl; +extern NSString * const _Nonnull kMaplyWideVecImpl; /// Default/old implementation of the wide vectors -extern NSString* const kMaplyWideVecImplDefault; +extern NSString * const _Nonnull kMaplyWideVecImplDefault; /// Performance implementation of the wide vectors -extern NSString* const kMaplyWideVecImplPerf; +extern NSString * const _Nonnull kMaplyWideVecImplPerf; /// For wide vectors we can control the line joins /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty -extern NSString* const kMaplyWideVecJoinType; +extern NSString * const _Nonnull kMaplyWideVecJoinType; /// Widened vectors are joined with miters -extern NSString* const kMaplyWideVecMiterJoin; +extern NSString * const _Nonnull kMaplyWideVecMiterJoin; // Note: Not yet implemented /// Widened vectors are joined with a curve -//extern NSString* const kMaplyWideVecRoundJoin @"round" +//extern NSString * const _Nonnull kMaplyWideVecRoundJoin @"round" /// Widened vectors are joined with a bevel -extern NSString* const kMaplyWideVecBevelJoin; +extern NSString * const _Nonnull kMaplyWideVecBevelJoin; /// Number of pixels to use in blending the edges of the wide vectors -extern NSString* const kMaplyWideVecEdgeFalloff; +extern NSString * const _Nonnull kMaplyWideVecEdgeFalloff; /// For wide vectors we can control the ends /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty -//extern NSString* const kMaplyWideVecLineCapType @"wideveclinecaptype" +//extern NSString * const _Nonnull kMaplyWideVecLineCapType @"wideveclinecaptype" // Note: These are not currently implemented /// Widened vector ends are flush -//extern NSString* const kMaplyWideVecButtCap; +//extern NSString * const _Nonnull kMaplyWideVecButtCap; /// Widened vector ends are round (e.g. hot dog roads) -//extern NSString* const kMaplyWideVecRoundCap; +//extern NSString * const _Nonnull kMaplyWideVecRoundCap; /// Widened vector ends are extended a bit and then flush -//extern NSString* const kMaplyWideVecSquareCap; +//extern NSString * const _Nonnull kMaplyWideVecSquareCap; /// Miter joins will turn to bevel joins past this number of degrees -extern NSString* const kMaplyWideVecMiterLimit; +extern NSString * const _Nonnull kMaplyWideVecMiterLimit; /// This is the length you'd like the texture to start repeating after. /// It's real world coordinates for kMaplyWideVecCoordTypeReal and pixel size for kMaplyWideVecCoordTypeScreen -extern NSString* const kMaplyWideVecTexRepeatLen; +extern NSString * const _Nonnull kMaplyWideVecTexRepeatLen; /// Offset to left (negative) or right (positive) of the centerline -extern NSString* const kMaplyWideVecOffset; +extern NSString * const _Nonnull kMaplyWideVecOffset; /// Close any un-closed areal features when drawing lines for them -extern NSString* const kMaplyVecCloseAreals; +extern NSString * const _Nonnull kMaplyVecCloseAreals; /// If set we'll break up a vector feature to the given epsilon on a globe surface -extern NSString* const kMaplySubdivEpsilon; +extern NSString * const _Nonnull kMaplySubdivEpsilon; /// If subdiv epsilon is set we'll look for a subdivision type. Default is simple. -extern NSString* const kMaplySubdivType; +extern NSString * const _Nonnull kMaplySubdivType; /// Subdivide the vector edges along a great circle -extern NSString* const kMaplySubdivGreatCircle; +extern NSString * const _Nonnull kMaplySubdivGreatCircle; /// Subdivide the vector edges along a great circle with ellipsoidal math -extern NSString* const kMaplySubdivGreatCirclePrecise; +extern NSString * const _Nonnull kMaplySubdivGreatCirclePrecise; /// Subdivide into a fixed number of segmenets -extern NSString* const kMaplySubdivStatic; +extern NSString * const _Nonnull kMaplySubdivStatic; /// Subdivide the vectors edges along lat/lon -extern NSString* const kMaplySubdivSimple; +extern NSString * const _Nonnull kMaplySubdivSimple; /// Clip features along a grid of the given size -extern NSString* const kMaplySubdivGrid; +extern NSString * const _Nonnull kMaplySubdivGrid; /// Used to turn off selection in vectors -extern NSString* const kMaplySelectable; +extern NSString * const _Nonnull kMaplySelectable; /// These are used for stickers /// Sampling size along one dimension -extern NSString* const kMaplySampleX; +extern NSString * const _Nonnull kMaplySampleX; #define kWGSampleX kMaplySampleX /// Sampling size along one dimension -extern NSString* const kMaplySampleY; +extern NSString * const _Nonnull kMaplySampleY; #define kWGSampleY kMaplySampleY /// Images to use when changing a sticker -extern NSString* const kMaplyStickerImages; +extern NSString * const _Nonnull kMaplyStickerImages; /// Image format to use for the new images -extern NSString* const kMaplyStickerImageFormat; +extern NSString * const _Nonnull kMaplyStickerImageFormat; /// These are used for billboards /// Billboard orientation -extern NSString* const kMaplyBillboardOrient; +extern NSString * const _Nonnull kMaplyBillboardOrient; /// Billboards are oriented toward the eye, but rotate on the ground -extern NSString* const kMaplyBillboardOrientGround; +extern NSString * const _Nonnull kMaplyBillboardOrientGround; /// Billboards are oriented only towards the eye -extern NSString* const kMaplyBillboardOrientEye; +extern NSString * const _Nonnull kMaplyBillboardOrientEye; /// These are used for lofted polygons /// Height above the ground -extern NSString* const kMaplyLoftedPolyHeight; +extern NSString * const _Nonnull kMaplyLoftedPolyHeight; /// Boolean that turns on/off top (on by default) -extern NSString* const kMaplyLoftedPolyTop; +extern NSString * const _Nonnull kMaplyLoftedPolyTop; /// Boolean that turns on/off sides (on by default) -extern NSString* const kMaplyLoftedPolySide; +extern NSString * const _Nonnull kMaplyLoftedPolySide; /// If present, we'll start the lofted poly above 0 height -extern NSString* const kMaplyLoftedPolyBase; +extern NSString * const _Nonnull kMaplyLoftedPolyBase; /// Grid size we used to chop the lofted polygons up (10 degress by default) -extern NSString* const kMaplyLoftedPolyGridSize; +extern NSString * const _Nonnull kMaplyLoftedPolyGridSize; /// If set to @(YES) this will draw an outline around the top of the lofted poly in lines -extern NSString* const kMaplyLoftedPolyOutline; +extern NSString * const _Nonnull kMaplyLoftedPolyOutline; /// If set to @(YES) this will draw an outline around the bottom of the lofted poly in lines -extern NSString* const kMaplyLoftedPolyOutlineBottom; +extern NSString * const _Nonnull kMaplyLoftedPolyOutlineBottom; /// If the outline is one this is the outline's color -extern NSString* const kMaplyLoftedPolyOutlineColor; +extern NSString * const _Nonnull kMaplyLoftedPolyOutlineColor; /// This is the outline's width if it's turned on -extern NSString* const kMaplyLoftedPolyOutlineWidth; +extern NSString * const _Nonnull kMaplyLoftedPolyOutlineWidth; /// Draw priority of the lines created for the lofted poly outline -extern NSString* const kMaplyLoftedPolyOutlineDrawPriority; +extern NSString * const _Nonnull kMaplyLoftedPolyOutlineDrawPriority; /// If set and we're drawing an outline, this will create lines up the sides -extern NSString* const kMaplyLoftedPolyOutlineSide; +extern NSString * const _Nonnull kMaplyLoftedPolyOutlineSide; /// These are used for shapes /// Samples (x) to use when converting shape to polygons -extern NSString* const kMaplyShapeSampleX; +extern NSString * const _Nonnull kMaplyShapeSampleX; /// Samples (y) to use when converting shape to polygons -extern NSString* const kMaplyShapeSampleY; +extern NSString * const _Nonnull kMaplyShapeSampleY; /// If set to true, we'll tessellate a shape using the opposite vertex ordering -extern NSString* const kMaplyShapeInsideOut; +extern NSString * const _Nonnull kMaplyShapeInsideOut; /// Center for the shape geometry -extern NSString* const kMaplyShapeCenterX; -extern NSString* const kMaplyShapeCenterY; -extern NSString* const kMaplyShapeCenterZ; +extern NSString * const _Nonnull kMaplyShapeCenterX; +extern NSString * const _Nonnull kMaplyShapeCenterY; +extern NSString * const _Nonnull kMaplyShapeCenterZ; /// These are used by active vector objects -extern NSString* const kMaplyVecHeight; -extern NSString* const kMaplyVecMinSample; +extern NSString * const _Nonnull kMaplyVecHeight; +extern NSString * const _Nonnull kMaplyVecMinSample; /// These are used by the particle systems -extern NSString* const kMaplyPointSize; +extern NSString * const _Nonnull kMaplyPointSize; extern const float kMaplyPointSizeDefault; /// These are used by the texture -extern NSString* const kMaplyTexFormat; -extern NSString* const kMaplyTexMinFilter; -extern NSString* const kMaplyTexMagFilter; -extern NSString* const kMaplyMinFilterNearest; -extern NSString* const kMaplyMinFilterLinear; -extern NSString* const kMaplyTexAtlas; -extern NSString* const kMaplyTexWrapX; -extern NSString* const kMaplyTexWrapY; -extern NSString* const kMaplyTexMipmap; +extern NSString * const _Nonnull kMaplyTexFormat; +extern NSString * const _Nonnull kMaplyTexMinFilter; +extern NSString * const _Nonnull kMaplyTexMagFilter; +extern NSString * const _Nonnull kMaplyMinFilterNearest; +extern NSString * const _Nonnull kMaplyMinFilterLinear; +extern NSString * const _Nonnull kMaplyTexAtlas; +extern NSString * const _Nonnull kMaplyTexWrapX; +extern NSString * const _Nonnull kMaplyTexWrapY; +extern NSString * const _Nonnull kMaplyTexMipmap; /// These are the various shader programs we set up by default -extern NSString* const kMaplyShaderDefaultTri; -extern NSString* const kMaplyDefaultTriangleShader; -extern NSString* const kMaplyShaderTriExp; +extern NSString * const _Nonnull kMaplyShaderDefaultTri; +extern NSString * const _Nonnull kMaplyDefaultTriangleShader; +extern NSString * const _Nonnull kMaplyShaderTriExp; + +extern NSString * const _Nonnull kMaplyShaderDefaultModelTri; -extern NSString* const kMaplyShaderDefaultModelTri; +extern NSString * const _Nonnull kMaplyShaderDefaultTriNoLighting; +extern NSString * const _Nonnull kMaplyNoLightTriangleShader; +extern NSString * const _Nonnull kMaplyShaderNoLightTriangleExp; +extern NSString * const _Nonnull kMaplyShaderDefaultMarker; -extern NSString* const kMaplyShaderDefaultTriNoLighting; -extern NSString* const kMaplyNoLightTriangleShader; -extern NSString* const kMaplyShaderNoLightTriangleExp; -extern NSString* const kMaplyShaderDefaultMarker; +extern NSString * const _Nonnull kMaplyShaderDefaultTriScreenTex; -extern NSString* const kMaplyShaderDefaultTriScreenTex; +extern NSString * const _Nonnull kMaplyShaderDefaultTriMultiTex; +extern NSString * const _Nonnull kMaplyShaderDefaultTriMultiTexRamp; +extern NSString * const _Nonnull kMaplyShaderDefaultTriNightDay; -extern NSString* const kMaplyShaderDefaultTriMultiTex; -extern NSString* const kMaplyShaderDefaultTriMultiTexRamp; -extern NSString* const kMaplyShaderDefaultTriNightDay; +extern NSString * const _Nonnull kMaplyShaderDefaultLine; +extern NSString * const _Nonnull kMaplyDefaultLineShader; -extern NSString* const kMaplyShaderDefaultLine; -extern NSString* const kMaplyDefaultLineShader; +extern NSString * const _Nonnull kMaplyShaderDefaultLineNoBackface; +extern NSString * const _Nonnull kMaplyNoBackfaceLineShader; -extern NSString* const kMaplyShaderDefaultLineNoBackface; -extern NSString* const kMaplyNoBackfaceLineShader; +extern NSString * const _Nonnull kMaplyShaderBillboardGround; +extern NSString * const _Nonnull kMaplyShaderBillboardEye; -extern NSString* const kMaplyShaderBillboardGround; -extern NSString* const kMaplyShaderBillboardEye; +extern NSString * const _Nonnull kMaplyShaderDefaultWideVector; +extern NSString * const _Nonnull kMaplyShaderWideVectorPerformance; +extern NSString * const _Nonnull kMaplyShaderWideVectorExp; -extern NSString* const kMaplyShaderDefaultWideVector; -extern NSString* const kMaplyShaderWideVectorPerformance; -extern NSString* const kMaplyShaderWideVectorExp; +extern NSString * const _Nonnull kMaplyScreenSpaceDefaultMotionProgram; +extern NSString * const _Nonnull kMaplyScreenSpaceDefaultProgram; +extern NSString * const _Nonnull kMaplyScreenSpaceMaskProgram; +extern NSString * const _Nonnull kMaplyScreenSpaceExpProgram; -extern NSString* const kMaplyScreenSpaceDefaultMotionProgram; -extern NSString* const kMaplyScreenSpaceDefaultProgram; -extern NSString* const kMaplyScreenSpaceMaskProgram; -extern NSString* const kMaplyScreenSpaceExpProgram; +extern NSString * const _Nonnull kMaplyAtmosphereProgram; +extern NSString * const _Nonnull kMaplyAtmosphereGroundProgram; -extern NSString* const kMaplyShaderParticleSystemPointDefault; +extern NSString * const _Nonnull kMaplyShaderParticleSystemPointDefault; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h index 119b330f78..77e5ef3420 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h @@ -1348,7 +1348,7 @@ typedef void (__strong ^InitCompletionBlock)(void); @return Returns the registered shader if it found one. */ -- (MaplyShader *__nullable)getShaderByName:(NSString *__nonnull)name; +- (MaplyShader *__nullable)getShaderByName:(const NSString *__nonnull)name; /** Remove a shader that was added earlier. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h index 0c7c36de71..ce54303a8b 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h @@ -911,7 +911,7 @@ typedef NS_ENUM(NSInteger, MaplyRenderType) { @return Returns the registered shader if it found one. */ -- (MaplyShader *__nullable)getShaderByName:(NSString *__nonnull)name; +- (MaplyShader *__nullable)getShaderByName:(const NSString *__nonnull)name; /** Remove a shader that was added earlier. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderController_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderController_private.h index 9de57a550a..dd96fffc14 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderController_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyRenderController_private.h @@ -1,5 +1,4 @@ -/* - * MaplyRenderController_private.h +/* MaplyRenderController_private.h * WhirlyGlobeMaplyComponent * * Created by Stephen Gifford on 1/19/18. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "control/MaplyRenderController.h" @@ -25,6 +23,7 @@ #import "MaplyShader_private.h" #import "MaplyCoordinateSystem_private.h" #import "MaplyQuadSampler_private.h" +#import "ProgramMTL.h" @class MaplyBaseInteractionLayer; @@ -129,4 +128,6 @@ // Version of remove objects that takes raw IDs - (void)removeObjectsByID:(const WhirlyKit::SimpleIDSet &)compObjIDs mode:(MaplyThreadMode)threadMode; +- (void)addShader:(NSString *)inName program:(WhirlyKit::ProgramRef)program; + @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h index f5de72d27e..fae06f4b97 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h @@ -1,5 +1,4 @@ -/* - * MaplyAtmosphere.h +/* MaplyAtmosphere.h * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 6/30/15. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import @@ -26,8 +24,9 @@ /** Sets up the objects and shaders to implement an atmosphere. - This object sets up a shader implementation of the simple atmosphere from GPU Gems 2 http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html - */ + This object sets up a shader implementation of the simple atmosphere from GPU Gems 2 + http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html +*/ @interface MaplyAtmosphere : NSObject /// Initialize the view controller. Will place objects in that view controller. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm index 7be90bd119..cadd9de12c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm @@ -543,7 +543,7 @@ - (void)addShaderProgram:(MaplyShader *)shader [renderControl addShaderProgram:shader]; } -- (MaplyShader *)getShaderByName:(NSString *)name +- (MaplyShader *)getShaderByName:(const NSString *)name { return [renderControl getShaderByName:name]; } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm index c3b386bfb8..5ebb10da3f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm @@ -393,14 +393,14 @@ - (void)removeShaderProgram:(MaplyShader *__nonnull)shaderToRemove scene->removeProgram(shaderToRemove.program->getId(),NULL); } -- (MaplyShader *__nullable)getShaderByName:(NSString *__nonnull)name +- (MaplyShader *__nullable)getShaderByName:(const NSString *__nonnull)name { if (!interactLayer) return nil; @synchronized (interactLayer->shaders) { for (MaplyShader *shader in interactLayer->shaders) - if (![shader.name compare:name]) + if (![name compare:shader.name]) return shader; } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm index 3f1f155210..3c5d590311 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm @@ -368,4 +368,7 @@ NSString* const kMaplyScreenSpaceMaskProgram = @"Screenspace mask"; NSString* const kMaplyScreenSpaceExpProgram = @"Screenspace with expressions"; -NSString* const kMaplyShaderParticleSystemPointDefault = @"Default Part Sys (Point)"; +NSString * const kMaplyAtmosphereProgram = @"Default Atmosphere"; +NSString * const kMaplyAtmosphereGroundProgram = @"Default Atmosphere Ground"; + +NSString * const kMaplyShaderParticleSystemPointDefault = @"Default Part Sys (Point)"; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm index 89e2a7b995..09cdd8949e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm @@ -1,5 +1,4 @@ -/* - * MaplyAtmosphere.mm +/* MaplyAtmosphere.mm * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 6/30/15. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import @@ -23,240 +21,12 @@ #import "visual_objects/MaplyShape.h" #import "MaplyShader_private.h" #import "MaplyActiveObject_private.h" +#import "MaplyRenderController_private.h" +#import "AtmosphereShadersMTL.h" using namespace WhirlyKit; using namespace Eigen; -#if 0 -static const char *vertexShaderAtmosTri = R"( -precision highp float; - -uniform mat4 u_mvpMatrix; -uniform vec3 u_v3CameraPos; -uniform float u_fCameraHeight2; -uniform vec3 u_v3LightPos; - -uniform float u_fInnerRadius; -uniform float u_fInnerRadius2; -uniform float u_fOuterRadius; -uniform float u_fOuterRadius2; -uniform float u_fScale; -uniform float u_fScaleDepth; -uniform float u_fScaleOverScaleDepth; - -uniform float u_Kr; -uniform float u_Kr4PI; -uniform float u_Km; -uniform float u_Km4PI; -uniform float u_ESun; -uniform float u_KmESun; -uniform float u_KrESun; -uniform vec3 u_v3InvWavelength; -uniform float u_fSamples; -uniform int u_nSamples; - -attribute vec3 a_position; - -varying highp vec3 v3Direction; -varying highp vec3 v3RayleighColor; -varying highp vec3 v3MieColor; - -float scale(float fCos) -{ - float x = 1.0 - fCos; - return u_fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25)))); -} - -void main() -{ - vec3 v3Pos = a_position.xyz; - vec3 v3Ray = v3Pos - u_v3CameraPos; - float fFar = length(v3Ray); - v3Ray /= fFar; - - float B = 2.0 * dot(u_v3CameraPos, v3Ray); - float C = u_fCameraHeight2 - u_fOuterRadius2; - float fDet = max(0.0, B*B - 4.0 * C); - float fNear = 0.5 * (-B - sqrt(fDet)); - - vec3 v3Start = u_v3CameraPos + v3Ray * fNear; - fFar -= fNear; - - float fStartAngle = dot(v3Ray, v3Start) / u_fOuterRadius; - float fStartDepth = exp(-1.0/u_fScaleDepth); - float fStartOffset = fStartDepth * scale(fStartAngle); - - float fSampleLength = fFar / u_fSamples; - float fScaledLength = fSampleLength * u_fScale; - vec3 v3SampleRay = v3Ray * fSampleLength; - vec3 v3SamplePoint = v3Start + v3SampleRay * 0.5; - - vec3 v3FrontColor = vec3(0.0, 0.0, 0.0); - vec3 v3Attenuate; - for (int i=0; i *)viewC +- (instancetype _Nullable)initWithShader:(MaplyShader *)inShader + groundShader:(MaplyShader *)inGroundShader + atm:(MaplyAtmosphere *)inAtm + viewC:(NSObject *)viewC { - self = [super initWithViewController:viewC]; + if (!(self = [super initWithViewController:viewC])) + { + return nil; + } + changed = true; started = false; shader = inShader; groundShader = inGroundShader; - atm = inAtm; + atmosphere = inAtm; _lockToCamera = false; return self; @@ -297,67 +74,10 @@ - (void)setSunPosition:(MaplyCoordinate3d)inSunPos - (void)setLockToCamera:(bool)lockToCamera { - _lockToCamera = lockToCamera; - changed = true; -} - -static bool nameIDsSetup = false; -static StringIdentity v3CameraPosNameID; -static StringIdentity v3LightPosNameID; -static StringIdentity v3InvWavelengthNameID; -static StringIdentity fCameraHeightNameID; -static StringIdentity fCameraHeight2NameID; -static StringIdentity fInnerRadiusNameID; -static StringIdentity fInnerRadius2NameID; -static StringIdentity fOuterRadiusNameID; -static StringIdentity fOuterRadius2NameID; -static StringIdentity fScaleNameID; -static StringIdentity fScaleDepthNameID; -static StringIdentity fScaleOverScaleDepthNameID; -static StringIdentity KrNameID; -static StringIdentity Kr4PINameID; -static StringIdentity KmNameID; -static StringIdentity Km4PINameID; -static StringIdentity ESunNameID; -static StringIdentity KmESunNameID; -static StringIdentity KrESunNameID; -static StringIdentity fSamplesNameID; -static StringIdentity nSamplesNameID; -static StringIdentity gNameID; -static StringIdentity g2NameID; -static StringIdentity fExposureNameID; - -- (void)setupStringIndices -{ - if (nameIDsSetup) - return; - - v3CameraPosNameID = StringIndexer::getStringID("u_v3CameraPos"); - v3LightPosNameID = StringIndexer::getStringID("u_v3LightPos"); - v3InvWavelengthNameID = StringIndexer::getStringID("u_v3InvWavelength"); - fCameraHeightNameID = StringIndexer::getStringID("u_fCameraHeight"); - fCameraHeight2NameID = StringIndexer::getStringID("u_fCameraHeight2"); - fInnerRadiusNameID = StringIndexer::getStringID("u_fInnerRadius"); - fInnerRadius2NameID = StringIndexer::getStringID("u_fInnerRadius2"); - fOuterRadiusNameID = StringIndexer::getStringID("u_fOuterRadius"); - fOuterRadius2NameID = StringIndexer::getStringID("u_fOuterRadius2"); - fScaleNameID = StringIndexer::getStringID("u_fScale"); - fScaleDepthNameID = StringIndexer::getStringID("u_fScaleDepth"); - fScaleOverScaleDepthNameID = StringIndexer::getStringID("u_fScaleOverScaleDepth"); - KrNameID = StringIndexer::getStringID("u_Kr"); - Kr4PINameID = StringIndexer::getStringID("u_Kr4PI"); - KmNameID = StringIndexer::getStringID("u_Km"); - Km4PINameID = StringIndexer::getStringID("u_Km4PI"); - ESunNameID = StringIndexer::getStringID("u_ESun"); - KmESunNameID = StringIndexer::getStringID("u_KmESun"); - KrESunNameID = StringIndexer::getStringID("u_KrESun"); - fSamplesNameID = StringIndexer::getStringID("u_fSamples"); - nSamplesNameID = StringIndexer::getStringID("u_nSamples"); - gNameID = StringIndexer::getStringID("g"); - g2NameID = StringIndexer::getStringID("g2"); - fExposureNameID = StringIndexer::getStringID("fExposure"); - - nameIDsSetup = true; + if (_lockToCamera != lockToCamera) { + _lockToCamera = lockToCamera; + changed = true; + } } // Thanks to: http://stainlessbeer.weebly.com/planets-9-atmospheric-scattering.html @@ -366,7 +86,12 @@ - (void)setupStringIndices - (void)updateForFrame:(void *)frameInfoVoid { RendererFrameInfo *frameInfo = (RendererFrameInfo *)frameInfoVoid; - [self setupStringIndices]; + + __strong MaplyAtmosphere *atm = atmosphere; + if (!atm) + { + return; + } if (!changed && started) { @@ -385,25 +110,57 @@ - (void)updateForFrame:(void *)frameInfoVoid if (_lockToCamera) sunDir3d = cameraPos; sunDir3d.normalize(); - //double cameraHeight = cameraPos.norm(); - //float scale = 1.0f / (atm.outerRadius - 1.f); - //float scaleDepth = 0.25; + const auto cameraHeight = (float)cameraPos.norm(); float wavelength[3]; [atm getWavelength:wavelength]; for (unsigned int ii=0;ii<3;ii++) + { wavelength[ii] = (float)(1.0/pow(wavelength[ii],4.0)); + } + + WhirlyKitAtmosphereShader::AtmosShaderVertUniforms vu; + memset(&vu, 0, sizeof(vu)); + vu.cameraHeight = cameraHeight; + vu.cameraHeight2 = cameraHeight * cameraHeight; + vu.innerRadius = 1.0f; + vu.innerRadius2 = vu.innerRadius * vu.innerRadius; + vu.outerRadius = atm.outerRadius; + vu.outerRadius2 = vu.outerRadius * vu.outerRadius; + vu.scale = 1 / (vu.outerRadius - vu.innerRadius); + vu.scaleDepth = 0.25f; + vu.scaleOverScaleDepth = vu.scale / vu.scaleDepth; + vu.kr = atm.Kr; + vu.km = atm.Km; + vu.eSun = atm.ESun; + vu.kmESun = vu.km * vu.eSun; + vu.krESun = vu.kr * vu.eSun; + vu.kr4PI = (float)(vu.kr * 4.0 * M_PI); + vu.km4PI = (float)(vu.km * 4.0 * M_PI); + vu.samples = (float)atm.numSamples; + vu.nSamples = atm.numSamples; + CopyIntoMtlFloat3(vu.cameraPos, cameraPos); + CopyIntoMtlFloat3(vu.lightPos, sunDir3d); + CopyIntoMtlFloat3(vu.invWavelength, Point3f(wavelength[0], wavelength[1], wavelength[2])); + + WhirlyKitAtmosphereShader::AtmosShaderFragUniforms fu; + memset(&fu, 0, sizeof(fu)); + fu.g = atm.g; + fu.g2 = fu.g * fu.g; + fu.exposure = atm.exposure; + CopyIntoMtlFloat3(fu.lightPos, sunDir3d); - //MaplyShader *shaders[2] = {shader,groundShader}; - for (unsigned int ii=0;ii<2;ii++) + NSData *vBlock = [[NSData alloc] initWithBytes:&vu length:sizeof(vu)]; + NSData *fBlock = [[NSData alloc] initWithBytes:&fu length:sizeof(fu)]; + + for (MaplyShader *shader : {shader, groundShader}) { - //MaplyShader *thisShader = shaders[ii]; - // TODO: Update for Metal - NSLog(@"MaplyAtmosphere not implemented for Metal."); + [shader setUniformBlock:vBlock buffer:WhirlyKitAtmosphereShader::AtmosUniformVertEntry]; + [shader setUniformBlock:fBlock buffer:WhirlyKitAtmosphereShader::AtmosUniformFragEntry]; } changed = false; started = true; - lastCameraPos = cameraPos; + lastCameraPos = cameraPos; } @end @@ -417,9 +174,12 @@ @implementation MaplyAtmosphere float wavelength[3]; } -- (instancetype)initWithViewC:(WhirlyGlobeViewController *)inViewC +- (instancetype _Nullable)initWithViewC:(WhirlyGlobeViewController *)inViewC { - self = [super init]; + if (!(self = [super init])) + { + return nil; + } viewC = inViewC; @@ -434,13 +194,45 @@ - (instancetype)initWithViewC:(WhirlyGlobeViewController *)inViewC wavelength[1] = 0.570; wavelength[2] = 0.475; - // Atmosphere shader - shader = [self setupShader]; + id lib = [inViewC getMetalLibrary]; + MaplyRenderController *control = [inViewC getRenderControl]; + // Atmosphere shader + shader = [inViewC getShaderByName:kMaplyAtmosphereProgram]; if (!shader) - return nil; + { + auto air = std::make_shared( + [kMaplyAtmosphereProgram cStringUsingEncoding:NSASCIIStringEncoding], + [lib newFunctionWithName:@"vertexTri_atmos"], + [lib newFunctionWithName:@"fragmentTri_atmos"]); + if (air->valid) + { + [control addShader:kMaplyAtmosphereProgram program:air]; + shader = [inViewC getShaderByName:kMaplyAtmosphereProgram]; + } + if (!shader) + { + return nil; + } + } - _groundShader = [self setupGroundShader]; + _groundShader = [inViewC getShaderByName:kMaplyAtmosphereGroundProgram]; + if (!_groundShader) + { + auto ground = std::make_shared( + [kMaplyAtmosphereProgram cStringUsingEncoding:NSASCIIStringEncoding], + [lib newFunctionWithName:@"vertexTri_atmosGround"], + [lib newFunctionWithName:@"fragmentTri_atmosGround"]); + if (ground->valid) + { + [control addShader:kMaplyAtmosphereGroundProgram program:ground]; + _groundShader = [inViewC getShaderByName:kMaplyAtmosphereGroundProgram]; + } + if (!_groundShader) + { + return nil; + } + } [self complexAtmosphere]; @@ -476,77 +268,67 @@ - (float)getWavelengthForComponent:(short)component - (void)setLockToCamera:(bool)lockToCamera { _lockToCamera = lockToCamera; - if (sunUpdater) - sunUpdater.lockToCamera = _lockToCamera; + sunUpdater.lockToCamera = _lockToCamera; } - (void)complexAtmosphere { + const auto __strong vc = viewC; + if (!vc) + { + return; + } + // Make a sphere for the outer atmosphere MaplyShapeSphere *sphere = [[MaplyShapeSphere alloc] init]; sphere.center = MaplyCoordinateMake(0, 0); sphere.height = -1.0; sphere.radius = _outerRadius; - - const auto __strong vc = viewC; - compObj = [vc addShapes:@[sphere] desc:@{kMaplyZBufferRead: @(NO), - kMaplyZBufferWrite: @(NO), - kMaplyShapeSampleX: @(120), - kMaplyShapeSampleY: @(60), - kMaplyShapeInsideOut: @(YES), - kMaplyShapeCenterX: @(0.0), - kMaplyShapeCenterY: @(0.0), - kMaplyShapeCenterZ: @(0.0), - kMaplyDrawPriority: @(kMaplyAtmosphereDrawPriorityDefault), - kMaplyShader: kAtmosphereShader}]; - - sunUpdater = [[SunUpdater alloc] initWithShader:shader groundShader:_groundShader atm:self viewC:vc]; - [vc addActiveObject:sunUpdater]; -} -- (MaplyShader *)setupGroundShader -{ - // TODO: Switch to Metal -// MaplyShader *theShader = [[MaplyShader alloc] initWithName:kAtmosphereGroundShader vertex:[NSString stringWithFormat:@"%s",vertexShaderGroundTri] fragment:[NSString stringWithFormat:@"%s",fragmentShaderGroundTri] viewC:viewC]; - MaplyShader *theShader = nil; - if (!theShader.valid) - return nil; - if (theShader) - [viewC addShaderProgram:theShader]; - - return theShader; + NSDictionary *desc = @{ + kMaplyZBufferRead: @(NO), + kMaplyZBufferWrite: @(NO), + kMaplyShapeSampleX: @(120), + kMaplyShapeSampleY: @(60), + kMaplyShapeInsideOut: @(YES), + kMaplyShapeCenterX: @(0.0), + kMaplyShapeCenterY: @(0.0), + kMaplyShapeCenterZ: @(0.0), + kMaplyDrawPriority: @(kMaplyAtmosphereDrawPriorityDefault), + kMaplyShader: kMaplyAtmosphereProgram + }; + + compObj = [vc addShapes:@[sphere] desc:desc]; + if (compObj) + { + sunUpdater = [[SunUpdater alloc] initWithShader:shader groundShader:_groundShader atm:self viewC:vc]; + if (sunUpdater) + { + [vc addActiveObject:sunUpdater]; + } + } } - (void)setSunPosition:(MaplyCoordinate3d)sunPos { - if (sunUpdater) - [sunUpdater setSunPosition:sunPos]; -} - -- (MaplyShader *)setupShader -{ -// TODO: Switch to Metal -// MaplyShader *theShader = [[MaplyShader alloc] initWithName:kAtmosphereShader vertex:[NSString stringWithFormat:@"%s",vertexShaderTri] fragment:[NSString stringWithFormat:@"%s",fragmentShaderTri] viewC:viewC]; -// MaplyShader *theShader = [[MaplyShader alloc] initWithName:kAtmosphereShader vertex:[NSString stringWithFormat:@"%s",vertexShaderAtmosTri] fragment:[NSString stringWithFormat:@"%s",fragmentShaderAtmosTri] viewC:viewC]; - MaplyShader *theShader = nil; - if (!theShader.valid) - return nil; - if (theShader) - [viewC addShaderProgram:theShader]; - - return theShader; + [sunUpdater setSunPosition:sunPos]; } - (void)removeFromViewC { - const auto __strong vc = viewC; - if (compObj) - [vc removeObject:compObj]; - compObj = nil; - if (sunUpdater) - [vc removeActiveObject:sunUpdater]; - sunUpdater = nil; - // Note: Should remove shader + if (const auto __strong vc = viewC) + { + if (compObj) + { + [vc removeObject:compObj]; + compObj = nil; + } + if (sunUpdater) + { + [vc removeActiveObject:sunUpdater]; + sunUpdater = nil; + } + } } @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyShader.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyShader.mm index 3e52de4e5d..d314bb492a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyShader.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyShader.mm @@ -40,7 +40,10 @@ @implementation MaplyShader std::vector textures; // Used to sit on the textures so they aren't deleted } -- (instancetype)initMetalWithName:(NSString *)inName vertex:(id)vertexFunc fragment:(id)fragFunc viewC:(NSObject *)baseViewC +- (instancetype _Nullable)initMetalWithName:(NSString *)inName + vertex:(id)vertexFunc + fragment:(id)fragFunc + viewC:(NSObject *)baseViewC { if (!vertexFunc) { NSLog(@"Passed in nil function to MaplyShader::initMetalWithName"); @@ -53,7 +56,11 @@ - (instancetype)initMetalWithName:(NSString *)inName vertex:(id)ver return nil; } - self = [super init]; + if (!(self = [super init])) + { + return nil; + } + viewC = baseViewC; std::string name = [inName cStringUsingEncoding:NSASCIIStringEncoding]; @@ -83,15 +90,21 @@ - (instancetype)initMetalWithName:(NSString *)inName vertex:(id)ver } -- (instancetype)initWithProgram:(ProgramRef)program viewC:(NSObject * __nonnull)baseViewC +- (instancetype _Nullable)initWithProgram:(ProgramRef)program + viewC:(NSObject * __nonnull)baseViewC { if (!program) return nil; + MaplyRenderController *renderControl = [baseViewC getRenderControl]; if (!renderControl) return nil; - self = [super init]; + if (!(self = [super init])) + { + return nil; + } + _program = program; viewC = baseViewC; scene = renderControl->scene; @@ -105,13 +118,11 @@ - (instancetype)initWithProgram:(ProgramRef)program viewC:(NSObjectgetId(); + return _program ? _program->getId() : EmptyIdentity; } -- (void)setTexture:(MaplyTexture * __nonnull)tex forIndex:(int)idx viewC:(NSObject * __nonnull)view +- (void)setTexture:(MaplyTexture * __nonnull)tex forIndex:(int)idx + viewC:(NSObject * __nonnull)view { if (!_program || !scene || !renderer) return; @@ -127,7 +138,8 @@ - (void)setTexture:(MaplyTexture * __nonnull)tex forIndex:(int)idx viewC:(NSObje scene->addChangeRequest(new ShaderAddTextureReq(programMTL->getId(),-1,tex.texID,idx)); } -- (void)removeTexture:(MaplyTexture *)tex viewC:(NSObject *)viewC +- (void)removeTexture:(MaplyTexture *)tex + viewC:(NSObject *)viewC { if (!_program || !scene || !renderer || tex.texID == EmptyIdentity) return; @@ -156,8 +168,11 @@ - (void)removeTexture:(MaplyTexture *)tex viewC:(NSObject(_program.get()); + if (!programMTL || !scene || !renderer) + { return false; + } if (renderer->getType() != SceneRenderer::RenderMetal) { @@ -165,47 +180,41 @@ - (bool)setUniformBlock:(NSData *__nonnull)uniBlock buffer:(int)bufferID return false; } - ProgramMTL *programMTL = (ProgramMTL *)_program.get(); - - RawNSDataReaderRef dataWrap = RawNSDataReaderRef(new RawNSDataReader(uniBlock)); - scene->addChangeRequest(new ProgramUniformBlockSetRequest(programMTL->getId(),dataWrap,bufferID)); - + auto dataWrap = std::make_shared(uniBlock); + auto req = new ProgramUniformBlockSetRequest(programMTL->getId(),std::move(dataWrap),bufferID); + scene->addChangeRequest(req); + return true; } - (void)setReduceMode:(bool)reduceMode { - if (!_program) - return; - - if (reduceMode) - _program->setReduceMode(Program::TextureReduce); - else - _program->setReduceMode(Program::None); + if (_program) + { + _program->setReduceMode(reduceMode ? Program::TextureReduce : Program::None); + } } // We're assuming the view controller has set the proper context - (void)teardown { - if (_program) - { -// _program->cleanUp(); -// delete _program; - _program = NULL; - } + _program.reset(); if (scene) { ChangeSet changes; + changes.reserve(texIDs.size()); for (SimpleIDSet::iterator it = texIDs.begin();it != texIDs.end(); ++it) + { changes.push_back(new RemTextureReq(*it)); + } scene->addChangeRequests(changes); } } - (bool)valid { - return _program != NULL; + return _program.operator bool(); } - (NSString *)getError diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyVariableTarget.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyVariableTarget.mm index 612895dfb3..29fdb0f1f4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyVariableTarget.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyVariableTarget.mm @@ -85,11 +85,7 @@ - (void)setupRectangle else NSLog(@"Failed to add auxiliary render target in setupRectangle for MaplyVariableTarget."); } - NSString *shaderName = nil; - if (_shader) - shaderName = [_shader name]; - else - shaderName = kMaplyShaderDefaultTriNoLighting; + const NSString * const shaderName = _shader ? [_shader name] : kMaplyShaderDefaultTriNoLighting; _rectObj = [theViewC addShapes:@[rect] desc:@{kMaplyColor: _color, kMaplyDrawPriority: @(_drawPriority), diff --git a/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h b/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h new file mode 100644 index 0000000000..ee55868aa0 --- /dev/null +++ b/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h @@ -0,0 +1,78 @@ +/* AtmosphereShaders.h + * WhirlyGlobeLib + * + * Created by Tim Sylvester on 2/2/22. + * Copyright 2022 mousebird consulting. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef AtmosphereShaders_h +#define AtmosphereShaders_h + +namespace WhirlyKitAtmosphereShader +{ + +// Entries in the free form argument buffers +// We start after 400 from the default shaders +enum AtmosArgBufferEntries { + AtmosUniformVertEntry = 501, + AtmosUniformFragEntry = 502, +}; + + +// Uniforms passed into the shaders +struct AtmosShaderVertUniforms +{ + float discardZero; // Zero is a discard value + simd_float2 minMax; // Data value min/max + int component; // Which component we're pulling from + + simd::float4x4 mvpMatrix; // "uniform mat4 u_mvpMatrix;\n"+ + simd::float3 cameraPos; // "uniform vec3 u_v3CameraPos;\n"+ + float cameraHeight; // "uniform float u_fCameraHeight;\n"+ + float cameraHeight2; // "uniform float u_fCameraHeight2;\n"+ + simd::float3 lightPos; // "uniform vec3 u_v3LightPos;\n"+ + + float innerRadius; // "uniform float u_fInnerRadius;\n"+ + float innerRadius2; // "uniform float u_fInnerRadius2;\n"+ + float outerRadius; // "uniform float u_fOuterRadius;\n"+ + float outerRadius2; // "uniform float u_fOuterRadius2;\n"+ + float scale; // "uniform float u_fScale;\n"+ + float scaleDepth; // "uniform float u_fScaleDepth;\n"+ + float scaleOverScaleDepth; // "uniform float u_fScaleOverScaleDepth;\n"+ + + float kr; // "uniform float u_Kr;\n"+ + float kr4PI; // "uniform float u_Kr4PI;\n"+ + float km; // "uniform float u_Km;\n"+ + float km4PI; // "uniform float u_Km4PI;\n"+ + float eSun; // "uniform float u_ESun;\n"+ + float kmESun; // "uniform float u_KmESun;\n"+ + float krESun; // "uniform float u_KrESun;\n"+ + simd::float3 invWavelength; // "uniform vec3 u_v3InvWavelength ;\n"+ + float samples; // "uniform float u_fSamples;\n"+ + int nSamples; // "uniform int u_nSamples;\n"+ +}; + +struct AtmosShaderFragUniforms +{ + float g; + float g2; + float exposure; + simd::float3 lightPos; +}; + +} + +#endif /* AtmosphereShaders_h */ + diff --git a/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal b/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal new file mode 100644 index 0000000000..546a431c3e --- /dev/null +++ b/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal @@ -0,0 +1,161 @@ +/* Atmosphere.metal + * WhirlyGlobeLib + * + * Created by Tim Sylvester on 2/2/22. + * Copyright 2022 mousebird consulting. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +#include +#import "../include/DefaultShadersMTL.h" +#import "../include/AtmosphereShadersMTL.h" + +using namespace metal; +using namespace WhirlyKitShader; +using namespace WhirlyKitAtmosphereShader; + +// Arguments we're expecting for the shader + +struct VertexTriArgBuffer { + UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; + AtmosShaderVertUniforms varUni [[ id(AtmosUniformVertEntry) ]]; +}; + +struct FragTriArgBuffer { + UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; + AtmosShaderFragUniforms varUni [[ id(AtmosUniformFragEntry) ]]; +}; + +struct ProjVertexTriAtmos { + float4 position [[invariant]] [[position]]; + float3 lightPos; + float3 direction; + float3 rayleighColor; + float3 mieColor; +}; + +float scale(float fCos) +{ + const float x = 1.0 - fCos; + return exp(-0.00287 + x * (0.459 + x * (3.83 + x * (-6.80 + x * 5.25)))); +} + +vertex ProjVertexTriAtmos vertexTri_atmos( + VertexTriA vert [[stage_in]], + uint vertID [[vertex_id]], + constant Uniforms &uniforms [[ buffer(WKSVertUniformArgBuffer) ]], + constant Lighting &lighting [[ buffer(WKSVertLightingArgBuffer) ]], + constant VertexTriArgBuffer & vertArgs [[buffer(WKSVertexArgBuffer)]]) +{ + ProjVertexTriAtmos out; + + const float3 camPos = vertArgs.varUni.cameraPos;//(vertArgs.uniDrawState.singleMat * float4(vertArgs.varUni.cameraPos,1.0)).xyz; + const float3 lightPos = vertArgs.varUni.lightPos;//(vertArgs.uniDrawState.singleMat * float4(vertArgs.varUni.lightPos,1.0)).xyz; + const float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; + if (vertArgs.uniDrawState.clipCoords) { + out.position = float4(vertPos,1); + } else { + out.position = uniforms.pMatrix * (uniforms.mvMatrix * float4(vertPos,1) + + uniforms.mvMatrixDiff * float4(vertPos,1)); + } + out.lightPos = lightPos; + + const float3 pos = vert.position;//vertPos.xyz;////out.position; + float3 ray = pos - camPos; + float far = length(ray); + ray /= far; + + const float B = 2.0 * dot(camPos, ray); + const float C = vertArgs.varUni.cameraHeight2 - vertArgs.varUni.outerRadius2; + const float det = max(0.0, B * B - 4.0 * C); + const float near = 0.5 * (-B - sqrt(det)); + + const float3 start = camPos + ray * near; + far -= near; + + const float scaleDepth = vertArgs.varUni.scaleDepth; + const float startAngle = dot(ray, start) / vertArgs.varUni.outerRadius; + const float startDepth = exp(-1.0 / scaleDepth); + const float startOffset = startDepth * scale(startAngle) * scaleDepth; + + const float sampleLength = far / vertArgs.varUni.samples; + const float scaledLength = sampleLength * vertArgs.varUni.scale; + const float3 sampleRay = ray * sampleLength; + float3 samplePoint = start + sampleRay * 0.5; + + float3 frontColor = float3(0, 0, 0); + for (int i=0; i Date: Fri, 4 Feb 2022 15:18:46 -0800 Subject: [PATCH 19/78] Remove `UNORDERED=1`, it's no longer needed and breaks Catalyst builds. Let Xcode update framework name --- WhirlyGlobe.podspec | 1 - .../AutoTester.xcodeproj/project.pbxproj | 16 +++++++--------- .../project.pbxproj | 3 --- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/WhirlyGlobe.podspec b/WhirlyGlobe.podspec index 1227752caa..9d6e1d80c6 100644 --- a/WhirlyGlobe.podspec +++ b/WhirlyGlobe.podspec @@ -35,7 +35,6 @@ Pod::Spec.new do |s| __IPHONEOS__ SQLITE_OPEN_READONLY HAVE_PTHREAD=1 - UNORDERED=1 ).join(" "), "HEADER_SEARCH_PATHS" => %w( "$(SDKROOT)/usr/include/libxml2" diff --git a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj index b86757c403..da230fc90b 100644 --- a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj +++ b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj @@ -107,8 +107,8 @@ 2BF29B8C24D2268200553963 /* LegendViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2BF29B8B24D2268200553963 /* LegendViewController.storyboard */; }; 2BF29B8F24D226B000553963 /* LegendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF29B8E24D226B000553963 /* LegendViewController.swift */; }; 2BFC7E511D132DCB0040E2A3 /* ScreenMarkersTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */; }; + 31041A2227A36D53004B25E1 /* WhirlyGlobe.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobe.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 31041A3E27A4AE76004B25E1 /* ActiveObjectTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */; }; - 31041A2227A36D53004B25E1 /* WhirlyGlobeMaplyComponent.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobeMaplyComponent.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 311E0A9C2680F597007BE16F /* ATS_Route.shp in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A902680F597007BE16F /* ATS_Route.shp */; }; 311E0A9D2680F597007BE16F /* Airspace_Boundary.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */; }; 311E0A9E2680F597007BE16F /* Airspace_Boundary.shx in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A922680F597007BE16F /* Airspace_Boundary.shx */; }; @@ -526,7 +526,7 @@ 88FF5EF31BC31D95002F15CE /* tl_2013_06075_roads.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DF41BC31D95002F15CE /* tl_2013_06075_roads.sqlite */; }; 8F4D91DC1CDFA7DE00F68045 /* globe.png in Resources */ = {isa = PBXBuildFile; fileRef = 8F4D91DA1CDFA7DE00F68045 /* globe.png */; }; 8F4D91DD1CDFA7DE00F68045 /* map.png in Resources */ = {isa = PBXBuildFile; fileRef = 8F4D91DB1CDFA7DE00F68045 /* map.png */; }; - 8F858B011E7FE7EB00037D4E /* WhirlyGlobeMaplyComponent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobeMaplyComponent.framework */; }; + 8F858B011E7FE7EB00037D4E /* WhirlyGlobe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobe.framework */; }; 8F981DB81DE3577C00717DF1 /* ne_10m_roads.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB21DE3577C00717DF1 /* ne_10m_roads.dbf */; }; 8F981DB91DE3577C00717DF1 /* ne_10m_roads.prj in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB31DE3577C00717DF1 /* ne_10m_roads.prj */; }; 8F981DBB1DE3577C00717DF1 /* ne_10m_roads.shp in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB51DE3577C00717DF1 /* ne_10m_roads.shp */; }; @@ -608,7 +608,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 31041A2227A36D53004B25E1 /* WhirlyGlobeMaplyComponent.framework in Embed Frameworks */, + 31041A2227A36D53004B25E1 /* WhirlyGlobe.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -1222,7 +1222,7 @@ buildActionMask = 2147483647; files = ( 2B1806D322AECF4300DD3DB1 /* Accelerate.framework in Frameworks */, - 8F858B011E7FE7EB00037D4E /* WhirlyGlobeMaplyComponent.framework in Frameworks */, + 8F858B011E7FE7EB00037D4E /* WhirlyGlobe.framework in Frameworks */, E5D2D66E1DE6C26A00E02305 /* libc++.tbd in Frameworks */, E5D2D66C1DE6C26000E02305 /* libz.tbd in Frameworks */, E5D2D66A1DE6C25A00E02305 /* libxml2.tbd in Frameworks */, @@ -1980,7 +1980,7 @@ 8F858AF71E7FE60C00037D4E /* Products */ = { isa = PBXGroup; children = ( - 8F858AFC1E7FE60C00037D4E /* WhirlyGlobeMaplyComponent.framework */, + 8F858AFC1E7FE60C00037D4E /* WhirlyGlobe.framework */, 8F858AFE1E7FE60C00037D4E /* WhirlyGlobeMaplyComponentTests.xctest */, ); name = Products; @@ -2081,10 +2081,10 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 8F858AFC1E7FE60C00037D4E /* WhirlyGlobeMaplyComponent.framework */ = { + 8F858AFC1E7FE60C00037D4E /* WhirlyGlobe.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = WhirlyGlobeMaplyComponent.framework; + path = WhirlyGlobe.framework; remoteRef = 8F858AFB1E7FE60C00037D4E /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -2839,7 +2839,6 @@ "\"$(SRCROOT)/../../../common/WhirlyGlobeLib/include\"", ); INFOPLIST_FILE = AutoTester/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 3.1; PRODUCT_BUNDLE_IDENTIFIER = com.mousebirdconsulting.AutoTesterApp; @@ -2875,7 +2874,6 @@ "\"$(SRCROOT)/../../../common/WhirlyGlobeLib/include\"", ); INFOPLIST_FILE = AutoTester/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 3.1; PRODUCT_BUNDLE_IDENTIFIER = com.mousebirdconsulting.AutoTesterApp; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index e653716326..86d651a949 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -5196,10 +5196,8 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", "$(inherited)", "HAVE_PTHREAD=1", - "UNORDERED=1", __IPHONEOS__, __USE_SDL_GLES__, ); @@ -5254,7 +5252,6 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREPROCESSOR_DEFINITIONS = ( "HAVE_PTHREAD=1", - "UNORDERED=1", __IPHONEOS__, __USE_SDL_GLES__, ); From 45eea725f018a3d925fc7d6032a1bae7c651242c Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 4 Feb 2022 15:20:56 -0800 Subject: [PATCH 20/78] Fix `insideOut` option for shape objects --- .../src/control/MaplyBaseInteractionLayer.mm | 1 - 1 file changed, 1 deletion(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm index 7c5cd5efa4..9f2cd40cec 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm @@ -2065,7 +2065,6 @@ - (void)addShapesRun:(NSArray *)argArray iosDictionary dictWrap(inDesc); ShapeInfo shapeInfo(dictWrap); - shapeInfo.insideOut = false; [self resolveInfoDefaults:inDesc info:&shapeInfo defaultShader:kMaplyDefaultTriangleShader]; [self resolveDrawPriority:inDesc info:&shapeInfo drawPriority:kMaplyShapeDrawPriorityDefault offset:0]; From f7b06e39f1dddd463d58f3e3e2832c9ad77e2fed Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 4 Feb 2022 15:21:10 -0800 Subject: [PATCH 21/78] Fix broken links --- .../maply/src/main/java/com/mousebird/maply/Atmosphere.java | 2 +- .../include/rendering/MaplyAtmosphere.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/library/maply/src/main/java/com/mousebird/maply/Atmosphere.java b/android/library/maply/src/main/java/com/mousebird/maply/Atmosphere.java index 66e6781c91..08a6f1e3eb 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/Atmosphere.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/Atmosphere.java @@ -25,7 +25,7 @@ /** Sets up the objects and shaders to implement an atmosphere. *
* This object sets up a shader implementation of the simple atmosphere from GPU Gems 2 - * http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html + * https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering */ public class Atmosphere { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h index fae06f4b97..a73f1a6c54 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/rendering/MaplyAtmosphere.h @@ -25,7 +25,7 @@ Sets up the objects and shaders to implement an atmosphere. This object sets up a shader implementation of the simple atmosphere from GPU Gems 2 - http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter16.html + https://developer.nvidia.com/gpugems/gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-scattering */ @interface MaplyAtmosphere : NSObject From 47f4e37fdd210c064c54b90010d2e29e45c2f365 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 4 Feb 2022 15:25:05 -0800 Subject: [PATCH 22/78] minor optimization --- ios/library/WhirlyGlobeLib/src/BasicDrawableBuilderMTL.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/BasicDrawableBuilderMTL.mm b/ios/library/WhirlyGlobeLib/src/BasicDrawableBuilderMTL.mm index bc81c75348..1e209fceb9 100644 --- a/ios/library/WhirlyGlobeLib/src/BasicDrawableBuilderMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/BasicDrawableBuilderMTL.mm @@ -103,7 +103,7 @@ VertexAttributeMTL *ptsAttr = (VertexAttributeMTL *)basicDraw->vertexAttributes[ptsIndex]; ptsAttr->slot = WhirlyKitShader::WKSVertexPositionAttribute; ptsAttr->reserve(points.size()); - for (auto pt : points) + for (const auto &pt : points) ptsAttr->addVector3f(pt); draw->tris = tris; @@ -117,7 +117,7 @@ FloatExpressionToMtl(opacityExp, vecExp.opacityExp); BasicDrawable::UniformBlock uniBlock; - uniBlock.blockData = RawDataRef(new RawNSDataReader([[NSData alloc] initWithBytes:&vecExp length:sizeof(vecExp)])); + uniBlock.blockData = std::make_shared([[NSData alloc] initWithBytes:&vecExp length:sizeof(vecExp)]); uniBlock.bufferID = WhirlyKitShader::WKSUniformVecEntryExp; basicDraw->setUniBlock(uniBlock); } From 6a8a0bb95753888ce8bd9a990ea8b141bf49020c Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 4 Feb 2022 15:27:26 -0800 Subject: [PATCH 23/78] Normalize API to let Android access the geo location under the sun --- .../autotester/TestCases/BillboardAdapter.kt | 8 +- .../generated/com_mousebird_maply_Sun.h | 6 +- .../maply/jni/src/astronomy/Sun_jni.cpp | 115 +++++++----------- .../main/java/com/mousebird/maply/Moon.java | 2 +- .../main/java/com/mousebird/maply/Sun.java | 5 +- 5 files changed, 56 insertions(+), 80 deletions(-) diff --git a/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/BillboardAdapter.kt b/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/BillboardAdapter.kt index 964129f59a..a2d9057c8a 100644 --- a/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/BillboardAdapter.kt +++ b/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/BillboardAdapter.kt @@ -53,8 +53,8 @@ class BillboardAdapter(private val viewC: GlobeController, // Sun val billSun = Billboard().apply { - val sunPosition = sun.asPosition() - center = Point3d(sunPosition[0].toDouble(), sunPosition[1].toDouble(), 5.4 * EarthRadius) + val sunPosition = sun.position + center = Point3d(sunPosition.x, sunPosition.y, 5.4 * EarthRadius) selectable = false screenObject = ScreenObject().apply { @@ -77,7 +77,7 @@ class BillboardAdapter(private val viewC: GlobeController, cal.timeZone = SimpleTimeZone(SimpleTimeZone.UTC_TIME, "UTC") val moon = Moon(cal) - val moonPosition = moon.asPosition() + val moonPosition = moon.position center = Point3d(moonPosition.x, moonPosition.y, 5.4 * EarthRadius) screenObject = ScreenObject().apply { @@ -95,6 +95,8 @@ class BillboardAdapter(private val viewC: GlobeController, waveLength = floatArrayOf(0.650f, 0.570f, 0.475f) setSunPosition(sun.direction) } + + viewC.setPositionGeo(sun.position.x + 2 * Math.PI, 0.0, 2.0) } var atmosphere: Atmosphere? = null diff --git a/android/library/maply/jni/include/generated/com_mousebird_maply_Sun.h b/android/library/maply/jni/include/generated/com_mousebird_maply_Sun.h index b974f202ae..c7e6f553f1 100644 --- a/android/library/maply/jni/include/generated/com_mousebird_maply_Sun.h +++ b/android/library/maply/jni/include/generated/com_mousebird_maply_Sun.h @@ -25,10 +25,10 @@ JNIEXPORT jobject JNICALL Java_com_mousebird_maply_Sun_getDirection /* * Class: com_mousebird_maply_Sun - * Method: asPosition - * Signature: ()[F + * Method: getPosition + * Signature: ()Lcom/mousebird/maply/Point2d; */ -JNIEXPORT jfloatArray JNICALL Java_com_mousebird_maply_Sun_asPosition +JNIEXPORT jobject JNICALL va_com_mousebird_maply_Sun_getPosition (JNIEnv *, jobject); /* diff --git a/android/library/maply/jni/src/astronomy/Sun_jni.cpp b/android/library/maply/jni/src/astronomy/Sun_jni.cpp index d2586d9e48..d7c3db0ab7 100644 --- a/android/library/maply/jni/src/astronomy/Sun_jni.cpp +++ b/android/library/maply/jni/src/astronomy/Sun_jni.cpp @@ -1,5 +1,4 @@ -/* - * Sun_jni.cpp +/* Sun_jni.cpp * WhirlyGlobeLib * * Created by Steve Gifford on 3/28/16. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import @@ -26,110 +24,83 @@ using namespace Eigen; using namespace WhirlyKit; -template<> SunClassInfo *SunClassInfo::classInfoObj = NULL; +template<> SunClassInfo *SunClassInfo::classInfoObj = nullptr; +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_Sun_nativeInit -(JNIEnv *env, jclass cls) + (JNIEnv *env, jclass cls) { SunClassInfo::getClassInfo(env,cls); } +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_Sun_initialise -(JNIEnv *env, jobject obj) + (JNIEnv *env, jobject obj) { - try { - Sun *sun = new Sun(); - SunClassInfo::getClassInfo()->setHandle(env,obj,sun); - } catch (...) { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in Sun::initialise()"); + try + { + SunClassInfo::getClassInfo()->setHandle(env,obj,new Sun()); } + MAPLY_STD_JNI_CATCH() } static std::mutex disposeMutex; +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_Sun_dispose -(JNIEnv *env, jobject obj) + (JNIEnv *env, jobject obj) { try { SunClassInfo *classInfo = SunClassInfo::getClassInfo(); - { - std::lock_guard lock(disposeMutex); - Sun *inst = classInfo->getObject(env,obj); - if (!inst) - return; - delete inst; - - classInfo->clearHandle(env,obj); - } - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in Sun::dispose()"); + std::lock_guard lock(disposeMutex); + delete classInfo->getObject(env,obj); + classInfo->clearHandle(env,obj); } + MAPLY_STD_JNI_CATCH() } -JNIEXPORT jobject JNICALL Java_com_mousebird_maply_Sun_getDirection -(JNIEnv *env, jobject obj) +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_Sun_getPosition + (JNIEnv *env, jobject obj) { try { - SunClassInfo *classInfo = SunClassInfo::getClassInfo(); - Sun *inst = classInfo->getObject(env,obj); - if (!inst) - return NULL; - - Point3d pt = inst->getDirection(); - - return MakePoint3d(env, pt); - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in Sun::dispose()"); + if (Sun *inst = SunClassInfo::get(env,obj)) + { + return MakePoint2d(env, Point2d(inst->sunLon, inst->sunLat)); + } } - - return NULL; + MAPLY_STD_JNI_CATCH() + return nullptr; } -JNIEXPORT void JNICALL Java_com_mousebird_maply_Sun_setTime -(JNIEnv *env, jobject obj, jdouble theTime, jdouble year, jdouble month, jdouble day, jdouble hour, jdouble minute, jdouble second) +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_Sun_getDirection + (JNIEnv *env, jobject obj) { try { - SunClassInfo *classInfo = SunClassInfo::getClassInfo(); - Sun *inst = classInfo->getObject(env,obj); - if (!inst) - return; - inst->time = theTime; - - inst->setTime(year,month,day,hour,minute,second); - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in Sun::dispose()"); + if (Sun *inst = SunClassInfo::get(env,obj)) + { + return MakePoint3d(env, inst->getDirection()); + } } + MAPLY_STD_JNI_CATCH() + return nullptr; } -JNIEXPORT jfloatArray JNICALL Java_com_mousebird_maply_Sun_asPosition -(JNIEnv *env, jobject obj) +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_Sun_setTime + (JNIEnv *env, jobject obj, jdouble theTime, jdouble year, jdouble month, jdouble day, jdouble hour, jdouble minute, jdouble second) { try { - SunClassInfo *classInfo = SunClassInfo::getClassInfo(); - Sun *inst = classInfo->getObject(env,obj); - if (!inst) - return NULL; - - float position[2] = {(float) inst->sunLon, (float) inst->sunLat}; - jfloatArray result; - result = env->NewFloatArray(2); - env->SetFloatArrayRegion(result, 0, 2, position); - return result; - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in Sun::asPosition()"); + if (Sun *inst = SunClassInfo::get(env,obj)) + { + inst->time = theTime; + inst->setTime(year, month, day, hour, minute, second); + } } - - return NULL; + MAPLY_STD_JNI_CATCH() } diff --git a/android/library/maply/src/main/java/com/mousebird/maply/Moon.java b/android/library/maply/src/main/java/com/mousebird/maply/Moon.java index 5a5729365e..5b0cca1297 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/Moon.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/Moon.java @@ -63,7 +63,7 @@ public Point2d asCoordinate(){ /** * @return the location above the globe in lon/lat/distance. Yay geocentric! */ - public Point3d asPosition() { + public Point3d getPosition() { double[] pos = this.getPositionOfMoon(); return new Point3d(pos[0], pos[1], 5.0); } diff --git a/android/library/maply/src/main/java/com/mousebird/maply/Sun.java b/android/library/maply/src/main/java/com/mousebird/maply/Sun.java index bd40a01285..f0eb02d186 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/Sun.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/Sun.java @@ -70,7 +70,10 @@ public void setDate(Date date) */ public native Point3d getDirection(); - public native float[] asPosition(); + /** + * Return the geo location (radians) + */ + public native Point2d getPosition(); static { From ca3062f1a90845964dddc257607d44c5be14de21 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 4 Feb 2022 16:43:17 -0800 Subject: [PATCH 24/78] Fix shape fade using the wrong time values --- common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp b/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp index 19e5d40af3..cc461083fa 100644 --- a/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp +++ b/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp @@ -145,7 +145,7 @@ void ShapeDrawableBuilder::flush() if (shapeInfo.fade > 0.0) { - TimeInterval curTime = time_t(); + const TimeInterval curTime = sceneRender->getScene()->getCurrentTime(); drawable->setFade(curTime,curTime+shapeInfo.fade); } drawables.push_back(drawable); @@ -409,7 +409,7 @@ void ShapeDrawableBuilderTri::flush() if (shapeInfo.fade > 0.0) { - TimeInterval curTime = time_t(NULL); + const TimeInterval curTime = sceneRender->getScene()->getCurrentTime(); drawable->setFade(curTime,curTime+shapeInfo.fade); } drawables.push_back(drawable); From 08348632270c3a11a3f27115c2bf3f0aafa85549 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 4 Feb 2022 17:24:04 -0800 Subject: [PATCH 25/78] Simplify by removing unnecessary uniforms. Add protection from quadratic significance loss. Add support for fade. --- .../src/rendering/MaplyAtmosphere.mm | 15 ++-- .../include/AtmosphereShadersMTL.h | 52 ++++++-------- .../src/AtmosphereShaders.metal | 69 ++++++++++++------- 3 files changed, 70 insertions(+), 66 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm index 09cdd8949e..1dc269681a 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyAtmosphere.mm @@ -121,11 +121,9 @@ - (void)updateForFrame:(void *)frameInfoVoid WhirlyKitAtmosphereShader::AtmosShaderVertUniforms vu; memset(&vu, 0, sizeof(vu)); vu.cameraHeight = cameraHeight; - vu.cameraHeight2 = cameraHeight * cameraHeight; vu.innerRadius = 1.0f; - vu.innerRadius2 = vu.innerRadius * vu.innerRadius; vu.outerRadius = atm.outerRadius; - vu.outerRadius2 = vu.outerRadius * vu.outerRadius; + vu.c = cameraHeight * cameraHeight - vu.outerRadius * vu.outerRadius; vu.scale = 1 / (vu.outerRadius - vu.innerRadius); vu.scaleDepth = 0.25f; vu.scaleOverScaleDepth = vu.scale / vu.scaleDepth; @@ -136,9 +134,7 @@ - (void)updateForFrame:(void *)frameInfoVoid vu.krESun = vu.kr * vu.eSun; vu.kr4PI = (float)(vu.kr * 4.0 * M_PI); vu.km4PI = (float)(vu.km * 4.0 * M_PI); - vu.samples = (float)atm.numSamples; - vu.nSamples = atm.numSamples; - CopyIntoMtlFloat3(vu.cameraPos, cameraPos); + vu.samples = atm.numSamples; CopyIntoMtlFloat3(vu.lightPos, sunDir3d); CopyIntoMtlFloat3(vu.invWavelength, Point3f(wavelength[0], wavelength[1], wavelength[2])); @@ -148,7 +144,7 @@ - (void)updateForFrame:(void *)frameInfoVoid fu.g2 = fu.g * fu.g; fu.exposure = atm.exposure; CopyIntoMtlFloat3(fu.lightPos, sunDir3d); - + NSData *vBlock = [[NSData alloc] initWithBytes:&vu length:sizeof(vu)]; NSData *fBlock = [[NSData alloc] initWithBytes:&fu length:sizeof(fu)]; @@ -186,7 +182,7 @@ - (instancetype _Nullable)initWithViewC:(WhirlyGlobeViewController *)inViewC _Kr = 0.0025; _Km = 0.0010; _ESun = 20.0; - _numSamples = 3; + _numSamples = 5; _outerRadius = 1.05; _g = -0.95; _exposure = 2.0; @@ -295,7 +291,8 @@ - (void)complexAtmosphere kMaplyShapeCenterY: @(0.0), kMaplyShapeCenterZ: @(0.0), kMaplyDrawPriority: @(kMaplyAtmosphereDrawPriorityDefault), - kMaplyShader: kMaplyAtmosphereProgram + kMaplyShader: kMaplyAtmosphereProgram, + kMaplyFade: @(5.0), }; compObj = [vc addShapes:@[sphere] desc:desc]; diff --git a/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h b/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h index ee55868aa0..5dfda00f81 100644 --- a/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h +++ b/ios/library/WhirlyGlobeLib/include/AtmosphereShadersMTL.h @@ -25,7 +25,8 @@ namespace WhirlyKitAtmosphereShader // Entries in the free form argument buffers // We start after 400 from the default shaders -enum AtmosArgBufferEntries { +enum AtmosArgBufferEntries +{ AtmosUniformVertEntry = 501, AtmosUniformFragEntry = 502, }; @@ -34,42 +35,31 @@ enum AtmosArgBufferEntries { // Uniforms passed into the shaders struct AtmosShaderVertUniforms { - float discardZero; // Zero is a discard value - simd_float2 minMax; // Data value min/max - int component; // Which component we're pulling from - - simd::float4x4 mvpMatrix; // "uniform mat4 u_mvpMatrix;\n"+ - simd::float3 cameraPos; // "uniform vec3 u_v3CameraPos;\n"+ - float cameraHeight; // "uniform float u_fCameraHeight;\n"+ - float cameraHeight2; // "uniform float u_fCameraHeight2;\n"+ - simd::float3 lightPos; // "uniform vec3 u_v3LightPos;\n"+ - - float innerRadius; // "uniform float u_fInnerRadius;\n"+ - float innerRadius2; // "uniform float u_fInnerRadius2;\n"+ - float outerRadius; // "uniform float u_fOuterRadius;\n"+ - float outerRadius2; // "uniform float u_fOuterRadius2;\n"+ - float scale; // "uniform float u_fScale;\n"+ - float scaleDepth; // "uniform float u_fScaleDepth;\n"+ - float scaleOverScaleDepth; // "uniform float u_fScaleOverScaleDepth;\n"+ - - float kr; // "uniform float u_Kr;\n"+ - float kr4PI; // "uniform float u_Kr4PI;\n"+ - float km; // "uniform float u_Km;\n"+ - float km4PI; // "uniform float u_Km4PI;\n"+ - float eSun; // "uniform float u_ESun;\n"+ - float kmESun; // "uniform float u_KmESun;\n"+ - float krESun; // "uniform float u_KrESun;\n"+ - simd::float3 invWavelength; // "uniform vec3 u_v3InvWavelength ;\n"+ - float samples; // "uniform float u_fSamples;\n"+ - int nSamples; // "uniform int u_nSamples;\n"+ + simd::float3 lightPos; // sun position (todo: use scene light info) + float cameraHeight; + float innerRadius; // The inner (planetary) radius + float outerRadius; // The outer (atmosphere) radius + float scale; // 1 / (outerRadius - innerRadius) + float scaleDepth; // The altitude at which the atmosphere's average density is found + float scaleOverScaleDepth; + float c; // cameraHeight^2 - outerRadius^2 + float kr; // scattering parameters + float kr4PI; + float km; + float km4PI; + float eSun; + float kmESun; + float krESun; + simd::float3 invWavelength; // 1 / pow(wavelength, 4) for RGB + int samples; // Number of samples to take between entry and exit points }; struct AtmosShaderFragUniforms { - float g; + simd::float3 lightPos; // sun position (todo: use scene light info) + float g; // ? float g2; float exposure; - simd::float3 lightPos; }; } diff --git a/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal b/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal index 546a431c3e..272e79a6b2 100644 --- a/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal @@ -1,4 +1,4 @@ -/* Atmosphere.metal +/* AtmosphereShaders.metal * WhirlyGlobeLib * * Created by Tim Sylvester on 2/2/22. @@ -25,29 +25,44 @@ using namespace WhirlyKitAtmosphereShader; // Arguments we're expecting for the shader struct VertexTriArgBuffer { - UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; - AtmosShaderVertUniforms varUni [[ id(AtmosUniformVertEntry) ]]; + UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; + AtmosShaderVertUniforms varUni [[ id(AtmosUniformVertEntry) ]]; + bool hasLighting; // provide WKSVertLightingArgBuffer }; struct FragTriArgBuffer { UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; AtmosShaderFragUniforms varUni [[ id(AtmosUniformFragEntry) ]]; + bool hasLighting; // provide WKSFragLightingArgBuffer }; struct ProjVertexTriAtmos { float4 position [[invariant]] [[position]]; - float3 lightPos; float3 direction; float3 rayleighColor; float3 mieColor; + float fade; }; +extern float calculateFade(constant Uniforms &, constant UniformDrawStateA &); + float scale(float fCos) { const float x = 1.0 - fCos; return exp(-0.00287 + x * (0.459 + x * (3.83 + x * (-6.80 + x * 5.25)))); } +// Find the intersections with the sphere, taking care to avoid loss of significance, +// and return the smaller/closer one. +float solveQuadratic(const float a, const float b, const float c) +{ + const float discr = b * b - 4 * a * c; + if (discr < 0) return 0; + else if (discr == 0) return - 0.5 * b / a; + const float q = -0.5 * (b + sign(b) * sqrt(discr)); + return min(q / a, c / q); +} + vertex ProjVertexTriAtmos vertexTri_atmos( VertexTriA vert [[stage_in]], uint vertID [[vertex_id]], @@ -57,8 +72,9 @@ vertex ProjVertexTriAtmos vertexTri_atmos( { ProjVertexTriAtmos out; - const float3 camPos = vertArgs.varUni.cameraPos;//(vertArgs.uniDrawState.singleMat * float4(vertArgs.varUni.cameraPos,1.0)).xyz; - const float3 lightPos = vertArgs.varUni.lightPos;//(vertArgs.uniDrawState.singleMat * float4(vertArgs.varUni.lightPos,1.0)).xyz; + //const float3 lightPos = (lighting.numLights > 0) ? lighting.lights[0].direction : float3(1,0,0); + const float3 lightPos = vertArgs.varUni.lightPos; + const float3 eyePos = uniforms.eyePos; const float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; if (vertArgs.uniDrawState.clipCoords) { out.position = float4(vertPos,1); @@ -66,21 +82,21 @@ vertex ProjVertexTriAtmos vertexTri_atmos( out.position = uniforms.pMatrix * (uniforms.mvMatrix * float4(vertPos,1) + uniforms.mvMatrixDiff * float4(vertPos,1)); } - out.lightPos = lightPos; - const float3 pos = vert.position;//vertPos.xyz;////out.position; - float3 ray = pos - camPos; + float3 ray = vert.position - eyePos; float far = length(ray); ray /= far; - const float B = 2.0 * dot(camPos, ray); - const float C = vertArgs.varUni.cameraHeight2 - vertArgs.varUni.outerRadius2; - const float det = max(0.0, B * B - 4.0 * C); - const float near = 0.5 * (-B - sqrt(det)); + // Calculate the closest intersection of the ray with the outer atmosphere + // (which is the near point of the ray passing through the atmosphere) + const float near = solveQuadratic(1, 2.0 * dot(eyePos, ray), vertArgs.varUni.c); - const float3 start = camPos + ray * near; + // Calculate the ray's start and end positions in the atmosphere, + // then calculate its scattering offset + const float3 start = eyePos + ray * near; far -= near; + // Initialize the scattering loop variables const float scaleDepth = vertArgs.varUni.scaleDepth; const float startAngle = dot(ray, start) / vertArgs.varUni.outerRadius; const float startDepth = exp(-1.0 / scaleDepth); @@ -91,14 +107,15 @@ vertex ProjVertexTriAtmos vertexTri_atmos( const float3 sampleRay = ray * sampleLength; float3 samplePoint = start + sampleRay * 0.5; + // Now loop through the sample points float3 frontColor = float3(0, 0, 0); - for (int i=0; i 0) ? lighting.lights[0].direction : float3(1,0,0); const float g = fragArgs.varUni.g; const float g2 = fragArgs.varUni.g2; - const float cos = dot(vert.lightPos /*fragArgs.varUni.lightPos*/, normalize(vert.direction)) / length(vert.direction); - const float cos2 = cos * cos; - const float rayPhase = 0.75 + 0.75 * cos2; - const float miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cos2) / pow(1.0 + g2 - 2.0*g*cos, 1.5); - - float3 color = rayPhase * vert.rayleighColor + miePhase * vert.mieColor; - color = 1.0 - exp(color * -fragArgs.varUni.exposure); - - return float4(color,color.b); + const float cs = dot(normalize(lightPos), normalize(vert.direction)) / length(vert.direction); + const float cs2 = cs * cs; + const float rayPhase = 0.75 + 0.75 * cs2; + const float miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cs2) / pow(1.0 + g2 - 2.0 * g * cs, 1.5); + const float3 color = 1.0 - exp((rayPhase * vert.rayleighColor + miePhase * vert.mieColor) * -fragArgs.varUni.exposure); + return float4(color, max(color.r, color.b) * vert.fade); } vertex ProjVertexTriA vertexTri_atmosGround( From 128bb135dbc04f9f043e595715c9cff39c7932d7 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 7 Feb 2022 11:08:52 -0800 Subject: [PATCH 26/78] Move atmosphere shaders into the main metal file to avoid making the "default library" fail to load in cocoapod-imported builds --- .../project.pbxproj | 4 - .../src/control/MaplyGlobeRenderController.mm | 2 +- .../src/control/MaplyRenderController.mm | 2 +- .../src/AtmosphereShaders.metal | 178 ------------------ .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 158 ++++++++++++++++ 5 files changed, 160 insertions(+), 184 deletions(-) delete mode 100644 ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index 86d651a949..e075ca1f4e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -1003,7 +1003,6 @@ 31CAB8DF2792126A00A5F744 /* GeographicLib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */; }; 31DDA0A627A4D3B800865ECE /* WhirlyGlobe_iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */; }; 31DDA4BA27A8787D00865ECE /* WhirlyGlobe.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 31DDA4CB27AB473A00865ECE /* AtmosphereShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 31DDA4CA27AB473A00865ECE /* AtmosphereShaders.metal */; }; 31DDA4CD27AB476400865ECE /* AtmosphereShadersMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */; }; 31DDA4CE27AB477300865ECE /* DefaultShadersMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B6998872293418F00C31E3F /* DefaultShadersMTL.h */; }; 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -2035,7 +2034,6 @@ 31CAB8DE2792126A00A5F744 /* GeographicLib.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GeographicLib.cpp; path = ../../../../common/WhirlyGlobeLib/src/GeographicLib.cpp; sourceTree = ""; }; 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe_iOS.h; sourceTree = ""; }; 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe.h; sourceTree = ""; }; - 31DDA4CA27AB473A00865ECE /* AtmosphereShaders.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; name = AtmosphereShaders.metal; path = ../src/AtmosphereShaders.metal; sourceTree = ""; }; 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtmosphereShadersMTL.h; sourceTree = ""; }; C4905728265AB9E3001E4A98 /* bucketalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bucketalloc.cpp; sourceTree = ""; }; C4905729265AB9E3001E4A98 /* bucketalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bucketalloc.h; sourceTree = ""; }; @@ -2411,7 +2409,6 @@ children = ( 2B6998872293418F00C31E3F /* DefaultShadersMTL.h */, 2B69987F228E26B500C31E3F /* wkDefaultShaders.metal */, - 31DDA4CA27AB473A00865ECE /* AtmosphereShaders.metal */, 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */, ); name = "metal shaders"; @@ -4600,7 +4597,6 @@ 3183313E259112BA005FEF70 /* DMS.cpp in Sources */, 2B82B6B41E82E24A0095FB14 /* PJ_tmerc.c in Sources */, 2B8796D321FFC59D00EF801D /* NSString+Stuff.mm in Sources */, - 31DDA4CB27AB473A00865ECE /* AtmosphereShaders.metal in Sources */, 2B3F451E243FD82200F85414 /* MaplyVectorStyle.mm in Sources */, 2B8A788B228607B3008B0A1F /* Program.cpp in Sources */, 2B8797222203BF7900EF801D /* MaplyBillboard.mm in Sources */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyGlobeRenderController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyGlobeRenderController.mm index f2e9c9122b..eb3f53c629 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyGlobeRenderController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyGlobeRenderController.mm @@ -199,7 +199,7 @@ - (void)loadSetup if (err) { NSLog(@"Failed to set up default Metal library in MaplyGlobeRenderController::loadSetup. Things will be missing."); } - SceneRendererMTLRef sceneRendererMTL = SceneRendererMTLRef(new SceneRendererMTL(mtlDevice,mtlLib,1.0)); + SceneRendererMTLRef sceneRendererMTL = std::make_shared(mtlDevice,mtlLib,1.0); // By default we're assuming offscreen renderers are dumb splats, but we're not doing that here sceneRendererMTL->offscreenBlendEnable = true; } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm index 5ebb10da3f..10c29b30cd 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm @@ -189,7 +189,7 @@ - (void)loadSetup if (err) { NSLog(@"Failed to set up default Metal library in MaplyRenderController::loadSetup. Things will be missing."); } - SceneRendererMTLRef sceneRendererMTL = SceneRendererMTLRef(new SceneRendererMTL(mtlDevice,mtlLib,1.0)); + SceneRendererMTLRef sceneRendererMTL = std::make_shared(mtlDevice,mtlLib,1.0); if (offlineMode) sceneRendererMTL->setup((int)initialFramebufferSize.width,(int)initialFramebufferSize.height, true); sceneRenderer = sceneRendererMTL; diff --git a/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal b/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal deleted file mode 100644 index 272e79a6b2..0000000000 --- a/ios/library/WhirlyGlobeLib/src/AtmosphereShaders.metal +++ /dev/null @@ -1,178 +0,0 @@ -/* AtmosphereShaders.metal - * WhirlyGlobeLib - * - * Created by Tim Sylvester on 2/2/22. - * Copyright 2022 mousebird consulting. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this - * file except in compliance with the License. You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS - * OF ANY KIND, either express or implied. See the License for the specific language - * governing permissions and limitations under the License. - */ - -#include -#import "../include/DefaultShadersMTL.h" -#import "../include/AtmosphereShadersMTL.h" - -using namespace metal; -using namespace WhirlyKitShader; -using namespace WhirlyKitAtmosphereShader; - -// Arguments we're expecting for the shader - -struct VertexTriArgBuffer { - UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; - AtmosShaderVertUniforms varUni [[ id(AtmosUniformVertEntry) ]]; - bool hasLighting; // provide WKSVertLightingArgBuffer -}; - -struct FragTriArgBuffer { - UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; - AtmosShaderFragUniforms varUni [[ id(AtmosUniformFragEntry) ]]; - bool hasLighting; // provide WKSFragLightingArgBuffer -}; - -struct ProjVertexTriAtmos { - float4 position [[invariant]] [[position]]; - float3 direction; - float3 rayleighColor; - float3 mieColor; - float fade; -}; - -extern float calculateFade(constant Uniforms &, constant UniformDrawStateA &); - -float scale(float fCos) -{ - const float x = 1.0 - fCos; - return exp(-0.00287 + x * (0.459 + x * (3.83 + x * (-6.80 + x * 5.25)))); -} - -// Find the intersections with the sphere, taking care to avoid loss of significance, -// and return the smaller/closer one. -float solveQuadratic(const float a, const float b, const float c) -{ - const float discr = b * b - 4 * a * c; - if (discr < 0) return 0; - else if (discr == 0) return - 0.5 * b / a; - const float q = -0.5 * (b + sign(b) * sqrt(discr)); - return min(q / a, c / q); -} - -vertex ProjVertexTriAtmos vertexTri_atmos( - VertexTriA vert [[stage_in]], - uint vertID [[vertex_id]], - constant Uniforms &uniforms [[ buffer(WKSVertUniformArgBuffer) ]], - constant Lighting &lighting [[ buffer(WKSVertLightingArgBuffer) ]], - constant VertexTriArgBuffer & vertArgs [[buffer(WKSVertexArgBuffer)]]) -{ - ProjVertexTriAtmos out; - - //const float3 lightPos = (lighting.numLights > 0) ? lighting.lights[0].direction : float3(1,0,0); - const float3 lightPos = vertArgs.varUni.lightPos; - const float3 eyePos = uniforms.eyePos; - const float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; - if (vertArgs.uniDrawState.clipCoords) { - out.position = float4(vertPos,1); - } else { - out.position = uniforms.pMatrix * (uniforms.mvMatrix * float4(vertPos,1) + - uniforms.mvMatrixDiff * float4(vertPos,1)); - } - - float3 ray = vert.position - eyePos; - float far = length(ray); - ray /= far; - - // Calculate the closest intersection of the ray with the outer atmosphere - // (which is the near point of the ray passing through the atmosphere) - const float near = solveQuadratic(1, 2.0 * dot(eyePos, ray), vertArgs.varUni.c); - - // Calculate the ray's start and end positions in the atmosphere, - // then calculate its scattering offset - const float3 start = eyePos + ray * near; - far -= near; - - // Initialize the scattering loop variables - const float scaleDepth = vertArgs.varUni.scaleDepth; - const float startAngle = dot(ray, start) / vertArgs.varUni.outerRadius; - const float startDepth = exp(-1.0 / scaleDepth); - const float startOffset = startDepth * scale(startAngle) * scaleDepth; - - const float sampleLength = far / vertArgs.varUni.samples; - const float scaledLength = sampleLength * vertArgs.varUni.scale; - const float3 sampleRay = ray * sampleLength; - float3 samplePoint = start + sampleRay * 0.5; - - // Now loop through the sample points - float3 frontColor = float3(0, 0, 0); - for (int i=0; i 0) ? lighting.lights[0].direction : float3(1,0,0); - const float g = fragArgs.varUni.g; - const float g2 = fragArgs.varUni.g2; - const float cs = dot(normalize(lightPos), normalize(vert.direction)) / length(vert.direction); - const float cs2 = cs * cs; - const float rayPhase = 0.75 + 0.75 * cs2; - const float miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cs2) / pow(1.0 + g2 - 2.0 * g * cs, 1.5); - const float3 color = 1.0 - exp((rayPhase * vert.rayleighColor + miePhase * vert.mieColor) * -fragArgs.varUni.exposure); - return float4(color, max(color.r, color.b) * vert.fade); -} - -vertex ProjVertexTriA vertexTri_atmosGround( - VertexTriA vert [[stage_in]], - constant Uniforms &uniforms [[ buffer(WKSVertUniformArgBuffer) ]], - constant Lighting &lighting [[ buffer(WKSVertLightingArgBuffer) ]], - constant VertexTriArgBuffer & vertArgs [[buffer(WKSVertexArgBuffer)]]) -{ - ProjVertexTriA out; - out.maskIDs = uint2(0,0); - - float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; - if (vertArgs.uniDrawState.clipCoords) { - out.position = float4(vertPos,1.0); - } else { - float4 v = vertArgs.uniDrawState.singleMat * float4(vert.position,1.0); - out.position = uniforms.pMatrix * (uniforms.mvMatrix * v + uniforms.mvMatrixDiff * v); - } - - out.color = float4(1,1,1,1); - - return out; -} - -fragment float4 fragmentTri_atmosGround( - ProjVertexTriA vert [[stage_in]], - constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], - constant FragTriArgBuffer & fragArgs [[buffer(WKSFragmentArgBuffer)]]) -{ - return vert.color; -} - diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index b38d96a8b5..4959b760ce 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1293,6 +1293,164 @@ vertex ProjVertexTriA vertexTri_billboard( } + +// Atmosphere shaders + +#import "../include/AtmosphereShadersMTL.h" +using namespace WhirlyKitAtmosphereShader; + +struct VertexTriArgBuffer { + UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; + AtmosShaderVertUniforms varUni [[ id(AtmosUniformVertEntry) ]]; + bool hasLighting; // provide WKSVertLightingArgBuffer +}; + +struct FragTriArgBuffer { + UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; + AtmosShaderFragUniforms varUni [[ id(AtmosUniformFragEntry) ]]; + bool hasLighting; // provide WKSFragLightingArgBuffer +}; + +struct ProjVertexTriAtmos { + float4 position [[invariant]] [[position]]; + float3 direction; + float3 rayleighColor; + float3 mieColor; + float fade; +}; + +float scatteringScale(float fCos) +{ + const float x = 1.0 - fCos; + return exp(-0.00287 + x * (0.459 + x * (3.83 + x * (-6.80 + x * 5.25)))); +} + +// Find the intersections with the sphere, taking care to avoid loss of significance, +// and return the smaller/closer one. +float solveQuadratic(const float a, const float b, const float c) +{ + const float discr = b * b - 4 * a * c; + if (discr < 0) return 0; + else if (discr == 0) return - 0.5 * b / a; + const float q = -0.5 * (b + sign(b) * sqrt(discr)); + return min(q / a, c / q); +} + +vertex ProjVertexTriAtmos vertexTri_atmos( + VertexTriA vert [[stage_in]], + uint vertID [[vertex_id]], + constant Uniforms &uniforms [[ buffer(WKSVertUniformArgBuffer) ]], + constant Lighting &lighting [[ buffer(WKSVertLightingArgBuffer) ]], + constant VertexTriArgBuffer & vertArgs [[buffer(WKSVertexArgBuffer)]]) +{ + ProjVertexTriAtmos out; + + //const float3 lightPos = (lighting.numLights > 0) ? lighting.lights[0].direction : float3(1,0,0); + const float3 lightPos = vertArgs.varUni.lightPos; + const float3 eyePos = uniforms.eyePos; + const float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; + if (vertArgs.uniDrawState.clipCoords) { + out.position = float4(vertPos,1); + } else { + out.position = uniforms.pMatrix * (uniforms.mvMatrix * float4(vertPos,1) + + uniforms.mvMatrixDiff * float4(vertPos,1)); + } + + float3 ray = vert.position - eyePos; + float far = length(ray); + ray /= far; + + // Calculate the closest intersection of the ray with the outer atmosphere + // (which is the near point of the ray passing through the atmosphere) + const float near = solveQuadratic(1, 2.0 * dot(eyePos, ray), vertArgs.varUni.c); + + // Calculate the ray's start and end positions in the atmosphere, + // then calculate its scattering offset + const float3 start = eyePos + ray * near; + far -= near; + + // Initialize the scattering loop variables + const float scaleDepth = vertArgs.varUni.scaleDepth; + const float startAngle = dot(ray, start) / vertArgs.varUni.outerRadius; + const float startDepth = exp(-1.0 / scaleDepth); + const float startOffset = startDepth * scatteringScale(startAngle) * scaleDepth; + + const float sampleLength = far / vertArgs.varUni.samples; + const float scaledLength = sampleLength * vertArgs.varUni.scale; + const float3 sampleRay = ray * sampleLength; + float3 samplePoint = start + sampleRay * 0.5; + + // Now loop through the sample points + float3 frontColor = float3(0, 0, 0); + for (int i=0; i 0) ? lighting.lights[0].direction : float3(1,0,0); + const float g = fragArgs.varUni.g; + const float g2 = fragArgs.varUni.g2; + const float cs = dot(normalize(lightPos), normalize(vert.direction)) / length(vert.direction); + const float cs2 = cs * cs; + const float rayPhase = 0.75 + 0.75 * cs2; + const float miePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + cs2) / pow(1.0 + g2 - 2.0 * g * cs, 1.5); + const float3 color = 1.0 - exp((rayPhase * vert.rayleighColor + miePhase * vert.mieColor) * -fragArgs.varUni.exposure); + return float4(color, max(color.r, color.b) * vert.fade); +} + +vertex ProjVertexTriA vertexTri_atmosGround( + VertexTriA vert [[stage_in]], + constant Uniforms &uniforms [[ buffer(WKSVertUniformArgBuffer) ]], + constant Lighting &lighting [[ buffer(WKSVertLightingArgBuffer) ]], + constant VertexTriArgBuffer & vertArgs [[buffer(WKSVertexArgBuffer)]]) +{ + ProjVertexTriA out; + out.maskIDs = uint2(0,0); + + float3 vertPos = (vertArgs.uniDrawState.singleMat * float4(vert.position,1.0)).xyz; + if (vertArgs.uniDrawState.clipCoords) { + out.position = float4(vertPos,1.0); + } else { + float4 v = vertArgs.uniDrawState.singleMat * float4(vert.position,1.0); + out.position = uniforms.pMatrix * (uniforms.mvMatrix * v + uniforms.mvMatrixDiff * v); + } + + out.color = float4(1,1,1,1); + + return out; +} + +fragment float4 fragmentTri_atmosGround( + ProjVertexTriA vert [[stage_in]], + constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], + constant FragTriArgBuffer & fragArgs [[buffer(WKSFragmentArgBuffer)]]) +{ + return vert.color; +} + + + // Stars shader. Simple points struct VertexIn { packed_float3 a_position; From 99148a818abb6728b2a0cbb67ff4b67976ed8ae4 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 7 Feb 2022 11:43:51 -0800 Subject: [PATCH 27/78] Add a parallel AutoTester project integrating WhirlyGlobe as a cocoapod --- .gitignore | 20 - android/.gitignore | 12 + ios/apps/AutoTester/.gitignore | 2 + .../AutoTester.xcodeproj/project.pbxproj | 2 + ios/apps/AutoTester/AutoTester/SwiftBridge.h | 11 + .../AutoTester/testCases/CartoDBTestCase.m | 2 +- .../testCases/ChangeVectorsTestCase.mm | 2 +- .../testCases/ExtrudedModelTestCase.m | 2 +- .../AutoTester/testCases/FindHeightTestCase.m | 2 +- .../testCases/GlyphProblemTestCase.m | 2 +- .../testCases/LabelAnimationTestCase.m | 2 +- .../testCases/PagingLayerTestCase.m | 2 +- .../testCases/RepresentationsTestCase.mm | 2 +- .../testCases/RunwayBuilderTestCase.m | 2 +- .../AutoTester/testCases/ShapefileTestCase.m | 2 +- .../AutoTester/testCases/ShapesTestCase.mm | 2 +- .../testCases/TextureVectorTestCase.m | 2 +- .../AutoTester/testCases/VectorHoleTestCase.m | 2 +- .../testCases/VectorStyleTestCase.m | 2 +- .../AutoTester/testCases/VectorsTestCase.mm | 2 +- .../AutoTester/testCases/WMSTestCase.m | 2 +- .../testCases/WideVectorsTestCase.mm | 2 +- .../AutoTesterPod.xcodeproj/project.pbxproj | 2896 +++++++++++++++++ .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + ios/apps/AutoTester/PodFile | 36 + ios/apps/AutoTester/Podfile.lock | 60 + 27 files changed, 3054 insertions(+), 37 deletions(-) create mode 100644 android/.gitignore create mode 100644 ios/apps/AutoTester/.gitignore create mode 100644 ios/apps/AutoTester/AutoTester/SwiftBridge.h create mode 100644 ios/apps/AutoTester/AutoTesterPod.xcodeproj/project.pbxproj create mode 100644 ios/apps/AutoTester/AutoTesterPod.xcworkspace/contents.xcworkspacedata create mode 100644 ios/apps/AutoTester/AutoTesterPod.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 ios/apps/AutoTester/PodFile create mode 100644 ios/apps/AutoTester/Podfile.lock diff --git a/.gitignore b/.gitignore index e9c11de818..77d3ecc098 100644 --- a/.gitignore +++ b/.gitignore @@ -24,26 +24,6 @@ WhirlyGlobeSrc/AutoTester/AutoTester.xcworkspace *.class **/*.iml **/.idea -android/**/local.properties -android/library/Android/.gradle -android/library/maply/.cxx - podlint\.txt - -android/library/maply/\.externalNativeBuild/ - -android/apps/AutoTesterAndroid/app/release/ -android/library/maply/.cxx/ - ~\$TestCaseStatus\.xlsx - ~\$CodeBreakdown\.xlsx - -android/apps/AutoTesterAndroid/app/gradle/wrapper/ - -android/apps/AutoTesterAndroid/app/gradlew - -android/apps/AutoTesterAndroid/app/gradlew.bat -android/library/Android/build/ -android/library/Android/libs/ -android/library/Android/obj/ diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000000..c6b305a0b4 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,12 @@ +**/local.properties +library/Android/.gradle +library/maply/.cxx +library/maply/\.externalNativeBuild/ +apps/AutoTesterAndroid/app/release/ +library/maply/.cxx/ +apps/AutoTesterAndroid/app/gradle/wrapper/ +apps/AutoTesterAndroid/app/gradlew +apps/AutoTesterAndroid/app/gradlew.bat +library/Android/build/ +library/Android/libs/ +library/Android/obj/ diff --git a/ios/apps/AutoTester/.gitignore b/ios/apps/AutoTester/.gitignore new file mode 100644 index 0000000000..2a165caac7 --- /dev/null +++ b/ios/apps/AutoTester/.gitignore @@ -0,0 +1,2 @@ +Pods/ + diff --git a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj index da230fc90b..0a792897e5 100644 --- a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj +++ b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj @@ -719,6 +719,7 @@ 2BFC7E4F1D132DCB0040E2A3 /* ScreenMarkersTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenMarkersTestCase.h; sourceTree = ""; }; 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenMarkersTestCase.m; sourceTree = ""; }; 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveObjectTestCase.swift; sourceTree = ""; }; + 311C6A0227B193AE0016BC7E /* SwiftBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwiftBridge.h; sourceTree = ""; }; 311E0A902680F597007BE16F /* ATS_Route.shp */ = {isa = PBXFileReference; lastKnownFileType = file; name = ATS_Route.shp; path = ../../../resources/vectors/faa/ATS_Route.shp; sourceTree = SOURCE_ROOT; }; 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.dbf; path = ../../../resources/vectors/faa/Airspace_Boundary.dbf; sourceTree = SOURCE_ROOT; }; 311E0A922680F597007BE16F /* Airspace_Boundary.shx */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.shx; path = ../../../resources/vectors/faa/Airspace_Boundary.shx; sourceTree = SOURCE_ROOT; }; @@ -1473,6 +1474,7 @@ 88E4B8C21B83B6AB0050D21B /* Supporting Files */ = { isa = PBXGroup; children = ( + 311C6A0227B193AE0016BC7E /* SwiftBridge.h */, 2B033BCE24F6D78400B55248 /* fonts */, 88F0951E1ECD041300E7E686 /* AutoTesterJenkins.plist */, 88E4B8CD1B83B6AB0050D21B /* LaunchScreen.xib */, diff --git a/ios/apps/AutoTester/AutoTester/SwiftBridge.h b/ios/apps/AutoTester/AutoTester/SwiftBridge.h new file mode 100644 index 0000000000..09d5fa0af5 --- /dev/null +++ b/ios/apps/AutoTester/AutoTester/SwiftBridge.h @@ -0,0 +1,11 @@ +#if !defined(STRINGIFY) && !defined(_STRINGIFY) +# define STRINGIFY_(x) #x +# define STRINGIFY(x) STRINGIFY_(x) +# define CONCAT(x,y) x##y +#endif + +#if !defined(SWIFT_BRIDGE) +# define SWIFT_BRIDGE AutoTester-Swift.h +#endif + +#import STRINGIFY(SWIFT_BRIDGE) diff --git a/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m index e293d6bd8f..0121fa9eb7 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/CartoDBTestCase.m @@ -8,7 +8,7 @@ #import "CartoDBTestCase.h" #import "CartoDBInterpreter.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation CartoDBTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm index ff158f79fb..e95e863f58 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/ChangeVectorsTestCase.mm @@ -8,7 +8,7 @@ #import "VectorsTestCase.h" #import "ChangeVectorsTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" #include diff --git a/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m index fb818f90ff..6a3fcf5228 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/ExtrudedModelTestCase.m @@ -7,7 +7,7 @@ // #import "ExtrudedModelTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" static const float EarthRadius = 6371000; diff --git a/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m index c663b70939..73f02de699 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/FindHeightTestCase.m @@ -7,7 +7,7 @@ // #import "FindHeightTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation FindHeightTestCase { MaplyBaseViewController *_baseVC; diff --git a/ios/apps/AutoTester/AutoTester/testCases/GlyphProblemTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/GlyphProblemTestCase.m index 5cc488266e..62416bef52 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/GlyphProblemTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/GlyphProblemTestCase.m @@ -10,7 +10,7 @@ #define MAX_HEIGHT 2.0 #import "GlyphProblemTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @interface GlyphProblemTestCase() diff --git a/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m index 90f3b5d974..80874473f2 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/LabelAnimationTestCase.m @@ -7,7 +7,7 @@ // #import "LabelAnimationTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation LabelAnimationTestCase { NSTimer *_labelAnimationTimer; diff --git a/ios/apps/AutoTester/AutoTester/testCases/PagingLayerTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/PagingLayerTestCase.m index 9934d51027..3cb47bd96f 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/PagingLayerTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/PagingLayerTestCase.m @@ -7,7 +7,7 @@ // #import "PagingLayerTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation PagingLayerTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm index a745d022e5..2551013593 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/RepresentationsTestCase.mm @@ -8,7 +8,7 @@ #import "VectorsTestCase.h" #import "RepresentationsTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" #include diff --git a/ios/apps/AutoTester/AutoTester/testCases/RunwayBuilderTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/RunwayBuilderTestCase.m index db099356d9..cc6cf043cb 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/RunwayBuilderTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/RunwayBuilderTestCase.m @@ -7,7 +7,7 @@ // #import "RunwayBuilderTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation RunwayBuilderTestCase diff --git a/ios/apps/AutoTester/AutoTester/testCases/ShapefileTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/ShapefileTestCase.m index 20fce814bf..18ff07d840 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ShapefileTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/ShapefileTestCase.m @@ -7,7 +7,7 @@ // #import "ShapefileTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation ShapefileTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm index e0d5adfe1b..2612fec3b3 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/ShapesTestCase.mm @@ -7,7 +7,7 @@ // #import "ShapesTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" #import "WhirlyVector.h" diff --git a/ios/apps/AutoTester/AutoTester/testCases/TextureVectorTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/TextureVectorTestCase.m index 2b47c5f3e6..6b6c07f061 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/TextureVectorTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/TextureVectorTestCase.m @@ -7,7 +7,7 @@ // #import "TextureVectorTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation TextureVectorTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/VectorHoleTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/VectorHoleTestCase.m index e7fbafde44..8f4b4da821 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/VectorHoleTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/VectorHoleTestCase.m @@ -7,7 +7,7 @@ // #import "VectorHoleTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @interface VectorHoleTestCase() diff --git a/ios/apps/AutoTester/AutoTester/testCases/VectorStyleTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/VectorStyleTestCase.m index 7b30c31796..30c993b744 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/VectorStyleTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/VectorStyleTestCase.m @@ -7,7 +7,7 @@ // #import "VectorStyleTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation VectorStyleTestCase { diff --git a/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm index 212d356f0c..11d7fdad49 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/VectorsTestCase.mm @@ -7,7 +7,7 @@ // #import "VectorsTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" #include diff --git a/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m b/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m index 5a5704ad88..7aab325096 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m +++ b/ios/apps/AutoTester/AutoTester/testCases/WMSTestCase.m @@ -8,7 +8,7 @@ #import "WMSTestCase.h" #import "DDXML.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation WMSTestCase { MaplyBaseViewController *_baseVC; diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm index 637f246d96..1fdb07e806 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm @@ -7,7 +7,7 @@ // #import "WideVectorsTestCase.h" -#import "AutoTester-Swift.h" +#import "SwiftBridge.h" @implementation WideVectorsTestCase { diff --git a/ios/apps/AutoTester/AutoTesterPod.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTesterPod.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..54b0a16741 --- /dev/null +++ b/ios/apps/AutoTester/AutoTesterPod.xcodeproj/project.pbxproj @@ -0,0 +1,2896 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2B033BE224F6D7BA00B55248 /* Roboto-Black.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD524F6D7B300B55248 /* Roboto-Black.ttf */; }; + 2B033BE324F6D7BA00B55248 /* Roboto-BlackItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD624F6D7B300B55248 /* Roboto-BlackItalic.ttf */; }; + 2B033BE424F6D7BA00B55248 /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD224F6D7B300B55248 /* Roboto-Bold.ttf */; }; + 2B033BE524F6D7BA00B55248 /* Roboto-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD324F6D7B300B55248 /* Roboto-BoldItalic.ttf */; }; + 2B033BE624F6D7BA00B55248 /* Roboto-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD024F6D7B200B55248 /* Roboto-Italic.ttf */; }; + 2B033BE724F6D7BA00B55248 /* Roboto-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BDA24F6D7B300B55248 /* Roboto-Light.ttf */; }; + 2B033BE824F6D7BA00B55248 /* Roboto-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BDD24F6D7B300B55248 /* Roboto-LightItalic.ttf */; }; + 2B033BE924F6D7BA00B55248 /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BE124F6D7B300B55248 /* Roboto-Medium.ttf */; }; + 2B033BEA24F6D7BA00B55248 /* Roboto-MediumItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD724F6D7B300B55248 /* Roboto-MediumItalic.ttf */; }; + 2B033BEB24F6D7BA00B55248 /* Roboto-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BDE24F6D7B300B55248 /* Roboto-Regular.ttf */; }; + 2B033BEC24F6D7BA00B55248 /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BD124F6D7B300B55248 /* Roboto-Thin.ttf */; }; + 2B033BED24F6D7BA00B55248 /* Roboto-ThinItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BE024F6D7B300B55248 /* Roboto-ThinItalic.ttf */; }; + 2B033BFA24F6DA4600B55248 /* Roboto-Condensed-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BF524F6DA4300B55248 /* Roboto-Condensed-Bold.ttf */; }; + 2B033BFB24F6DA4600B55248 /* Roboto-Condensed-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BF924F6DA4300B55248 /* Roboto-Condensed-BoldItalic.ttf */; }; + 2B033BFC24F6DA4600B55248 /* Roboto-Condensed-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BF424F6DA4300B55248 /* Roboto-Condensed-Italic.ttf */; }; + 2B033BFD24F6DA4600B55248 /* Roboto-Condensed-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BF624F6DA4300B55248 /* Roboto-Condensed-Light.ttf */; }; + 2B033BFE24F6DA4600B55248 /* Roboto-Condensed-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BF724F6DA4300B55248 /* Roboto-Condensed-LightItalic.ttf */; }; + 2B033BFF24F6DA4600B55248 /* Roboto-Condensed-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033BF824F6DA4300B55248 /* Roboto-Condensed-Regular.ttf */; }; + 2B033C0A24F6F75300B55248 /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0524F6F6DB00B55248 /* OpenSans-Bold.ttf */; }; + 2B033C0B24F6F75300B55248 /* OpenSans-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0424F6F6DB00B55248 /* OpenSans-BoldItalic.ttf */; }; + 2B033C0C24F6F75300B55248 /* OpenSans-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0724F6F6DB00B55248 /* OpenSans-ExtraBold.ttf */; }; + 2B033C0D24F6F75300B55248 /* OpenSans-ExtraBoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0624F6F6DB00B55248 /* OpenSans-ExtraBoldItalic.ttf */; }; + 2B033C0E24F6F75300B55248 /* OpenSans-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0124F6F6DB00B55248 /* OpenSans-Italic.ttf */; }; + 2B033C0F24F6F75300B55248 /* OpenSans-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0824F6F6DB00B55248 /* OpenSans-Light.ttf */; }; + 2B033C1024F6F75300B55248 /* OpenSans-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0024F6F6DA00B55248 /* OpenSans-LightItalic.ttf */; }; + 2B033C1124F6F75300B55248 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0224F6F6DB00B55248 /* OpenSans-Regular.ttf */; }; + 2B033C1224F6F75300B55248 /* OpenSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0324F6F6DB00B55248 /* OpenSans-SemiBold.ttf */; }; + 2B033C1324F6F75300B55248 /* OpenSans-SemiBoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B033C0924F6F6DB00B55248 /* OpenSans-SemiBoldItalic.ttf */; }; + 2B158BEF1D5D19E900103E04 /* VectorHoleTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B158BEE1D5D19E900103E04 /* VectorHoleTestCase.m */; }; + 2B1806D322AECF4300DD3DB1 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B1806D122AECF4200DD3DB1 /* Accelerate.framework */; }; + 2B1C26531C91037100C71B0A /* France.mbtiles in Resources */ = {isa = PBXBuildFile; fileRef = 2B1C26511C9100A500C71B0A /* France.mbtiles */; }; + 2B1E85A622B44D5800AB7208 /* BillboardTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B1E85A522B44D5800AB7208 /* BillboardTestCase.swift */; }; + 2B249F3F23F4A82600CFA3D0 /* GeographyClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B249F3E23F4A82600CFA3D0 /* GeographyClass.swift */; }; + 2B29944B243BA08D00677DE4 /* MapboxKindaMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B29944A243BA08D00677DE4 /* MapboxKindaMap.swift */; }; + 2B29944D243BA16000677DE4 /* SimpleStyleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B29944C243BA16000677DE4 /* SimpleStyleTestCase.swift */; }; + 2B29944F243BA31900677DE4 /* cube.obj in Resources */ = {isa = PBXBuildFile; fileRef = 2B29944E243BA31900677DE4 /* cube.obj */; }; + 2B392B711C5AC59D001EE40B /* RunwayBuilderTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B392B701C5AC59D001EE40B /* RunwayBuilderTestCase.m */; }; + 2B446AAE21EFE29B0078A975 /* WMSTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = E5679F451CB72DE800369A15 /* WMSTestCase.m */; }; + 2B4B30AA2395E0DE00854073 /* MapboxTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B30A32395E0DE00854073 /* MapboxTestCase.swift */; }; + 2B4B30AB2395E0DE00854073 /* StartupShutdownTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B30A52395E0DE00854073 /* StartupShutdownTestCase.swift */; }; + 2B4B30AC2395E0DE00854073 /* GlyphProblemTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B30A62395E0DE00854073 /* GlyphProblemTestCase.m */; }; + 2B4B30AD2395E0DE00854073 /* LayerStartupShutdownTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B30A82395E0DE00854073 /* LayerStartupShutdownTestCase.swift */; }; + 2B4B30AE2395E0DE00854073 /* MapTilerTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B30A92395E0DE00854073 /* MapTilerTestCase.swift */; }; + 2B4B30C12395F08D00854073 /* maptiler_streets.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30BA2395F08C00854073 /* maptiler_streets.json */; }; + 2B4B30C22395F08D00854073 /* maptiler_topo.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30BB2395F08C00854073 /* maptiler_topo.json */; }; + 2B4B30C32395F08D00854073 /* maptiler_basic.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30BC2395F08C00854073 /* maptiler_basic.json */; }; + 2B4B30C42395F08D00854073 /* default.sld in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30BD2395F08C00854073 /* default.sld */; }; + 2B4B30C52395F08D00854073 /* maptiler_hybrid_satellite.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30BE2395F08C00854073 /* maptiler_hybrid_satellite.json */; }; + 2B4B30C62395F08D00854073 /* mapbox_satellite-v9.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30BF2395F08C00854073 /* mapbox_satellite-v9.json */; }; + 2B4B30C72395F08D00854073 /* mapbox_satellite-streets-v9.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B4B30C02395F08D00854073 /* mapbox_satellite-streets-v9.json */; }; + 2B4B63AE23611D690008C8C1 /* OfflineRenderTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4B63AD23611D690008C8C1 /* OfflineRenderTestCase.swift */; }; + 2B4BA6CE1C83A22000DC1562 /* leftbend.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C21C83A22000DC1562 /* leftbend.geojson */; }; + 2B4BA6CF1C83A22000DC1562 /* leftv.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C31C83A22000DC1562 /* leftv.geojson */; }; + 2B4BA6D01C83A22000DC1562 /* mowing-lawn.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C41C83A22000DC1562 /* mowing-lawn.geojson */; }; + 2B4BA6D11C83A22000DC1562 /* rightbend.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C51C83A22000DC1562 /* rightbend.geojson */; }; + 2B4BA6D21C83A22000DC1562 /* rightv.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C61C83A22000DC1562 /* rightv.geojson */; }; + 2B4BA6D31C83A22000DC1562 /* sawtooth.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C71C83A22000DC1562 /* sawtooth.geojson */; }; + 2B4BA6D41C83A22000DC1562 /* sawtoothbegin.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C81C83A22000DC1562 /* sawtoothbegin.geojson */; }; + 2B4BA6D51C83A22000DC1562 /* spiral.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6C91C83A22000DC1562 /* spiral.geojson */; }; + 2B4BA6D61C83A22000DC1562 /* square.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6CA1C83A22000DC1562 /* square.geojson */; }; + 2B4BA6D71C83A22000DC1562 /* straight.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6CB1C83A22000DC1562 /* straight.geojson */; }; + 2B4BA6D81C83A22000DC1562 /* track.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6CC1C83A22000DC1562 /* track.geojson */; }; + 2B4BA6D91C83A22000DC1562 /* uturn.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BA6CD1C83A22000DC1562 /* uturn.geojson */; }; + 2B5E8AF51E943560000B39E5 /* greensquare.png in Resources */ = {isa = PBXBuildFile; fileRef = 2B5E8AF41E943560000B39E5 /* greensquare.png */; }; + 2B60F4462452706200CF9339 /* VectorMBTilesTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B1C264E1C90FFFC00C71B0A /* VectorMBTilesTestCase.swift */; }; + 2B6611E625D1C35D009D228F /* AirwayTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B6611E525D1C35D009D228F /* AirwayTestCase.swift */; }; + 2B68A43C225D06A8009CC720 /* ImageReloadTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B68A43B225D06A8009CC720 /* ImageReloadTestCase.swift */; }; + 2B6953681C7E67DD007FC51E /* colorramp.png in Resources */ = {isa = PBXBuildFile; fileRef = 2B6953671C7E67DD007FC51E /* colorramp.png */; }; + 2B73D6AE207C0D5F00AF5095 /* NotoSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B8F3258201021CF006DDE27 /* NotoSans-Bold.ttf */; }; + 2B73D6AF207C0D5F00AF5095 /* NotoSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2B8F3256201021CF006DDE27 /* NotoSans-Regular.ttf */; }; + 2B73D6B4207C106C00AF5095 /* GlobeSamplerTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B73D6B2207C106C00AF5095 /* GlobeSamplerTestCase.swift */; }; + 2B753DDB21EEB41700DE98BA /* NASAGIBSTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84433E61C14A46100A52117 /* NASAGIBSTestCase.swift */; }; + 2B753DE221EEB7F900DE98BA /* StarsSunTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8200C971BE93E6E00B22CF5 /* StarsSunTestCase.swift */; }; + 2B7787CA21CDA47F006ABF5D /* CartoDBLightTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B7787C921CDA47F006ABF5D /* CartoDBLightTestCase.swift */; }; + 2B7E288B200EC109007E2965 /* SE_PolygonsLines.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B7E2889200EC109007E2965 /* SE_PolygonsLines.json */; }; + 2B7E288C200EC109007E2965 /* SE_Basic.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B7E288A200EC109007E2965 /* SE_Basic.json */; }; + 2B7FC0A71E32B67400AF253A /* testJson.json in Resources */ = {isa = PBXBuildFile; fileRef = 2B7FC0A61E32B67400AF253A /* testJson.json */; }; + 2B81009C221F4EA900CFF779 /* CartoDBInterpreter.m in Sources */ = {isa = PBXBuildFile; fileRef = D84433ED1C14E4FE00A52117 /* CartoDBInterpreter.m */; }; + 2B81009D221F4EA900CFF779 /* CartoDBTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = D84433EA1C14E4E700A52117 /* CartoDBTestCase.m */; }; + 2B8849FB1E37F9B30027C397 /* stadium-utm-quad-data.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 2B8849FA1E37F9B30027C397 /* stadium-utm-quad-data.sqlite */; }; + 2BA827CD225EBDBF00324594 /* GeoJSONStyleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5941DC01E0CEE7300E1C8B3 /* GeoJSONStyleTestCase.swift */; }; + 2BB8A40021ED46E10025DA98 /* StamenWatercolorRemote.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BF115E1BCDA9730002205E /* StamenWatercolorRemote.swift */; }; + 2BBB70831D5E9079009B67A6 /* VectorStyleTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BBB70821D5E9079009B67A6 /* VectorStyleTestCase.m */; }; + 2BBCE41C2220A4170013E158 /* PagingLayerTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BC2DCEF1D2345AF0088D350 /* PagingLayerTestCase.m */; }; + 2BC0FB781DCAA18A004125F1 /* TextureVectorTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BC0FB771DCAA18A004125F1 /* TextureVectorTestCase.m */; }; + 2BC0FB7A1DCAA574004125F1 /* dots.png in Resources */ = {isa = PBXBuildFile; fileRef = 2BC0FB791DCAA574004125F1 /* dots.png */; }; + 2BC2DCCD1D1F4CE20088D350 /* ShapefileTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BC2DCCC1D1F4CE20088D350 /* ShapefileTestCase.m */; }; + 2BC3D6F0220B900A00CE91D0 /* StartupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 886FCCC21BA73C1D00494BB0 /* StartupViewController.swift */; }; + 2BC3D6F2220B900D00CE91D0 /* TestCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FE129181CDFB3B8004744FC /* TestCell.swift */; }; + 2BC3D6F3220B901000CE91D0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88E4B8C41B83B6AB0050D21B /* AppDelegate.swift */; }; + 2BC41C8321F00AA6002926B7 /* BNGCustomMapTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84AA5931C1A1C9700413B76 /* BNGCustomMapTestCase.swift */; }; + 2BC41C8521F00AA9002926B7 /* BNGTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D84AA5981C1A2B9800413B76 /* BNGTestCase.swift */; }; + 2BD358F31DD3EA0400081EA8 /* AnimatedMarkersTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BD358F21DD3EA0400081EA8 /* AnimatedMarkersTestCase.swift */; }; + 2BD914BD256F1C8D00E724A8 /* icon_167.png in Resources */ = {isa = PBXBuildFile; fileRef = 2BD914BB256F1C8D00E724A8 /* icon_167.png */; }; + 2BD914BE256F1C8D00E724A8 /* icon_152.png in Resources */ = {isa = PBXBuildFile; fileRef = 2BD914BC256F1C8D00E724A8 /* icon_152.png */; }; + 2BD914E8256F1F8A00E724A8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2BD914E7256F1F8A00E724A8 /* Assets.xcassets */; }; + 2BDEB3021C924842003259B3 /* ExtrudedModelTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BDEB3011C924842003259B3 /* ExtrudedModelTestCase.m */; }; + 2BF29B8C24D2268200553963 /* LegendViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2BF29B8B24D2268200553963 /* LegendViewController.storyboard */; }; + 2BF29B8F24D226B000553963 /* LegendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BF29B8E24D226B000553963 /* LegendViewController.swift */; }; + 2BFC7E511D132DCB0040E2A3 /* ScreenMarkersTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */; }; + 31041A3E27A4AE76004B25E1 /* ActiveObjectTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */; }; + 311C6A0527B1AC7F0016BC7E /* wkDefaultShaders.metal in Sources */ = {isa = PBXBuildFile; fileRef = 311C6A0427B1AC7E0016BC7E /* wkDefaultShaders.metal */; }; + 311E0A9C2680F597007BE16F /* ATS_Route.shp in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A902680F597007BE16F /* ATS_Route.shp */; }; + 311E0A9D2680F597007BE16F /* Airspace_Boundary.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */; }; + 311E0A9E2680F597007BE16F /* Airspace_Boundary.shx in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A922680F597007BE16F /* Airspace_Boundary.shx */; }; + 311E0A9F2680F597007BE16F /* Airspace_Boundary.shp in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A932680F597007BE16F /* Airspace_Boundary.shp */; }; + 311E0AA02680F597007BE16F /* ATS_Route.cpg in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A942680F597007BE16F /* ATS_Route.cpg */; }; + 311E0AA12680F597007BE16F /* ATS_Route.prj in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A952680F597007BE16F /* ATS_Route.prj */; }; + 311E0AA22680F597007BE16F /* ATS_Route.shx in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A962680F597007BE16F /* ATS_Route.shx */; }; + 311E0AA32680F597007BE16F /* Airspace_Boundary.xml in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A972680F597007BE16F /* Airspace_Boundary.xml */; }; + 311E0AA42680F597007BE16F /* ATS_Route.xml in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A982680F597007BE16F /* ATS_Route.xml */; }; + 311E0AA52680F597007BE16F /* Airspace_Boundary.cpg in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A992680F597007BE16F /* Airspace_Boundary.cpg */; }; + 311E0AA62680F597007BE16F /* Airspace_Boundary.prj in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A9A2680F597007BE16F /* Airspace_Boundary.prj */; }; + 311E0AA72680F597007BE16F /* ATS_Route.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A9B2680F597007BE16F /* ATS_Route.dbf */; }; + 311E0AAC26865D2C007BE16F /* ESRIRemoteTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 311E0AAA26865D2C007BE16F /* ESRIRemoteTestCase.swift */; }; + 311E0AB7268E87E3007BE16F /* LIDARTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2B8849EA1E37F7CB0027C397 /* LIDARTestCase.mm */; }; + 311E0AB9268F79CC007BE16F /* ParticleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D3E0671C4EDA1800F0D006 /* ParticleTestCase.swift */; }; + 311E0ABA268F7A09007BE16F /* ParticleTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8895D8AF1CA4ABA9004387FB /* ParticleTest.mm */; }; + 313C521625D329070036C22E /* MovingScreenMarkersTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 313C521425D329070036C22E /* MovingScreenMarkersTestCase.swift */; }; + 313FED0727027D6800FCD14C /* ShapesTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 313FED0627027D6800FCD14C /* ShapesTestCase.mm */; }; + 316B5CF3260526AD000B4F15 /* maptiler_expr_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 316B5CF1260526AD000B4F15 /* maptiler_expr_test.json */; }; + 316B5CFC260A5573000B4F15 /* maptiler_test_circles.json in Resources */ = {isa = PBXBuildFile; fileRef = 316B5CFA260A5573000B4F15 /* maptiler_test_circles.json */; }; + 316B5CFE260A58A8000B4F15 /* MapTilerCircleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316B5CFD260A58A8000B4F15 /* MapTilerCircleTestCase.swift */; }; + 31833793259E5291005FEF70 /* ChangeVectorsTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31833792259E5291005FEF70 /* ChangeVectorsTestCase.mm */; }; + 3183380F25A67CD8005FEF70 /* RepresentationsTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3183380C25A67CD8005FEF70 /* RepresentationsTestCase.mm */; }; + 31D3287C262FADF100456B93 /* TestTileImageFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31D3287B262FADF100456B93 /* TestTileImageFetcher.swift */; }; + 31D328AD26387E7900456B93 /* GreatCircleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31D328AC26387E7900456B93 /* GreatCircleTestCase.swift */; }; + 8820852B1DC81051008F8E76 /* Issue721TestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8820852A1DC81051008F8E76 /* Issue721TestCase.swift */; }; + 88BF11491BCD3DA40002205E /* MaplyTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BF11481BCD3DA40002205E /* MaplyTestCase.m */; }; + 88E4B8CA1B83B6AB0050D21B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 88E4B8C81B83B6AB0050D21B /* Main.storyboard */; }; + 88E4B8CF1B83B6AB0050D21B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 88E4B8CD1B83B6AB0050D21B /* LaunchScreen.xib */; }; + 88F0951F1ECD041300E7E686 /* AutoTesterJenkins.plist in Resources */ = {isa = PBXBuildFile; fileRef = 88F0951E1ECD041300E7E686 /* AutoTesterJenkins.plist */; }; + 88FF5BE71BC31D53002F15CE /* map_pin.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BE11BC31D53002F15CE /* map_pin.png */; }; + 88FF5BE81BC31D53002F15CE /* Smiley_Face_Avatar_by_PixelTwist.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BE21BC31D53002F15CE /* Smiley_Face_Avatar_by_PixelTwist.png */; }; + 88FF5BE91BC31D53002F15CE /* star_background.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BE31BC31D53002F15CE /* star_background.png */; }; + 88FF5BEA1BC31D53002F15CE /* Star.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BE41BC31D53002F15CE /* Star.png */; }; + 88FF5BEB1BC31D53002F15CE /* SunImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BE51BC31D53002F15CE /* SunImage.png */; }; + 88FF5C741BC31D6D002F15CE /* geography-class_medres.mbtiles in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BED1BC31D6D002F15CE /* geography-class_medres.mbtiles */; }; + 88FF5C751BC31D6D002F15CE /* lowres_wtb_0x0.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BEF1BC31D6D002F15CE /* lowres_wtb_0x0.pvrtc */; }; + 88FF5C761BC31D6D002F15CE /* lowres_wtb_0x1.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF01BC31D6D002F15CE /* lowres_wtb_0x1.pvrtc */; }; + 88FF5C771BC31D6D002F15CE /* lowres_wtb_1x0.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF11BC31D6D002F15CE /* lowres_wtb_1x0.pvrtc */; }; + 88FF5C781BC31D6D002F15CE /* lowres_wtb_1x1.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF21BC31D6D002F15CE /* lowres_wtb_1x1.pvrtc */; }; + 88FF5C791BC31D6D002F15CE /* lowres_wtb_2x0.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF31BC31D6D002F15CE /* lowres_wtb_2x0.pvrtc */; }; + 88FF5C7A1BC31D6D002F15CE /* lowres_wtb_2x1.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF41BC31D6D002F15CE /* lowres_wtb_2x1.pvrtc */; }; + 88FF5C7B1BC31D6D002F15CE /* lowres_wtb_3x0.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF51BC31D6D002F15CE /* lowres_wtb_3x0.pvrtc */; }; + 88FF5C7C1BC31D6D002F15CE /* lowres_wtb_3x1.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF61BC31D6D002F15CE /* lowres_wtb_3x1.pvrtc */; }; + 88FF5C7D1BC31D6D002F15CE /* lowres_wtb_4x0.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF71BC31D6D002F15CE /* lowres_wtb_4x0.pvrtc */; }; + 88FF5C7E1BC31D6D002F15CE /* lowres_wtb_4x1.pvrtc in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF81BC31D6D002F15CE /* lowres_wtb_4x1.pvrtc */; }; + 88FF5C7F1BC31D6D002F15CE /* lowres_wtb_info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BF91BC31D6D002F15CE /* lowres_wtb_info.plist */; }; + 88FF5C801BC31D6D002F15CE /* world_web_mercator.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BFB1BC31D6D002F15CE /* world_web_mercator.sqlite */; }; + 88FF5C811BC31D6D002F15CE /* airfield-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BFD1BC31D6D002F15CE /* airfield-24@2x.png */; }; + 88FF5C821BC31D6D002F15CE /* airport-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BFE1BC31D6D002F15CE /* airport-24@2x.png */; }; + 88FF5C831BC31D6D002F15CE /* alcohol-shop-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5BFF1BC31D6D002F15CE /* alcohol-shop-24@2x.png */; }; + 88FF5C841BC31D6D002F15CE /* america-football-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C001BC31D6D002F15CE /* america-football-24@2x.png */; }; + 88FF5C851BC31D6D002F15CE /* art-gallery-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C011BC31D6D002F15CE /* art-gallery-24@2x.png */; }; + 88FF5C861BC31D6D002F15CE /* bakery-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C021BC31D6D002F15CE /* bakery-24@2x.png */; }; + 88FF5C871BC31D6D002F15CE /* bank-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C031BC31D6D002F15CE /* bank-24@2x.png */; }; + 88FF5C881BC31D6D002F15CE /* bar-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C041BC31D6D002F15CE /* bar-24@2x.png */; }; + 88FF5C891BC31D6D002F15CE /* baseball-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C051BC31D6D002F15CE /* baseball-24@2x.png */; }; + 88FF5C8A1BC31D6D002F15CE /* basketball-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C061BC31D6D002F15CE /* basketball-24@2x.png */; }; + 88FF5C8B1BC31D6D002F15CE /* beer-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C071BC31D6D002F15CE /* beer-24@2x.png */; }; + 88FF5C8C1BC31D6D002F15CE /* bicycle-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C081BC31D6D002F15CE /* bicycle-24@2x.png */; }; + 88FF5C8D1BC31D6D002F15CE /* building-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C091BC31D6D002F15CE /* building-24@2x.png */; }; + 88FF5C8E1BC31D6D002F15CE /* bus-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C0A1BC31D6D002F15CE /* bus-24@2x.png */; }; + 88FF5C8F1BC31D6D002F15CE /* cafe-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C0B1BC31D6D002F15CE /* cafe-24@2x.png */; }; + 88FF5C901BC31D6D002F15CE /* camera-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C0C1BC31D6D002F15CE /* camera-24@2x.png */; }; + 88FF5C911BC31D6D002F15CE /* campsite-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C0D1BC31D6D002F15CE /* campsite-24@2x.png */; }; + 88FF5C921BC31D6D002F15CE /* car-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C0E1BC31D6D002F15CE /* car-24@2x.png */; }; + 88FF5C931BC31D6D002F15CE /* cemetery-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C0F1BC31D6D002F15CE /* cemetery-24@2x.png */; }; + 88FF5C941BC31D6D002F15CE /* cinema-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C101BC31D6D002F15CE /* cinema-24@2x.png */; }; + 88FF5C951BC31D6D002F15CE /* circle-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C111BC31D6D002F15CE /* circle-24@2x.png */; }; + 88FF5C961BC31D6D002F15CE /* circle-stroked-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C121BC31D6D002F15CE /* circle-stroked-24@2x.png */; }; + 88FF5C971BC31D6D002F15CE /* city-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C131BC31D6D002F15CE /* city-24@2x.png */; }; + 88FF5C981BC31D6D002F15CE /* clothing-store-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C141BC31D6D002F15CE /* clothing-store-24@2x.png */; }; + 88FF5C991BC31D6D002F15CE /* college-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C151BC31D6D002F15CE /* college-24@2x.png */; }; + 88FF5C9A1BC31D6D002F15CE /* commercial-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C161BC31D6D002F15CE /* commercial-24@2x.png */; }; + 88FF5C9B1BC31D6D002F15CE /* cricket-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C171BC31D6D002F15CE /* cricket-24@2x.png */; }; + 88FF5C9C1BC31D6D002F15CE /* cross-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C181BC31D6D002F15CE /* cross-24@2x.png */; }; + 88FF5C9D1BC31D6D002F15CE /* dam-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C191BC31D6D002F15CE /* dam-24@2x.png */; }; + 88FF5C9E1BC31D6D002F15CE /* danger-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C1A1BC31D6D002F15CE /* danger-24@2x.png */; }; + 88FF5C9F1BC31D6D002F15CE /* disability-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C1B1BC31D6D002F15CE /* disability-24@2x.png */; }; + 88FF5CA01BC31D6D002F15CE /* dog-park-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C1C1BC31D6D002F15CE /* dog-park-24@2x.png */; }; + 88FF5CA11BC31D6D002F15CE /* embassy-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C1D1BC31D6D002F15CE /* embassy-24@2x.png */; }; + 88FF5CA21BC31D6D002F15CE /* emergency-telephone-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C1E1BC31D6D002F15CE /* emergency-telephone-24@2x.png */; }; + 88FF5CA31BC31D6D002F15CE /* farm-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C1F1BC31D6D002F15CE /* farm-24@2x.png */; }; + 88FF5CA41BC31D6D002F15CE /* fast-food-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C201BC31D6D002F15CE /* fast-food-24@2x.png */; }; + 88FF5CA51BC31D6D002F15CE /* ferry-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C211BC31D6D002F15CE /* ferry-24@2x.png */; }; + 88FF5CA61BC31D6D002F15CE /* fire-station-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C221BC31D6D002F15CE /* fire-station-24@2x.png */; }; + 88FF5CA71BC31D6D002F15CE /* fuel-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C231BC31D6D002F15CE /* fuel-24@2x.png */; }; + 88FF5CA81BC31D6D002F15CE /* garden-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C241BC31D6D002F15CE /* garden-24@2x.png */; }; + 88FF5CA91BC31D6D002F15CE /* golf-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C251BC31D6D002F15CE /* golf-24@2x.png */; }; + 88FF5CAA1BC31D6D002F15CE /* grocery-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C261BC31D6D002F15CE /* grocery-24@2x.png */; }; + 88FF5CAB1BC31D6D002F15CE /* harbor-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C271BC31D6D002F15CE /* harbor-24@2x.png */; }; + 88FF5CAC1BC31D6D002F15CE /* heliport-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C281BC31D6D002F15CE /* heliport-24@2x.png */; }; + 88FF5CAD1BC31D6D002F15CE /* hospital-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C291BC31D6D002F15CE /* hospital-24@2x.png */; }; + 88FF5CAE1BC31D6D002F15CE /* industrial-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C2A1BC31D6D002F15CE /* industrial-24@2x.png */; }; + 88FF5CAF1BC31D6D002F15CE /* land-use-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C2B1BC31D6D002F15CE /* land-use-24@2x.png */; }; + 88FF5CB01BC31D6D002F15CE /* laundry-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C2C1BC31D6D002F15CE /* laundry-24@2x.png */; }; + 88FF5CB11BC31D6D002F15CE /* library-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C2D1BC31D6D002F15CE /* library-24@2x.png */; }; + 88FF5CB21BC31D6D002F15CE /* lighthouse-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C2E1BC31D6D002F15CE /* lighthouse-24@2x.png */; }; + 88FF5CB31BC31D6D002F15CE /* lodging-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C2F1BC31D6D002F15CE /* lodging-24@2x.png */; }; + 88FF5CB41BC31D6D002F15CE /* logging-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C301BC31D6D002F15CE /* logging-24@2x.png */; }; + 88FF5CB51BC31D6D002F15CE /* london-underground-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C311BC31D6D002F15CE /* london-underground-24@2x.png */; }; + 88FF5CB61BC31D6D002F15CE /* marker-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C321BC31D6D002F15CE /* marker-24@2x.png */; }; + 88FF5CB71BC31D6D002F15CE /* marker-stroked-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C331BC31D6D002F15CE /* marker-stroked-24@2x.png */; }; + 88FF5CB81BC31D6D002F15CE /* minefield-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C341BC31D6D002F15CE /* minefield-24@2x.png */; }; + 88FF5CB91BC31D6D002F15CE /* monument-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C351BC31D6D002F15CE /* monument-24@2x.png */; }; + 88FF5CBA1BC31D6D002F15CE /* museum-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C361BC31D6D002F15CE /* museum-24@2x.png */; }; + 88FF5CBB1BC31D6D002F15CE /* music-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C371BC31D6D002F15CE /* music-24@2x.png */; }; + 88FF5CBC1BC31D6D002F15CE /* oil-well-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C381BC31D6D002F15CE /* oil-well-24@2x.png */; }; + 88FF5CBD1BC31D6D002F15CE /* park-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C391BC31D6D002F15CE /* park-24@2x.png */; }; + 88FF5CBE1BC31D6D002F15CE /* park2-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C3A1BC31D6D002F15CE /* park2-24@2x.png */; }; + 88FF5CBF1BC31D6D002F15CE /* parking-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C3B1BC31D6D002F15CE /* parking-24@2x.png */; }; + 88FF5CC01BC31D6D002F15CE /* parking-garage-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C3C1BC31D6D002F15CE /* parking-garage-24@2x.png */; }; + 88FF5CC11BC31D6D002F15CE /* pharmacy-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C3D1BC31D6D002F15CE /* pharmacy-24@2x.png */; }; + 88FF5CC21BC31D6D002F15CE /* pitch-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C3E1BC31D6D002F15CE /* pitch-24@2x.png */; }; + 88FF5CC31BC31D6D002F15CE /* place-of-worship-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C3F1BC31D6D002F15CE /* place-of-worship-24@2x.png */; }; + 88FF5CC41BC31D6D002F15CE /* playground-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C401BC31D6D002F15CE /* playground-24@2x.png */; }; + 88FF5CC51BC31D6D002F15CE /* police-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C411BC31D6D002F15CE /* police-24@2x.png */; }; + 88FF5CC61BC31D6D002F15CE /* polling-place-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C421BC31D6D002F15CE /* polling-place-24@2x.png */; }; + 88FF5CC71BC31D6D002F15CE /* post-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C431BC31D6D002F15CE /* post-24@2x.png */; }; + 88FF5CC81BC31D6D002F15CE /* prison-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C441BC31D6D002F15CE /* prison-24@2x.png */; }; + 88FF5CC91BC31D6D002F15CE /* rail-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C451BC31D6D002F15CE /* rail-24@2x.png */; }; + 88FF5CCA1BC31D6D002F15CE /* rail-above-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C461BC31D6D002F15CE /* rail-above-24@2x.png */; }; + 88FF5CCB1BC31D6D002F15CE /* rail-underground-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C471BC31D6D002F15CE /* rail-underground-24@2x.png */; }; + 88FF5CCC1BC31D6D002F15CE /* religious-christian-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C481BC31D6D002F15CE /* religious-christian-24@2x.png */; }; + 88FF5CCD1BC31D6D002F15CE /* religious-jewish-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C491BC31D6D002F15CE /* religious-jewish-24@2x.png */; }; + 88FF5CCE1BC31D6D002F15CE /* religious-muslim-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C4A1BC31D6D002F15CE /* religious-muslim-24@2x.png */; }; + 88FF5CCF1BC31D6D002F15CE /* restaurant-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C4B1BC31D6D002F15CE /* restaurant-24@2x.png */; }; + 88FF5CD01BC31D6D002F15CE /* roadblock-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C4C1BC31D6D002F15CE /* roadblock-24@2x.png */; }; + 88FF5CD11BC31D6D002F15CE /* rocket-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C4D1BC31D6D002F15CE /* rocket-24@2x.png */; }; + 88FF5CD21BC31D6D002F15CE /* school-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C4E1BC31D6D002F15CE /* school-24@2x.png */; }; + 88FF5CD31BC31D6D002F15CE /* shop-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C4F1BC31D6D002F15CE /* shop-24@2x.png */; }; + 88FF5CD41BC31D6D002F15CE /* skiing-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C501BC31D6D002F15CE /* skiing-24@2x.png */; }; + 88FF5CD51BC31D6D002F15CE /* slaughterhouse-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C511BC31D6D002F15CE /* slaughterhouse-24@2x.png */; }; + 88FF5CD61BC31D6D002F15CE /* soccer-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C521BC31D6D002F15CE /* soccer-24@2x.png */; }; + 88FF5CD71BC31D6D002F15CE /* square-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C531BC31D6D002F15CE /* square-24@2x.png */; }; + 88FF5CD81BC31D6D002F15CE /* square-stroked-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C541BC31D6D002F15CE /* square-stroked-24@2x.png */; }; + 88FF5CD91BC31D6D002F15CE /* star-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C551BC31D6D002F15CE /* star-24@2x.png */; }; + 88FF5CDA1BC31D6D002F15CE /* star-stroked-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C561BC31D6D002F15CE /* star-stroked-24@2x.png */; }; + 88FF5CDB1BC31D6D002F15CE /* suitcase-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C571BC31D6D002F15CE /* suitcase-24@2x.png */; }; + 88FF5CDC1BC31D6D002F15CE /* swimming-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C581BC31D6D002F15CE /* swimming-24@2x.png */; }; + 88FF5CDD1BC31D6D002F15CE /* telephone-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C591BC31D6D002F15CE /* telephone-24@2x.png */; }; + 88FF5CDE1BC31D6D002F15CE /* tennis-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C5A1BC31D6D002F15CE /* tennis-24@2x.png */; }; + 88FF5CDF1BC31D6D002F15CE /* theatre-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C5B1BC31D6D002F15CE /* theatre-24@2x.png */; }; + 88FF5CE01BC31D6D002F15CE /* toilets-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C5C1BC31D6D002F15CE /* toilets-24@2x.png */; }; + 88FF5CE11BC31D6D002F15CE /* town-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C5D1BC31D6D002F15CE /* town-24@2x.png */; }; + 88FF5CE21BC31D6D002F15CE /* town-hall-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C5E1BC31D6D002F15CE /* town-hall-24@2x.png */; }; + 88FF5CE31BC31D6D002F15CE /* triangle-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C5F1BC31D6D002F15CE /* triangle-24@2x.png */; }; + 88FF5CE41BC31D6D002F15CE /* triangle-stroked-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C601BC31D6D002F15CE /* triangle-stroked-24@2x.png */; }; + 88FF5CE51BC31D6D002F15CE /* village-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C611BC31D6D002F15CE /* village-24@2x.png */; }; + 88FF5CE61BC31D6D002F15CE /* warehouse-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C621BC31D6D002F15CE /* warehouse-24@2x.png */; }; + 88FF5CE71BC31D6D002F15CE /* waste-basket-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C631BC31D6D002F15CE /* waste-basket-24@2x.png */; }; + 88FF5CE81BC31D6D002F15CE /* water-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C641BC31D6D002F15CE /* water-24@2x.png */; }; + 88FF5CE91BC31D6D002F15CE /* wetland-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C651BC31D6D002F15CE /* wetland-24@2x.png */; }; + 88FF5CEA1BC31D6D002F15CE /* zoo-24@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C661BC31D6D002F15CE /* zoo-24@2x.png */; }; + 88FF5CEE1BC31D6D002F15CE /* cessna.obj in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C6D1BC31D6D002F15CE /* cessna.obj */; }; + 88FF5CEF1BC31D6D002F15CE /* cessna.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C6E1BC31D6D002F15CE /* cessna.png */; }; + 88FF5CF01BC31D6D002F15CE /* moon.png in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C6F1BC31D6D002F15CE /* moon.png */; }; + 88FF5CF11BC31D6D002F15CE /* vp.mtl in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C701BC31D6D002F15CE /* vp.mtl */; }; + 88FF5CF21BC31D6D002F15CE /* starcatalog_orig.txt in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C721BC31D6D002F15CE /* starcatalog_orig.txt */; }; + 88FF5CF31BC31D6D002F15CE /* starcatalog_short.txt in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5C731BC31D6D002F15CE /* starcatalog_short.txt */; }; + 88FF5DF51BC31D95002F15CE /* ABW.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CF51BC31D94002F15CE /* ABW.geojson */; }; + 88FF5DF61BC31D95002F15CE /* AFG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CF61BC31D94002F15CE /* AFG.geojson */; }; + 88FF5DF71BC31D95002F15CE /* AGO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CF71BC31D94002F15CE /* AGO.geojson */; }; + 88FF5DF81BC31D95002F15CE /* AIA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CF81BC31D94002F15CE /* AIA.geojson */; }; + 88FF5DF91BC31D95002F15CE /* ALA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CF91BC31D94002F15CE /* ALA.geojson */; }; + 88FF5DFA1BC31D95002F15CE /* ALB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CFA1BC31D94002F15CE /* ALB.geojson */; }; + 88FF5DFB1BC31D95002F15CE /* AND.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CFB1BC31D94002F15CE /* AND.geojson */; }; + 88FF5DFC1BC31D95002F15CE /* ARE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CFC1BC31D94002F15CE /* ARE.geojson */; }; + 88FF5DFD1BC31D95002F15CE /* ARG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CFD1BC31D94002F15CE /* ARG.geojson */; }; + 88FF5DFE1BC31D95002F15CE /* ARM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CFE1BC31D94002F15CE /* ARM.geojson */; }; + 88FF5DFF1BC31D95002F15CE /* ASM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5CFF1BC31D94002F15CE /* ASM.geojson */; }; + 88FF5E001BC31D95002F15CE /* ATA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D001BC31D94002F15CE /* ATA.geojson */; }; + 88FF5E011BC31D95002F15CE /* ATF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D011BC31D94002F15CE /* ATF.geojson */; }; + 88FF5E021BC31D95002F15CE /* ATG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D021BC31D94002F15CE /* ATG.geojson */; }; + 88FF5E031BC31D95002F15CE /* AUS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D031BC31D94002F15CE /* AUS.geojson */; }; + 88FF5E041BC31D95002F15CE /* AUT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D041BC31D94002F15CE /* AUT.geojson */; }; + 88FF5E051BC31D95002F15CE /* AZE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D051BC31D94002F15CE /* AZE.geojson */; }; + 88FF5E061BC31D95002F15CE /* BDI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D061BC31D94002F15CE /* BDI.geojson */; }; + 88FF5E071BC31D95002F15CE /* BEL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D071BC31D94002F15CE /* BEL.geojson */; }; + 88FF5E081BC31D95002F15CE /* BEN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D081BC31D94002F15CE /* BEN.geojson */; }; + 88FF5E091BC31D95002F15CE /* BES.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D091BC31D94002F15CE /* BES.geojson */; }; + 88FF5E0A1BC31D95002F15CE /* BFA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D0A1BC31D94002F15CE /* BFA.geojson */; }; + 88FF5E0B1BC31D95002F15CE /* BGD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D0B1BC31D94002F15CE /* BGD.geojson */; }; + 88FF5E0C1BC31D95002F15CE /* BGR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D0C1BC31D94002F15CE /* BGR.geojson */; }; + 88FF5E0D1BC31D95002F15CE /* BHR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D0D1BC31D94002F15CE /* BHR.geojson */; }; + 88FF5E0E1BC31D95002F15CE /* BHS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D0E1BC31D94002F15CE /* BHS.geojson */; }; + 88FF5E0F1BC31D95002F15CE /* BIH.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D0F1BC31D94002F15CE /* BIH.geojson */; }; + 88FF5E101BC31D95002F15CE /* BLM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D101BC31D94002F15CE /* BLM.geojson */; }; + 88FF5E111BC31D95002F15CE /* BLR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D111BC31D94002F15CE /* BLR.geojson */; }; + 88FF5E121BC31D95002F15CE /* BLZ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D121BC31D94002F15CE /* BLZ.geojson */; }; + 88FF5E131BC31D95002F15CE /* BMU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D131BC31D94002F15CE /* BMU.geojson */; }; + 88FF5E141BC31D95002F15CE /* BOL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D141BC31D94002F15CE /* BOL.geojson */; }; + 88FF5E151BC31D95002F15CE /* BRA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D151BC31D94002F15CE /* BRA.geojson */; }; + 88FF5E161BC31D95002F15CE /* BRB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D161BC31D94002F15CE /* BRB.geojson */; }; + 88FF5E171BC31D95002F15CE /* BRN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D171BC31D94002F15CE /* BRN.geojson */; }; + 88FF5E181BC31D95002F15CE /* BTN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D181BC31D94002F15CE /* BTN.geojson */; }; + 88FF5E191BC31D95002F15CE /* BVT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D191BC31D94002F15CE /* BVT.geojson */; }; + 88FF5E1A1BC31D95002F15CE /* BWA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D1A1BC31D94002F15CE /* BWA.geojson */; }; + 88FF5E1B1BC31D95002F15CE /* CAF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D1B1BC31D94002F15CE /* CAF.geojson */; }; + 88FF5E1C1BC31D95002F15CE /* CAN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D1C1BC31D94002F15CE /* CAN.geojson */; }; + 88FF5E1D1BC31D95002F15CE /* CCK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D1D1BC31D94002F15CE /* CCK.geojson */; }; + 88FF5E1E1BC31D95002F15CE /* CHE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D1E1BC31D94002F15CE /* CHE.geojson */; }; + 88FF5E1F1BC31D95002F15CE /* CHL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D1F1BC31D94002F15CE /* CHL.geojson */; }; + 88FF5E201BC31D95002F15CE /* CHN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D201BC31D94002F15CE /* CHN.geojson */; }; + 88FF5E211BC31D95002F15CE /* CIV.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D211BC31D94002F15CE /* CIV.geojson */; }; + 88FF5E221BC31D95002F15CE /* CMR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D221BC31D94002F15CE /* CMR.geojson */; }; + 88FF5E231BC31D95002F15CE /* COD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D231BC31D94002F15CE /* COD.geojson */; }; + 88FF5E241BC31D95002F15CE /* COG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D241BC31D94002F15CE /* COG.geojson */; }; + 88FF5E251BC31D95002F15CE /* COK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D251BC31D94002F15CE /* COK.geojson */; }; + 88FF5E261BC31D95002F15CE /* COL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D261BC31D94002F15CE /* COL.geojson */; }; + 88FF5E271BC31D95002F15CE /* COM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D271BC31D94002F15CE /* COM.geojson */; }; + 88FF5E281BC31D95002F15CE /* CPV.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D281BC31D94002F15CE /* CPV.geojson */; }; + 88FF5E291BC31D95002F15CE /* CRI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D291BC31D94002F15CE /* CRI.geojson */; }; + 88FF5E2A1BC31D95002F15CE /* CUB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D2A1BC31D94002F15CE /* CUB.geojson */; }; + 88FF5E2B1BC31D95002F15CE /* CUW.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D2B1BC31D94002F15CE /* CUW.geojson */; }; + 88FF5E2C1BC31D95002F15CE /* CXR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D2C1BC31D94002F15CE /* CXR.geojson */; }; + 88FF5E2D1BC31D95002F15CE /* CYM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D2D1BC31D94002F15CE /* CYM.geojson */; }; + 88FF5E2E1BC31D95002F15CE /* CYP.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D2E1BC31D94002F15CE /* CYP.geojson */; }; + 88FF5E2F1BC31D95002F15CE /* CZE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D2F1BC31D94002F15CE /* CZE.geojson */; }; + 88FF5E301BC31D95002F15CE /* DEU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D301BC31D94002F15CE /* DEU.geojson */; }; + 88FF5E311BC31D95002F15CE /* DJI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D311BC31D94002F15CE /* DJI.geojson */; }; + 88FF5E321BC31D95002F15CE /* DMA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D321BC31D94002F15CE /* DMA.geojson */; }; + 88FF5E331BC31D95002F15CE /* DNK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D331BC31D94002F15CE /* DNK.geojson */; }; + 88FF5E341BC31D95002F15CE /* DOM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D341BC31D94002F15CE /* DOM.geojson */; }; + 88FF5E351BC31D95002F15CE /* DZA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D351BC31D94002F15CE /* DZA.geojson */; }; + 88FF5E361BC31D95002F15CE /* ECU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D361BC31D94002F15CE /* ECU.geojson */; }; + 88FF5E371BC31D95002F15CE /* EGY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D371BC31D94002F15CE /* EGY.geojson */; }; + 88FF5E381BC31D95002F15CE /* ERI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D381BC31D94002F15CE /* ERI.geojson */; }; + 88FF5E391BC31D95002F15CE /* ESH.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D391BC31D94002F15CE /* ESH.geojson */; }; + 88FF5E3A1BC31D95002F15CE /* ESP.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D3A1BC31D94002F15CE /* ESP.geojson */; }; + 88FF5E3B1BC31D95002F15CE /* EST.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D3B1BC31D94002F15CE /* EST.geojson */; }; + 88FF5E3C1BC31D95002F15CE /* ETH.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D3C1BC31D94002F15CE /* ETH.geojson */; }; + 88FF5E3D1BC31D95002F15CE /* FIN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D3D1BC31D94002F15CE /* FIN.geojson */; }; + 88FF5E3E1BC31D95002F15CE /* FJI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D3E1BC31D94002F15CE /* FJI.geojson */; }; + 88FF5E3F1BC31D95002F15CE /* FLK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D3F1BC31D94002F15CE /* FLK.geojson */; }; + 88FF5E401BC31D95002F15CE /* FRA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D401BC31D94002F15CE /* FRA.geojson */; }; + 88FF5E411BC31D95002F15CE /* FRO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D411BC31D94002F15CE /* FRO.geojson */; }; + 88FF5E421BC31D95002F15CE /* FSM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D421BC31D94002F15CE /* FSM.geojson */; }; + 88FF5E431BC31D95002F15CE /* GAB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D431BC31D94002F15CE /* GAB.geojson */; }; + 88FF5E441BC31D95002F15CE /* GBR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D441BC31D94002F15CE /* GBR.geojson */; }; + 88FF5E451BC31D95002F15CE /* GEO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D451BC31D94002F15CE /* GEO.geojson */; }; + 88FF5E461BC31D95002F15CE /* GGY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D461BC31D94002F15CE /* GGY.geojson */; }; + 88FF5E471BC31D95002F15CE /* GHA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D471BC31D94002F15CE /* GHA.geojson */; }; + 88FF5E481BC31D95002F15CE /* GIB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D481BC31D94002F15CE /* GIB.geojson */; }; + 88FF5E491BC31D95002F15CE /* GIN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D491BC31D94002F15CE /* GIN.geojson */; }; + 88FF5E4A1BC31D95002F15CE /* GLP.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D4A1BC31D94002F15CE /* GLP.geojson */; }; + 88FF5E4B1BC31D95002F15CE /* GMB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D4B1BC31D94002F15CE /* GMB.geojson */; }; + 88FF5E4C1BC31D95002F15CE /* GNB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D4C1BC31D94002F15CE /* GNB.geojson */; }; + 88FF5E4D1BC31D95002F15CE /* GNQ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D4D1BC31D94002F15CE /* GNQ.geojson */; }; + 88FF5E4E1BC31D95002F15CE /* GRC.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D4E1BC31D94002F15CE /* GRC.geojson */; }; + 88FF5E4F1BC31D95002F15CE /* GRD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D4F1BC31D94002F15CE /* GRD.geojson */; }; + 88FF5E501BC31D95002F15CE /* GRL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D501BC31D94002F15CE /* GRL.geojson */; }; + 88FF5E511BC31D95002F15CE /* GTM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D511BC31D94002F15CE /* GTM.geojson */; }; + 88FF5E521BC31D95002F15CE /* GUF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D521BC31D94002F15CE /* GUF.geojson */; }; + 88FF5E531BC31D95002F15CE /* GUM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D531BC31D94002F15CE /* GUM.geojson */; }; + 88FF5E541BC31D95002F15CE /* GUY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D541BC31D94002F15CE /* GUY.geojson */; }; + 88FF5E551BC31D95002F15CE /* HKG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D551BC31D94002F15CE /* HKG.geojson */; }; + 88FF5E561BC31D95002F15CE /* HMD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D561BC31D94002F15CE /* HMD.geojson */; }; + 88FF5E571BC31D95002F15CE /* HND.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D571BC31D94002F15CE /* HND.geojson */; }; + 88FF5E581BC31D95002F15CE /* HRV.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D581BC31D94002F15CE /* HRV.geojson */; }; + 88FF5E591BC31D95002F15CE /* HTI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D591BC31D94002F15CE /* HTI.geojson */; }; + 88FF5E5A1BC31D95002F15CE /* HUN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D5A1BC31D94002F15CE /* HUN.geojson */; }; + 88FF5E5B1BC31D95002F15CE /* IDN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D5B1BC31D94002F15CE /* IDN.geojson */; }; + 88FF5E5C1BC31D95002F15CE /* IMN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D5C1BC31D94002F15CE /* IMN.geojson */; }; + 88FF5E5D1BC31D95002F15CE /* IND.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D5D1BC31D94002F15CE /* IND.geojson */; }; + 88FF5E5E1BC31D95002F15CE /* IOT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D5E1BC31D94002F15CE /* IOT.geojson */; }; + 88FF5E5F1BC31D95002F15CE /* IRL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D5F1BC31D94002F15CE /* IRL.geojson */; }; + 88FF5E601BC31D95002F15CE /* IRN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D601BC31D94002F15CE /* IRN.geojson */; }; + 88FF5E611BC31D95002F15CE /* IRQ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D611BC31D94002F15CE /* IRQ.geojson */; }; + 88FF5E621BC31D95002F15CE /* ISL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D621BC31D94002F15CE /* ISL.geojson */; }; + 88FF5E631BC31D95002F15CE /* ISR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D631BC31D94002F15CE /* ISR.geojson */; }; + 88FF5E641BC31D95002F15CE /* ITA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D641BC31D94002F15CE /* ITA.geojson */; }; + 88FF5E651BC31D95002F15CE /* JAM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D651BC31D94002F15CE /* JAM.geojson */; }; + 88FF5E661BC31D95002F15CE /* JEY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D661BC31D94002F15CE /* JEY.geojson */; }; + 88FF5E671BC31D95002F15CE /* JOR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D671BC31D94002F15CE /* JOR.geojson */; }; + 88FF5E681BC31D95002F15CE /* JPN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D681BC31D94002F15CE /* JPN.geojson */; }; + 88FF5E691BC31D95002F15CE /* KAZ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D691BC31D94002F15CE /* KAZ.geojson */; }; + 88FF5E6A1BC31D95002F15CE /* KEN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D6A1BC31D94002F15CE /* KEN.geojson */; }; + 88FF5E6B1BC31D95002F15CE /* KGZ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D6B1BC31D94002F15CE /* KGZ.geojson */; }; + 88FF5E6C1BC31D95002F15CE /* KHM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D6C1BC31D94002F15CE /* KHM.geojson */; }; + 88FF5E6D1BC31D95002F15CE /* KIR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D6D1BC31D94002F15CE /* KIR.geojson */; }; + 88FF5E6E1BC31D95002F15CE /* KNA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D6E1BC31D94002F15CE /* KNA.geojson */; }; + 88FF5E6F1BC31D95002F15CE /* KOR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D6F1BC31D94002F15CE /* KOR.geojson */; }; + 88FF5E701BC31D95002F15CE /* KWT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D701BC31D94002F15CE /* KWT.geojson */; }; + 88FF5E711BC31D95002F15CE /* LAO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D711BC31D94002F15CE /* LAO.geojson */; }; + 88FF5E721BC31D95002F15CE /* LBN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D721BC31D94002F15CE /* LBN.geojson */; }; + 88FF5E731BC31D95002F15CE /* LBR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D731BC31D94002F15CE /* LBR.geojson */; }; + 88FF5E741BC31D95002F15CE /* LBY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D741BC31D94002F15CE /* LBY.geojson */; }; + 88FF5E751BC31D95002F15CE /* LCA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D751BC31D94002F15CE /* LCA.geojson */; }; + 88FF5E761BC31D95002F15CE /* LIE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D761BC31D94002F15CE /* LIE.geojson */; }; + 88FF5E771BC31D95002F15CE /* LKA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D771BC31D94002F15CE /* LKA.geojson */; }; + 88FF5E781BC31D95002F15CE /* LSO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D781BC31D94002F15CE /* LSO.geojson */; }; + 88FF5E791BC31D95002F15CE /* LTU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D791BC31D94002F15CE /* LTU.geojson */; }; + 88FF5E7A1BC31D95002F15CE /* LUX.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D7A1BC31D94002F15CE /* LUX.geojson */; }; + 88FF5E7B1BC31D95002F15CE /* LVA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D7B1BC31D94002F15CE /* LVA.geojson */; }; + 88FF5E7C1BC31D95002F15CE /* MAC.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D7C1BC31D94002F15CE /* MAC.geojson */; }; + 88FF5E7D1BC31D95002F15CE /* MAF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D7D1BC31D94002F15CE /* MAF.geojson */; }; + 88FF5E7E1BC31D95002F15CE /* MAR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D7E1BC31D94002F15CE /* MAR.geojson */; }; + 88FF5E7F1BC31D95002F15CE /* MCO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D7F1BC31D94002F15CE /* MCO.geojson */; }; + 88FF5E801BC31D95002F15CE /* MDA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D801BC31D94002F15CE /* MDA.geojson */; }; + 88FF5E811BC31D95002F15CE /* MDG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D811BC31D94002F15CE /* MDG.geojson */; }; + 88FF5E821BC31D95002F15CE /* MDV.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D821BC31D94002F15CE /* MDV.geojson */; }; + 88FF5E831BC31D95002F15CE /* MEX.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D831BC31D94002F15CE /* MEX.geojson */; }; + 88FF5E841BC31D95002F15CE /* MHL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D841BC31D94002F15CE /* MHL.geojson */; }; + 88FF5E851BC31D95002F15CE /* MKD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D851BC31D94002F15CE /* MKD.geojson */; }; + 88FF5E861BC31D95002F15CE /* MLI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D861BC31D94002F15CE /* MLI.geojson */; }; + 88FF5E871BC31D95002F15CE /* MLT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D871BC31D94002F15CE /* MLT.geojson */; }; + 88FF5E881BC31D95002F15CE /* MMR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D881BC31D94002F15CE /* MMR.geojson */; }; + 88FF5E891BC31D95002F15CE /* MNE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D891BC31D94002F15CE /* MNE.geojson */; }; + 88FF5E8A1BC31D95002F15CE /* MNG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D8A1BC31D94002F15CE /* MNG.geojson */; }; + 88FF5E8B1BC31D95002F15CE /* MNP.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D8B1BC31D94002F15CE /* MNP.geojson */; }; + 88FF5E8C1BC31D95002F15CE /* MOZ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D8C1BC31D94002F15CE /* MOZ.geojson */; }; + 88FF5E8D1BC31D95002F15CE /* MRT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D8D1BC31D94002F15CE /* MRT.geojson */; }; + 88FF5E8E1BC31D95002F15CE /* MSR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D8E1BC31D94002F15CE /* MSR.geojson */; }; + 88FF5E8F1BC31D95002F15CE /* MTQ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D8F1BC31D94002F15CE /* MTQ.geojson */; }; + 88FF5E901BC31D95002F15CE /* MUS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D901BC31D94002F15CE /* MUS.geojson */; }; + 88FF5E911BC31D95002F15CE /* MWI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D911BC31D94002F15CE /* MWI.geojson */; }; + 88FF5E921BC31D95002F15CE /* MYS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D921BC31D94002F15CE /* MYS.geojson */; }; + 88FF5E931BC31D95002F15CE /* MYT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D931BC31D94002F15CE /* MYT.geojson */; }; + 88FF5E941BC31D95002F15CE /* NAM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D941BC31D94002F15CE /* NAM.geojson */; }; + 88FF5E951BC31D95002F15CE /* NCL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D951BC31D94002F15CE /* NCL.geojson */; }; + 88FF5E961BC31D95002F15CE /* NER.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D961BC31D94002F15CE /* NER.geojson */; }; + 88FF5E971BC31D95002F15CE /* NFK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D971BC31D94002F15CE /* NFK.geojson */; }; + 88FF5E981BC31D95002F15CE /* NGA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D981BC31D94002F15CE /* NGA.geojson */; }; + 88FF5E991BC31D95002F15CE /* NIC.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D991BC31D94002F15CE /* NIC.geojson */; }; + 88FF5E9A1BC31D95002F15CE /* NIU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D9A1BC31D94002F15CE /* NIU.geojson */; }; + 88FF5E9B1BC31D95002F15CE /* NLD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D9B1BC31D94002F15CE /* NLD.geojson */; }; + 88FF5E9C1BC31D95002F15CE /* NOR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D9C1BC31D94002F15CE /* NOR.geojson */; }; + 88FF5E9D1BC31D95002F15CE /* NPL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D9D1BC31D94002F15CE /* NPL.geojson */; }; + 88FF5E9E1BC31D95002F15CE /* NRU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D9E1BC31D94002F15CE /* NRU.geojson */; }; + 88FF5E9F1BC31D95002F15CE /* NZL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5D9F1BC31D94002F15CE /* NZL.geojson */; }; + 88FF5EA01BC31D95002F15CE /* OMN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA01BC31D94002F15CE /* OMN.geojson */; }; + 88FF5EA11BC31D95002F15CE /* PAK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA11BC31D94002F15CE /* PAK.geojson */; }; + 88FF5EA21BC31D95002F15CE /* PAN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA21BC31D94002F15CE /* PAN.geojson */; }; + 88FF5EA31BC31D95002F15CE /* PCN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA31BC31D94002F15CE /* PCN.geojson */; }; + 88FF5EA41BC31D95002F15CE /* PER.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA41BC31D94002F15CE /* PER.geojson */; }; + 88FF5EA51BC31D95002F15CE /* PHL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA51BC31D94002F15CE /* PHL.geojson */; }; + 88FF5EA61BC31D95002F15CE /* PLW.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA61BC31D94002F15CE /* PLW.geojson */; }; + 88FF5EA71BC31D95002F15CE /* PNG.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA71BC31D94002F15CE /* PNG.geojson */; }; + 88FF5EA81BC31D95002F15CE /* POL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA81BC31D94002F15CE /* POL.geojson */; }; + 88FF5EA91BC31D95002F15CE /* PRI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DA91BC31D94002F15CE /* PRI.geojson */; }; + 88FF5EAA1BC31D95002F15CE /* PRK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DAA1BC31D94002F15CE /* PRK.geojson */; }; + 88FF5EAB1BC31D95002F15CE /* PRT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DAB1BC31D94002F15CE /* PRT.geojson */; }; + 88FF5EAC1BC31D95002F15CE /* PRY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DAC1BC31D94002F15CE /* PRY.geojson */; }; + 88FF5EAD1BC31D95002F15CE /* PSE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DAD1BC31D94002F15CE /* PSE.geojson */; }; + 88FF5EAE1BC31D95002F15CE /* PYF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DAE1BC31D94002F15CE /* PYF.geojson */; }; + 88FF5EAF1BC31D95002F15CE /* QAT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DAF1BC31D95002F15CE /* QAT.geojson */; }; + 88FF5EB01BC31D95002F15CE /* REU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB01BC31D95002F15CE /* REU.geojson */; }; + 88FF5EB11BC31D95002F15CE /* ROU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB11BC31D95002F15CE /* ROU.geojson */; }; + 88FF5EB21BC31D95002F15CE /* RUS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB21BC31D95002F15CE /* RUS.geojson */; }; + 88FF5EB31BC31D95002F15CE /* RWA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB31BC31D95002F15CE /* RWA.geojson */; }; + 88FF5EB41BC31D95002F15CE /* SAU.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB41BC31D95002F15CE /* SAU.geojson */; }; + 88FF5EB51BC31D95002F15CE /* SDN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB51BC31D95002F15CE /* SDN.geojson */; }; + 88FF5EB61BC31D95002F15CE /* SEN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB61BC31D95002F15CE /* SEN.geojson */; }; + 88FF5EB71BC31D95002F15CE /* SGP.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB71BC31D95002F15CE /* SGP.geojson */; }; + 88FF5EB81BC31D95002F15CE /* SGS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB81BC31D95002F15CE /* SGS.geojson */; }; + 88FF5EB91BC31D95002F15CE /* SHN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DB91BC31D95002F15CE /* SHN.geojson */; }; + 88FF5EBA1BC31D95002F15CE /* SJM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DBA1BC31D95002F15CE /* SJM.geojson */; }; + 88FF5EBB1BC31D95002F15CE /* SLB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DBB1BC31D95002F15CE /* SLB.geojson */; }; + 88FF5EBC1BC31D95002F15CE /* SLE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DBC1BC31D95002F15CE /* SLE.geojson */; }; + 88FF5EBD1BC31D95002F15CE /* SLV.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DBD1BC31D95002F15CE /* SLV.geojson */; }; + 88FF5EBE1BC31D95002F15CE /* SMR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DBE1BC31D95002F15CE /* SMR.geojson */; }; + 88FF5EBF1BC31D95002F15CE /* SOM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DBF1BC31D95002F15CE /* SOM.geojson */; }; + 88FF5EC01BC31D95002F15CE /* SPM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC01BC31D95002F15CE /* SPM.geojson */; }; + 88FF5EC11BC31D95002F15CE /* SRB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC11BC31D95002F15CE /* SRB.geojson */; }; + 88FF5EC21BC31D95002F15CE /* SSD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC21BC31D95002F15CE /* SSD.geojson */; }; + 88FF5EC31BC31D95002F15CE /* STP.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC31BC31D95002F15CE /* STP.geojson */; }; + 88FF5EC41BC31D95002F15CE /* SUR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC41BC31D95002F15CE /* SUR.geojson */; }; + 88FF5EC51BC31D95002F15CE /* SVK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC51BC31D95002F15CE /* SVK.geojson */; }; + 88FF5EC61BC31D95002F15CE /* SVN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC61BC31D95002F15CE /* SVN.geojson */; }; + 88FF5EC71BC31D95002F15CE /* SWE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC71BC31D95002F15CE /* SWE.geojson */; }; + 88FF5EC81BC31D95002F15CE /* SWZ.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC81BC31D95002F15CE /* SWZ.geojson */; }; + 88FF5EC91BC31D95002F15CE /* SXM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DC91BC31D95002F15CE /* SXM.geojson */; }; + 88FF5ECA1BC31D95002F15CE /* SYC.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DCA1BC31D95002F15CE /* SYC.geojson */; }; + 88FF5ECB1BC31D95002F15CE /* SYR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DCB1BC31D95002F15CE /* SYR.geojson */; }; + 88FF5ECC1BC31D95002F15CE /* TCA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DCC1BC31D95002F15CE /* TCA.geojson */; }; + 88FF5ECD1BC31D95002F15CE /* TCD.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DCD1BC31D95002F15CE /* TCD.geojson */; }; + 88FF5ECE1BC31D95002F15CE /* TGO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DCE1BC31D95002F15CE /* TGO.geojson */; }; + 88FF5ECF1BC31D95002F15CE /* THA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DCF1BC31D95002F15CE /* THA.geojson */; }; + 88FF5ED01BC31D95002F15CE /* TJK.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD01BC31D95002F15CE /* TJK.geojson */; }; + 88FF5ED11BC31D95002F15CE /* TKL.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD11BC31D95002F15CE /* TKL.geojson */; }; + 88FF5ED21BC31D95002F15CE /* TKM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD21BC31D95002F15CE /* TKM.geojson */; }; + 88FF5ED31BC31D95002F15CE /* TLS.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD31BC31D95002F15CE /* TLS.geojson */; }; + 88FF5ED41BC31D95002F15CE /* TON.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD41BC31D95002F15CE /* TON.geojson */; }; + 88FF5ED51BC31D95002F15CE /* TTO.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD51BC31D95002F15CE /* TTO.geojson */; }; + 88FF5ED61BC31D95002F15CE /* TUN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD61BC31D95002F15CE /* TUN.geojson */; }; + 88FF5ED71BC31D95002F15CE /* TUR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD71BC31D95002F15CE /* TUR.geojson */; }; + 88FF5ED81BC31D95002F15CE /* TUV.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD81BC31D95002F15CE /* TUV.geojson */; }; + 88FF5ED91BC31D95002F15CE /* TWN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DD91BC31D95002F15CE /* TWN.geojson */; }; + 88FF5EDA1BC31D95002F15CE /* TZA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DDA1BC31D95002F15CE /* TZA.geojson */; }; + 88FF5EDB1BC31D95002F15CE /* UGA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DDB1BC31D95002F15CE /* UGA.geojson */; }; + 88FF5EDC1BC31D95002F15CE /* UKR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DDC1BC31D95002F15CE /* UKR.geojson */; }; + 88FF5EDD1BC31D95002F15CE /* UMI.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DDD1BC31D95002F15CE /* UMI.geojson */; }; + 88FF5EDE1BC31D95002F15CE /* URY.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DDE1BC31D95002F15CE /* URY.geojson */; }; + 88FF5EDF1BC31D95002F15CE /* USA.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DDF1BC31D95002F15CE /* USA.geojson */; }; + 88FF5EE01BC31D95002F15CE /* UZB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE01BC31D95002F15CE /* UZB.geojson */; }; + 88FF5EE11BC31D95002F15CE /* VAT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE11BC31D95002F15CE /* VAT.geojson */; }; + 88FF5EE21BC31D95002F15CE /* VCT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE21BC31D95002F15CE /* VCT.geojson */; }; + 88FF5EE31BC31D95002F15CE /* VEN.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE31BC31D95002F15CE /* VEN.geojson */; }; + 88FF5EE41BC31D95002F15CE /* VGB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE41BC31D95002F15CE /* VGB.geojson */; }; + 88FF5EE51BC31D95002F15CE /* VIR.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE51BC31D95002F15CE /* VIR.geojson */; }; + 88FF5EE61BC31D95002F15CE /* VNM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE61BC31D95002F15CE /* VNM.geojson */; }; + 88FF5EE71BC31D95002F15CE /* VUT.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE71BC31D95002F15CE /* VUT.geojson */; }; + 88FF5EE81BC31D95002F15CE /* WLF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE81BC31D95002F15CE /* WLF.geojson */; }; + 88FF5EE91BC31D95002F15CE /* WSM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DE91BC31D95002F15CE /* WSM.geojson */; }; + 88FF5EEA1BC31D95002F15CE /* YEM.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DEA1BC31D95002F15CE /* YEM.geojson */; }; + 88FF5EEB1BC31D95002F15CE /* ZAF.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DEB1BC31D95002F15CE /* ZAF.geojson */; }; + 88FF5EEC1BC31D95002F15CE /* ZMB.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DEC1BC31D95002F15CE /* ZMB.geojson */; }; + 88FF5EED1BC31D95002F15CE /* ZWE.geojson in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DED1BC31D95002F15CE /* ZWE.geojson */; }; + 88FF5EEE1BC31D95002F15CE /* tl_2013_06075_roads.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DEF1BC31D95002F15CE /* tl_2013_06075_roads.dbf */; }; + 88FF5EEF1BC31D95002F15CE /* tl_2013_06075_roads.mbr in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DF01BC31D95002F15CE /* tl_2013_06075_roads.mbr */; }; + 88FF5EF01BC31D95002F15CE /* tl_2013_06075_roads.prj in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DF11BC31D95002F15CE /* tl_2013_06075_roads.prj */; }; + 88FF5EF11BC31D95002F15CE /* tl_2013_06075_roads.shp in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DF21BC31D95002F15CE /* tl_2013_06075_roads.shp */; }; + 88FF5EF21BC31D95002F15CE /* tl_2013_06075_roads.shx in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DF31BC31D95002F15CE /* tl_2013_06075_roads.shx */; }; + 88FF5EF31BC31D95002F15CE /* tl_2013_06075_roads.sqlite in Resources */ = {isa = PBXBuildFile; fileRef = 88FF5DF41BC31D95002F15CE /* tl_2013_06075_roads.sqlite */; }; + 8F4D91DC1CDFA7DE00F68045 /* globe.png in Resources */ = {isa = PBXBuildFile; fileRef = 8F4D91DA1CDFA7DE00F68045 /* globe.png */; }; + 8F4D91DD1CDFA7DE00F68045 /* map.png in Resources */ = {isa = PBXBuildFile; fileRef = 8F4D91DB1CDFA7DE00F68045 /* map.png */; }; + 8F981DB81DE3577C00717DF1 /* ne_10m_roads.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB21DE3577C00717DF1 /* ne_10m_roads.dbf */; }; + 8F981DB91DE3577C00717DF1 /* ne_10m_roads.prj in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB31DE3577C00717DF1 /* ne_10m_roads.prj */; }; + 8F981DBB1DE3577C00717DF1 /* ne_10m_roads.shp in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB51DE3577C00717DF1 /* ne_10m_roads.shp */; }; + 8F981DBC1DE3577C00717DF1 /* ne_10m_roads.shx in Resources */ = {isa = PBXBuildFile; fileRef = 8F981DB61DE3577C00717DF1 /* ne_10m_roads.shx */; }; + D8200C911BE92B2F00B22CF5 /* WideVectorsTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = D8200C901BE92B2F00B22CF5 /* WideVectorsTestCase.mm */; }; + D8200CA11BE9563F00B22CF5 /* StickersTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8200CA01BE9563F00B22CF5 /* StickersTestCase.swift */; }; + D8200CA41BE9624300B22CF5 /* LoftedPolysTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = D8200CA31BE9624300B22CF5 /* LoftedPolysTestCase.m */; }; + D8228A921BE77816001D6914 /* MovingScreenLabelsTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8228A911BE77816001D6914 /* MovingScreenLabelsTestCase.swift */; }; + D8228AA81BE786BE001D6914 /* ClusteredMarkersTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8228AA71BE786BE001D6914 /* ClusteredMarkersTestCase.swift */; }; + D8341A711BE2C8D200411A46 /* VectorsTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = D8341A701BE2C8D200411A46 /* VectorsTestCase.mm */; }; + D8341A731BE2DFE100411A46 /* ScreenLabelsTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8341A721BE2DFE100411A46 /* ScreenLabelsTestCase.swift */; }; + D84AA5971C1A26C100413B76 /* OSTN02_NTv2.gsb in Resources */ = {isa = PBXBuildFile; fileRef = D84AA5961C1A26C100413B76 /* OSTN02_NTv2.gsb */; }; + D8E12ECD1BDE9FD500BB7BC7 /* AnimatedBasemapTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E12ECC1BDE9FD500BB7BC7 /* AnimatedBasemapTestCase.swift */; }; + D8F2FE271BE7BD630058A310 /* LabelsTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F2FE261BE7BD630058A310 /* LabelsTestCase.m */; }; + D8F2FE291BE7C2000058A310 /* MarkersTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F2FE281BE7C2000058A310 /* MarkersTestCase.swift */; }; + D8F2FE2C1BE7CAD30058A310 /* MegaMarkersTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = D8F2FE2B1BE7CAD30058A310 /* MegaMarkersTestCase.m */; }; + D8F2FE2E1BE7CF310058A310 /* ModelsTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8F2FE2D1BE7CF310058A310 /* ModelsTestCase.swift */; }; + E0D333623509A56C61C2228C /* libPods-AutoTesterPod.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B0C308BBE20E3D71A8EEB294 /* libPods-AutoTesterPod.a */; }; + E53CF5DA1E1EAF63000FB5C1 /* belfast_ireland_amenities.geojson in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5D91E1EAF63000FB5C1 /* belfast_ireland_amenities.geojson */; }; + E53CF5DE1E1EAF6A000FB5C1 /* amenities.sld in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5DD1E1EAF6A000FB5C1 /* amenities.sld */; }; + E53CF5E41E1EAF73000FB5C1 /* firehouse.png in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5DF1E1EAF73000FB5C1 /* firehouse.png */; }; + E53CF5E51E1EAF73000FB5C1 /* fuel.png in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5E01E1EAF73000FB5C1 /* fuel.png */; }; + E53CF5E61E1EAF73000FB5C1 /* library.png in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5E11E1EAF73000FB5C1 /* library.png */; }; + E53CF5E71E1EAF73000FB5C1 /* police.png in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5E21E1EAF73000FB5C1 /* police.png */; }; + E53CF5E81E1EAF73000FB5C1 /* school.png in Resources */ = {isa = PBXBuildFile; fileRef = E53CF5E31E1EAF73000FB5C1 /* school.png */; }; + E5679F481CB72DE800369A15 /* LabelAnimationTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = E5679F431CB72DE800369A15 /* LabelAnimationTestCase.m */; }; + E5679F4A1CB72DE800369A15 /* FindHeightTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = E5679F471CB72DE800369A15 /* FindHeightTestCase.m */; }; + E5941DBB1E0CEC8600E1C8B3 /* belfast_ireland_buildings.geojson in Resources */ = {isa = PBXBuildFile; fileRef = E5941DB61E0CEC8600E1C8B3 /* belfast_ireland_buildings.geojson */; }; + E5941DBC1E0CEC8600E1C8B3 /* belfast_ireland_landusages.geojson in Resources */ = {isa = PBXBuildFile; fileRef = E5941DB71E0CEC8600E1C8B3 /* belfast_ireland_landusages.geojson */; }; + E5941DBD1E0CEC8600E1C8B3 /* belfast_ireland_roads.geojson in Resources */ = {isa = PBXBuildFile; fileRef = E5941DB81E0CEC8600E1C8B3 /* belfast_ireland_roads.geojson */; }; + E5941DBE1E0CEC8600E1C8B3 /* belfast_ireland_waterareas.geojson in Resources */ = {isa = PBXBuildFile; fileRef = E5941DB91E0CEC8600E1C8B3 /* belfast_ireland_waterareas.geojson */; }; + E5941DBF1E0CEC8600E1C8B3 /* belfast_ireland_waterways.geojson in Resources */ = {isa = PBXBuildFile; fileRef = E5941DBA1E0CEC8600E1C8B3 /* belfast_ireland_waterways.geojson */; }; + E5941DCA1E0D02A800E1C8B3 /* osm_buildings.sld in Resources */ = {isa = PBXBuildFile; fileRef = E5941DC51E0D02A800E1C8B3 /* osm_buildings.sld */; }; + E5941DCB1E0D02A800E1C8B3 /* osm_landuse.sld in Resources */ = {isa = PBXBuildFile; fileRef = E5941DC61E0D02A800E1C8B3 /* osm_landuse.sld */; }; + E5941DCC1E0D02A800E1C8B3 /* osm_roads.sld in Resources */ = {isa = PBXBuildFile; fileRef = E5941DC71E0D02A800E1C8B3 /* osm_roads.sld */; }; + E5941DCD1E0D02A800E1C8B3 /* osm_water.sld in Resources */ = {isa = PBXBuildFile; fileRef = E5941DC81E0D02A800E1C8B3 /* osm_water.sld */; }; + E5941DCE1E0D02A800E1C8B3 /* water_lines.sld in Resources */ = {isa = PBXBuildFile; fileRef = E5941DC91E0D02A800E1C8B3 /* water_lines.sld */; }; + E5C82FCC1E221C890074DF23 /* cemetery.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C82FC71E221C890074DF23 /* cemetery.png */; }; + E5C82FCD1E221C890074DF23 /* commercial.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C82FC81E221C890074DF23 /* commercial.png */; }; + E5C82FCE1E221C890074DF23 /* industrial.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C82FC91E221C890074DF23 /* industrial.png */; }; + E5C82FCF1E221C890074DF23 /* forest.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C82FCA1E221C890074DF23 /* forest.png */; }; + E5C82FD01E221C890074DF23 /* residential.png in Resources */ = {isa = PBXBuildFile; fileRef = E5C82FCB1E221C890074DF23 /* residential.png */; }; + E5CC4E201DF7CBEA00C0D4DE /* LocationTrackingRealTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5CC4E1F1DF7CBEA00C0D4DE /* LocationTrackingRealTestCase.swift */; }; + E5D2D65F1DE65CE400E02305 /* LocationTrackingSimTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5D2D65E1DE65CE400E02305 /* LocationTrackingSimTestCase.swift */; }; + E5D2D6681DE6C25300E02305 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D2D6671DE6C25300E02305 /* libsqlite3.tbd */; }; + E5D2D66A1DE6C25A00E02305 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D2D6691DE6C25A00E02305 /* libxml2.tbd */; }; + E5D2D66C1DE6C26000E02305 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D2D66B1DE6C26000E02305 /* libz.tbd */; }; + E5D2D66E1DE6C26A00E02305 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D2D66D1DE6C26A00E02305 /* libc++.tbd */; }; + E5D2D6751DEDEABF00E02305 /* AnimationDelegateTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5D2D6741DEDEABF00E02305 /* AnimationDelegateTestCase.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 2BB4766C20004764006AAACB /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1EECB7330E20B0B0F0973EF5 /* Pods-AutoTesterPod.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoTesterPod.debug.xcconfig"; path = "Target Support Files/Pods-AutoTesterPod/Pods-AutoTesterPod.debug.xcconfig"; sourceTree = ""; }; + 2B033BD024F6D7B200B55248 /* Roboto-Italic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Italic.ttf"; path = "../../../../resources/fonts/Roboto-Italic.ttf"; sourceTree = ""; }; + 2B033BD124F6D7B300B55248 /* Roboto-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Thin.ttf"; path = "../../../../resources/fonts/Roboto-Thin.ttf"; sourceTree = ""; }; + 2B033BD224F6D7B300B55248 /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Bold.ttf"; path = "../../../../resources/fonts/Roboto-Bold.ttf"; sourceTree = ""; }; + 2B033BD324F6D7B300B55248 /* Roboto-BoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-BoldItalic.ttf"; path = "../../../../resources/fonts/Roboto-BoldItalic.ttf"; sourceTree = ""; }; + 2B033BD524F6D7B300B55248 /* Roboto-Black.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Black.ttf"; path = "../../../../resources/fonts/Roboto-Black.ttf"; sourceTree = ""; }; + 2B033BD624F6D7B300B55248 /* Roboto-BlackItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-BlackItalic.ttf"; path = "../../../../resources/fonts/Roboto-BlackItalic.ttf"; sourceTree = ""; }; + 2B033BD724F6D7B300B55248 /* Roboto-MediumItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-MediumItalic.ttf"; path = "../../../../resources/fonts/Roboto-MediumItalic.ttf"; sourceTree = ""; }; + 2B033BDA24F6D7B300B55248 /* Roboto-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Light.ttf"; path = "../../../../resources/fonts/Roboto-Light.ttf"; sourceTree = ""; }; + 2B033BDD24F6D7B300B55248 /* Roboto-LightItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-LightItalic.ttf"; path = "../../../../resources/fonts/Roboto-LightItalic.ttf"; sourceTree = ""; }; + 2B033BDE24F6D7B300B55248 /* Roboto-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Regular.ttf"; path = "../../../../resources/fonts/Roboto-Regular.ttf"; sourceTree = ""; }; + 2B033BE024F6D7B300B55248 /* Roboto-ThinItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-ThinItalic.ttf"; path = "../../../../resources/fonts/Roboto-ThinItalic.ttf"; sourceTree = ""; }; + 2B033BE124F6D7B300B55248 /* Roboto-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Medium.ttf"; path = "../../../../resources/fonts/Roboto-Medium.ttf"; sourceTree = ""; }; + 2B033BF424F6DA4300B55248 /* Roboto-Condensed-Italic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Condensed-Italic.ttf"; path = "../../../../resources/fonts/Roboto-Condensed-Italic.ttf"; sourceTree = ""; }; + 2B033BF524F6DA4300B55248 /* Roboto-Condensed-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Condensed-Bold.ttf"; path = "../../../../resources/fonts/Roboto-Condensed-Bold.ttf"; sourceTree = ""; }; + 2B033BF624F6DA4300B55248 /* Roboto-Condensed-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Condensed-Light.ttf"; path = "../../../../resources/fonts/Roboto-Condensed-Light.ttf"; sourceTree = ""; }; + 2B033BF724F6DA4300B55248 /* Roboto-Condensed-LightItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Condensed-LightItalic.ttf"; path = "../../../../resources/fonts/Roboto-Condensed-LightItalic.ttf"; sourceTree = ""; }; + 2B033BF824F6DA4300B55248 /* Roboto-Condensed-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Condensed-Regular.ttf"; path = "../../../../resources/fonts/Roboto-Condensed-Regular.ttf"; sourceTree = ""; }; + 2B033BF924F6DA4300B55248 /* Roboto-Condensed-BoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Roboto-Condensed-BoldItalic.ttf"; path = "../../../../resources/fonts/Roboto-Condensed-BoldItalic.ttf"; sourceTree = ""; }; + 2B033C0024F6F6DA00B55248 /* OpenSans-LightItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-LightItalic.ttf"; path = "../../../../resources/fonts/OpenSans-LightItalic.ttf"; sourceTree = ""; }; + 2B033C0124F6F6DB00B55248 /* OpenSans-Italic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Italic.ttf"; path = "../../../../resources/fonts/OpenSans-Italic.ttf"; sourceTree = ""; }; + 2B033C0224F6F6DB00B55248 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Regular.ttf"; path = "../../../../resources/fonts/OpenSans-Regular.ttf"; sourceTree = ""; }; + 2B033C0324F6F6DB00B55248 /* OpenSans-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-SemiBold.ttf"; path = "../../../../resources/fonts/OpenSans-SemiBold.ttf"; sourceTree = ""; }; + 2B033C0424F6F6DB00B55248 /* OpenSans-BoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-BoldItalic.ttf"; path = "../../../../resources/fonts/OpenSans-BoldItalic.ttf"; sourceTree = ""; }; + 2B033C0524F6F6DB00B55248 /* OpenSans-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Bold.ttf"; path = "../../../../resources/fonts/OpenSans-Bold.ttf"; sourceTree = ""; }; + 2B033C0624F6F6DB00B55248 /* OpenSans-ExtraBoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-ExtraBoldItalic.ttf"; path = "../../../../resources/fonts/OpenSans-ExtraBoldItalic.ttf"; sourceTree = ""; }; + 2B033C0724F6F6DB00B55248 /* OpenSans-ExtraBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-ExtraBold.ttf"; path = "../../../../resources/fonts/OpenSans-ExtraBold.ttf"; sourceTree = ""; }; + 2B033C0824F6F6DB00B55248 /* OpenSans-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Light.ttf"; path = "../../../../resources/fonts/OpenSans-Light.ttf"; sourceTree = ""; }; + 2B033C0924F6F6DB00B55248 /* OpenSans-SemiBoldItalic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-SemiBoldItalic.ttf"; path = "../../../../resources/fonts/OpenSans-SemiBoldItalic.ttf"; sourceTree = ""; }; + 2B158BED1D5D19E900103E04 /* VectorHoleTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorHoleTestCase.h; sourceTree = ""; }; + 2B158BEE1D5D19E900103E04 /* VectorHoleTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VectorHoleTestCase.m; sourceTree = ""; }; + 2B1806D122AECF4200DD3DB1 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 2B1806D422AECFA700DD3DB1 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; }; + 2B1C264E1C90FFFC00C71B0A /* VectorMBTilesTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VectorMBTilesTestCase.swift; sourceTree = ""; }; + 2B1C26511C9100A500C71B0A /* France.mbtiles */ = {isa = PBXFileReference; lastKnownFileType = file; name = France.mbtiles; path = ../../../resources/vectors/France.mbtiles; sourceTree = ""; }; + 2B1E85A522B44D5800AB7208 /* BillboardTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BillboardTestCase.swift; sourceTree = ""; }; + 2B249F3E23F4A82600CFA3D0 /* GeographyClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeographyClass.swift; sourceTree = ""; }; + 2B29944A243BA08D00677DE4 /* MapboxKindaMap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MapboxKindaMap.swift; path = "../../../library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift"; sourceTree = ""; }; + 2B29944C243BA16000677DE4 /* SimpleStyleTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleStyleTestCase.swift; sourceTree = ""; }; + 2B29944E243BA31900677DE4 /* cube.obj */ = {isa = PBXFileReference; lastKnownFileType = text; name = cube.obj; path = resources/cube.obj; sourceTree = SOURCE_ROOT; }; + 2B361E3921237CFE0074D06D /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 2B392B6F1C5AC59D001EE40B /* RunwayBuilderTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RunwayBuilderTestCase.h; sourceTree = ""; }; + 2B392B701C5AC59D001EE40B /* RunwayBuilderTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RunwayBuilderTestCase.m; sourceTree = ""; }; + 2B4B30A32395E0DE00854073 /* MapboxTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapboxTestCase.swift; sourceTree = ""; }; + 2B4B30A52395E0DE00854073 /* StartupShutdownTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StartupShutdownTestCase.swift; sourceTree = ""; }; + 2B4B30A62395E0DE00854073 /* GlyphProblemTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GlyphProblemTestCase.m; sourceTree = ""; }; + 2B4B30A72395E0DE00854073 /* GlyphProblemTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlyphProblemTestCase.h; sourceTree = ""; }; + 2B4B30A82395E0DE00854073 /* LayerStartupShutdownTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayerStartupShutdownTestCase.swift; sourceTree = ""; }; + 2B4B30A92395E0DE00854073 /* MapTilerTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapTilerTestCase.swift; sourceTree = ""; }; + 2B4B30BA2395F08C00854073 /* maptiler_streets.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = maptiler_streets.json; sourceTree = ""; }; + 2B4B30BB2395F08C00854073 /* maptiler_topo.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = maptiler_topo.json; sourceTree = ""; }; + 2B4B30BC2395F08C00854073 /* maptiler_basic.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = maptiler_basic.json; sourceTree = ""; }; + 2B4B30BD2395F08C00854073 /* default.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = default.sld; sourceTree = ""; }; + 2B4B30BE2395F08C00854073 /* maptiler_hybrid_satellite.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = maptiler_hybrid_satellite.json; sourceTree = ""; }; + 2B4B30BF2395F08C00854073 /* mapbox_satellite-v9.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "mapbox_satellite-v9.json"; sourceTree = ""; }; + 2B4B30C02395F08D00854073 /* mapbox_satellite-streets-v9.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "mapbox_satellite-streets-v9.json"; sourceTree = ""; }; + 2B4B63AD23611D690008C8C1 /* OfflineRenderTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OfflineRenderTestCase.swift; sourceTree = ""; }; + 2B4BA6C21C83A22000DC1562 /* leftbend.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = leftbend.geojson; sourceTree = ""; }; + 2B4BA6C31C83A22000DC1562 /* leftv.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = leftv.geojson; sourceTree = ""; }; + 2B4BA6C41C83A22000DC1562 /* mowing-lawn.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "mowing-lawn.geojson"; sourceTree = ""; }; + 2B4BA6C51C83A22000DC1562 /* rightbend.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rightbend.geojson; sourceTree = ""; }; + 2B4BA6C61C83A22000DC1562 /* rightv.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rightv.geojson; sourceTree = ""; }; + 2B4BA6C71C83A22000DC1562 /* sawtooth.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sawtooth.geojson; sourceTree = ""; }; + 2B4BA6C81C83A22000DC1562 /* sawtoothbegin.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sawtoothbegin.geojson; sourceTree = ""; }; + 2B4BA6C91C83A22000DC1562 /* spiral.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = spiral.geojson; sourceTree = ""; }; + 2B4BA6CA1C83A22000DC1562 /* square.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = square.geojson; sourceTree = ""; }; + 2B4BA6CB1C83A22000DC1562 /* straight.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = straight.geojson; sourceTree = ""; }; + 2B4BA6CC1C83A22000DC1562 /* track.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = track.geojson; sourceTree = ""; }; + 2B4BA6CD1C83A22000DC1562 /* uturn.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = uturn.geojson; sourceTree = ""; }; + 2B5E8AF41E943560000B39E5 /* greensquare.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = greensquare.png; path = resources/greensquare.png; sourceTree = ""; }; + 2B6611E525D1C35D009D228F /* AirwayTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AirwayTestCase.swift; sourceTree = ""; }; + 2B68A43B225D06A8009CC720 /* ImageReloadTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageReloadTestCase.swift; sourceTree = ""; }; + 2B6953671C7E67DD007FC51E /* colorramp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = colorramp.png; path = AutoTester/colorramp.png; sourceTree = ""; }; + 2B73D6B2207C106C00AF5095 /* GlobeSamplerTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlobeSamplerTestCase.swift; sourceTree = ""; }; + 2B7787C921CDA47F006ABF5D /* CartoDBLightTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CartoDBLightTestCase.swift; sourceTree = ""; }; + 2B7E2889200EC109007E2965 /* SE_PolygonsLines.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = SE_PolygonsLines.json; path = resources/SE_PolygonsLines.json; sourceTree = SOURCE_ROOT; }; + 2B7E288A200EC109007E2965 /* SE_Basic.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = SE_Basic.json; path = resources/SE_Basic.json; sourceTree = SOURCE_ROOT; }; + 2B7FC0A61E32B67400AF253A /* testJson.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = testJson.json; path = resources/testJson.json; sourceTree = ""; }; + 2B8849E91E37F7CB0027C397 /* LIDARTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LIDARTestCase.h; sourceTree = ""; }; + 2B8849EA1E37F7CB0027C397 /* LIDARTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LIDARTestCase.mm; sourceTree = ""; }; + 2B8849FA1E37F9B30027C397 /* stadium-utm-quad-data.sqlite */ = {isa = PBXFileReference; lastKnownFileType = text; name = "stadium-utm-quad-data.sqlite"; path = "../../../resources/lidar/stadium-utm-quad-data.sqlite"; sourceTree = ""; }; + 2B8F3256201021CF006DDE27 /* NotoSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "NotoSans-Regular.ttf"; path = "../resources/NotoSans-Regular.ttf"; sourceTree = ""; }; + 2B8F3258201021CF006DDE27 /* NotoSans-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "NotoSans-Bold.ttf"; path = "../resources/NotoSans-Bold.ttf"; sourceTree = ""; }; + 2BBB70811D5E9079009B67A6 /* VectorStyleTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorStyleTestCase.h; sourceTree = ""; }; + 2BBB70821D5E9079009B67A6 /* VectorStyleTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VectorStyleTestCase.m; sourceTree = ""; }; + 2BC0FB761DCAA18A004125F1 /* TextureVectorTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureVectorTestCase.h; sourceTree = ""; }; + 2BC0FB771DCAA18A004125F1 /* TextureVectorTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextureVectorTestCase.m; sourceTree = ""; }; + 2BC0FB791DCAA574004125F1 /* dots.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = dots.png; path = ../../../resources/textures/dots.png; sourceTree = ""; }; + 2BC2DCCB1D1F4CE20088D350 /* ShapefileTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapefileTestCase.h; sourceTree = ""; }; + 2BC2DCCC1D1F4CE20088D350 /* ShapefileTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShapefileTestCase.m; sourceTree = ""; }; + 2BC2DCEE1D2345AF0088D350 /* PagingLayerTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PagingLayerTestCase.h; sourceTree = ""; }; + 2BC2DCEF1D2345AF0088D350 /* PagingLayerTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PagingLayerTestCase.m; sourceTree = ""; }; + 2BD358F21DD3EA0400081EA8 /* AnimatedMarkersTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedMarkersTestCase.swift; sourceTree = ""; }; + 2BD914BB256F1C8D00E724A8 /* icon_167.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon_167.png; path = icons/icon_167.png; sourceTree = ""; }; + 2BD914BC256F1C8D00E724A8 /* icon_152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon_152.png; path = icons/icon_152.png; sourceTree = ""; }; + 2BD914E7256F1F8A00E724A8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2BDEB3001C924842003259B3 /* ExtrudedModelTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtrudedModelTestCase.h; sourceTree = ""; }; + 2BDEB3011C924842003259B3 /* ExtrudedModelTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExtrudedModelTestCase.m; sourceTree = ""; }; + 2BF29B8B24D2268200553963 /* LegendViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LegendViewController.storyboard; sourceTree = ""; }; + 2BF29B8E24D226B000553963 /* LegendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegendViewController.swift; sourceTree = ""; }; + 2BFC7E4F1D132DCB0040E2A3 /* ScreenMarkersTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenMarkersTestCase.h; sourceTree = ""; }; + 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenMarkersTestCase.m; sourceTree = ""; }; + 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveObjectTestCase.swift; sourceTree = ""; }; + 311C6A0127B1939F0016BC7E /* SwiftBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwiftBridge.h; sourceTree = ""; }; + 311C6A0427B1AC7E0016BC7E /* wkDefaultShaders.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; name = wkDefaultShaders.metal; path = Pods/WhirlyGlobe/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.metal; }; + 311E0A902680F597007BE16F /* ATS_Route.shp */ = {isa = PBXFileReference; lastKnownFileType = file; name = ATS_Route.shp; path = ../../../resources/vectors/faa/ATS_Route.shp; sourceTree = SOURCE_ROOT; }; + 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.dbf; path = ../../../resources/vectors/faa/Airspace_Boundary.dbf; sourceTree = SOURCE_ROOT; }; + 311E0A922680F597007BE16F /* Airspace_Boundary.shx */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.shx; path = ../../../resources/vectors/faa/Airspace_Boundary.shx; sourceTree = SOURCE_ROOT; }; + 311E0A932680F597007BE16F /* Airspace_Boundary.shp */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.shp; path = ../../../resources/vectors/faa/Airspace_Boundary.shp; sourceTree = SOURCE_ROOT; }; + 311E0A942680F597007BE16F /* ATS_Route.cpg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ATS_Route.cpg; path = ../../../resources/vectors/faa/ATS_Route.cpg; sourceTree = SOURCE_ROOT; }; + 311E0A952680F597007BE16F /* ATS_Route.prj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ATS_Route.prj; path = ../../../resources/vectors/faa/ATS_Route.prj; sourceTree = SOURCE_ROOT; }; + 311E0A962680F597007BE16F /* ATS_Route.shx */ = {isa = PBXFileReference; lastKnownFileType = file; name = ATS_Route.shx; path = ../../../resources/vectors/faa/ATS_Route.shx; sourceTree = SOURCE_ROOT; }; + 311E0A972680F597007BE16F /* Airspace_Boundary.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = Airspace_Boundary.xml; path = ../../../resources/vectors/faa/Airspace_Boundary.xml; sourceTree = SOURCE_ROOT; }; + 311E0A982680F597007BE16F /* ATS_Route.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = ATS_Route.xml; path = ../../../resources/vectors/faa/ATS_Route.xml; sourceTree = SOURCE_ROOT; }; + 311E0A992680F597007BE16F /* Airspace_Boundary.cpg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Airspace_Boundary.cpg; path = ../../../resources/vectors/faa/Airspace_Boundary.cpg; sourceTree = SOURCE_ROOT; }; + 311E0A9A2680F597007BE16F /* Airspace_Boundary.prj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Airspace_Boundary.prj; path = ../../../resources/vectors/faa/Airspace_Boundary.prj; sourceTree = SOURCE_ROOT; }; + 311E0A9B2680F597007BE16F /* ATS_Route.dbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ATS_Route.dbf; path = ../../../resources/vectors/faa/ATS_Route.dbf; sourceTree = SOURCE_ROOT; }; + 311E0AAA26865D2C007BE16F /* ESRIRemoteTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ESRIRemoteTestCase.swift; sourceTree = ""; }; + 313C521425D329070036C22E /* MovingScreenMarkersTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MovingScreenMarkersTestCase.swift; sourceTree = ""; }; + 313FED0627027D6800FCD14C /* ShapesTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ShapesTestCase.mm; sourceTree = ""; }; + 313FED102706166300FCD14C /* AutoTester.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AutoTester.entitlements; sourceTree = ""; }; + 316B5CF1260526AD000B4F15 /* maptiler_expr_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = maptiler_expr_test.json; sourceTree = ""; }; + 316B5CFA260A5573000B4F15 /* maptiler_test_circles.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = maptiler_test_circles.json; sourceTree = ""; }; + 316B5CFD260A58A8000B4F15 /* MapTilerCircleTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapTilerCircleTestCase.swift; sourceTree = ""; }; + 31833791259E5291005FEF70 /* ChangeVectorsTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChangeVectorsTestCase.h; sourceTree = ""; }; + 31833792259E5291005FEF70 /* ChangeVectorsTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ChangeVectorsTestCase.mm; sourceTree = ""; }; + 3183380C25A67CD8005FEF70 /* RepresentationsTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RepresentationsTestCase.mm; sourceTree = ""; }; + 3183380E25A67CD8005FEF70 /* RepresentationsTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepresentationsTestCase.h; sourceTree = ""; }; + 31D3287B262FADF100456B93 /* TestTileImageFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestTileImageFetcher.swift; sourceTree = ""; }; + 31D328AC26387E7900456B93 /* GreatCircleTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GreatCircleTestCase.swift; sourceTree = ""; }; + 3D6D9431634E599E2DCD9E5E /* Pods-AutoTesterPod.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AutoTesterPod.release.xcconfig"; path = "Target Support Files/Pods-AutoTesterPod/Pods-AutoTesterPod.release.xcconfig"; sourceTree = ""; }; + 8810B2D11BA9D45F00446CE3 /* MaplyTesterBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaplyTesterBridge.h; sourceTree = ""; }; + 8820852A1DC81051008F8E76 /* Issue721TestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Issue721TestCase.swift; sourceTree = ""; }; + 886FCCC21BA73C1D00494BB0 /* StartupViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StartupViewController.swift; sourceTree = ""; }; + 8895D8AE1CA4ABA9004387FB /* ParticleTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleTest.h; sourceTree = ""; }; + 8895D8AF1CA4ABA9004387FB /* ParticleTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ParticleTest.mm; sourceTree = ""; }; + 88BF11471BCD3DA40002205E /* MaplyTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyTestCase.h; sourceTree = ""; }; + 88BF11481BCD3DA40002205E /* MaplyTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MaplyTestCase.m; sourceTree = ""; }; + 88BF115E1BCDA9730002205E /* StamenWatercolorRemote.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StamenWatercolorRemote.swift; sourceTree = ""; }; + 88E4B8BF1B83B6AB0050D21B /* AutoTesterPod.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutoTesterPod.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 88E4B8C31B83B6AB0050D21B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 88E4B8C41B83B6AB0050D21B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 88E4B8C91B83B6AB0050D21B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 88E4B8CE1B83B6AB0050D21B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 88F0951E1ECD041300E7E686 /* AutoTesterJenkins.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AutoTesterJenkins.plist; sourceTree = ""; }; + 88FF5BE11BC31D53002F15CE /* map_pin.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = map_pin.png; path = resources/map_pin.png; sourceTree = ""; }; + 88FF5BE21BC31D53002F15CE /* Smiley_Face_Avatar_by_PixelTwist.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Smiley_Face_Avatar_by_PixelTwist.png; path = resources/Smiley_Face_Avatar_by_PixelTwist.png; sourceTree = ""; }; + 88FF5BE31BC31D53002F15CE /* star_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = star_background.png; sourceTree = ""; }; + 88FF5BE41BC31D53002F15CE /* Star.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Star.png; path = resources/Star.png; sourceTree = ""; }; + 88FF5BE51BC31D53002F15CE /* SunImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = SunImage.png; sourceTree = ""; }; + 88FF5BED1BC31D6D002F15CE /* geography-class_medres.mbtiles */ = {isa = PBXFileReference; lastKnownFileType = file; path = "geography-class_medres.mbtiles"; sourceTree = ""; }; + 88FF5BEF1BC31D6D002F15CE /* lowres_wtb_0x0.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_0x0.pvrtc; sourceTree = ""; }; + 88FF5BF01BC31D6D002F15CE /* lowres_wtb_0x1.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_0x1.pvrtc; sourceTree = ""; }; + 88FF5BF11BC31D6D002F15CE /* lowres_wtb_1x0.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_1x0.pvrtc; sourceTree = ""; }; + 88FF5BF21BC31D6D002F15CE /* lowres_wtb_1x1.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_1x1.pvrtc; sourceTree = ""; }; + 88FF5BF31BC31D6D002F15CE /* lowres_wtb_2x0.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_2x0.pvrtc; sourceTree = ""; }; + 88FF5BF41BC31D6D002F15CE /* lowres_wtb_2x1.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_2x1.pvrtc; sourceTree = ""; }; + 88FF5BF51BC31D6D002F15CE /* lowres_wtb_3x0.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_3x0.pvrtc; sourceTree = ""; }; + 88FF5BF61BC31D6D002F15CE /* lowres_wtb_3x1.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_3x1.pvrtc; sourceTree = ""; }; + 88FF5BF71BC31D6D002F15CE /* lowres_wtb_4x0.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_4x0.pvrtc; sourceTree = ""; }; + 88FF5BF81BC31D6D002F15CE /* lowres_wtb_4x1.pvrtc */ = {isa = PBXFileReference; lastKnownFileType = file; path = lowres_wtb_4x1.pvrtc; sourceTree = ""; }; + 88FF5BF91BC31D6D002F15CE /* lowres_wtb_info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = lowres_wtb_info.plist; sourceTree = ""; }; + 88FF5BFB1BC31D6D002F15CE /* world_web_mercator.sqlite */ = {isa = PBXFileReference; lastKnownFileType = file; path = world_web_mercator.sqlite; sourceTree = ""; }; + 88FF5BFD1BC31D6D002F15CE /* airfield-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "airfield-24@2x.png"; sourceTree = ""; }; + 88FF5BFE1BC31D6D002F15CE /* airport-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "airport-24@2x.png"; sourceTree = ""; }; + 88FF5BFF1BC31D6D002F15CE /* alcohol-shop-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "alcohol-shop-24@2x.png"; sourceTree = ""; }; + 88FF5C001BC31D6D002F15CE /* america-football-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "america-football-24@2x.png"; sourceTree = ""; }; + 88FF5C011BC31D6D002F15CE /* art-gallery-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "art-gallery-24@2x.png"; sourceTree = ""; }; + 88FF5C021BC31D6D002F15CE /* bakery-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bakery-24@2x.png"; sourceTree = ""; }; + 88FF5C031BC31D6D002F15CE /* bank-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bank-24@2x.png"; sourceTree = ""; }; + 88FF5C041BC31D6D002F15CE /* bar-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bar-24@2x.png"; sourceTree = ""; }; + 88FF5C051BC31D6D002F15CE /* baseball-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "baseball-24@2x.png"; sourceTree = ""; }; + 88FF5C061BC31D6D002F15CE /* basketball-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "basketball-24@2x.png"; sourceTree = ""; }; + 88FF5C071BC31D6D002F15CE /* beer-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "beer-24@2x.png"; sourceTree = ""; }; + 88FF5C081BC31D6D002F15CE /* bicycle-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bicycle-24@2x.png"; sourceTree = ""; }; + 88FF5C091BC31D6D002F15CE /* building-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "building-24@2x.png"; sourceTree = ""; }; + 88FF5C0A1BC31D6D002F15CE /* bus-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bus-24@2x.png"; sourceTree = ""; }; + 88FF5C0B1BC31D6D002F15CE /* cafe-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cafe-24@2x.png"; sourceTree = ""; }; + 88FF5C0C1BC31D6D002F15CE /* camera-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "camera-24@2x.png"; sourceTree = ""; }; + 88FF5C0D1BC31D6D002F15CE /* campsite-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "campsite-24@2x.png"; sourceTree = ""; }; + 88FF5C0E1BC31D6D002F15CE /* car-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "car-24@2x.png"; sourceTree = ""; }; + 88FF5C0F1BC31D6D002F15CE /* cemetery-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cemetery-24@2x.png"; sourceTree = ""; }; + 88FF5C101BC31D6D002F15CE /* cinema-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cinema-24@2x.png"; sourceTree = ""; }; + 88FF5C111BC31D6D002F15CE /* circle-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "circle-24@2x.png"; sourceTree = ""; }; + 88FF5C121BC31D6D002F15CE /* circle-stroked-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "circle-stroked-24@2x.png"; sourceTree = ""; }; + 88FF5C131BC31D6D002F15CE /* city-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "city-24@2x.png"; sourceTree = ""; }; + 88FF5C141BC31D6D002F15CE /* clothing-store-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "clothing-store-24@2x.png"; sourceTree = ""; }; + 88FF5C151BC31D6D002F15CE /* college-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "college-24@2x.png"; sourceTree = ""; }; + 88FF5C161BC31D6D002F15CE /* commercial-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "commercial-24@2x.png"; sourceTree = ""; }; + 88FF5C171BC31D6D002F15CE /* cricket-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cricket-24@2x.png"; sourceTree = ""; }; + 88FF5C181BC31D6D002F15CE /* cross-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "cross-24@2x.png"; sourceTree = ""; }; + 88FF5C191BC31D6D002F15CE /* dam-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "dam-24@2x.png"; sourceTree = ""; }; + 88FF5C1A1BC31D6D002F15CE /* danger-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "danger-24@2x.png"; sourceTree = ""; }; + 88FF5C1B1BC31D6D002F15CE /* disability-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "disability-24@2x.png"; sourceTree = ""; }; + 88FF5C1C1BC31D6D002F15CE /* dog-park-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "dog-park-24@2x.png"; sourceTree = ""; }; + 88FF5C1D1BC31D6D002F15CE /* embassy-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "embassy-24@2x.png"; sourceTree = ""; }; + 88FF5C1E1BC31D6D002F15CE /* emergency-telephone-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "emergency-telephone-24@2x.png"; sourceTree = ""; }; + 88FF5C1F1BC31D6D002F15CE /* farm-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "farm-24@2x.png"; sourceTree = ""; }; + 88FF5C201BC31D6D002F15CE /* fast-food-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fast-food-24@2x.png"; sourceTree = ""; }; + 88FF5C211BC31D6D002F15CE /* ferry-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "ferry-24@2x.png"; sourceTree = ""; }; + 88FF5C221BC31D6D002F15CE /* fire-station-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fire-station-24@2x.png"; sourceTree = ""; }; + 88FF5C231BC31D6D002F15CE /* fuel-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fuel-24@2x.png"; sourceTree = ""; }; + 88FF5C241BC31D6D002F15CE /* garden-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "garden-24@2x.png"; sourceTree = ""; }; + 88FF5C251BC31D6D002F15CE /* golf-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "golf-24@2x.png"; sourceTree = ""; }; + 88FF5C261BC31D6D002F15CE /* grocery-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "grocery-24@2x.png"; sourceTree = ""; }; + 88FF5C271BC31D6D002F15CE /* harbor-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "harbor-24@2x.png"; sourceTree = ""; }; + 88FF5C281BC31D6D002F15CE /* heliport-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "heliport-24@2x.png"; sourceTree = ""; }; + 88FF5C291BC31D6D002F15CE /* hospital-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "hospital-24@2x.png"; sourceTree = ""; }; + 88FF5C2A1BC31D6D002F15CE /* industrial-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "industrial-24@2x.png"; sourceTree = ""; }; + 88FF5C2B1BC31D6D002F15CE /* land-use-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "land-use-24@2x.png"; sourceTree = ""; }; + 88FF5C2C1BC31D6D002F15CE /* laundry-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "laundry-24@2x.png"; sourceTree = ""; }; + 88FF5C2D1BC31D6D002F15CE /* library-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "library-24@2x.png"; sourceTree = ""; }; + 88FF5C2E1BC31D6D002F15CE /* lighthouse-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lighthouse-24@2x.png"; sourceTree = ""; }; + 88FF5C2F1BC31D6D002F15CE /* lodging-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "lodging-24@2x.png"; sourceTree = ""; }; + 88FF5C301BC31D6D002F15CE /* logging-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "logging-24@2x.png"; sourceTree = ""; }; + 88FF5C311BC31D6D002F15CE /* london-underground-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "london-underground-24@2x.png"; sourceTree = ""; }; + 88FF5C321BC31D6D002F15CE /* marker-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "marker-24@2x.png"; sourceTree = ""; }; + 88FF5C331BC31D6D002F15CE /* marker-stroked-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "marker-stroked-24@2x.png"; sourceTree = ""; }; + 88FF5C341BC31D6D002F15CE /* minefield-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "minefield-24@2x.png"; sourceTree = ""; }; + 88FF5C351BC31D6D002F15CE /* monument-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "monument-24@2x.png"; sourceTree = ""; }; + 88FF5C361BC31D6D002F15CE /* museum-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "museum-24@2x.png"; sourceTree = ""; }; + 88FF5C371BC31D6D002F15CE /* music-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "music-24@2x.png"; sourceTree = ""; }; + 88FF5C381BC31D6D002F15CE /* oil-well-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "oil-well-24@2x.png"; sourceTree = ""; }; + 88FF5C391BC31D6D002F15CE /* park-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "park-24@2x.png"; sourceTree = ""; }; + 88FF5C3A1BC31D6D002F15CE /* park2-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "park2-24@2x.png"; sourceTree = ""; }; + 88FF5C3B1BC31D6D002F15CE /* parking-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "parking-24@2x.png"; sourceTree = ""; }; + 88FF5C3C1BC31D6D002F15CE /* parking-garage-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "parking-garage-24@2x.png"; sourceTree = ""; }; + 88FF5C3D1BC31D6D002F15CE /* pharmacy-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pharmacy-24@2x.png"; sourceTree = ""; }; + 88FF5C3E1BC31D6D002F15CE /* pitch-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "pitch-24@2x.png"; sourceTree = ""; }; + 88FF5C3F1BC31D6D002F15CE /* place-of-worship-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "place-of-worship-24@2x.png"; sourceTree = ""; }; + 88FF5C401BC31D6D002F15CE /* playground-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "playground-24@2x.png"; sourceTree = ""; }; + 88FF5C411BC31D6D002F15CE /* police-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "police-24@2x.png"; sourceTree = ""; }; + 88FF5C421BC31D6D002F15CE /* polling-place-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "polling-place-24@2x.png"; sourceTree = ""; }; + 88FF5C431BC31D6D002F15CE /* post-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "post-24@2x.png"; sourceTree = ""; }; + 88FF5C441BC31D6D002F15CE /* prison-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "prison-24@2x.png"; sourceTree = ""; }; + 88FF5C451BC31D6D002F15CE /* rail-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rail-24@2x.png"; sourceTree = ""; }; + 88FF5C461BC31D6D002F15CE /* rail-above-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rail-above-24@2x.png"; sourceTree = ""; }; + 88FF5C471BC31D6D002F15CE /* rail-underground-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rail-underground-24@2x.png"; sourceTree = ""; }; + 88FF5C481BC31D6D002F15CE /* religious-christian-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "religious-christian-24@2x.png"; sourceTree = ""; }; + 88FF5C491BC31D6D002F15CE /* religious-jewish-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "religious-jewish-24@2x.png"; sourceTree = ""; }; + 88FF5C4A1BC31D6D002F15CE /* religious-muslim-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "religious-muslim-24@2x.png"; sourceTree = ""; }; + 88FF5C4B1BC31D6D002F15CE /* restaurant-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "restaurant-24@2x.png"; sourceTree = ""; }; + 88FF5C4C1BC31D6D002F15CE /* roadblock-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "roadblock-24@2x.png"; sourceTree = ""; }; + 88FF5C4D1BC31D6D002F15CE /* rocket-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rocket-24@2x.png"; sourceTree = ""; }; + 88FF5C4E1BC31D6D002F15CE /* school-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "school-24@2x.png"; sourceTree = ""; }; + 88FF5C4F1BC31D6D002F15CE /* shop-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shop-24@2x.png"; sourceTree = ""; }; + 88FF5C501BC31D6D002F15CE /* skiing-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "skiing-24@2x.png"; sourceTree = ""; }; + 88FF5C511BC31D6D002F15CE /* slaughterhouse-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "slaughterhouse-24@2x.png"; sourceTree = ""; }; + 88FF5C521BC31D6D002F15CE /* soccer-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "soccer-24@2x.png"; sourceTree = ""; }; + 88FF5C531BC31D6D002F15CE /* square-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "square-24@2x.png"; sourceTree = ""; }; + 88FF5C541BC31D6D002F15CE /* square-stroked-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "square-stroked-24@2x.png"; sourceTree = ""; }; + 88FF5C551BC31D6D002F15CE /* star-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "star-24@2x.png"; sourceTree = ""; }; + 88FF5C561BC31D6D002F15CE /* star-stroked-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "star-stroked-24@2x.png"; sourceTree = ""; }; + 88FF5C571BC31D6D002F15CE /* suitcase-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "suitcase-24@2x.png"; sourceTree = ""; }; + 88FF5C581BC31D6D002F15CE /* swimming-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "swimming-24@2x.png"; sourceTree = ""; }; + 88FF5C591BC31D6D002F15CE /* telephone-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "telephone-24@2x.png"; sourceTree = ""; }; + 88FF5C5A1BC31D6D002F15CE /* tennis-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tennis-24@2x.png"; sourceTree = ""; }; + 88FF5C5B1BC31D6D002F15CE /* theatre-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theatre-24@2x.png"; sourceTree = ""; }; + 88FF5C5C1BC31D6D002F15CE /* toilets-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "toilets-24@2x.png"; sourceTree = ""; }; + 88FF5C5D1BC31D6D002F15CE /* town-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "town-24@2x.png"; sourceTree = ""; }; + 88FF5C5E1BC31D6D002F15CE /* town-hall-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "town-hall-24@2x.png"; sourceTree = ""; }; + 88FF5C5F1BC31D6D002F15CE /* triangle-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "triangle-24@2x.png"; sourceTree = ""; }; + 88FF5C601BC31D6D002F15CE /* triangle-stroked-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "triangle-stroked-24@2x.png"; sourceTree = ""; }; + 88FF5C611BC31D6D002F15CE /* village-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "village-24@2x.png"; sourceTree = ""; }; + 88FF5C621BC31D6D002F15CE /* warehouse-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "warehouse-24@2x.png"; sourceTree = ""; }; + 88FF5C631BC31D6D002F15CE /* waste-basket-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "waste-basket-24@2x.png"; sourceTree = ""; }; + 88FF5C641BC31D6D002F15CE /* water-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "water-24@2x.png"; sourceTree = ""; }; + 88FF5C651BC31D6D002F15CE /* wetland-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "wetland-24@2x.png"; sourceTree = ""; }; + 88FF5C661BC31D6D002F15CE /* zoo-24@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "zoo-24@2x.png"; sourceTree = ""; }; + 88FF5C6D1BC31D6D002F15CE /* cessna.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = cessna.obj; sourceTree = ""; }; + 88FF5C6E1BC31D6D002F15CE /* cessna.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cessna.png; sourceTree = ""; }; + 88FF5C6F1BC31D6D002F15CE /* moon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = moon.png; sourceTree = ""; }; + 88FF5C701BC31D6D002F15CE /* vp.mtl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = vp.mtl; sourceTree = ""; }; + 88FF5C721BC31D6D002F15CE /* starcatalog_orig.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = starcatalog_orig.txt; sourceTree = ""; }; + 88FF5C731BC31D6D002F15CE /* starcatalog_short.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = starcatalog_short.txt; sourceTree = ""; }; + 88FF5CF51BC31D94002F15CE /* ABW.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ABW.geojson; sourceTree = ""; }; + 88FF5CF61BC31D94002F15CE /* AFG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AFG.geojson; sourceTree = ""; }; + 88FF5CF71BC31D94002F15CE /* AGO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AGO.geojson; sourceTree = ""; }; + 88FF5CF81BC31D94002F15CE /* AIA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AIA.geojson; sourceTree = ""; }; + 88FF5CF91BC31D94002F15CE /* ALA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ALA.geojson; sourceTree = ""; }; + 88FF5CFA1BC31D94002F15CE /* ALB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ALB.geojson; sourceTree = ""; }; + 88FF5CFB1BC31D94002F15CE /* AND.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AND.geojson; sourceTree = ""; }; + 88FF5CFC1BC31D94002F15CE /* ARE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARE.geojson; sourceTree = ""; }; + 88FF5CFD1BC31D94002F15CE /* ARG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARG.geojson; sourceTree = ""; }; + 88FF5CFE1BC31D94002F15CE /* ARM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ARM.geojson; sourceTree = ""; }; + 88FF5CFF1BC31D94002F15CE /* ASM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ASM.geojson; sourceTree = ""; }; + 88FF5D001BC31D94002F15CE /* ATA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ATA.geojson; sourceTree = ""; }; + 88FF5D011BC31D94002F15CE /* ATF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ATF.geojson; sourceTree = ""; }; + 88FF5D021BC31D94002F15CE /* ATG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ATG.geojson; sourceTree = ""; }; + 88FF5D031BC31D94002F15CE /* AUS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUS.geojson; sourceTree = ""; }; + 88FF5D041BC31D94002F15CE /* AUT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUT.geojson; sourceTree = ""; }; + 88FF5D051BC31D94002F15CE /* AZE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AZE.geojson; sourceTree = ""; }; + 88FF5D061BC31D94002F15CE /* BDI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BDI.geojson; sourceTree = ""; }; + 88FF5D071BC31D94002F15CE /* BEL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BEL.geojson; sourceTree = ""; }; + 88FF5D081BC31D94002F15CE /* BEN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BEN.geojson; sourceTree = ""; }; + 88FF5D091BC31D94002F15CE /* BES.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BES.geojson; sourceTree = ""; }; + 88FF5D0A1BC31D94002F15CE /* BFA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BFA.geojson; sourceTree = ""; }; + 88FF5D0B1BC31D94002F15CE /* BGD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BGD.geojson; sourceTree = ""; }; + 88FF5D0C1BC31D94002F15CE /* BGR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BGR.geojson; sourceTree = ""; }; + 88FF5D0D1BC31D94002F15CE /* BHR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BHR.geojson; sourceTree = ""; }; + 88FF5D0E1BC31D94002F15CE /* BHS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BHS.geojson; sourceTree = ""; }; + 88FF5D0F1BC31D94002F15CE /* BIH.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BIH.geojson; sourceTree = ""; }; + 88FF5D101BC31D94002F15CE /* BLM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BLM.geojson; sourceTree = ""; }; + 88FF5D111BC31D94002F15CE /* BLR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BLR.geojson; sourceTree = ""; }; + 88FF5D121BC31D94002F15CE /* BLZ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BLZ.geojson; sourceTree = ""; }; + 88FF5D131BC31D94002F15CE /* BMU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BMU.geojson; sourceTree = ""; }; + 88FF5D141BC31D94002F15CE /* BOL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BOL.geojson; sourceTree = ""; }; + 88FF5D151BC31D94002F15CE /* BRA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BRA.geojson; sourceTree = ""; }; + 88FF5D161BC31D94002F15CE /* BRB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BRB.geojson; sourceTree = ""; }; + 88FF5D171BC31D94002F15CE /* BRN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BRN.geojson; sourceTree = ""; }; + 88FF5D181BC31D94002F15CE /* BTN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BTN.geojson; sourceTree = ""; }; + 88FF5D191BC31D94002F15CE /* BVT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BVT.geojson; sourceTree = ""; }; + 88FF5D1A1BC31D94002F15CE /* BWA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = BWA.geojson; sourceTree = ""; }; + 88FF5D1B1BC31D94002F15CE /* CAF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CAF.geojson; sourceTree = ""; }; + 88FF5D1C1BC31D94002F15CE /* CAN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CAN.geojson; sourceTree = ""; }; + 88FF5D1D1BC31D94002F15CE /* CCK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CCK.geojson; sourceTree = ""; }; + 88FF5D1E1BC31D94002F15CE /* CHE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHE.geojson; sourceTree = ""; }; + 88FF5D1F1BC31D94002F15CE /* CHL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHL.geojson; sourceTree = ""; }; + 88FF5D201BC31D94002F15CE /* CHN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHN.geojson; sourceTree = ""; }; + 88FF5D211BC31D94002F15CE /* CIV.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CIV.geojson; sourceTree = ""; }; + 88FF5D221BC31D94002F15CE /* CMR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMR.geojson; sourceTree = ""; }; + 88FF5D231BC31D94002F15CE /* COD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COD.geojson; sourceTree = ""; }; + 88FF5D241BC31D94002F15CE /* COG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COG.geojson; sourceTree = ""; }; + 88FF5D251BC31D94002F15CE /* COK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COK.geojson; sourceTree = ""; }; + 88FF5D261BC31D94002F15CE /* COL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COL.geojson; sourceTree = ""; }; + 88FF5D271BC31D94002F15CE /* COM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = COM.geojson; sourceTree = ""; }; + 88FF5D281BC31D94002F15CE /* CPV.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CPV.geojson; sourceTree = ""; }; + 88FF5D291BC31D94002F15CE /* CRI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CRI.geojson; sourceTree = ""; }; + 88FF5D2A1BC31D94002F15CE /* CUB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CUB.geojson; sourceTree = ""; }; + 88FF5D2B1BC31D94002F15CE /* CUW.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CUW.geojson; sourceTree = ""; }; + 88FF5D2C1BC31D94002F15CE /* CXR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CXR.geojson; sourceTree = ""; }; + 88FF5D2D1BC31D94002F15CE /* CYM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CYM.geojson; sourceTree = ""; }; + 88FF5D2E1BC31D94002F15CE /* CYP.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CYP.geojson; sourceTree = ""; }; + 88FF5D2F1BC31D94002F15CE /* CZE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CZE.geojson; sourceTree = ""; }; + 88FF5D301BC31D94002F15CE /* DEU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DEU.geojson; sourceTree = ""; }; + 88FF5D311BC31D94002F15CE /* DJI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DJI.geojson; sourceTree = ""; }; + 88FF5D321BC31D94002F15CE /* DMA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DMA.geojson; sourceTree = ""; }; + 88FF5D331BC31D94002F15CE /* DNK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DNK.geojson; sourceTree = ""; }; + 88FF5D341BC31D94002F15CE /* DOM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOM.geojson; sourceTree = ""; }; + 88FF5D351BC31D94002F15CE /* DZA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DZA.geojson; sourceTree = ""; }; + 88FF5D361BC31D94002F15CE /* ECU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ECU.geojson; sourceTree = ""; }; + 88FF5D371BC31D94002F15CE /* EGY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EGY.geojson; sourceTree = ""; }; + 88FF5D381BC31D94002F15CE /* ERI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ERI.geojson; sourceTree = ""; }; + 88FF5D391BC31D94002F15CE /* ESH.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ESH.geojson; sourceTree = ""; }; + 88FF5D3A1BC31D94002F15CE /* ESP.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ESP.geojson; sourceTree = ""; }; + 88FF5D3B1BC31D94002F15CE /* EST.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EST.geojson; sourceTree = ""; }; + 88FF5D3C1BC31D94002F15CE /* ETH.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ETH.geojson; sourceTree = ""; }; + 88FF5D3D1BC31D94002F15CE /* FIN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FIN.geojson; sourceTree = ""; }; + 88FF5D3E1BC31D94002F15CE /* FJI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FJI.geojson; sourceTree = ""; }; + 88FF5D3F1BC31D94002F15CE /* FLK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FLK.geojson; sourceTree = ""; }; + 88FF5D401BC31D94002F15CE /* FRA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FRA.geojson; sourceTree = ""; }; + 88FF5D411BC31D94002F15CE /* FRO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FRO.geojson; sourceTree = ""; }; + 88FF5D421BC31D94002F15CE /* FSM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FSM.geojson; sourceTree = ""; }; + 88FF5D431BC31D94002F15CE /* GAB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GAB.geojson; sourceTree = ""; }; + 88FF5D441BC31D94002F15CE /* GBR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GBR.geojson; sourceTree = ""; }; + 88FF5D451BC31D94002F15CE /* GEO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GEO.geojson; sourceTree = ""; }; + 88FF5D461BC31D94002F15CE /* GGY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GGY.geojson; sourceTree = ""; }; + 88FF5D471BC31D94002F15CE /* GHA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GHA.geojson; sourceTree = ""; }; + 88FF5D481BC31D94002F15CE /* GIB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GIB.geojson; sourceTree = ""; }; + 88FF5D491BC31D94002F15CE /* GIN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GIN.geojson; sourceTree = ""; }; + 88FF5D4A1BC31D94002F15CE /* GLP.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GLP.geojson; sourceTree = ""; }; + 88FF5D4B1BC31D94002F15CE /* GMB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GMB.geojson; sourceTree = ""; }; + 88FF5D4C1BC31D94002F15CE /* GNB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GNB.geojson; sourceTree = ""; }; + 88FF5D4D1BC31D94002F15CE /* GNQ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GNQ.geojson; sourceTree = ""; }; + 88FF5D4E1BC31D94002F15CE /* GRC.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GRC.geojson; sourceTree = ""; }; + 88FF5D4F1BC31D94002F15CE /* GRD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GRD.geojson; sourceTree = ""; }; + 88FF5D501BC31D94002F15CE /* GRL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GRL.geojson; sourceTree = ""; }; + 88FF5D511BC31D94002F15CE /* GTM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GTM.geojson; sourceTree = ""; }; + 88FF5D521BC31D94002F15CE /* GUF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GUF.geojson; sourceTree = ""; }; + 88FF5D531BC31D94002F15CE /* GUM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GUM.geojson; sourceTree = ""; }; + 88FF5D541BC31D94002F15CE /* GUY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GUY.geojson; sourceTree = ""; }; + 88FF5D551BC31D94002F15CE /* HKG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HKG.geojson; sourceTree = ""; }; + 88FF5D561BC31D94002F15CE /* HMD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HMD.geojson; sourceTree = ""; }; + 88FF5D571BC31D94002F15CE /* HND.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HND.geojson; sourceTree = ""; }; + 88FF5D581BC31D94002F15CE /* HRV.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HRV.geojson; sourceTree = ""; }; + 88FF5D591BC31D94002F15CE /* HTI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTI.geojson; sourceTree = ""; }; + 88FF5D5A1BC31D94002F15CE /* HUN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HUN.geojson; sourceTree = ""; }; + 88FF5D5B1BC31D94002F15CE /* IDN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDN.geojson; sourceTree = ""; }; + 88FF5D5C1BC31D94002F15CE /* IMN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IMN.geojson; sourceTree = ""; }; + 88FF5D5D1BC31D94002F15CE /* IND.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IND.geojson; sourceTree = ""; }; + 88FF5D5E1BC31D94002F15CE /* IOT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IOT.geojson; sourceTree = ""; }; + 88FF5D5F1BC31D94002F15CE /* IRL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IRL.geojson; sourceTree = ""; }; + 88FF5D601BC31D94002F15CE /* IRN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IRN.geojson; sourceTree = ""; }; + 88FF5D611BC31D94002F15CE /* IRQ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IRQ.geojson; sourceTree = ""; }; + 88FF5D621BC31D94002F15CE /* ISL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ISL.geojson; sourceTree = ""; }; + 88FF5D631BC31D94002F15CE /* ISR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ISR.geojson; sourceTree = ""; }; + 88FF5D641BC31D94002F15CE /* ITA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ITA.geojson; sourceTree = ""; }; + 88FF5D651BC31D94002F15CE /* JAM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JAM.geojson; sourceTree = ""; }; + 88FF5D661BC31D94002F15CE /* JEY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JEY.geojson; sourceTree = ""; }; + 88FF5D671BC31D94002F15CE /* JOR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JOR.geojson; sourceTree = ""; }; + 88FF5D681BC31D94002F15CE /* JPN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = JPN.geojson; sourceTree = ""; }; + 88FF5D691BC31D94002F15CE /* KAZ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KAZ.geojson; sourceTree = ""; }; + 88FF5D6A1BC31D94002F15CE /* KEN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KEN.geojson; sourceTree = ""; }; + 88FF5D6B1BC31D94002F15CE /* KGZ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KGZ.geojson; sourceTree = ""; }; + 88FF5D6C1BC31D94002F15CE /* KHM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KHM.geojson; sourceTree = ""; }; + 88FF5D6D1BC31D94002F15CE /* KIR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KIR.geojson; sourceTree = ""; }; + 88FF5D6E1BC31D94002F15CE /* KNA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KNA.geojson; sourceTree = ""; }; + 88FF5D6F1BC31D94002F15CE /* KOR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KOR.geojson; sourceTree = ""; }; + 88FF5D701BC31D94002F15CE /* KWT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = KWT.geojson; sourceTree = ""; }; + 88FF5D711BC31D94002F15CE /* LAO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LAO.geojson; sourceTree = ""; }; + 88FF5D721BC31D94002F15CE /* LBN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LBN.geojson; sourceTree = ""; }; + 88FF5D731BC31D94002F15CE /* LBR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LBR.geojson; sourceTree = ""; }; + 88FF5D741BC31D94002F15CE /* LBY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LBY.geojson; sourceTree = ""; }; + 88FF5D751BC31D94002F15CE /* LCA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LCA.geojson; sourceTree = ""; }; + 88FF5D761BC31D94002F15CE /* LIE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LIE.geojson; sourceTree = ""; }; + 88FF5D771BC31D94002F15CE /* LKA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LKA.geojson; sourceTree = ""; }; + 88FF5D781BC31D94002F15CE /* LSO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LSO.geojson; sourceTree = ""; }; + 88FF5D791BC31D94002F15CE /* LTU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LTU.geojson; sourceTree = ""; }; + 88FF5D7A1BC31D94002F15CE /* LUX.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LUX.geojson; sourceTree = ""; }; + 88FF5D7B1BC31D94002F15CE /* LVA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LVA.geojson; sourceTree = ""; }; + 88FF5D7C1BC31D94002F15CE /* MAC.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MAC.geojson; sourceTree = ""; }; + 88FF5D7D1BC31D94002F15CE /* MAF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MAF.geojson; sourceTree = ""; }; + 88FF5D7E1BC31D94002F15CE /* MAR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MAR.geojson; sourceTree = ""; }; + 88FF5D7F1BC31D94002F15CE /* MCO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MCO.geojson; sourceTree = ""; }; + 88FF5D801BC31D94002F15CE /* MDA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MDA.geojson; sourceTree = ""; }; + 88FF5D811BC31D94002F15CE /* MDG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MDG.geojson; sourceTree = ""; }; + 88FF5D821BC31D94002F15CE /* MDV.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MDV.geojson; sourceTree = ""; }; + 88FF5D831BC31D94002F15CE /* MEX.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MEX.geojson; sourceTree = ""; }; + 88FF5D841BC31D94002F15CE /* MHL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MHL.geojson; sourceTree = ""; }; + 88FF5D851BC31D94002F15CE /* MKD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MKD.geojson; sourceTree = ""; }; + 88FF5D861BC31D94002F15CE /* MLI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MLI.geojson; sourceTree = ""; }; + 88FF5D871BC31D94002F15CE /* MLT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MLT.geojson; sourceTree = ""; }; + 88FF5D881BC31D94002F15CE /* MMR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MMR.geojson; sourceTree = ""; }; + 88FF5D891BC31D94002F15CE /* MNE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MNE.geojson; sourceTree = ""; }; + 88FF5D8A1BC31D94002F15CE /* MNG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MNG.geojson; sourceTree = ""; }; + 88FF5D8B1BC31D94002F15CE /* MNP.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MNP.geojson; sourceTree = ""; }; + 88FF5D8C1BC31D94002F15CE /* MOZ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MOZ.geojson; sourceTree = ""; }; + 88FF5D8D1BC31D94002F15CE /* MRT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MRT.geojson; sourceTree = ""; }; + 88FF5D8E1BC31D94002F15CE /* MSR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MSR.geojson; sourceTree = ""; }; + 88FF5D8F1BC31D94002F15CE /* MTQ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MTQ.geojson; sourceTree = ""; }; + 88FF5D901BC31D94002F15CE /* MUS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MUS.geojson; sourceTree = ""; }; + 88FF5D911BC31D94002F15CE /* MWI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MWI.geojson; sourceTree = ""; }; + 88FF5D921BC31D94002F15CE /* MYS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MYS.geojson; sourceTree = ""; }; + 88FF5D931BC31D94002F15CE /* MYT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MYT.geojson; sourceTree = ""; }; + 88FF5D941BC31D94002F15CE /* NAM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NAM.geojson; sourceTree = ""; }; + 88FF5D951BC31D94002F15CE /* NCL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NCL.geojson; sourceTree = ""; }; + 88FF5D961BC31D94002F15CE /* NER.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NER.geojson; sourceTree = ""; }; + 88FF5D971BC31D94002F15CE /* NFK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NFK.geojson; sourceTree = ""; }; + 88FF5D981BC31D94002F15CE /* NGA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NGA.geojson; sourceTree = ""; }; + 88FF5D991BC31D94002F15CE /* NIC.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NIC.geojson; sourceTree = ""; }; + 88FF5D9A1BC31D94002F15CE /* NIU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NIU.geojson; sourceTree = ""; }; + 88FF5D9B1BC31D94002F15CE /* NLD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NLD.geojson; sourceTree = ""; }; + 88FF5D9C1BC31D94002F15CE /* NOR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NOR.geojson; sourceTree = ""; }; + 88FF5D9D1BC31D94002F15CE /* NPL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NPL.geojson; sourceTree = ""; }; + 88FF5D9E1BC31D94002F15CE /* NRU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NRU.geojson; sourceTree = ""; }; + 88FF5D9F1BC31D94002F15CE /* NZL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NZL.geojson; sourceTree = ""; }; + 88FF5DA01BC31D94002F15CE /* OMN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OMN.geojson; sourceTree = ""; }; + 88FF5DA11BC31D94002F15CE /* PAK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PAK.geojson; sourceTree = ""; }; + 88FF5DA21BC31D94002F15CE /* PAN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PAN.geojson; sourceTree = ""; }; + 88FF5DA31BC31D94002F15CE /* PCN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PCN.geojson; sourceTree = ""; }; + 88FF5DA41BC31D94002F15CE /* PER.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PER.geojson; sourceTree = ""; }; + 88FF5DA51BC31D94002F15CE /* PHL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PHL.geojson; sourceTree = ""; }; + 88FF5DA61BC31D94002F15CE /* PLW.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PLW.geojson; sourceTree = ""; }; + 88FF5DA71BC31D94002F15CE /* PNG.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PNG.geojson; sourceTree = ""; }; + 88FF5DA81BC31D94002F15CE /* POL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = POL.geojson; sourceTree = ""; }; + 88FF5DA91BC31D94002F15CE /* PRI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PRI.geojson; sourceTree = ""; }; + 88FF5DAA1BC31D94002F15CE /* PRK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PRK.geojson; sourceTree = ""; }; + 88FF5DAB1BC31D94002F15CE /* PRT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PRT.geojson; sourceTree = ""; }; + 88FF5DAC1BC31D94002F15CE /* PRY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PRY.geojson; sourceTree = ""; }; + 88FF5DAD1BC31D94002F15CE /* PSE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PSE.geojson; sourceTree = ""; }; + 88FF5DAE1BC31D94002F15CE /* PYF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PYF.geojson; sourceTree = ""; }; + 88FF5DAF1BC31D95002F15CE /* QAT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = QAT.geojson; sourceTree = ""; }; + 88FF5DB01BC31D95002F15CE /* REU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = REU.geojson; sourceTree = ""; }; + 88FF5DB11BC31D95002F15CE /* ROU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ROU.geojson; sourceTree = ""; }; + 88FF5DB21BC31D95002F15CE /* RUS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RUS.geojson; sourceTree = ""; }; + 88FF5DB31BC31D95002F15CE /* RWA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = RWA.geojson; sourceTree = ""; }; + 88FF5DB41BC31D95002F15CE /* SAU.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SAU.geojson; sourceTree = ""; }; + 88FF5DB51BC31D95002F15CE /* SDN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SDN.geojson; sourceTree = ""; }; + 88FF5DB61BC31D95002F15CE /* SEN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SEN.geojson; sourceTree = ""; }; + 88FF5DB71BC31D95002F15CE /* SGP.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SGP.geojson; sourceTree = ""; }; + 88FF5DB81BC31D95002F15CE /* SGS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SGS.geojson; sourceTree = ""; }; + 88FF5DB91BC31D95002F15CE /* SHN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SHN.geojson; sourceTree = ""; }; + 88FF5DBA1BC31D95002F15CE /* SJM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SJM.geojson; sourceTree = ""; }; + 88FF5DBB1BC31D95002F15CE /* SLB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SLB.geojson; sourceTree = ""; }; + 88FF5DBC1BC31D95002F15CE /* SLE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SLE.geojson; sourceTree = ""; }; + 88FF5DBD1BC31D95002F15CE /* SLV.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SLV.geojson; sourceTree = ""; }; + 88FF5DBE1BC31D95002F15CE /* SMR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SMR.geojson; sourceTree = ""; }; + 88FF5DBF1BC31D95002F15CE /* SOM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SOM.geojson; sourceTree = ""; }; + 88FF5DC01BC31D95002F15CE /* SPM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SPM.geojson; sourceTree = ""; }; + 88FF5DC11BC31D95002F15CE /* SRB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SRB.geojson; sourceTree = ""; }; + 88FF5DC21BC31D95002F15CE /* SSD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SSD.geojson; sourceTree = ""; }; + 88FF5DC31BC31D95002F15CE /* STP.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = STP.geojson; sourceTree = ""; }; + 88FF5DC41BC31D95002F15CE /* SUR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SUR.geojson; sourceTree = ""; }; + 88FF5DC51BC31D95002F15CE /* SVK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVK.geojson; sourceTree = ""; }; + 88FF5DC61BC31D95002F15CE /* SVN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVN.geojson; sourceTree = ""; }; + 88FF5DC71BC31D95002F15CE /* SWE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SWE.geojson; sourceTree = ""; }; + 88FF5DC81BC31D95002F15CE /* SWZ.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SWZ.geojson; sourceTree = ""; }; + 88FF5DC91BC31D95002F15CE /* SXM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SXM.geojson; sourceTree = ""; }; + 88FF5DCA1BC31D95002F15CE /* SYC.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SYC.geojson; sourceTree = ""; }; + 88FF5DCB1BC31D95002F15CE /* SYR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SYR.geojson; sourceTree = ""; }; + 88FF5DCC1BC31D95002F15CE /* TCA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TCA.geojson; sourceTree = ""; }; + 88FF5DCD1BC31D95002F15CE /* TCD.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TCD.geojson; sourceTree = ""; }; + 88FF5DCE1BC31D95002F15CE /* TGO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TGO.geojson; sourceTree = ""; }; + 88FF5DCF1BC31D95002F15CE /* THA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = THA.geojson; sourceTree = ""; }; + 88FF5DD01BC31D95002F15CE /* TJK.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TJK.geojson; sourceTree = ""; }; + 88FF5DD11BC31D95002F15CE /* TKL.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TKL.geojson; sourceTree = ""; }; + 88FF5DD21BC31D95002F15CE /* TKM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TKM.geojson; sourceTree = ""; }; + 88FF5DD31BC31D95002F15CE /* TLS.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TLS.geojson; sourceTree = ""; }; + 88FF5DD41BC31D95002F15CE /* TON.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TON.geojson; sourceTree = ""; }; + 88FF5DD51BC31D95002F15CE /* TTO.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TTO.geojson; sourceTree = ""; }; + 88FF5DD61BC31D95002F15CE /* TUN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TUN.geojson; sourceTree = ""; }; + 88FF5DD71BC31D95002F15CE /* TUR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TUR.geojson; sourceTree = ""; }; + 88FF5DD81BC31D95002F15CE /* TUV.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TUV.geojson; sourceTree = ""; }; + 88FF5DD91BC31D95002F15CE /* TWN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TWN.geojson; sourceTree = ""; }; + 88FF5DDA1BC31D95002F15CE /* TZA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TZA.geojson; sourceTree = ""; }; + 88FF5DDB1BC31D95002F15CE /* UGA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UGA.geojson; sourceTree = ""; }; + 88FF5DDC1BC31D95002F15CE /* UKR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UKR.geojson; sourceTree = ""; }; + 88FF5DDD1BC31D95002F15CE /* UMI.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UMI.geojson; sourceTree = ""; }; + 88FF5DDE1BC31D95002F15CE /* URY.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = URY.geojson; sourceTree = ""; }; + 88FF5DDF1BC31D95002F15CE /* USA.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = USA.geojson; sourceTree = ""; }; + 88FF5DE01BC31D95002F15CE /* UZB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = UZB.geojson; sourceTree = ""; }; + 88FF5DE11BC31D95002F15CE /* VAT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VAT.geojson; sourceTree = ""; }; + 88FF5DE21BC31D95002F15CE /* VCT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VCT.geojson; sourceTree = ""; }; + 88FF5DE31BC31D95002F15CE /* VEN.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VEN.geojson; sourceTree = ""; }; + 88FF5DE41BC31D95002F15CE /* VGB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VGB.geojson; sourceTree = ""; }; + 88FF5DE51BC31D95002F15CE /* VIR.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VIR.geojson; sourceTree = ""; }; + 88FF5DE61BC31D95002F15CE /* VNM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VNM.geojson; sourceTree = ""; }; + 88FF5DE71BC31D95002F15CE /* VUT.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VUT.geojson; sourceTree = ""; }; + 88FF5DE81BC31D95002F15CE /* WLF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WLF.geojson; sourceTree = ""; }; + 88FF5DE91BC31D95002F15CE /* WSM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WSM.geojson; sourceTree = ""; }; + 88FF5DEA1BC31D95002F15CE /* YEM.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = YEM.geojson; sourceTree = ""; }; + 88FF5DEB1BC31D95002F15CE /* ZAF.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ZAF.geojson; sourceTree = ""; }; + 88FF5DEC1BC31D95002F15CE /* ZMB.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ZMB.geojson; sourceTree = ""; }; + 88FF5DED1BC31D95002F15CE /* ZWE.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ZWE.geojson; sourceTree = ""; }; + 88FF5DEF1BC31D95002F15CE /* tl_2013_06075_roads.dbf */ = {isa = PBXFileReference; lastKnownFileType = file; path = tl_2013_06075_roads.dbf; sourceTree = ""; }; + 88FF5DF01BC31D95002F15CE /* tl_2013_06075_roads.mbr */ = {isa = PBXFileReference; lastKnownFileType = file; path = tl_2013_06075_roads.mbr; sourceTree = ""; }; + 88FF5DF11BC31D95002F15CE /* tl_2013_06075_roads.prj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tl_2013_06075_roads.prj; sourceTree = ""; }; + 88FF5DF21BC31D95002F15CE /* tl_2013_06075_roads.shp */ = {isa = PBXFileReference; lastKnownFileType = file; path = tl_2013_06075_roads.shp; sourceTree = ""; }; + 88FF5DF31BC31D95002F15CE /* tl_2013_06075_roads.shx */ = {isa = PBXFileReference; lastKnownFileType = file; path = tl_2013_06075_roads.shx; sourceTree = ""; }; + 88FF5DF41BC31D95002F15CE /* tl_2013_06075_roads.sqlite */ = {isa = PBXFileReference; lastKnownFileType = file; path = tl_2013_06075_roads.sqlite; sourceTree = ""; }; + 8F4D91DA1CDFA7DE00F68045 /* globe.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = globe.png; path = AutoTester/icons/globe.png; sourceTree = ""; }; + 8F4D91DB1CDFA7DE00F68045 /* map.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = map.png; path = AutoTester/icons/map.png; sourceTree = ""; }; + 8F981DB21DE3577C00717DF1 /* ne_10m_roads.dbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ne_10m_roads.dbf; path = ../../../resources/vectors/ne_10m_roads/ne_10m_roads.dbf; sourceTree = ""; }; + 8F981DB31DE3577C00717DF1 /* ne_10m_roads.prj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ne_10m_roads.prj; path = ../../../resources/vectors/ne_10m_roads/ne_10m_roads.prj; sourceTree = ""; }; + 8F981DB51DE3577C00717DF1 /* ne_10m_roads.shp */ = {isa = PBXFileReference; lastKnownFileType = file; name = ne_10m_roads.shp; path = ../../../resources/vectors/ne_10m_roads/ne_10m_roads.shp; sourceTree = ""; }; + 8F981DB61DE3577C00717DF1 /* ne_10m_roads.shx */ = {isa = PBXFileReference; lastKnownFileType = file; name = ne_10m_roads.shx; path = ../../../resources/vectors/ne_10m_roads/ne_10m_roads.shx; sourceTree = ""; }; + 8FE129181CDFB3B8004744FC /* TestCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestCell.swift; sourceTree = ""; }; + B0C308BBE20E3D71A8EEB294 /* libPods-AutoTesterPod.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AutoTesterPod.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + D8200C8F1BE92B2F00B22CF5 /* WideVectorsTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WideVectorsTestCase.h; sourceTree = ""; }; + D8200C901BE92B2F00B22CF5 /* WideVectorsTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WideVectorsTestCase.mm; sourceTree = ""; }; + D8200C971BE93E6E00B22CF5 /* StarsSunTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StarsSunTestCase.swift; sourceTree = ""; }; + D8200C9D1BE9516300B22CF5 /* ShapesTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShapesTestCase.h; sourceTree = ""; }; + D8200CA01BE9563F00B22CF5 /* StickersTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StickersTestCase.swift; sourceTree = ""; }; + D8200CA21BE9624300B22CF5 /* LoftedPolysTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoftedPolysTestCase.h; sourceTree = ""; }; + D8200CA31BE9624300B22CF5 /* LoftedPolysTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoftedPolysTestCase.m; sourceTree = ""; }; + D8228A911BE77816001D6914 /* MovingScreenLabelsTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MovingScreenLabelsTestCase.swift; sourceTree = ""; }; + D8228AA71BE786BE001D6914 /* ClusteredMarkersTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClusteredMarkersTestCase.swift; sourceTree = ""; }; + D8341A6F1BE2C8D200411A46 /* VectorsTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VectorsTestCase.h; sourceTree = ""; }; + D8341A701BE2C8D200411A46 /* VectorsTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VectorsTestCase.mm; sourceTree = ""; }; + D8341A721BE2DFE100411A46 /* ScreenLabelsTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScreenLabelsTestCase.swift; sourceTree = ""; }; + D84433E61C14A46100A52117 /* NASAGIBSTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NASAGIBSTestCase.swift; sourceTree = ""; }; + D84433E91C14E4E700A52117 /* CartoDBTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CartoDBTestCase.h; sourceTree = ""; }; + D84433EA1C14E4E700A52117 /* CartoDBTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CartoDBTestCase.m; sourceTree = ""; }; + D84433EC1C14E4FE00A52117 /* CartoDBInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CartoDBInterpreter.h; sourceTree = ""; }; + D84433ED1C14E4FE00A52117 /* CartoDBInterpreter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CartoDBInterpreter.m; sourceTree = ""; }; + D84AA5931C1A1C9700413B76 /* BNGCustomMapTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BNGCustomMapTestCase.swift; sourceTree = ""; }; + D84AA5961C1A26C100413B76 /* OSTN02_NTv2.gsb */ = {isa = PBXFileReference; lastKnownFileType = file; name = OSTN02_NTv2.gsb; path = AutoTester/OSTN02_NTv2.gsb; sourceTree = ""; }; + D84AA5981C1A2B9800413B76 /* BNGTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BNGTestCase.swift; sourceTree = ""; }; + D8D3E0671C4EDA1800F0D006 /* ParticleTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParticleTestCase.swift; sourceTree = ""; }; + D8E12ECC1BDE9FD500BB7BC7 /* AnimatedBasemapTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimatedBasemapTestCase.swift; sourceTree = ""; }; + D8F2FE251BE7BD630058A310 /* LabelsTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelsTestCase.h; sourceTree = ""; }; + D8F2FE261BE7BD630058A310 /* LabelsTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelsTestCase.m; sourceTree = ""; }; + D8F2FE281BE7C2000058A310 /* MarkersTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MarkersTestCase.swift; sourceTree = ""; }; + D8F2FE2A1BE7CAD30058A310 /* MegaMarkersTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MegaMarkersTestCase.h; sourceTree = ""; }; + D8F2FE2B1BE7CAD30058A310 /* MegaMarkersTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MegaMarkersTestCase.m; sourceTree = ""; }; + D8F2FE2D1BE7CF310058A310 /* ModelsTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModelsTestCase.swift; sourceTree = ""; }; + E53CF5D91E1EAF63000FB5C1 /* belfast_ireland_amenities.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = belfast_ireland_amenities.geojson; sourceTree = ""; }; + E53CF5DD1E1EAF6A000FB5C1 /* amenities.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = amenities.sld; sourceTree = ""; }; + E53CF5DF1E1EAF73000FB5C1 /* firehouse.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = firehouse.png; sourceTree = ""; }; + E53CF5E01E1EAF73000FB5C1 /* fuel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fuel.png; sourceTree = ""; }; + E53CF5E11E1EAF73000FB5C1 /* library.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = library.png; sourceTree = ""; }; + E53CF5E21E1EAF73000FB5C1 /* police.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = police.png; sourceTree = ""; }; + E53CF5E31E1EAF73000FB5C1 /* school.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = school.png; sourceTree = ""; }; + E5679F421CB72DE800369A15 /* LabelAnimationTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelAnimationTestCase.h; sourceTree = ""; }; + E5679F431CB72DE800369A15 /* LabelAnimationTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelAnimationTestCase.m; sourceTree = ""; }; + E5679F441CB72DE800369A15 /* WMSTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMSTestCase.h; sourceTree = ""; }; + E5679F451CB72DE800369A15 /* WMSTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMSTestCase.m; sourceTree = ""; }; + E5679F461CB72DE800369A15 /* FindHeightTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindHeightTestCase.h; sourceTree = ""; }; + E5679F471CB72DE800369A15 /* FindHeightTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FindHeightTestCase.m; sourceTree = ""; }; + E5941DB61E0CEC8600E1C8B3 /* belfast_ireland_buildings.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = belfast_ireland_buildings.geojson; sourceTree = ""; }; + E5941DB71E0CEC8600E1C8B3 /* belfast_ireland_landusages.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = belfast_ireland_landusages.geojson; sourceTree = ""; }; + E5941DB81E0CEC8600E1C8B3 /* belfast_ireland_roads.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = belfast_ireland_roads.geojson; sourceTree = ""; }; + E5941DB91E0CEC8600E1C8B3 /* belfast_ireland_waterareas.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = belfast_ireland_waterareas.geojson; sourceTree = ""; }; + E5941DBA1E0CEC8600E1C8B3 /* belfast_ireland_waterways.geojson */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = belfast_ireland_waterways.geojson; sourceTree = ""; }; + E5941DC01E0CEE7300E1C8B3 /* GeoJSONStyleTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeoJSONStyleTestCase.swift; sourceTree = ""; }; + E5941DC51E0D02A800E1C8B3 /* osm_buildings.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = osm_buildings.sld; sourceTree = ""; }; + E5941DC61E0D02A800E1C8B3 /* osm_landuse.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = osm_landuse.sld; sourceTree = ""; }; + E5941DC71E0D02A800E1C8B3 /* osm_roads.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = osm_roads.sld; sourceTree = ""; }; + E5941DC81E0D02A800E1C8B3 /* osm_water.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = osm_water.sld; sourceTree = ""; }; + E5941DC91E0D02A800E1C8B3 /* water_lines.sld */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = water_lines.sld; sourceTree = ""; }; + E5C82FC71E221C890074DF23 /* cemetery.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cemetery.png; sourceTree = ""; }; + E5C82FC81E221C890074DF23 /* commercial.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = commercial.png; sourceTree = ""; }; + E5C82FC91E221C890074DF23 /* industrial.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = industrial.png; sourceTree = ""; }; + E5C82FCA1E221C890074DF23 /* forest.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = forest.png; sourceTree = ""; }; + E5C82FCB1E221C890074DF23 /* residential.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = residential.png; sourceTree = ""; }; + E5CC4E1F1DF7CBEA00C0D4DE /* LocationTrackingRealTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationTrackingRealTestCase.swift; sourceTree = ""; }; + E5D2D65E1DE65CE400E02305 /* LocationTrackingSimTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationTrackingSimTestCase.swift; sourceTree = ""; }; + E5D2D6671DE6C25300E02305 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; + E5D2D6691DE6C25A00E02305 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; }; + E5D2D66B1DE6C26000E02305 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + E5D2D66D1DE6C26A00E02305 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; + E5D2D6741DEDEABF00E02305 /* AnimationDelegateTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnimationDelegateTestCase.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 88E4B8BC1B83B6AB0050D21B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2B1806D322AECF4300DD3DB1 /* Accelerate.framework in Frameworks */, + E5D2D66E1DE6C26A00E02305 /* libc++.tbd in Frameworks */, + E5D2D66C1DE6C26000E02305 /* libz.tbd in Frameworks */, + E5D2D66A1DE6C25A00E02305 /* libxml2.tbd in Frameworks */, + E5D2D6681DE6C25300E02305 /* libsqlite3.tbd in Frameworks */, + E0D333623509A56C61C2228C /* libPods-AutoTesterPod.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2B033BCE24F6D78400B55248 /* fonts */ = { + isa = PBXGroup; + children = ( + 2B033C0524F6F6DB00B55248 /* OpenSans-Bold.ttf */, + 2B033C0424F6F6DB00B55248 /* OpenSans-BoldItalic.ttf */, + 2B033C0724F6F6DB00B55248 /* OpenSans-ExtraBold.ttf */, + 2B033C0624F6F6DB00B55248 /* OpenSans-ExtraBoldItalic.ttf */, + 2B033C0124F6F6DB00B55248 /* OpenSans-Italic.ttf */, + 2B033C0824F6F6DB00B55248 /* OpenSans-Light.ttf */, + 2B033C0024F6F6DA00B55248 /* OpenSans-LightItalic.ttf */, + 2B033C0224F6F6DB00B55248 /* OpenSans-Regular.ttf */, + 2B033C0324F6F6DB00B55248 /* OpenSans-SemiBold.ttf */, + 2B033C0924F6F6DB00B55248 /* OpenSans-SemiBoldItalic.ttf */, + 2B8F3258201021CF006DDE27 /* NotoSans-Bold.ttf */, + 2B8F3256201021CF006DDE27 /* NotoSans-Regular.ttf */, + 2B033BF524F6DA4300B55248 /* Roboto-Condensed-Bold.ttf */, + 2B033BF924F6DA4300B55248 /* Roboto-Condensed-BoldItalic.ttf */, + 2B033BF424F6DA4300B55248 /* Roboto-Condensed-Italic.ttf */, + 2B033BF624F6DA4300B55248 /* Roboto-Condensed-Light.ttf */, + 2B033BF724F6DA4300B55248 /* Roboto-Condensed-LightItalic.ttf */, + 2B033BF824F6DA4300B55248 /* Roboto-Condensed-Regular.ttf */, + 2B033BD524F6D7B300B55248 /* Roboto-Black.ttf */, + 2B033BD624F6D7B300B55248 /* Roboto-BlackItalic.ttf */, + 2B033BD224F6D7B300B55248 /* Roboto-Bold.ttf */, + 2B033BD324F6D7B300B55248 /* Roboto-BoldItalic.ttf */, + 2B033BD024F6D7B200B55248 /* Roboto-Italic.ttf */, + 2B033BDA24F6D7B300B55248 /* Roboto-Light.ttf */, + 2B033BDD24F6D7B300B55248 /* Roboto-LightItalic.ttf */, + 2B033BE124F6D7B300B55248 /* Roboto-Medium.ttf */, + 2B033BD724F6D7B300B55248 /* Roboto-MediumItalic.ttf */, + 2B033BDE24F6D7B300B55248 /* Roboto-Regular.ttf */, + 2B033BD124F6D7B300B55248 /* Roboto-Thin.ttf */, + 2B033BE024F6D7B300B55248 /* Roboto-ThinItalic.ttf */, + ); + name = fonts; + sourceTree = ""; + }; + 2B4B30B92395F07000854073 /* vector maps */ = { + isa = PBXGroup; + children = ( + 316B5CFA260A5573000B4F15 /* maptiler_test_circles.json */, + 316B5CF1260526AD000B4F15 /* maptiler_expr_test.json */, + 2B4B30BD2395F08C00854073 /* default.sld */, + 2B4B30C02395F08D00854073 /* mapbox_satellite-streets-v9.json */, + 2B4B30BF2395F08C00854073 /* mapbox_satellite-v9.json */, + 2B4B30BC2395F08C00854073 /* maptiler_basic.json */, + 2B4B30BE2395F08C00854073 /* maptiler_hybrid_satellite.json */, + 2B4B30BA2395F08C00854073 /* maptiler_streets.json */, + 2B4B30BB2395F08C00854073 /* maptiler_topo.json */, + ); + name = "vector maps"; + path = ../../../resources/vectors/styles; + sourceTree = ""; + }; + 2B4BA6C01C83A1F500DC1562 /* wide vectors */ = { + isa = PBXGroup; + children = ( + 2B4BA6C21C83A22000DC1562 /* leftbend.geojson */, + 2B4BA6C31C83A22000DC1562 /* leftv.geojson */, + 2B4BA6C41C83A22000DC1562 /* mowing-lawn.geojson */, + 2B4BA6C51C83A22000DC1562 /* rightbend.geojson */, + 2B4BA6C61C83A22000DC1562 /* rightv.geojson */, + 2B4BA6C71C83A22000DC1562 /* sawtooth.geojson */, + 2B4BA6C81C83A22000DC1562 /* sawtoothbegin.geojson */, + 2B4BA6C91C83A22000DC1562 /* spiral.geojson */, + 2B4BA6CA1C83A22000DC1562 /* square.geojson */, + 2B4BA6CB1C83A22000DC1562 /* straight.geojson */, + 2B4BA6CC1C83A22000DC1562 /* track.geojson */, + 2B4BA6CD1C83A22000DC1562 /* uturn.geojson */, + ); + name = "wide vectors"; + path = resources; + sourceTree = ""; + }; + 311E0A822680F496007BE16F /* airways */ = { + isa = PBXGroup; + children = ( + 311E0A992680F597007BE16F /* Airspace_Boundary.cpg */, + 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */, + 311E0A9A2680F597007BE16F /* Airspace_Boundary.prj */, + 311E0A932680F597007BE16F /* Airspace_Boundary.shp */, + 311E0A922680F597007BE16F /* Airspace_Boundary.shx */, + 311E0A972680F597007BE16F /* Airspace_Boundary.xml */, + 311E0A942680F597007BE16F /* ATS_Route.cpg */, + 311E0A9B2680F597007BE16F /* ATS_Route.dbf */, + 311E0A952680F597007BE16F /* ATS_Route.prj */, + 311E0A902680F597007BE16F /* ATS_Route.shp */, + 311E0A962680F597007BE16F /* ATS_Route.shx */, + 311E0A982680F597007BE16F /* ATS_Route.xml */, + ); + name = airways; + sourceTree = ""; + }; + 3651D5D283D23F0C2EFDE845 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 2B1806D422AECFA700DD3DB1 /* CoreImage.framework */, + 2B1806D122AECF4200DD3DB1 /* Accelerate.framework */, + 2B361E3921237CFE0074D06D /* CoreLocation.framework */, + E5D2D66D1DE6C26A00E02305 /* libc++.tbd */, + E5D2D66B1DE6C26000E02305 /* libz.tbd */, + E5D2D6691DE6C25A00E02305 /* libxml2.tbd */, + E5D2D6671DE6C25300E02305 /* libsqlite3.tbd */, + B0C308BBE20E3D71A8EEB294 /* libPods-AutoTesterPod.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 88BF115A1BCDA9530002205E /* testCases */ = { + isa = PBXGroup; + children = ( + 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */, + 2B6611E525D1C35D009D228F /* AirwayTestCase.swift */, + D8E12ECC1BDE9FD500BB7BC7 /* AnimatedBasemapTestCase.swift */, + 2BD358F21DD3EA0400081EA8 /* AnimatedMarkersTestCase.swift */, + E5D2D6741DEDEABF00E02305 /* AnimationDelegateTestCase.swift */, + 2B1E85A522B44D5800AB7208 /* BillboardTestCase.swift */, + D84AA5931C1A1C9700413B76 /* BNGCustomMapTestCase.swift */, + D84AA5981C1A2B9800413B76 /* BNGTestCase.swift */, + D84433EC1C14E4FE00A52117 /* CartoDBInterpreter.h */, + D84433ED1C14E4FE00A52117 /* CartoDBInterpreter.m */, + 2B7787C921CDA47F006ABF5D /* CartoDBLightTestCase.swift */, + D84433E91C14E4E700A52117 /* CartoDBTestCase.h */, + D84433EA1C14E4E700A52117 /* CartoDBTestCase.m */, + 31833791259E5291005FEF70 /* ChangeVectorsTestCase.h */, + 31833792259E5291005FEF70 /* ChangeVectorsTestCase.mm */, + D8228AA71BE786BE001D6914 /* ClusteredMarkersTestCase.swift */, + 311E0AAA26865D2C007BE16F /* ESRIRemoteTestCase.swift */, + 2BDEB3001C924842003259B3 /* ExtrudedModelTestCase.h */, + 2BDEB3011C924842003259B3 /* ExtrudedModelTestCase.m */, + E5679F461CB72DE800369A15 /* FindHeightTestCase.h */, + E5679F471CB72DE800369A15 /* FindHeightTestCase.m */, + 2B249F3E23F4A82600CFA3D0 /* GeographyClass.swift */, + E5941DC01E0CEE7300E1C8B3 /* GeoJSONStyleTestCase.swift */, + 2B73D6B2207C106C00AF5095 /* GlobeSamplerTestCase.swift */, + 2B4B30A72395E0DE00854073 /* GlyphProblemTestCase.h */, + 2B4B30A62395E0DE00854073 /* GlyphProblemTestCase.m */, + 31D328AC26387E7900456B93 /* GreatCircleTestCase.swift */, + 2B68A43B225D06A8009CC720 /* ImageReloadTestCase.swift */, + 8820852A1DC81051008F8E76 /* Issue721TestCase.swift */, + E5679F421CB72DE800369A15 /* LabelAnimationTestCase.h */, + E5679F431CB72DE800369A15 /* LabelAnimationTestCase.m */, + D8F2FE251BE7BD630058A310 /* LabelsTestCase.h */, + D8F2FE261BE7BD630058A310 /* LabelsTestCase.m */, + 2B4B30A82395E0DE00854073 /* LayerStartupShutdownTestCase.swift */, + 2B8849E91E37F7CB0027C397 /* LIDARTestCase.h */, + 2B8849EA1E37F7CB0027C397 /* LIDARTestCase.mm */, + E5CC4E1F1DF7CBEA00C0D4DE /* LocationTrackingRealTestCase.swift */, + E5D2D65E1DE65CE400E02305 /* LocationTrackingSimTestCase.swift */, + D8200CA21BE9624300B22CF5 /* LoftedPolysTestCase.h */, + D8200CA31BE9624300B22CF5 /* LoftedPolysTestCase.m */, + 2B4B30A32395E0DE00854073 /* MapboxTestCase.swift */, + 88BF11471BCD3DA40002205E /* MaplyTestCase.h */, + 88BF11481BCD3DA40002205E /* MaplyTestCase.m */, + 316B5CFD260A58A8000B4F15 /* MapTilerCircleTestCase.swift */, + 2B4B30A92395E0DE00854073 /* MapTilerTestCase.swift */, + D8F2FE281BE7C2000058A310 /* MarkersTestCase.swift */, + D8F2FE2A1BE7CAD30058A310 /* MegaMarkersTestCase.h */, + D8F2FE2B1BE7CAD30058A310 /* MegaMarkersTestCase.m */, + D8F2FE2D1BE7CF310058A310 /* ModelsTestCase.swift */, + D8228A911BE77816001D6914 /* MovingScreenLabelsTestCase.swift */, + 313C521425D329070036C22E /* MovingScreenMarkersTestCase.swift */, + D84433E61C14A46100A52117 /* NASAGIBSTestCase.swift */, + 2B4B63AD23611D690008C8C1 /* OfflineRenderTestCase.swift */, + 2BC2DCEE1D2345AF0088D350 /* PagingLayerTestCase.h */, + 2BC2DCEF1D2345AF0088D350 /* PagingLayerTestCase.m */, + 8895D8AE1CA4ABA9004387FB /* ParticleTest.h */, + 8895D8AF1CA4ABA9004387FB /* ParticleTest.mm */, + D8D3E0671C4EDA1800F0D006 /* ParticleTestCase.swift */, + 3183380E25A67CD8005FEF70 /* RepresentationsTestCase.h */, + 3183380C25A67CD8005FEF70 /* RepresentationsTestCase.mm */, + 2B392B6F1C5AC59D001EE40B /* RunwayBuilderTestCase.h */, + 2B392B701C5AC59D001EE40B /* RunwayBuilderTestCase.m */, + D8341A721BE2DFE100411A46 /* ScreenLabelsTestCase.swift */, + 2BFC7E4F1D132DCB0040E2A3 /* ScreenMarkersTestCase.h */, + 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */, + 2BC2DCCB1D1F4CE20088D350 /* ShapefileTestCase.h */, + 2BC2DCCC1D1F4CE20088D350 /* ShapefileTestCase.m */, + D8200C9D1BE9516300B22CF5 /* ShapesTestCase.h */, + 313FED0627027D6800FCD14C /* ShapesTestCase.mm */, + 2B29944C243BA16000677DE4 /* SimpleStyleTestCase.swift */, + 88BF115E1BCDA9730002205E /* StamenWatercolorRemote.swift */, + D8200C971BE93E6E00B22CF5 /* StarsSunTestCase.swift */, + 2B4B30A52395E0DE00854073 /* StartupShutdownTestCase.swift */, + D8200CA01BE9563F00B22CF5 /* StickersTestCase.swift */, + 2BC0FB761DCAA18A004125F1 /* TextureVectorTestCase.h */, + 2BC0FB771DCAA18A004125F1 /* TextureVectorTestCase.m */, + 2B158BED1D5D19E900103E04 /* VectorHoleTestCase.h */, + 2B158BEE1D5D19E900103E04 /* VectorHoleTestCase.m */, + 2B1C264E1C90FFFC00C71B0A /* VectorMBTilesTestCase.swift */, + D8341A6F1BE2C8D200411A46 /* VectorsTestCase.h */, + D8341A701BE2C8D200411A46 /* VectorsTestCase.mm */, + 2BBB70811D5E9079009B67A6 /* VectorStyleTestCase.h */, + 2BBB70821D5E9079009B67A6 /* VectorStyleTestCase.m */, + D8200C8F1BE92B2F00B22CF5 /* WideVectorsTestCase.h */, + D8200C901BE92B2F00B22CF5 /* WideVectorsTestCase.mm */, + E5679F441CB72DE800369A15 /* WMSTestCase.h */, + E5679F451CB72DE800369A15 /* WMSTestCase.m */, + ); + path = testCases; + sourceTree = ""; + }; + 88E4B8B61B83B6AB0050D21B = { + isa = PBXGroup; + children = ( + 311C6A0427B1AC7E0016BC7E /* wkDefaultShaders.metal */, + 88E4B8C11B83B6AB0050D21B /* AutoTester */, + 88E4B8C01B83B6AB0050D21B /* Products */, + 88FF5BDF1BC31D3C002F15CE /* Resources */, + 3651D5D283D23F0C2EFDE845 /* Frameworks */, + B896A30D27C259475AB0907B /* Pods */, + ); + sourceTree = ""; + }; + 88E4B8C01B83B6AB0050D21B /* Products */ = { + isa = PBXGroup; + children = ( + 88E4B8BF1B83B6AB0050D21B /* AutoTesterPod.app */, + ); + name = Products; + sourceTree = ""; + }; + 88E4B8C11B83B6AB0050D21B /* AutoTester */ = { + isa = PBXGroup; + children = ( + 313FED102706166300FCD14C /* AutoTester.entitlements */, + 2B29944A243BA08D00677DE4 /* MapboxKindaMap.swift */, + 88E4B8C81B83B6AB0050D21B /* Main.storyboard */, + 88E4B8C21B83B6AB0050D21B /* Supporting Files */, + 886FCCC21BA73C1D00494BB0 /* StartupViewController.swift */, + 8FE129181CDFB3B8004744FC /* TestCell.swift */, + 2BF29B8B24D2268200553963 /* LegendViewController.storyboard */, + 2BF29B8E24D226B000553963 /* LegendViewController.swift */, + 88BF115A1BCDA9530002205E /* testCases */, + 31D3287B262FADF100456B93 /* TestTileImageFetcher.swift */, + ); + path = AutoTester; + sourceTree = ""; + }; + 88E4B8C21B83B6AB0050D21B /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 311C6A0127B1939F0016BC7E /* SwiftBridge.h */, + 2B033BCE24F6D78400B55248 /* fonts */, + 88F0951E1ECD041300E7E686 /* AutoTesterJenkins.plist */, + 88E4B8CD1B83B6AB0050D21B /* LaunchScreen.xib */, + 88E4B8C41B83B6AB0050D21B /* AppDelegate.swift */, + 8810B2D11BA9D45F00446CE3 /* MaplyTesterBridge.h */, + 88E4B8C31B83B6AB0050D21B /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 88FF5BDF1BC31D3C002F15CE /* Resources */ = { + isa = PBXGroup; + children = ( + 311E0A822680F496007BE16F /* airways */, + 2BD914E7256F1F8A00E724A8 /* Assets.xcassets */, + 2BD914BC256F1C8D00E724A8 /* icon_152.png */, + 2BD914BB256F1C8D00E724A8 /* icon_167.png */, + 88FF5BE11BC31D53002F15CE /* map_pin.png */, + 88FF5BE21BC31D53002F15CE /* Smiley_Face_Avatar_by_PixelTwist.png */, + 88FF5BE41BC31D53002F15CE /* Star.png */, + 2B4B30B92395F07000854073 /* vector maps */, + 2B7E288A200EC109007E2965 /* SE_Basic.json */, + 2B7E2889200EC109007E2965 /* SE_PolygonsLines.json */, + 2B5E8AF41E943560000B39E5 /* greensquare.png */, + 2B8849FA1E37F9B30027C397 /* stadium-utm-quad-data.sqlite */, + 2B7FC0A61E32B67400AF253A /* testJson.json */, + E5941DB51E0CEA5700E1C8B3 /* belfast_northern_ireland */, + 8F981DB21DE3577C00717DF1 /* ne_10m_roads.dbf */, + 8F981DB31DE3577C00717DF1 /* ne_10m_roads.prj */, + 8F981DB51DE3577C00717DF1 /* ne_10m_roads.shp */, + 8F981DB61DE3577C00717DF1 /* ne_10m_roads.shx */, + 2BC0FB791DCAA574004125F1 /* dots.png */, + 8F4D91D81CDFA7C000F68045 /* Icons */, + 2B1C26511C9100A500C71B0A /* France.mbtiles */, + 2B6953671C7E67DD007FC51E /* colorramp.png */, + D84AA5961C1A26C100413B76 /* OSTN02_NTv2.gsb */, + 2B4BA6C01C83A1F500DC1562 /* wide vectors */, + 88FF5CF41BC31D94002F15CE /* country_json_50m */, + 88FF5DEE1BC31D95002F15CE /* sf_roads */, + 88FF5BEC1BC31D6D002F15CE /* base_maps */, + 88FF5BFA1BC31D6D002F15CE /* elevation */, + 88FF5BFC1BC31D6D002F15CE /* maki icons */, + 88FF5C6C1BC31D6D002F15CE /* models */, + 88FF5C711BC31D6D002F15CE /* stars */, + ); + name = Resources; + sourceTree = ""; + }; + 88FF5BEC1BC31D6D002F15CE /* base_maps */ = { + isa = PBXGroup; + children = ( + 88FF5BED1BC31D6D002F15CE /* geography-class_medres.mbtiles */, + 88FF5BEE1BC31D6D002F15CE /* lowres_wtb */, + ); + name = base_maps; + path = ../../../resources/base_maps; + sourceTree = ""; + }; + 88FF5BEE1BC31D6D002F15CE /* lowres_wtb */ = { + isa = PBXGroup; + children = ( + 88FF5BEF1BC31D6D002F15CE /* lowres_wtb_0x0.pvrtc */, + 88FF5BF01BC31D6D002F15CE /* lowres_wtb_0x1.pvrtc */, + 88FF5BF11BC31D6D002F15CE /* lowres_wtb_1x0.pvrtc */, + 88FF5BF21BC31D6D002F15CE /* lowres_wtb_1x1.pvrtc */, + 88FF5BF31BC31D6D002F15CE /* lowres_wtb_2x0.pvrtc */, + 88FF5BF41BC31D6D002F15CE /* lowres_wtb_2x1.pvrtc */, + 88FF5BF51BC31D6D002F15CE /* lowres_wtb_3x0.pvrtc */, + 88FF5BF61BC31D6D002F15CE /* lowres_wtb_3x1.pvrtc */, + 88FF5BF71BC31D6D002F15CE /* lowres_wtb_4x0.pvrtc */, + 88FF5BF81BC31D6D002F15CE /* lowres_wtb_4x1.pvrtc */, + 88FF5BF91BC31D6D002F15CE /* lowres_wtb_info.plist */, + ); + path = lowres_wtb; + sourceTree = ""; + }; + 88FF5BFA1BC31D6D002F15CE /* elevation */ = { + isa = PBXGroup; + children = ( + 88FF5BFB1BC31D6D002F15CE /* world_web_mercator.sqlite */, + ); + name = elevation; + path = ../../../resources/elevation; + sourceTree = ""; + }; + 88FF5BFC1BC31D6D002F15CE /* maki icons */ = { + isa = PBXGroup; + children = ( + 88FF5BFD1BC31D6D002F15CE /* airfield-24@2x.png */, + 88FF5BFE1BC31D6D002F15CE /* airport-24@2x.png */, + 88FF5BFF1BC31D6D002F15CE /* alcohol-shop-24@2x.png */, + 88FF5C001BC31D6D002F15CE /* america-football-24@2x.png */, + 88FF5C011BC31D6D002F15CE /* art-gallery-24@2x.png */, + 88FF5C021BC31D6D002F15CE /* bakery-24@2x.png */, + 88FF5C031BC31D6D002F15CE /* bank-24@2x.png */, + 88FF5C041BC31D6D002F15CE /* bar-24@2x.png */, + 88FF5C051BC31D6D002F15CE /* baseball-24@2x.png */, + 88FF5C061BC31D6D002F15CE /* basketball-24@2x.png */, + 88FF5C071BC31D6D002F15CE /* beer-24@2x.png */, + 88FF5C081BC31D6D002F15CE /* bicycle-24@2x.png */, + 88FF5C091BC31D6D002F15CE /* building-24@2x.png */, + 88FF5C0A1BC31D6D002F15CE /* bus-24@2x.png */, + 88FF5C0B1BC31D6D002F15CE /* cafe-24@2x.png */, + 88FF5C0C1BC31D6D002F15CE /* camera-24@2x.png */, + 88FF5C0D1BC31D6D002F15CE /* campsite-24@2x.png */, + 88FF5C0E1BC31D6D002F15CE /* car-24@2x.png */, + 88FF5C0F1BC31D6D002F15CE /* cemetery-24@2x.png */, + 88FF5C101BC31D6D002F15CE /* cinema-24@2x.png */, + 88FF5C111BC31D6D002F15CE /* circle-24@2x.png */, + 88FF5C121BC31D6D002F15CE /* circle-stroked-24@2x.png */, + 88FF5C131BC31D6D002F15CE /* city-24@2x.png */, + 88FF5C141BC31D6D002F15CE /* clothing-store-24@2x.png */, + 88FF5C151BC31D6D002F15CE /* college-24@2x.png */, + 88FF5C161BC31D6D002F15CE /* commercial-24@2x.png */, + 88FF5C171BC31D6D002F15CE /* cricket-24@2x.png */, + 88FF5C181BC31D6D002F15CE /* cross-24@2x.png */, + 88FF5C191BC31D6D002F15CE /* dam-24@2x.png */, + 88FF5C1A1BC31D6D002F15CE /* danger-24@2x.png */, + 88FF5C1B1BC31D6D002F15CE /* disability-24@2x.png */, + 88FF5C1C1BC31D6D002F15CE /* dog-park-24@2x.png */, + 88FF5C1D1BC31D6D002F15CE /* embassy-24@2x.png */, + 88FF5C1E1BC31D6D002F15CE /* emergency-telephone-24@2x.png */, + 88FF5C1F1BC31D6D002F15CE /* farm-24@2x.png */, + 88FF5C201BC31D6D002F15CE /* fast-food-24@2x.png */, + 88FF5C211BC31D6D002F15CE /* ferry-24@2x.png */, + 88FF5C221BC31D6D002F15CE /* fire-station-24@2x.png */, + 88FF5C231BC31D6D002F15CE /* fuel-24@2x.png */, + 88FF5C241BC31D6D002F15CE /* garden-24@2x.png */, + 88FF5C251BC31D6D002F15CE /* golf-24@2x.png */, + 88FF5C261BC31D6D002F15CE /* grocery-24@2x.png */, + 88FF5C271BC31D6D002F15CE /* harbor-24@2x.png */, + 88FF5C281BC31D6D002F15CE /* heliport-24@2x.png */, + 88FF5C291BC31D6D002F15CE /* hospital-24@2x.png */, + 88FF5C2A1BC31D6D002F15CE /* industrial-24@2x.png */, + 88FF5C2B1BC31D6D002F15CE /* land-use-24@2x.png */, + 88FF5C2C1BC31D6D002F15CE /* laundry-24@2x.png */, + 88FF5C2D1BC31D6D002F15CE /* library-24@2x.png */, + 88FF5C2E1BC31D6D002F15CE /* lighthouse-24@2x.png */, + 88FF5C2F1BC31D6D002F15CE /* lodging-24@2x.png */, + 88FF5C301BC31D6D002F15CE /* logging-24@2x.png */, + 88FF5C311BC31D6D002F15CE /* london-underground-24@2x.png */, + 88FF5C321BC31D6D002F15CE /* marker-24@2x.png */, + 88FF5C331BC31D6D002F15CE /* marker-stroked-24@2x.png */, + 88FF5C341BC31D6D002F15CE /* minefield-24@2x.png */, + 88FF5C351BC31D6D002F15CE /* monument-24@2x.png */, + 88FF5C361BC31D6D002F15CE /* museum-24@2x.png */, + 88FF5C371BC31D6D002F15CE /* music-24@2x.png */, + 88FF5C381BC31D6D002F15CE /* oil-well-24@2x.png */, + 88FF5C391BC31D6D002F15CE /* park-24@2x.png */, + 88FF5C3A1BC31D6D002F15CE /* park2-24@2x.png */, + 88FF5C3B1BC31D6D002F15CE /* parking-24@2x.png */, + 88FF5C3C1BC31D6D002F15CE /* parking-garage-24@2x.png */, + 88FF5C3D1BC31D6D002F15CE /* pharmacy-24@2x.png */, + 88FF5C3E1BC31D6D002F15CE /* pitch-24@2x.png */, + 88FF5C3F1BC31D6D002F15CE /* place-of-worship-24@2x.png */, + 88FF5C401BC31D6D002F15CE /* playground-24@2x.png */, + 88FF5C411BC31D6D002F15CE /* police-24@2x.png */, + 88FF5C421BC31D6D002F15CE /* polling-place-24@2x.png */, + 88FF5C431BC31D6D002F15CE /* post-24@2x.png */, + 88FF5C441BC31D6D002F15CE /* prison-24@2x.png */, + 88FF5C451BC31D6D002F15CE /* rail-24@2x.png */, + 88FF5C461BC31D6D002F15CE /* rail-above-24@2x.png */, + 88FF5C471BC31D6D002F15CE /* rail-underground-24@2x.png */, + 88FF5C481BC31D6D002F15CE /* religious-christian-24@2x.png */, + 88FF5C491BC31D6D002F15CE /* religious-jewish-24@2x.png */, + 88FF5C4A1BC31D6D002F15CE /* religious-muslim-24@2x.png */, + 88FF5C4B1BC31D6D002F15CE /* restaurant-24@2x.png */, + 88FF5C4C1BC31D6D002F15CE /* roadblock-24@2x.png */, + 88FF5C4D1BC31D6D002F15CE /* rocket-24@2x.png */, + 88FF5C4E1BC31D6D002F15CE /* school-24@2x.png */, + 88FF5C4F1BC31D6D002F15CE /* shop-24@2x.png */, + 88FF5C501BC31D6D002F15CE /* skiing-24@2x.png */, + 88FF5C511BC31D6D002F15CE /* slaughterhouse-24@2x.png */, + 88FF5C521BC31D6D002F15CE /* soccer-24@2x.png */, + 88FF5C531BC31D6D002F15CE /* square-24@2x.png */, + 88FF5C541BC31D6D002F15CE /* square-stroked-24@2x.png */, + 88FF5C551BC31D6D002F15CE /* star-24@2x.png */, + 88FF5C561BC31D6D002F15CE /* star-stroked-24@2x.png */, + 88FF5C571BC31D6D002F15CE /* suitcase-24@2x.png */, + 88FF5C581BC31D6D002F15CE /* swimming-24@2x.png */, + 88FF5C591BC31D6D002F15CE /* telephone-24@2x.png */, + 88FF5C5A1BC31D6D002F15CE /* tennis-24@2x.png */, + 88FF5C5B1BC31D6D002F15CE /* theatre-24@2x.png */, + 88FF5C5C1BC31D6D002F15CE /* toilets-24@2x.png */, + 88FF5C5D1BC31D6D002F15CE /* town-24@2x.png */, + 88FF5C5E1BC31D6D002F15CE /* town-hall-24@2x.png */, + 88FF5C5F1BC31D6D002F15CE /* triangle-24@2x.png */, + 88FF5C601BC31D6D002F15CE /* triangle-stroked-24@2x.png */, + 88FF5C611BC31D6D002F15CE /* village-24@2x.png */, + 88FF5C621BC31D6D002F15CE /* warehouse-24@2x.png */, + 88FF5C631BC31D6D002F15CE /* waste-basket-24@2x.png */, + 88FF5C641BC31D6D002F15CE /* water-24@2x.png */, + 88FF5C651BC31D6D002F15CE /* wetland-24@2x.png */, + 88FF5C661BC31D6D002F15CE /* zoo-24@2x.png */, + ); + name = "maki icons"; + path = "../../../resources/maki icons"; + sourceTree = ""; + }; + 88FF5C6C1BC31D6D002F15CE /* models */ = { + isa = PBXGroup; + children = ( + 2B29944E243BA31900677DE4 /* cube.obj */, + 88FF5C6D1BC31D6D002F15CE /* cessna.obj */, + 88FF5C6E1BC31D6D002F15CE /* cessna.png */, + 88FF5C6F1BC31D6D002F15CE /* moon.png */, + 88FF5C701BC31D6D002F15CE /* vp.mtl */, + ); + name = models; + path = ../../../resources/models; + sourceTree = ""; + }; + 88FF5C711BC31D6D002F15CE /* stars */ = { + isa = PBXGroup; + children = ( + 88FF5BE51BC31D53002F15CE /* SunImage.png */, + 88FF5BE31BC31D53002F15CE /* star_background.png */, + 88FF5C721BC31D6D002F15CE /* starcatalog_orig.txt */, + 88FF5C731BC31D6D002F15CE /* starcatalog_short.txt */, + ); + name = stars; + path = ../../../resources/stars; + sourceTree = ""; + }; + 88FF5CF41BC31D94002F15CE /* country_json_50m */ = { + isa = PBXGroup; + children = ( + 88FF5CF51BC31D94002F15CE /* ABW.geojson */, + 88FF5CF61BC31D94002F15CE /* AFG.geojson */, + 88FF5CF71BC31D94002F15CE /* AGO.geojson */, + 88FF5CF81BC31D94002F15CE /* AIA.geojson */, + 88FF5CF91BC31D94002F15CE /* ALA.geojson */, + 88FF5CFA1BC31D94002F15CE /* ALB.geojson */, + 88FF5CFB1BC31D94002F15CE /* AND.geojson */, + 88FF5CFC1BC31D94002F15CE /* ARE.geojson */, + 88FF5CFD1BC31D94002F15CE /* ARG.geojson */, + 88FF5CFE1BC31D94002F15CE /* ARM.geojson */, + 88FF5CFF1BC31D94002F15CE /* ASM.geojson */, + 88FF5D001BC31D94002F15CE /* ATA.geojson */, + 88FF5D011BC31D94002F15CE /* ATF.geojson */, + 88FF5D021BC31D94002F15CE /* ATG.geojson */, + 88FF5D031BC31D94002F15CE /* AUS.geojson */, + 88FF5D041BC31D94002F15CE /* AUT.geojson */, + 88FF5D051BC31D94002F15CE /* AZE.geojson */, + 88FF5D061BC31D94002F15CE /* BDI.geojson */, + 88FF5D071BC31D94002F15CE /* BEL.geojson */, + 88FF5D081BC31D94002F15CE /* BEN.geojson */, + 88FF5D091BC31D94002F15CE /* BES.geojson */, + 88FF5D0A1BC31D94002F15CE /* BFA.geojson */, + 88FF5D0B1BC31D94002F15CE /* BGD.geojson */, + 88FF5D0C1BC31D94002F15CE /* BGR.geojson */, + 88FF5D0D1BC31D94002F15CE /* BHR.geojson */, + 88FF5D0E1BC31D94002F15CE /* BHS.geojson */, + 88FF5D0F1BC31D94002F15CE /* BIH.geojson */, + 88FF5D101BC31D94002F15CE /* BLM.geojson */, + 88FF5D111BC31D94002F15CE /* BLR.geojson */, + 88FF5D121BC31D94002F15CE /* BLZ.geojson */, + 88FF5D131BC31D94002F15CE /* BMU.geojson */, + 88FF5D141BC31D94002F15CE /* BOL.geojson */, + 88FF5D151BC31D94002F15CE /* BRA.geojson */, + 88FF5D161BC31D94002F15CE /* BRB.geojson */, + 88FF5D171BC31D94002F15CE /* BRN.geojson */, + 88FF5D181BC31D94002F15CE /* BTN.geojson */, + 88FF5D191BC31D94002F15CE /* BVT.geojson */, + 88FF5D1A1BC31D94002F15CE /* BWA.geojson */, + 88FF5D1B1BC31D94002F15CE /* CAF.geojson */, + 88FF5D1C1BC31D94002F15CE /* CAN.geojson */, + 88FF5D1D1BC31D94002F15CE /* CCK.geojson */, + 88FF5D1E1BC31D94002F15CE /* CHE.geojson */, + 88FF5D1F1BC31D94002F15CE /* CHL.geojson */, + 88FF5D201BC31D94002F15CE /* CHN.geojson */, + 88FF5D211BC31D94002F15CE /* CIV.geojson */, + 88FF5D221BC31D94002F15CE /* CMR.geojson */, + 88FF5D231BC31D94002F15CE /* COD.geojson */, + 88FF5D241BC31D94002F15CE /* COG.geojson */, + 88FF5D251BC31D94002F15CE /* COK.geojson */, + 88FF5D261BC31D94002F15CE /* COL.geojson */, + 88FF5D271BC31D94002F15CE /* COM.geojson */, + 88FF5D281BC31D94002F15CE /* CPV.geojson */, + 88FF5D291BC31D94002F15CE /* CRI.geojson */, + 88FF5D2A1BC31D94002F15CE /* CUB.geojson */, + 88FF5D2B1BC31D94002F15CE /* CUW.geojson */, + 88FF5D2C1BC31D94002F15CE /* CXR.geojson */, + 88FF5D2D1BC31D94002F15CE /* CYM.geojson */, + 88FF5D2E1BC31D94002F15CE /* CYP.geojson */, + 88FF5D2F1BC31D94002F15CE /* CZE.geojson */, + 88FF5D301BC31D94002F15CE /* DEU.geojson */, + 88FF5D311BC31D94002F15CE /* DJI.geojson */, + 88FF5D321BC31D94002F15CE /* DMA.geojson */, + 88FF5D331BC31D94002F15CE /* DNK.geojson */, + 88FF5D341BC31D94002F15CE /* DOM.geojson */, + 88FF5D351BC31D94002F15CE /* DZA.geojson */, + 88FF5D361BC31D94002F15CE /* ECU.geojson */, + 88FF5D371BC31D94002F15CE /* EGY.geojson */, + 88FF5D381BC31D94002F15CE /* ERI.geojson */, + 88FF5D391BC31D94002F15CE /* ESH.geojson */, + 88FF5D3A1BC31D94002F15CE /* ESP.geojson */, + 88FF5D3B1BC31D94002F15CE /* EST.geojson */, + 88FF5D3C1BC31D94002F15CE /* ETH.geojson */, + 88FF5D3D1BC31D94002F15CE /* FIN.geojson */, + 88FF5D3E1BC31D94002F15CE /* FJI.geojson */, + 88FF5D3F1BC31D94002F15CE /* FLK.geojson */, + 88FF5D401BC31D94002F15CE /* FRA.geojson */, + 88FF5D411BC31D94002F15CE /* FRO.geojson */, + 88FF5D421BC31D94002F15CE /* FSM.geojson */, + 88FF5D431BC31D94002F15CE /* GAB.geojson */, + 88FF5D441BC31D94002F15CE /* GBR.geojson */, + 88FF5D451BC31D94002F15CE /* GEO.geojson */, + 88FF5D461BC31D94002F15CE /* GGY.geojson */, + 88FF5D471BC31D94002F15CE /* GHA.geojson */, + 88FF5D481BC31D94002F15CE /* GIB.geojson */, + 88FF5D491BC31D94002F15CE /* GIN.geojson */, + 88FF5D4A1BC31D94002F15CE /* GLP.geojson */, + 88FF5D4B1BC31D94002F15CE /* GMB.geojson */, + 88FF5D4C1BC31D94002F15CE /* GNB.geojson */, + 88FF5D4D1BC31D94002F15CE /* GNQ.geojson */, + 88FF5D4E1BC31D94002F15CE /* GRC.geojson */, + 88FF5D4F1BC31D94002F15CE /* GRD.geojson */, + 88FF5D501BC31D94002F15CE /* GRL.geojson */, + 88FF5D511BC31D94002F15CE /* GTM.geojson */, + 88FF5D521BC31D94002F15CE /* GUF.geojson */, + 88FF5D531BC31D94002F15CE /* GUM.geojson */, + 88FF5D541BC31D94002F15CE /* GUY.geojson */, + 88FF5D551BC31D94002F15CE /* HKG.geojson */, + 88FF5D561BC31D94002F15CE /* HMD.geojson */, + 88FF5D571BC31D94002F15CE /* HND.geojson */, + 88FF5D581BC31D94002F15CE /* HRV.geojson */, + 88FF5D591BC31D94002F15CE /* HTI.geojson */, + 88FF5D5A1BC31D94002F15CE /* HUN.geojson */, + 88FF5D5B1BC31D94002F15CE /* IDN.geojson */, + 88FF5D5C1BC31D94002F15CE /* IMN.geojson */, + 88FF5D5D1BC31D94002F15CE /* IND.geojson */, + 88FF5D5E1BC31D94002F15CE /* IOT.geojson */, + 88FF5D5F1BC31D94002F15CE /* IRL.geojson */, + 88FF5D601BC31D94002F15CE /* IRN.geojson */, + 88FF5D611BC31D94002F15CE /* IRQ.geojson */, + 88FF5D621BC31D94002F15CE /* ISL.geojson */, + 88FF5D631BC31D94002F15CE /* ISR.geojson */, + 88FF5D641BC31D94002F15CE /* ITA.geojson */, + 88FF5D651BC31D94002F15CE /* JAM.geojson */, + 88FF5D661BC31D94002F15CE /* JEY.geojson */, + 88FF5D671BC31D94002F15CE /* JOR.geojson */, + 88FF5D681BC31D94002F15CE /* JPN.geojson */, + 88FF5D691BC31D94002F15CE /* KAZ.geojson */, + 88FF5D6A1BC31D94002F15CE /* KEN.geojson */, + 88FF5D6B1BC31D94002F15CE /* KGZ.geojson */, + 88FF5D6C1BC31D94002F15CE /* KHM.geojson */, + 88FF5D6D1BC31D94002F15CE /* KIR.geojson */, + 88FF5D6E1BC31D94002F15CE /* KNA.geojson */, + 88FF5D6F1BC31D94002F15CE /* KOR.geojson */, + 88FF5D701BC31D94002F15CE /* KWT.geojson */, + 88FF5D711BC31D94002F15CE /* LAO.geojson */, + 88FF5D721BC31D94002F15CE /* LBN.geojson */, + 88FF5D731BC31D94002F15CE /* LBR.geojson */, + 88FF5D741BC31D94002F15CE /* LBY.geojson */, + 88FF5D751BC31D94002F15CE /* LCA.geojson */, + 88FF5D761BC31D94002F15CE /* LIE.geojson */, + 88FF5D771BC31D94002F15CE /* LKA.geojson */, + 88FF5D781BC31D94002F15CE /* LSO.geojson */, + 88FF5D791BC31D94002F15CE /* LTU.geojson */, + 88FF5D7A1BC31D94002F15CE /* LUX.geojson */, + 88FF5D7B1BC31D94002F15CE /* LVA.geojson */, + 88FF5D7C1BC31D94002F15CE /* MAC.geojson */, + 88FF5D7D1BC31D94002F15CE /* MAF.geojson */, + 88FF5D7E1BC31D94002F15CE /* MAR.geojson */, + 88FF5D7F1BC31D94002F15CE /* MCO.geojson */, + 88FF5D801BC31D94002F15CE /* MDA.geojson */, + 88FF5D811BC31D94002F15CE /* MDG.geojson */, + 88FF5D821BC31D94002F15CE /* MDV.geojson */, + 88FF5D831BC31D94002F15CE /* MEX.geojson */, + 88FF5D841BC31D94002F15CE /* MHL.geojson */, + 88FF5D851BC31D94002F15CE /* MKD.geojson */, + 88FF5D861BC31D94002F15CE /* MLI.geojson */, + 88FF5D871BC31D94002F15CE /* MLT.geojson */, + 88FF5D881BC31D94002F15CE /* MMR.geojson */, + 88FF5D891BC31D94002F15CE /* MNE.geojson */, + 88FF5D8A1BC31D94002F15CE /* MNG.geojson */, + 88FF5D8B1BC31D94002F15CE /* MNP.geojson */, + 88FF5D8C1BC31D94002F15CE /* MOZ.geojson */, + 88FF5D8D1BC31D94002F15CE /* MRT.geojson */, + 88FF5D8E1BC31D94002F15CE /* MSR.geojson */, + 88FF5D8F1BC31D94002F15CE /* MTQ.geojson */, + 88FF5D901BC31D94002F15CE /* MUS.geojson */, + 88FF5D911BC31D94002F15CE /* MWI.geojson */, + 88FF5D921BC31D94002F15CE /* MYS.geojson */, + 88FF5D931BC31D94002F15CE /* MYT.geojson */, + 88FF5D941BC31D94002F15CE /* NAM.geojson */, + 88FF5D951BC31D94002F15CE /* NCL.geojson */, + 88FF5D961BC31D94002F15CE /* NER.geojson */, + 88FF5D971BC31D94002F15CE /* NFK.geojson */, + 88FF5D981BC31D94002F15CE /* NGA.geojson */, + 88FF5D991BC31D94002F15CE /* NIC.geojson */, + 88FF5D9A1BC31D94002F15CE /* NIU.geojson */, + 88FF5D9B1BC31D94002F15CE /* NLD.geojson */, + 88FF5D9C1BC31D94002F15CE /* NOR.geojson */, + 88FF5D9D1BC31D94002F15CE /* NPL.geojson */, + 88FF5D9E1BC31D94002F15CE /* NRU.geojson */, + 88FF5D9F1BC31D94002F15CE /* NZL.geojson */, + 88FF5DA01BC31D94002F15CE /* OMN.geojson */, + 88FF5DA11BC31D94002F15CE /* PAK.geojson */, + 88FF5DA21BC31D94002F15CE /* PAN.geojson */, + 88FF5DA31BC31D94002F15CE /* PCN.geojson */, + 88FF5DA41BC31D94002F15CE /* PER.geojson */, + 88FF5DA51BC31D94002F15CE /* PHL.geojson */, + 88FF5DA61BC31D94002F15CE /* PLW.geojson */, + 88FF5DA71BC31D94002F15CE /* PNG.geojson */, + 88FF5DA81BC31D94002F15CE /* POL.geojson */, + 88FF5DA91BC31D94002F15CE /* PRI.geojson */, + 88FF5DAA1BC31D94002F15CE /* PRK.geojson */, + 88FF5DAB1BC31D94002F15CE /* PRT.geojson */, + 88FF5DAC1BC31D94002F15CE /* PRY.geojson */, + 88FF5DAD1BC31D94002F15CE /* PSE.geojson */, + 88FF5DAE1BC31D94002F15CE /* PYF.geojson */, + 88FF5DAF1BC31D95002F15CE /* QAT.geojson */, + 88FF5DB01BC31D95002F15CE /* REU.geojson */, + 88FF5DB11BC31D95002F15CE /* ROU.geojson */, + 88FF5DB21BC31D95002F15CE /* RUS.geojson */, + 88FF5DB31BC31D95002F15CE /* RWA.geojson */, + 88FF5DB41BC31D95002F15CE /* SAU.geojson */, + 88FF5DB51BC31D95002F15CE /* SDN.geojson */, + 88FF5DB61BC31D95002F15CE /* SEN.geojson */, + 88FF5DB71BC31D95002F15CE /* SGP.geojson */, + 88FF5DB81BC31D95002F15CE /* SGS.geojson */, + 88FF5DB91BC31D95002F15CE /* SHN.geojson */, + 88FF5DBA1BC31D95002F15CE /* SJM.geojson */, + 88FF5DBB1BC31D95002F15CE /* SLB.geojson */, + 88FF5DBC1BC31D95002F15CE /* SLE.geojson */, + 88FF5DBD1BC31D95002F15CE /* SLV.geojson */, + 88FF5DBE1BC31D95002F15CE /* SMR.geojson */, + 88FF5DBF1BC31D95002F15CE /* SOM.geojson */, + 88FF5DC01BC31D95002F15CE /* SPM.geojson */, + 88FF5DC11BC31D95002F15CE /* SRB.geojson */, + 88FF5DC21BC31D95002F15CE /* SSD.geojson */, + 88FF5DC31BC31D95002F15CE /* STP.geojson */, + 88FF5DC41BC31D95002F15CE /* SUR.geojson */, + 88FF5DC51BC31D95002F15CE /* SVK.geojson */, + 88FF5DC61BC31D95002F15CE /* SVN.geojson */, + 88FF5DC71BC31D95002F15CE /* SWE.geojson */, + 88FF5DC81BC31D95002F15CE /* SWZ.geojson */, + 88FF5DC91BC31D95002F15CE /* SXM.geojson */, + 88FF5DCA1BC31D95002F15CE /* SYC.geojson */, + 88FF5DCB1BC31D95002F15CE /* SYR.geojson */, + 88FF5DCC1BC31D95002F15CE /* TCA.geojson */, + 88FF5DCD1BC31D95002F15CE /* TCD.geojson */, + 88FF5DCE1BC31D95002F15CE /* TGO.geojson */, + 88FF5DCF1BC31D95002F15CE /* THA.geojson */, + 88FF5DD01BC31D95002F15CE /* TJK.geojson */, + 88FF5DD11BC31D95002F15CE /* TKL.geojson */, + 88FF5DD21BC31D95002F15CE /* TKM.geojson */, + 88FF5DD31BC31D95002F15CE /* TLS.geojson */, + 88FF5DD41BC31D95002F15CE /* TON.geojson */, + 88FF5DD51BC31D95002F15CE /* TTO.geojson */, + 88FF5DD61BC31D95002F15CE /* TUN.geojson */, + 88FF5DD71BC31D95002F15CE /* TUR.geojson */, + 88FF5DD81BC31D95002F15CE /* TUV.geojson */, + 88FF5DD91BC31D95002F15CE /* TWN.geojson */, + 88FF5DDA1BC31D95002F15CE /* TZA.geojson */, + 88FF5DDB1BC31D95002F15CE /* UGA.geojson */, + 88FF5DDC1BC31D95002F15CE /* UKR.geojson */, + 88FF5DDD1BC31D95002F15CE /* UMI.geojson */, + 88FF5DDE1BC31D95002F15CE /* URY.geojson */, + 88FF5DDF1BC31D95002F15CE /* USA.geojson */, + 88FF5DE01BC31D95002F15CE /* UZB.geojson */, + 88FF5DE11BC31D95002F15CE /* VAT.geojson */, + 88FF5DE21BC31D95002F15CE /* VCT.geojson */, + 88FF5DE31BC31D95002F15CE /* VEN.geojson */, + 88FF5DE41BC31D95002F15CE /* VGB.geojson */, + 88FF5DE51BC31D95002F15CE /* VIR.geojson */, + 88FF5DE61BC31D95002F15CE /* VNM.geojson */, + 88FF5DE71BC31D95002F15CE /* VUT.geojson */, + 88FF5DE81BC31D95002F15CE /* WLF.geojson */, + 88FF5DE91BC31D95002F15CE /* WSM.geojson */, + 88FF5DEA1BC31D95002F15CE /* YEM.geojson */, + 88FF5DEB1BC31D95002F15CE /* ZAF.geojson */, + 88FF5DEC1BC31D95002F15CE /* ZMB.geojson */, + 88FF5DED1BC31D95002F15CE /* ZWE.geojson */, + ); + name = country_json_50m; + path = ../../../resources/vectors/country_json_50m; + sourceTree = ""; + }; + 88FF5DEE1BC31D95002F15CE /* sf_roads */ = { + isa = PBXGroup; + children = ( + 88FF5DEF1BC31D95002F15CE /* tl_2013_06075_roads.dbf */, + 88FF5DF01BC31D95002F15CE /* tl_2013_06075_roads.mbr */, + 88FF5DF11BC31D95002F15CE /* tl_2013_06075_roads.prj */, + 88FF5DF21BC31D95002F15CE /* tl_2013_06075_roads.shp */, + 88FF5DF31BC31D95002F15CE /* tl_2013_06075_roads.shx */, + 88FF5DF41BC31D95002F15CE /* tl_2013_06075_roads.sqlite */, + ); + name = sf_roads; + path = ../../../resources/vectors/sf_roads; + sourceTree = ""; + }; + 8F4D91D81CDFA7C000F68045 /* Icons */ = { + isa = PBXGroup; + children = ( + 8F4D91DA1CDFA7DE00F68045 /* globe.png */, + 8F4D91DB1CDFA7DE00F68045 /* map.png */, + ); + name = Icons; + sourceTree = ""; + }; + B896A30D27C259475AB0907B /* Pods */ = { + isa = PBXGroup; + children = ( + 1EECB7330E20B0B0F0973EF5 /* Pods-AutoTesterPod.debug.xcconfig */, + 3D6D9431634E599E2DCD9E5E /* Pods-AutoTesterPod.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + E5941DB51E0CEA5700E1C8B3 /* belfast_northern_ireland */ = { + isa = PBXGroup; + children = ( + E53CF5D91E1EAF63000FB5C1 /* belfast_ireland_amenities.geojson */, + E53CF5DD1E1EAF6A000FB5C1 /* amenities.sld */, + E53CF5DF1E1EAF73000FB5C1 /* firehouse.png */, + E53CF5E01E1EAF73000FB5C1 /* fuel.png */, + E53CF5E11E1EAF73000FB5C1 /* library.png */, + E53CF5E21E1EAF73000FB5C1 /* police.png */, + E53CF5E31E1EAF73000FB5C1 /* school.png */, + E5941DC51E0D02A800E1C8B3 /* osm_buildings.sld */, + E5941DC61E0D02A800E1C8B3 /* osm_landuse.sld */, + E5941DC71E0D02A800E1C8B3 /* osm_roads.sld */, + E5941DC81E0D02A800E1C8B3 /* osm_water.sld */, + E5941DC91E0D02A800E1C8B3 /* water_lines.sld */, + E5941DB61E0CEC8600E1C8B3 /* belfast_ireland_buildings.geojson */, + E5941DB71E0CEC8600E1C8B3 /* belfast_ireland_landusages.geojson */, + E5941DB81E0CEC8600E1C8B3 /* belfast_ireland_roads.geojson */, + E5941DB91E0CEC8600E1C8B3 /* belfast_ireland_waterareas.geojson */, + E5941DBA1E0CEC8600E1C8B3 /* belfast_ireland_waterways.geojson */, + E5C82FC71E221C890074DF23 /* cemetery.png */, + E5C82FC81E221C890074DF23 /* commercial.png */, + E5C82FC91E221C890074DF23 /* industrial.png */, + E5C82FCA1E221C890074DF23 /* forest.png */, + E5C82FCB1E221C890074DF23 /* residential.png */, + ); + name = belfast_northern_ireland; + path = ../../../resources/vectors/belfast_ireland; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 88E4B8BE1B83B6AB0050D21B /* AutoTesterPod */ = { + isa = PBXNativeTarget; + buildConfigurationList = 88E4B8DE1B83B6AC0050D21B /* Build configuration list for PBXNativeTarget "AutoTesterPod" */; + buildPhases = ( + 5094E5961184D4972CD670A5 /* [CP] Check Pods Manifest.lock */, + 88E4B8BB1B83B6AB0050D21B /* Sources */, + 88E4B8BC1B83B6AB0050D21B /* Frameworks */, + 88E4B8BD1B83B6AB0050D21B /* Resources */, + 2BB4766C20004764006AAACB /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AutoTesterPod; + productName = HelloEarthSwift; + productReference = 88E4B8BF1B83B6AB0050D21B /* AutoTesterPod.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 88E4B8B71B83B6AB0050D21B /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0710; + LastUpgradeCheck = 1220; + ORGANIZATIONNAME = "mousebird consulting"; + TargetAttributes = { + 88E4B8BE1B83B6AB0050D21B = { + CreatedOnToolsVersion = 6.4; + DevelopmentTeam = BFXSGS6V8N; + LastSwiftMigration = 0930; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 88E4B8BA1B83B6AB0050D21B /* Build configuration list for PBXProject "AutoTesterPod" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 88E4B8B61B83B6AB0050D21B; + productRefGroup = 88E4B8C01B83B6AB0050D21B /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 88E4B8BE1B83B6AB0050D21B /* AutoTesterPod */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 88E4B8BD1B83B6AB0050D21B /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 88FF5E521BC31D95002F15CE /* GUF.geojson in Resources */, + 8F981DB91DE3577C00717DF1 /* ne_10m_roads.prj in Resources */, + 311E0AA32680F597007BE16F /* Airspace_Boundary.xml in Resources */, + 88FF5E211BC31D95002F15CE /* CIV.geojson in Resources */, + 88FF5CCD1BC31D6D002F15CE /* religious-jewish-24@2x.png in Resources */, + 88FF5CDA1BC31D6D002F15CE /* star-stroked-24@2x.png in Resources */, + 88FF5C7F1BC31D6D002F15CE /* lowres_wtb_info.plist in Resources */, + 88FF5E1C1BC31D95002F15CE /* CAN.geojson in Resources */, + 88FF5EDF1BC31D95002F15CE /* USA.geojson in Resources */, + 2B033C0A24F6F75300B55248 /* OpenSans-Bold.ttf in Resources */, + 88FF5C9A1BC31D6D002F15CE /* commercial-24@2x.png in Resources */, + 88FF5E9B1BC31D95002F15CE /* NLD.geojson in Resources */, + 88FF5C851BC31D6D002F15CE /* art-gallery-24@2x.png in Resources */, + 88FF5C831BC31D6D002F15CE /* alcohol-shop-24@2x.png in Resources */, + 88FF5BEB1BC31D53002F15CE /* SunImage.png in Resources */, + 88FF5CBE1BC31D6D002F15CE /* park2-24@2x.png in Resources */, + 88FF5E6A1BC31D95002F15CE /* KEN.geojson in Resources */, + 88FF5E531BC31D95002F15CE /* GUM.geojson in Resources */, + 2B4B30C72395F08D00854073 /* mapbox_satellite-streets-v9.json in Resources */, + 88FF5C871BC31D6D002F15CE /* bank-24@2x.png in Resources */, + 88FF5E381BC31D95002F15CE /* ERI.geojson in Resources */, + 2B4B30C32395F08D00854073 /* maptiler_basic.json in Resources */, + 88FF5CC81BC31D6D002F15CE /* prison-24@2x.png in Resources */, + 88FF5E841BC31D95002F15CE /* MHL.geojson in Resources */, + 2B4B30C62395F08D00854073 /* mapbox_satellite-v9.json in Resources */, + 88FF5C821BC31D6D002F15CE /* airport-24@2x.png in Resources */, + 88FF5C811BC31D6D002F15CE /* airfield-24@2x.png in Resources */, + 88FF5ED01BC31D95002F15CE /* TJK.geojson in Resources */, + 88FF5ED51BC31D95002F15CE /* TTO.geojson in Resources */, + 88FF5E061BC31D95002F15CE /* BDI.geojson in Resources */, + 88FF5EEA1BC31D95002F15CE /* YEM.geojson in Resources */, + 88FF5E111BC31D95002F15CE /* BLR.geojson in Resources */, + 311E0A9F2680F597007BE16F /* Airspace_Boundary.shp in Resources */, + 88FF5ED61BC31D95002F15CE /* TUN.geojson in Resources */, + 2B5E8AF51E943560000B39E5 /* greensquare.png in Resources */, + 88FF5E9C1BC31D95002F15CE /* NOR.geojson in Resources */, + 88FF5CCB1BC31D6D002F15CE /* rail-underground-24@2x.png in Resources */, + 2B033BEA24F6D7BA00B55248 /* Roboto-MediumItalic.ttf in Resources */, + 88FF5CB01BC31D6D002F15CE /* laundry-24@2x.png in Resources */, + 88FF5E141BC31D95002F15CE /* BOL.geojson in Resources */, + 88FF5E461BC31D95002F15CE /* GGY.geojson in Resources */, + 88FF5E5C1BC31D95002F15CE /* IMN.geojson in Resources */, + 88FF5E721BC31D95002F15CE /* LBN.geojson in Resources */, + 88FF5E431BC31D95002F15CE /* GAB.geojson in Resources */, + 88FF5E781BC31D95002F15CE /* LSO.geojson in Resources */, + 8F981DBB1DE3577C00717DF1 /* ne_10m_roads.shp in Resources */, + 88FF5EC21BC31D95002F15CE /* SSD.geojson in Resources */, + 88FF5E6F1BC31D95002F15CE /* KOR.geojson in Resources */, + 2BF29B8C24D2268200553963 /* LegendViewController.storyboard in Resources */, + 88FF5E341BC31D95002F15CE /* DOM.geojson in Resources */, + 2B4BA6D11C83A22000DC1562 /* rightbend.geojson in Resources */, + 88FF5E4D1BC31D95002F15CE /* GNQ.geojson in Resources */, + 88FF5E2F1BC31D95002F15CE /* CZE.geojson in Resources */, + 88FF5CA21BC31D6D002F15CE /* emergency-telephone-24@2x.png in Resources */, + 88FF5EE91BC31D95002F15CE /* WSM.geojson in Resources */, + 88FF5E6D1BC31D95002F15CE /* KIR.geojson in Resources */, + 88FF5DF71BC31D95002F15CE /* AGO.geojson in Resources */, + 88FF5CEE1BC31D6D002F15CE /* cessna.obj in Resources */, + 88FF5E551BC31D95002F15CE /* HKG.geojson in Resources */, + 88FF5C7A1BC31D6D002F15CE /* lowres_wtb_2x1.pvrtc in Resources */, + 88FF5E7A1BC31D95002F15CE /* LUX.geojson in Resources */, + E5941DCB1E0D02A800E1C8B3 /* osm_landuse.sld in Resources */, + 88FF5E4C1BC31D95002F15CE /* GNB.geojson in Resources */, + 88FF5E8D1BC31D95002F15CE /* MRT.geojson in Resources */, + 88FF5C761BC31D6D002F15CE /* lowres_wtb_0x1.pvrtc in Resources */, + 88FF5E421BC31D95002F15CE /* FSM.geojson in Resources */, + E5941DBB1E0CEC8600E1C8B3 /* belfast_ireland_buildings.geojson in Resources */, + 88FF5CBF1BC31D6D002F15CE /* parking-24@2x.png in Resources */, + 88FF5C961BC31D6D002F15CE /* circle-stroked-24@2x.png in Resources */, + 88FF5C7E1BC31D6D002F15CE /* lowres_wtb_4x1.pvrtc in Resources */, + 2B4B30C52395F08D00854073 /* maptiler_hybrid_satellite.json in Resources */, + 2B033BFD24F6DA4600B55248 /* Roboto-Condensed-Light.ttf in Resources */, + 88FF5E7E1BC31D95002F15CE /* MAR.geojson in Resources */, + 2B7E288C200EC109007E2965 /* SE_Basic.json in Resources */, + 311E0AA62680F597007BE16F /* Airspace_Boundary.prj in Resources */, + 88FF5EDD1BC31D95002F15CE /* UMI.geojson in Resources */, + 88FF5E771BC31D95002F15CE /* LKA.geojson in Resources */, + 88FF5E7B1BC31D95002F15CE /* LVA.geojson in Resources */, + 88FF5E1B1BC31D95002F15CE /* CAF.geojson in Resources */, + 88FF5EF21BC31D95002F15CE /* tl_2013_06075_roads.shx in Resources */, + 88FF5EB01BC31D95002F15CE /* REU.geojson in Resources */, + 88FF5EC41BC31D95002F15CE /* SUR.geojson in Resources */, + 2B033BE524F6D7BA00B55248 /* Roboto-BoldItalic.ttf in Resources */, + 88FF5E801BC31D95002F15CE /* MDA.geojson in Resources */, + 88FF5E7F1BC31D95002F15CE /* MCO.geojson in Resources */, + 88FF5CE31BC31D6D002F15CE /* triangle-24@2x.png in Resources */, + 88FF5E471BC31D95002F15CE /* GHA.geojson in Resources */, + E53CF5E51E1EAF73000FB5C1 /* fuel.png in Resources */, + 88FF5E081BC31D95002F15CE /* BEN.geojson in Resources */, + 88FF5DFC1BC31D95002F15CE /* ARE.geojson in Resources */, + 88FF5E4B1BC31D95002F15CE /* GMB.geojson in Resources */, + 88FF5EA21BC31D95002F15CE /* PAN.geojson in Resources */, + 2B033BE724F6D7BA00B55248 /* Roboto-Light.ttf in Resources */, + 88FF5CE71BC31D6D002F15CE /* waste-basket-24@2x.png in Resources */, + 88FF5C791BC31D6D002F15CE /* lowres_wtb_2x0.pvrtc in Resources */, + 88FF5E401BC31D95002F15CE /* FRA.geojson in Resources */, + 88FF5CA31BC31D6D002F15CE /* farm-24@2x.png in Resources */, + 2BD914E8256F1F8A00E724A8 /* Assets.xcassets in Resources */, + 88FF5E8B1BC31D95002F15CE /* MNP.geojson in Resources */, + 88FF5E731BC31D95002F15CE /* LBR.geojson in Resources */, + 2B033BFE24F6DA4600B55248 /* Roboto-Condensed-LightItalic.ttf in Resources */, + 88FF5E6B1BC31D95002F15CE /* KGZ.geojson in Resources */, + 88FF5EEE1BC31D95002F15CE /* tl_2013_06075_roads.dbf in Resources */, + 88FF5E3A1BC31D95002F15CE /* ESP.geojson in Resources */, + 88FF5BEA1BC31D53002F15CE /* Star.png in Resources */, + 88FF5CDC1BC31D6D002F15CE /* swimming-24@2x.png in Resources */, + 88FF5DFD1BC31D95002F15CE /* ARG.geojson in Resources */, + 88FF5ECD1BC31D95002F15CE /* TCD.geojson in Resources */, + 88FF5E351BC31D95002F15CE /* DZA.geojson in Resources */, + 88FF5C8E1BC31D6D002F15CE /* bus-24@2x.png in Resources */, + 88FF5E691BC31D95002F15CE /* KAZ.geojson in Resources */, + 88FF5BE81BC31D53002F15CE /* Smiley_Face_Avatar_by_PixelTwist.png in Resources */, + 88FF5E871BC31D95002F15CE /* MLT.geojson in Resources */, + 88FF5E961BC31D95002F15CE /* NER.geojson in Resources */, + 88FF5EC51BC31D95002F15CE /* SVK.geojson in Resources */, + 88FF5E861BC31D95002F15CE /* MLI.geojson in Resources */, + 88FF5EAB1BC31D95002F15CE /* PRT.geojson in Resources */, + 88FF5EE21BC31D95002F15CE /* VCT.geojson in Resources */, + 88FF5E011BC31D95002F15CE /* ATF.geojson in Resources */, + 2B4BA6D51C83A22000DC1562 /* spiral.geojson in Resources */, + 88FF5EBB1BC31D95002F15CE /* SLB.geojson in Resources */, + 88FF5CD11BC31D6D002F15CE /* rocket-24@2x.png in Resources */, + 88FF5EE61BC31D95002F15CE /* VNM.geojson in Resources */, + 2B033C0D24F6F75300B55248 /* OpenSans-ExtraBoldItalic.ttf in Resources */, + 88FF5E5B1BC31D95002F15CE /* IDN.geojson in Resources */, + 88FF5E121BC31D95002F15CE /* BLZ.geojson in Resources */, + 88FF5E9E1BC31D95002F15CE /* NRU.geojson in Resources */, + 88FF5C9C1BC31D6D002F15CE /* cross-24@2x.png in Resources */, + 88FF5E441BC31D95002F15CE /* GBR.geojson in Resources */, + 88FF5E331BC31D95002F15CE /* DNK.geojson in Resources */, + 88FF5E251BC31D95002F15CE /* COK.geojson in Resources */, + 88FF5EB61BC31D95002F15CE /* SEN.geojson in Resources */, + 88FF5E0B1BC31D95002F15CE /* BGD.geojson in Resources */, + 2B4BA6D41C83A22000DC1562 /* sawtoothbegin.geojson in Resources */, + 88FF5CE01BC31D6D002F15CE /* toilets-24@2x.png in Resources */, + 88FF5C951BC31D6D002F15CE /* circle-24@2x.png in Resources */, + 88FF5C9F1BC31D6D002F15CE /* disability-24@2x.png in Resources */, + 316B5CFC260A5573000B4F15 /* maptiler_test_circles.json in Resources */, + 88FF5EA11BC31D95002F15CE /* PAK.geojson in Resources */, + 88FF5CB11BC31D6D002F15CE /* library-24@2x.png in Resources */, + 88FF5E281BC31D95002F15CE /* CPV.geojson in Resources */, + 88FF5E831BC31D95002F15CE /* MEX.geojson in Resources */, + 88FF5EEC1BC31D95002F15CE /* ZMB.geojson in Resources */, + 88FF5CA61BC31D6D002F15CE /* fire-station-24@2x.png in Resources */, + 8F4D91DC1CDFA7DE00F68045 /* globe.png in Resources */, + 2B4BA6D31C83A22000DC1562 /* sawtooth.geojson in Resources */, + 2B7E288B200EC109007E2965 /* SE_PolygonsLines.json in Resources */, + 88FF5CA01BC31D6D002F15CE /* dog-park-24@2x.png in Resources */, + 88FF5E001BC31D95002F15CE /* ATA.geojson in Resources */, + 88FF5EE51BC31D95002F15CE /* VIR.geojson in Resources */, + 88FF5E5A1BC31D95002F15CE /* HUN.geojson in Resources */, + 88FF5EDE1BC31D95002F15CE /* URY.geojson in Resources */, + 88FF5E491BC31D95002F15CE /* GIN.geojson in Resources */, + 88FF5EA81BC31D95002F15CE /* POL.geojson in Resources */, + 88FF5E651BC31D95002F15CE /* JAM.geojson in Resources */, + 2B033C1124F6F75300B55248 /* OpenSans-Regular.ttf in Resources */, + 88FF5E541BC31D95002F15CE /* GUY.geojson in Resources */, + 88FF5EB71BC31D95002F15CE /* SGP.geojson in Resources */, + 2B7FC0A71E32B67400AF253A /* testJson.json in Resources */, + 88FF5E981BC31D95002F15CE /* NGA.geojson in Resources */, + 88F0951F1ECD041300E7E686 /* AutoTesterJenkins.plist in Resources */, + 88FF5CAF1BC31D6D002F15CE /* land-use-24@2x.png in Resources */, + 88FF5CC61BC31D6D002F15CE /* polling-place-24@2x.png in Resources */, + 88FF5E181BC31D95002F15CE /* BTN.geojson in Resources */, + 88FF5EB31BC31D95002F15CE /* RWA.geojson in Resources */, + 88FF5EAC1BC31D95002F15CE /* PRY.geojson in Resources */, + 88FF5EBF1BC31D95002F15CE /* SOM.geojson in Resources */, + 2B73D6AF207C0D5F00AF5095 /* NotoSans-Regular.ttf in Resources */, + 88FF5EBD1BC31D95002F15CE /* SLV.geojson in Resources */, + 88FF5CC01BC31D6D002F15CE /* parking-garage-24@2x.png in Resources */, + 88FF5EE31BC31D95002F15CE /* VEN.geojson in Resources */, + 88FF5CE21BC31D6D002F15CE /* town-hall-24@2x.png in Resources */, + 2B4BA6D81C83A22000DC1562 /* track.geojson in Resources */, + 88FF5CF21BC31D6D002F15CE /* starcatalog_orig.txt in Resources */, + 2B033BFB24F6DA4600B55248 /* Roboto-Condensed-BoldItalic.ttf in Resources */, + 311E0AA42680F597007BE16F /* ATS_Route.xml in Resources */, + 2B73D6AE207C0D5F00AF5095 /* NotoSans-Bold.ttf in Resources */, + 2BD914BD256F1C8D00E724A8 /* icon_167.png in Resources */, + E53CF5E81E1EAF73000FB5C1 /* school.png in Resources */, + 88FF5ECA1BC31D95002F15CE /* SYC.geojson in Resources */, + 2B4BA6D01C83A22000DC1562 /* mowing-lawn.geojson in Resources */, + 8F981DBC1DE3577C00717DF1 /* ne_10m_roads.shx in Resources */, + 88FF5EE81BC31D95002F15CE /* WLF.geojson in Resources */, + 2B4BA6D21C83A22000DC1562 /* rightv.geojson in Resources */, + 88FF5EB51BC31D95002F15CE /* SDN.geojson in Resources */, + 88FF5C931BC31D6D002F15CE /* cemetery-24@2x.png in Resources */, + 88FF5E041BC31D95002F15CE /* AUT.geojson in Resources */, + 88FF5CA51BC31D6D002F15CE /* ferry-24@2x.png in Resources */, + 88FF5CC41BC31D6D002F15CE /* playground-24@2x.png in Resources */, + 88FF5E0A1BC31D95002F15CE /* BFA.geojson in Resources */, + 2B033BFF24F6DA4600B55248 /* Roboto-Condensed-Regular.ttf in Resources */, + 88FF5E5D1BC31D95002F15CE /* IND.geojson in Resources */, + 88FF5DFF1BC31D95002F15CE /* ASM.geojson in Resources */, + 2B033BE924F6D7BA00B55248 /* Roboto-Medium.ttf in Resources */, + 88FF5E3C1BC31D95002F15CE /* ETH.geojson in Resources */, + 88FF5E291BC31D95002F15CE /* CRI.geojson in Resources */, + 88FF5E631BC31D95002F15CE /* ISR.geojson in Resources */, + 88FF5EEF1BC31D95002F15CE /* tl_2013_06075_roads.mbr in Resources */, + 88FF5CA11BC31D6D002F15CE /* embassy-24@2x.png in Resources */, + 2BC0FB7A1DCAA574004125F1 /* dots.png in Resources */, + 2B033BE424F6D7BA00B55248 /* Roboto-Bold.ttf in Resources */, + 88FF5E621BC31D95002F15CE /* ISL.geojson in Resources */, + 311E0AA12680F597007BE16F /* ATS_Route.prj in Resources */, + 88FF5E391BC31D95002F15CE /* ESH.geojson in Resources */, + 88FF5CCE1BC31D6D002F15CE /* religious-muslim-24@2x.png in Resources */, + 88E4B8CA1B83B6AB0050D21B /* Main.storyboard in Resources */, + 88FF5EC71BC31D95002F15CE /* SWE.geojson in Resources */, + 88FF5CD91BC31D6D002F15CE /* star-24@2x.png in Resources */, + 88FF5E5E1BC31D95002F15CE /* IOT.geojson in Resources */, + 88FF5C841BC31D6D002F15CE /* america-football-24@2x.png in Resources */, + 88FF5E891BC31D95002F15CE /* MNE.geojson in Resources */, + 88FF5E201BC31D95002F15CE /* CHN.geojson in Resources */, + 88FF5C8F1BC31D6D002F15CE /* cafe-24@2x.png in Resources */, + 88FF5E131BC31D95002F15CE /* BMU.geojson in Resources */, + 88FF5CE51BC31D6D002F15CE /* village-24@2x.png in Resources */, + 88FF5BE71BC31D53002F15CE /* map_pin.png in Resources */, + 88FF5E1E1BC31D95002F15CE /* CHE.geojson in Resources */, + 2B033BEB24F6D7BA00B55248 /* Roboto-Regular.ttf in Resources */, + 88FF5E451BC31D95002F15CE /* GEO.geojson in Resources */, + 2B4B30C12395F08D00854073 /* maptiler_streets.json in Resources */, + 88FF5E571BC31D95002F15CE /* HND.geojson in Resources */, + 88FF5C941BC31D6D002F15CE /* cinema-24@2x.png in Resources */, + 88FF5E411BC31D95002F15CE /* FRO.geojson in Resources */, + 88FF5CF31BC31D6D002F15CE /* starcatalog_short.txt in Resources */, + 88FF5E3F1BC31D95002F15CE /* FLK.geojson in Resources */, + E5941DBD1E0CEC8600E1C8B3 /* belfast_ireland_roads.geojson in Resources */, + 88FF5EBA1BC31D95002F15CE /* SJM.geojson in Resources */, + 88FF5CF01BC31D6D002F15CE /* moon.png in Resources */, + 88FF5E361BC31D95002F15CE /* ECU.geojson in Resources */, + 88E4B8CF1B83B6AB0050D21B /* LaunchScreen.xib in Resources */, + 88FF5ED31BC31D95002F15CE /* TLS.geojson in Resources */, + 88FF5E821BC31D95002F15CE /* MDV.geojson in Resources */, + 88FF5E021BC31D95002F15CE /* ATG.geojson in Resources */, + 88FF5E561BC31D95002F15CE /* HMD.geojson in Resources */, + 88FF5DFA1BC31D95002F15CE /* ALB.geojson in Resources */, + 88FF5E3E1BC31D95002F15CE /* FJI.geojson in Resources */, + E53CF5E71E1EAF73000FB5C1 /* police.png in Resources */, + E53CF5E61E1EAF73000FB5C1 /* library.png in Resources */, + 2B6953681C7E67DD007FC51E /* colorramp.png in Resources */, + 88FF5E2E1BC31D95002F15CE /* CYP.geojson in Resources */, + 88FF5EED1BC31D95002F15CE /* ZWE.geojson in Resources */, + 88FF5E941BC31D95002F15CE /* NAM.geojson in Resources */, + 88FF5EC91BC31D95002F15CE /* SXM.geojson in Resources */, + 88FF5EAA1BC31D95002F15CE /* PRK.geojson in Resources */, + 88FF5E151BC31D95002F15CE /* BRA.geojson in Resources */, + 88FF5CB61BC31D6D002F15CE /* marker-24@2x.png in Resources */, + 88FF5CC31BC31D6D002F15CE /* place-of-worship-24@2x.png in Resources */, + 88FF5E3D1BC31D95002F15CE /* FIN.geojson in Resources */, + 88FF5CB91BC31D6D002F15CE /* monument-24@2x.png in Resources */, + 2B033BED24F6D7BA00B55248 /* Roboto-ThinItalic.ttf in Resources */, + 88FF5CEF1BC31D6D002F15CE /* cessna.png in Resources */, + 88FF5C8A1BC31D6D002F15CE /* basketball-24@2x.png in Resources */, + 88FF5ED41BC31D95002F15CE /* TON.geojson in Resources */, + E5941DBC1E0CEC8600E1C8B3 /* belfast_ireland_landusages.geojson in Resources */, + 88FF5CA71BC31D6D002F15CE /* fuel-24@2x.png in Resources */, + 88FF5ED11BC31D95002F15CE /* TKL.geojson in Resources */, + 8F981DB81DE3577C00717DF1 /* ne_10m_roads.dbf in Resources */, + 88FF5DF81BC31D95002F15CE /* AIA.geojson in Resources */, + E53CF5DA1E1EAF63000FB5C1 /* belfast_ireland_amenities.geojson in Resources */, + 88FF5E761BC31D95002F15CE /* LIE.geojson in Resources */, + 88FF5C9B1BC31D6D002F15CE /* cricket-24@2x.png in Resources */, + 2B033BE324F6D7BA00B55248 /* Roboto-BlackItalic.ttf in Resources */, + 88FF5CAA1BC31D6D002F15CE /* grocery-24@2x.png in Resources */, + 88FF5CC71BC31D6D002F15CE /* post-24@2x.png in Resources */, + 88FF5E931BC31D95002F15CE /* MYT.geojson in Resources */, + 88FF5EE41BC31D95002F15CE /* VGB.geojson in Resources */, + 88FF5EC01BC31D95002F15CE /* SPM.geojson in Resources */, + 88FF5E241BC31D95002F15CE /* COG.geojson in Resources */, + 2B1C26531C91037100C71B0A /* France.mbtiles in Resources */, + 88FF5E911BC31D95002F15CE /* MWI.geojson in Resources */, + 88FF5CDE1BC31D6D002F15CE /* tennis-24@2x.png in Resources */, + 311E0AA22680F597007BE16F /* ATS_Route.shx in Resources */, + 88FF5C981BC31D6D002F15CE /* clothing-store-24@2x.png in Resources */, + 88FF5CA91BC31D6D002F15CE /* golf-24@2x.png in Resources */, + 2B033C0E24F6F75300B55248 /* OpenSans-Italic.ttf in Resources */, + 88FF5ECF1BC31D95002F15CE /* THA.geojson in Resources */, + 88FF5E701BC31D95002F15CE /* KWT.geojson in Resources */, + 88FF5E271BC31D95002F15CE /* COM.geojson in Resources */, + 2B4BA6CE1C83A22000DC1562 /* leftbend.geojson in Resources */, + 88FF5EDC1BC31D95002F15CE /* UKR.geojson in Resources */, + E5C82FCF1E221C890074DF23 /* forest.png in Resources */, + 88FF5EA91BC31D95002F15CE /* PRI.geojson in Resources */, + 88FF5EAD1BC31D95002F15CE /* PSE.geojson in Resources */, + 88FF5EEB1BC31D95002F15CE /* ZAF.geojson in Resources */, + 88FF5EE11BC31D95002F15CE /* VAT.geojson in Resources */, + 88FF5C751BC31D6D002F15CE /* lowres_wtb_0x0.pvrtc in Resources */, + 2B4BA6D71C83A22000DC1562 /* straight.geojson in Resources */, + 88FF5E031BC31D95002F15CE /* AUS.geojson in Resources */, + 88FF5E0D1BC31D95002F15CE /* BHR.geojson in Resources */, + 88FF5CAC1BC31D6D002F15CE /* heliport-24@2x.png in Resources */, + 88FF5E0F1BC31D95002F15CE /* BIH.geojson in Resources */, + 88FF5C991BC31D6D002F15CE /* college-24@2x.png in Resources */, + 88FF5CE41BC31D6D002F15CE /* triangle-stroked-24@2x.png in Resources */, + 88FF5EB91BC31D95002F15CE /* SHN.geojson in Resources */, + 88FF5E971BC31D95002F15CE /* NFK.geojson in Resources */, + 88FF5C9E1BC31D6D002F15CE /* danger-24@2x.png in Resources */, + 311E0A9D2680F597007BE16F /* Airspace_Boundary.dbf in Resources */, + 2B8849FB1E37F9B30027C397 /* stadium-utm-quad-data.sqlite in Resources */, + 2B29944F243BA31900677DE4 /* cube.obj in Resources */, + 88FF5C971BC31D6D002F15CE /* city-24@2x.png in Resources */, + E5C82FCE1E221C890074DF23 /* industrial.png in Resources */, + 88FF5CB81BC31D6D002F15CE /* minefield-24@2x.png in Resources */, + 88FF5E6E1BC31D95002F15CE /* KNA.geojson in Resources */, + 88FF5C801BC31D6D002F15CE /* world_web_mercator.sqlite in Resources */, + 88FF5EDA1BC31D95002F15CE /* TZA.geojson in Resources */, + 88FF5EBC1BC31D95002F15CE /* SLE.geojson in Resources */, + E5C82FD01E221C890074DF23 /* residential.png in Resources */, + 2B4B30C22395F08D00854073 /* maptiler_topo.json in Resources */, + 88FF5E811BC31D95002F15CE /* MDG.geojson in Resources */, + 88FF5E371BC31D95002F15CE /* EGY.geojson in Resources */, + 88FF5E9F1BC31D95002F15CE /* NZL.geojson in Resources */, + 88FF5E8F1BC31D95002F15CE /* MTQ.geojson in Resources */, + 88FF5E591BC31D95002F15CE /* HTI.geojson in Resources */, + 88FF5E311BC31D95002F15CE /* DJI.geojson in Resources */, + 88FF5E261BC31D95002F15CE /* COL.geojson in Resources */, + 88FF5CD31BC31D6D002F15CE /* shop-24@2x.png in Resources */, + 88FF5CCC1BC31D6D002F15CE /* religious-christian-24@2x.png in Resources */, + 88FF5E4F1BC31D95002F15CE /* GRD.geojson in Resources */, + 88FF5E101BC31D95002F15CE /* BLM.geojson in Resources */, + 88FF5C911BC31D6D002F15CE /* campsite-24@2x.png in Resources */, + 88FF5EA51BC31D95002F15CE /* PHL.geojson in Resources */, + 88FF5E7C1BC31D95002F15CE /* MAC.geojson in Resources */, + 88FF5CE81BC31D6D002F15CE /* water-24@2x.png in Resources */, + 2B033C0C24F6F75300B55248 /* OpenSans-ExtraBold.ttf in Resources */, + 2B4B30C42395F08D00854073 /* default.sld in Resources */, + 88FF5E4A1BC31D95002F15CE /* GLP.geojson in Resources */, + 88FF5E611BC31D95002F15CE /* IRQ.geojson in Resources */, + 88FF5E7D1BC31D95002F15CE /* MAF.geojson in Resources */, + 2B033BE224F6D7BA00B55248 /* Roboto-Black.ttf in Resources */, + 2B033C1024F6F75300B55248 /* OpenSans-LightItalic.ttf in Resources */, + 88FF5CD71BC31D6D002F15CE /* square-24@2x.png in Resources */, + 88FF5E9A1BC31D95002F15CE /* NIU.geojson in Resources */, + 88FF5E0E1BC31D95002F15CE /* BHS.geojson in Resources */, + 88FF5CBA1BC31D6D002F15CE /* museum-24@2x.png in Resources */, + 88FF5CDB1BC31D6D002F15CE /* suitcase-24@2x.png in Resources */, + 2B033C0F24F6F75300B55248 /* OpenSans-Light.ttf in Resources */, + 88FF5DF91BC31D95002F15CE /* ALA.geojson in Resources */, + 2B033C1324F6F75300B55248 /* OpenSans-SemiBoldItalic.ttf in Resources */, + E5C82FCD1E221C890074DF23 /* commercial.png in Resources */, + 88FF5E191BC31D95002F15CE /* BVT.geojson in Resources */, + 88FF5E711BC31D95002F15CE /* LAO.geojson in Resources */, + E5941DCE1E0D02A800E1C8B3 /* water_lines.sld in Resources */, + 8F4D91DD1CDFA7DE00F68045 /* map.png in Resources */, + 311E0A9C2680F597007BE16F /* ATS_Route.shp in Resources */, + 88FF5E2B1BC31D95002F15CE /* CUW.geojson in Resources */, + 2B033C1224F6F75300B55248 /* OpenSans-SemiBold.ttf in Resources */, + 88FF5E511BC31D95002F15CE /* GTM.geojson in Resources */, + 88FF5CAB1BC31D6D002F15CE /* harbor-24@2x.png in Resources */, + 88FF5CBD1BC31D6D002F15CE /* park-24@2x.png in Resources */, + 88FF5E991BC31D95002F15CE /* NIC.geojson in Resources */, + 88FF5C741BC31D6D002F15CE /* geography-class_medres.mbtiles in Resources */, + 88FF5EAE1BC31D95002F15CE /* PYF.geojson in Resources */, + 88FF5E881BC31D95002F15CE /* MMR.geojson in Resources */, + 88FF5E301BC31D95002F15CE /* DEU.geojson in Resources */, + 88FF5CA41BC31D6D002F15CE /* fast-food-24@2x.png in Resources */, + 88FF5E8A1BC31D95002F15CE /* MNG.geojson in Resources */, + 88FF5EE01BC31D95002F15CE /* UZB.geojson in Resources */, + 2B4BA6D61C83A22000DC1562 /* square.geojson in Resources */, + 88FF5E581BC31D95002F15CE /* HRV.geojson in Resources */, + 88FF5C8D1BC31D6D002F15CE /* building-24@2x.png in Resources */, + 88FF5C781BC31D6D002F15CE /* lowres_wtb_1x1.pvrtc in Resources */, + 88FF5E501BC31D95002F15CE /* GRL.geojson in Resources */, + 88FF5DF61BC31D95002F15CE /* AFG.geojson in Resources */, + 88FF5E8E1BC31D95002F15CE /* MSR.geojson in Resources */, + 88FF5CBC1BC31D6D002F15CE /* oil-well-24@2x.png in Resources */, + 88FF5E8C1BC31D95002F15CE /* MOZ.geojson in Resources */, + 88FF5E2A1BC31D95002F15CE /* CUB.geojson in Resources */, + 88FF5EB41BC31D95002F15CE /* SAU.geojson in Resources */, + 88FF5E901BC31D95002F15CE /* MUS.geojson in Resources */, + 88FF5E1D1BC31D95002F15CE /* CCK.geojson in Resources */, + 2B033BFC24F6DA4600B55248 /* Roboto-Condensed-Italic.ttf in Resources */, + 311E0A9E2680F597007BE16F /* Airspace_Boundary.shx in Resources */, + 88FF5EBE1BC31D95002F15CE /* SMR.geojson in Resources */, + 88FF5CD81BC31D6D002F15CE /* square-stroked-24@2x.png in Resources */, + 88FF5DFB1BC31D95002F15CE /* AND.geojson in Resources */, + 88FF5ECE1BC31D95002F15CE /* TGO.geojson in Resources */, + 88FF5CC91BC31D6D002F15CE /* rail-24@2x.png in Resources */, + 88FF5CE61BC31D6D002F15CE /* warehouse-24@2x.png in Resources */, + 88FF5CB71BC31D6D002F15CE /* marker-stroked-24@2x.png in Resources */, + 88FF5C8C1BC31D6D002F15CE /* bicycle-24@2x.png in Resources */, + 88FF5CD01BC31D6D002F15CE /* roadblock-24@2x.png in Resources */, + 88FF5CCF1BC31D6D002F15CE /* restaurant-24@2x.png in Resources */, + 88FF5E671BC31D95002F15CE /* JOR.geojson in Resources */, + 316B5CF3260526AD000B4F15 /* maptiler_expr_test.json in Resources */, + 88FF5CBB1BC31D6D002F15CE /* music-24@2x.png in Resources */, + 88FF5CAD1BC31D6D002F15CE /* hospital-24@2x.png in Resources */, + 88FF5C921BC31D6D002F15CE /* car-24@2x.png in Resources */, + 88FF5E1F1BC31D95002F15CE /* CHL.geojson in Resources */, + 88FF5E741BC31D95002F15CE /* LBY.geojson in Resources */, + 88FF5CB21BC31D6D002F15CE /* lighthouse-24@2x.png in Resources */, + E5C82FCC1E221C890074DF23 /* cemetery.png in Resources */, + 88FF5E221BC31D95002F15CE /* CMR.geojson in Resources */, + 88FF5CDD1BC31D6D002F15CE /* telephone-24@2x.png in Resources */, + 88FF5E231BC31D95002F15CE /* COD.geojson in Resources */, + 311E0AA02680F597007BE16F /* ATS_Route.cpg in Resources */, + D84AA5971C1A26C100413B76 /* OSTN02_NTv2.gsb in Resources */, + 88FF5CC11BC31D6D002F15CE /* pharmacy-24@2x.png in Resources */, + E5941DBF1E0CEC8600E1C8B3 /* belfast_ireland_waterways.geojson in Resources */, + 88FF5EA31BC31D95002F15CE /* PCN.geojson in Resources */, + 88FF5ED21BC31D95002F15CE /* TKM.geojson in Resources */, + 88FF5E321BC31D95002F15CE /* DMA.geojson in Resources */, + 88FF5E951BC31D95002F15CE /* NCL.geojson in Resources */, + 88FF5C891BC31D6D002F15CE /* baseball-24@2x.png in Resources */, + 88FF5EA61BC31D95002F15CE /* PLW.geojson in Resources */, + E53CF5E41E1EAF73000FB5C1 /* firehouse.png in Resources */, + 88FF5BE91BC31D53002F15CE /* star_background.png in Resources */, + 88FF5E6C1BC31D95002F15CE /* KHM.geojson in Resources */, + 88FF5C7D1BC31D6D002F15CE /* lowres_wtb_4x0.pvrtc in Resources */, + 88FF5EC81BC31D95002F15CE /* SWZ.geojson in Resources */, + 88FF5EF01BC31D95002F15CE /* tl_2013_06075_roads.prj in Resources */, + 88FF5ED91BC31D95002F15CE /* TWN.geojson in Resources */, + 88FF5CEA1BC31D6D002F15CE /* zoo-24@2x.png in Resources */, + 88FF5E661BC31D95002F15CE /* JEY.geojson in Resources */, + 88FF5EA01BC31D95002F15CE /* OMN.geojson in Resources */, + 2B033BE624F6D7BA00B55248 /* Roboto-Italic.ttf in Resources */, + 88FF5E071BC31D95002F15CE /* BEL.geojson in Resources */, + 88FF5EA41BC31D95002F15CE /* PER.geojson in Resources */, + 88FF5E791BC31D95002F15CE /* LTU.geojson in Resources */, + 88FF5CD41BC31D6D002F15CE /* skiing-24@2x.png in Resources */, + 88FF5EB21BC31D95002F15CE /* RUS.geojson in Resources */, + 88FF5EF31BC31D95002F15CE /* tl_2013_06075_roads.sqlite in Resources */, + 88FF5EB11BC31D95002F15CE /* ROU.geojson in Resources */, + 88FF5C8B1BC31D6D002F15CE /* beer-24@2x.png in Resources */, + 88FF5E641BC31D95002F15CE /* ITA.geojson in Resources */, + 88FF5E481BC31D95002F15CE /* GIB.geojson in Resources */, + 88FF5E4E1BC31D95002F15CE /* GRC.geojson in Resources */, + 88FF5CD51BC31D6D002F15CE /* slaughterhouse-24@2x.png in Resources */, + 88FF5EC11BC31D95002F15CE /* SRB.geojson in Resources */, + 88FF5E851BC31D95002F15CE /* MKD.geojson in Resources */, + 88FF5C771BC31D6D002F15CE /* lowres_wtb_1x0.pvrtc in Resources */, + 88FF5E2C1BC31D95002F15CE /* CXR.geojson in Resources */, + 88FF5ED81BC31D95002F15CE /* TUV.geojson in Resources */, + 88FF5CE11BC31D6D002F15CE /* town-24@2x.png in Resources */, + 88FF5C7B1BC31D6D002F15CE /* lowres_wtb_3x0.pvrtc in Resources */, + 88FF5EC61BC31D95002F15CE /* SVN.geojson in Resources */, + 2B033BEC24F6D7BA00B55248 /* Roboto-Thin.ttf in Resources */, + 88FF5EDB1BC31D95002F15CE /* UGA.geojson in Resources */, + 88FF5E2D1BC31D95002F15CE /* CYM.geojson in Resources */, + 2BD914BE256F1C8D00E724A8 /* icon_152.png in Resources */, + 88FF5E3B1BC31D95002F15CE /* EST.geojson in Resources */, + 88FF5CAE1BC31D6D002F15CE /* industrial-24@2x.png in Resources */, + 88FF5CF11BC31D6D002F15CE /* vp.mtl in Resources */, + 88FF5E1A1BC31D95002F15CE /* BWA.geojson in Resources */, + 88FF5CE91BC31D6D002F15CE /* wetland-24@2x.png in Resources */, + 88FF5C9D1BC31D6D002F15CE /* dam-24@2x.png in Resources */, + 88FF5E091BC31D95002F15CE /* BES.geojson in Resources */, + 88FF5CB51BC31D6D002F15CE /* london-underground-24@2x.png in Resources */, + 88FF5CCA1BC31D6D002F15CE /* rail-above-24@2x.png in Resources */, + 88FF5DFE1BC31D95002F15CE /* ARM.geojson in Resources */, + 88FF5C901BC31D6D002F15CE /* camera-24@2x.png in Resources */, + 88FF5CD61BC31D6D002F15CE /* soccer-24@2x.png in Resources */, + 88FF5DF51BC31D95002F15CE /* ABW.geojson in Resources */, + 88FF5C861BC31D6D002F15CE /* bakery-24@2x.png in Resources */, + E5941DBE1E0CEC8600E1C8B3 /* belfast_ireland_waterareas.geojson in Resources */, + 88FF5E161BC31D95002F15CE /* BRB.geojson in Resources */, + 2B033BFA24F6DA4600B55248 /* Roboto-Condensed-Bold.ttf in Resources */, + 2B033C0B24F6F75300B55248 /* OpenSans-BoldItalic.ttf in Resources */, + 88FF5C881BC31D6D002F15CE /* bar-24@2x.png in Resources */, + 311E0AA72680F597007BE16F /* ATS_Route.dbf in Resources */, + E53CF5DE1E1EAF6A000FB5C1 /* amenities.sld in Resources */, + 311E0AA52680F597007BE16F /* Airspace_Boundary.cpg in Resources */, + 88FF5ECB1BC31D95002F15CE /* SYR.geojson in Resources */, + 88FF5EA71BC31D95002F15CE /* PNG.geojson in Resources */, + 88FF5E681BC31D95002F15CE /* JPN.geojson in Resources */, + 88FF5E751BC31D95002F15CE /* LCA.geojson in Resources */, + 88FF5EF11BC31D95002F15CE /* tl_2013_06075_roads.shp in Resources */, + 88FF5CDF1BC31D6D002F15CE /* theatre-24@2x.png in Resources */, + 88FF5CC21BC31D6D002F15CE /* pitch-24@2x.png in Resources */, + 2B4BA6D91C83A22000DC1562 /* uturn.geojson in Resources */, + 88FF5E5F1BC31D95002F15CE /* IRL.geojson in Resources */, + 2B033BE824F6D7BA00B55248 /* Roboto-LightItalic.ttf in Resources */, + 88FF5ECC1BC31D95002F15CE /* TCA.geojson in Resources */, + 88FF5E051BC31D95002F15CE /* AZE.geojson in Resources */, + 88FF5EC31BC31D95002F15CE /* STP.geojson in Resources */, + 88FF5E0C1BC31D95002F15CE /* BGR.geojson in Resources */, + 88FF5ED71BC31D95002F15CE /* TUR.geojson in Resources */, + 88FF5E921BC31D95002F15CE /* MYS.geojson in Resources */, + E5941DCC1E0D02A800E1C8B3 /* osm_roads.sld in Resources */, + 88FF5EE71BC31D95002F15CE /* VUT.geojson in Resources */, + E5941DCD1E0D02A800E1C8B3 /* osm_water.sld in Resources */, + E5941DCA1E0D02A800E1C8B3 /* osm_buildings.sld in Resources */, + 88FF5CB31BC31D6D002F15CE /* lodging-24@2x.png in Resources */, + 88FF5CC51BC31D6D002F15CE /* police-24@2x.png in Resources */, + 88FF5CD21BC31D6D002F15CE /* school-24@2x.png in Resources */, + 88FF5EAF1BC31D95002F15CE /* QAT.geojson in Resources */, + 88FF5CB41BC31D6D002F15CE /* logging-24@2x.png in Resources */, + 88FF5E171BC31D95002F15CE /* BRN.geojson in Resources */, + 2B4BA6CF1C83A22000DC1562 /* leftv.geojson in Resources */, + 88FF5E601BC31D95002F15CE /* IRN.geojson in Resources */, + 88FF5CA81BC31D6D002F15CE /* garden-24@2x.png in Resources */, + 88FF5E9D1BC31D95002F15CE /* NPL.geojson in Resources */, + 88FF5C7C1BC31D6D002F15CE /* lowres_wtb_3x1.pvrtc in Resources */, + 88FF5EB81BC31D95002F15CE /* SGS.geojson in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 5094E5961184D4972CD670A5 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-AutoTesterPod-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 88E4B8BB1B83B6AB0050D21B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 311C6A0527B1AC7F0016BC7E /* wkDefaultShaders.metal in Sources */, + 2B1E85A622B44D5800AB7208 /* BillboardTestCase.swift in Sources */, + 2BA827CD225EBDBF00324594 /* GeoJSONStyleTestCase.swift in Sources */, + E5679F481CB72DE800369A15 /* LabelAnimationTestCase.m in Sources */, + 2BDEB3021C924842003259B3 /* ExtrudedModelTestCase.m in Sources */, + D8228A921BE77816001D6914 /* MovingScreenLabelsTestCase.swift in Sources */, + 2BF29B8F24D226B000553963 /* LegendViewController.swift in Sources */, + D8200CA41BE9624300B22CF5 /* LoftedPolysTestCase.m in Sources */, + 2B29944D243BA16000677DE4 /* SimpleStyleTestCase.swift in Sources */, + 313FED0727027D6800FCD14C /* ShapesTestCase.mm in Sources */, + 2B73D6B4207C106C00AF5095 /* GlobeSamplerTestCase.swift in Sources */, + 2BC41C8521F00AA9002926B7 /* BNGTestCase.swift in Sources */, + 311E0ABA268F7A09007BE16F /* ParticleTest.mm in Sources */, + 31041A3E27A4AE76004B25E1 /* ActiveObjectTestCase.swift in Sources */, + 88BF11491BCD3DA40002205E /* MaplyTestCase.m in Sources */, + D8341A731BE2DFE100411A46 /* ScreenLabelsTestCase.swift in Sources */, + E5D2D6751DEDEABF00E02305 /* AnimationDelegateTestCase.swift in Sources */, + D8E12ECD1BDE9FD500BB7BC7 /* AnimatedBasemapTestCase.swift in Sources */, + 2BD358F31DD3EA0400081EA8 /* AnimatedMarkersTestCase.swift in Sources */, + 316B5CFE260A58A8000B4F15 /* MapTilerCircleTestCase.swift in Sources */, + 2B4B30AE2395E0DE00854073 /* MapTilerTestCase.swift in Sources */, + 2B7787CA21CDA47F006ABF5D /* CartoDBLightTestCase.swift in Sources */, + 2B4B30AD2395E0DE00854073 /* LayerStartupShutdownTestCase.swift in Sources */, + E5679F4A1CB72DE800369A15 /* FindHeightTestCase.m in Sources */, + 2B158BEF1D5D19E900103E04 /* VectorHoleTestCase.m in Sources */, + D8200C911BE92B2F00B22CF5 /* WideVectorsTestCase.mm in Sources */, + 2B446AAE21EFE29B0078A975 /* WMSTestCase.m in Sources */, + 2BFC7E511D132DCB0040E2A3 /* ScreenMarkersTestCase.m in Sources */, + 2BC41C8321F00AA6002926B7 /* BNGCustomMapTestCase.swift in Sources */, + D8200CA11BE9563F00B22CF5 /* StickersTestCase.swift in Sources */, + 2BC3D6F3220B901000CE91D0 /* AppDelegate.swift in Sources */, + 2BC3D6F2220B900D00CE91D0 /* TestCell.swift in Sources */, + 311E0AAC26865D2C007BE16F /* ESRIRemoteTestCase.swift in Sources */, + 31833793259E5291005FEF70 /* ChangeVectorsTestCase.mm in Sources */, + 2BB8A40021ED46E10025DA98 /* StamenWatercolorRemote.swift in Sources */, + 311E0AB9268F79CC007BE16F /* ParticleTestCase.swift in Sources */, + 2B392B711C5AC59D001EE40B /* RunwayBuilderTestCase.m in Sources */, + 2B68A43C225D06A8009CC720 /* ImageReloadTestCase.swift in Sources */, + D8F2FE2E1BE7CF310058A310 /* ModelsTestCase.swift in Sources */, + 2B81009C221F4EA900CFF779 /* CartoDBInterpreter.m in Sources */, + 2B29944B243BA08D00677DE4 /* MapboxKindaMap.swift in Sources */, + D8228AA81BE786BE001D6914 /* ClusteredMarkersTestCase.swift in Sources */, + 2B4B63AE23611D690008C8C1 /* OfflineRenderTestCase.swift in Sources */, + 2BC2DCCD1D1F4CE20088D350 /* ShapefileTestCase.m in Sources */, + D8F2FE271BE7BD630058A310 /* LabelsTestCase.m in Sources */, + 313C521625D329070036C22E /* MovingScreenMarkersTestCase.swift in Sources */, + E5D2D65F1DE65CE400E02305 /* LocationTrackingSimTestCase.swift in Sources */, + E5CC4E201DF7CBEA00C0D4DE /* LocationTrackingRealTestCase.swift in Sources */, + 2BBCE41C2220A4170013E158 /* PagingLayerTestCase.m in Sources */, + 2B4B30AB2395E0DE00854073 /* StartupShutdownTestCase.swift in Sources */, + D8F2FE2C1BE7CAD30058A310 /* MegaMarkersTestCase.m in Sources */, + 31D328AD26387E7900456B93 /* GreatCircleTestCase.swift in Sources */, + 2B4B30AA2395E0DE00854073 /* MapboxTestCase.swift in Sources */, + D8341A711BE2C8D200411A46 /* VectorsTestCase.mm in Sources */, + 311E0AB7268E87E3007BE16F /* LIDARTestCase.mm in Sources */, + 2B753DE221EEB7F900DE98BA /* StarsSunTestCase.swift in Sources */, + 2B81009D221F4EA900CFF779 /* CartoDBTestCase.m in Sources */, + 2BC3D6F0220B900A00CE91D0 /* StartupViewController.swift in Sources */, + 2B4B30AC2395E0DE00854073 /* GlyphProblemTestCase.m in Sources */, + 2BBB70831D5E9079009B67A6 /* VectorStyleTestCase.m in Sources */, + 2B60F4462452706200CF9339 /* VectorMBTilesTestCase.swift in Sources */, + 8820852B1DC81051008F8E76 /* Issue721TestCase.swift in Sources */, + 31D3287C262FADF100456B93 /* TestTileImageFetcher.swift in Sources */, + 2B753DDB21EEB41700DE98BA /* NASAGIBSTestCase.swift in Sources */, + 2BC0FB781DCAA18A004125F1 /* TextureVectorTestCase.m in Sources */, + 2B6611E625D1C35D009D228F /* AirwayTestCase.swift in Sources */, + 2B249F3F23F4A82600CFA3D0 /* GeographyClass.swift in Sources */, + 3183380F25A67CD8005FEF70 /* RepresentationsTestCase.mm in Sources */, + D8F2FE291BE7C2000058A310 /* MarkersTestCase.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 88E4B8C81B83B6AB0050D21B /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 88E4B8C91B83B6AB0050D21B /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 88E4B8CD1B83B6AB0050D21B /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 88E4B8CE1B83B6AB0050D21B /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 88E4B8DC1B83B6AC0050D21B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "SWIFT_BRIDGE=AutoTesterPod-Swift.h", + "DEBUG=1", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + }; + name = Debug; + }; + 88E4B8DD1B83B6AC0050D21B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "SWIFT_BRIDGE=AutoTesterPod-Swift.h", + "NDEBUG=1", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 88E4B8DF1B83B6AC0050D21B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1EECB7330E20B0B0F0973EF5 /* Pods-AutoTesterPod.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CODE_SIGN_ENTITLEMENTS = AutoTester/AutoTester.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 3; + DEVELOPMENT_TEAM = BFXSGS6V8N; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../common/local_libs/KissXML\"", + "\"$(SRCROOT)/../../../common/local_libs/eigen\"", + "\"$(SRCROOT)/../../library/WhirlyGlobeLib/include\"", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include\"/**", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent\"", + "\"$(SRCROOT)/../../../common/WhirlyGlobeLib/include\"", + ); + INFOPLIST_FILE = AutoTester/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 3.1; + PRODUCT_BUNDLE_IDENTIFIER = com.mousebirdconsulting.AutoTesterApp; + PRODUCT_NAME = AutoTesterPod; + PROVISIONING_PROFILE = ""; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTS_MACCATALYST = YES; + SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/AutoTester/MaplyTesterBridge.h"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 88E4B8E01B83B6AC0050D21B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3D6D9431634E599E2DCD9E5E /* Pods-AutoTesterPod.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "c++14"; + CODE_SIGN_ENTITLEMENTS = AutoTester/AutoTester.entitlements; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 3; + DEVELOPMENT_TEAM = BFXSGS6V8N; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../common/local_libs/KissXML\"", + "\"$(SRCROOT)/../../../common/local_libs/eigen\"", + "\"$(SRCROOT)/../../library/WhirlyGlobeLib/include\"", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent/include\"/**", + "\"$(SRCROOT)/../../library/WhirlyGlobe-MaplyComponent\"", + "\"$(SRCROOT)/../../../common/WhirlyGlobeLib/include\"", + ); + INFOPLIST_FILE = AutoTester/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 3.1; + PRODUCT_BUNDLE_IDENTIFIER = com.mousebirdconsulting.AutoTesterApp; + PRODUCT_NAME = AutoTesterPod; + PROVISIONING_PROFILE_SPECIFIER = ""; + SUPPORTS_MACCATALYST = YES; + SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/AutoTester/MaplyTesterBridge.h"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 88E4B8BA1B83B6AB0050D21B /* Build configuration list for PBXProject "AutoTesterPod" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 88E4B8DC1B83B6AC0050D21B /* Debug */, + 88E4B8DD1B83B6AC0050D21B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 88E4B8DE1B83B6AC0050D21B /* Build configuration list for PBXNativeTarget "AutoTesterPod" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 88E4B8DF1B83B6AC0050D21B /* Debug */, + 88E4B8E01B83B6AC0050D21B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 88E4B8B71B83B6AB0050D21B /* Project object */; +} diff --git a/ios/apps/AutoTester/AutoTesterPod.xcworkspace/contents.xcworkspacedata b/ios/apps/AutoTester/AutoTesterPod.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..363ecbc90a --- /dev/null +++ b/ios/apps/AutoTester/AutoTesterPod.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ios/apps/AutoTester/AutoTesterPod.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/apps/AutoTester/AutoTesterPod.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/ios/apps/AutoTester/AutoTesterPod.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/apps/AutoTester/PodFile b/ios/apps/AutoTester/PodFile new file mode 100644 index 0000000000..b356b503f7 --- /dev/null +++ b/ios/apps/AutoTester/PodFile @@ -0,0 +1,36 @@ +# Podfile for AutoTesterPod project + +project 'AutoTesterPod.xcodeproj' +platform :ios, '12.0' +install! 'cocoapods', :deterministic_uuids => false + +target 'AutoTesterPod' do + pod 'WhirlyGlobe', { :git => 'https://github.com/mousebird/WhirlyGlobe.git', :branch => 'develop' } +end + +post_install do |installer| + #require 'fileutils' + #installer.pods_project.targets.each do |target| + # target.build_configurations.each do |config| + # config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' + # end + #end + + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings.delete 'ARCHS' + config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' + end + end + + # uvGO project settings cause ~20k documentation warnings from WG-Maply. + # Override these settings for that project to avoid slow XCode response. + installer.pods_project.targets.each do |target| + if target.name == 'WhirlyGlobe' + #target.build_configurations.each do |config| + # config.build_settings['WARNING_CFLAGS'] = '-Wno-documentation' + #end + end + end +end + diff --git a/ios/apps/AutoTester/Podfile.lock b/ios/apps/AutoTester/Podfile.lock new file mode 100644 index 0000000000..86279ce81c --- /dev/null +++ b/ios/apps/AutoTester/Podfile.lock @@ -0,0 +1,60 @@ +PODS: + - FMDB (2.7.5): + - FMDB/standard (= 2.7.5) + - FMDB/standard (2.7.5) + - KissXML (5.3.1): + - KissXML/All (= 5.3.1) + - KissXML/Additions (5.3.1): + - KissXML/Core + - KissXML/All (5.3.1): + - KissXML/Additions + - KissXML/Core + - KissXML/Core (5.3.1) + - libjson (7.6.1) + - proj4 (4.8.0) + - SMCalloutView (2.1.5) + - WhirlyGlobe (3.5): + - WhirlyGlobe/WhirlyGlobe (= 3.5) + - WhirlyGlobe/glues (3.5) + - WhirlyGlobe/locallibs (3.5) + - WhirlyGlobe/WhirlyGlobe (3.5): + - FMDB + - KissXML + - libjson + - proj4 + - SMCalloutView + - WhirlyGlobe/glues + - WhirlyGlobe/locallibs + +DEPENDENCIES: + - WhirlyGlobe (from `https://github.com/mousebird/WhirlyGlobe.git`, branch `topic/sun-stars-case`) + +SPEC REPOS: + trunk: + - FMDB + - KissXML + - libjson + - proj4 + - SMCalloutView + +EXTERNAL SOURCES: + WhirlyGlobe: + :branch: topic/sun-stars-case + :git: https://github.com/mousebird/WhirlyGlobe.git + +CHECKOUT OPTIONS: + WhirlyGlobe: + :commit: 988e7e743304925f2e69f76090ed1805db9ada11 + :git: https://github.com/mousebird/WhirlyGlobe.git + +SPEC CHECKSUMS: + FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + KissXML: 5c8e0f2e8b9f071d3e1ae123dec3eb5da615c10c + libjson: 1a065ca64704a5d1b51c3754268998942d57ac6f + proj4: 234525105d05a33b2ae9a90a6fe3935f7a246f7e + SMCalloutView: 5c0ee363dc8e7204b2fda17dfad38c93e9e23481 + WhirlyGlobe: 72e575d95c9dd9b286f0ada088fb3fb0e7b19c8e + +PODFILE CHECKSUM: f0bda966e4050effe4692f7a207e825ef6a967d8 + +COCOAPODS: 1.11.2 From f40f1ff112b0096a569c9031e0edff026d10b540 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 7 Feb 2022 15:06:52 -0800 Subject: [PATCH 28/78] Remove redundant fade option. Add timed fade-out support for vectors, shapes, lofts. Clarify confusing variation in fadeDown/fadeUp parameter ordering. New fade test case. --- .../maply/jni/src/base/BaseInfo_jni.cpp | 3 +- common/WhirlyGlobeLib/include/BaseInfo.h | 45 +++--- .../WhirlyGlobeLib/include/BillboardManager.h | 10 +- common/WhirlyGlobeLib/include/LoftManager.h | 8 +- common/WhirlyGlobeLib/include/ShapeManager.h | 2 +- common/WhirlyGlobeLib/include/VectorManager.h | 4 +- .../include/WideVectorManager.h | 4 +- common/WhirlyGlobeLib/src/BaseInfo.cpp | 44 +----- .../WhirlyGlobeLib/src/BillboardManager.cpp | 26 +--- common/WhirlyGlobeLib/src/LabelRenderer.cpp | 5 +- common/WhirlyGlobeLib/src/LoftManager.cpp | 53 +++---- .../src/MapboxVectorStyleLine.cpp | 3 +- common/WhirlyGlobeLib/src/MarkerManager.cpp | 3 +- .../src/ShapeDrawableBuilder.cpp | 22 ++- common/WhirlyGlobeLib/src/ShapeManager.cpp | 18 ++- common/WhirlyGlobeLib/src/VectorManager.cpp | 33 +++-- .../WhirlyGlobeLib/src/WideVectorManager.cpp | 12 +- .../AutoTester.xcodeproj/project.pbxproj | 4 + .../AutoTester/StartupViewController.swift | 1 + .../AutoTester/testCases/FadeTestCase.swift | 135 ++++++++++++++++++ .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 20 ++- 21 files changed, 295 insertions(+), 160 deletions(-) create mode 100644 ios/apps/AutoTester/AutoTester/testCases/FadeTestCase.swift diff --git a/android/library/maply/jni/src/base/BaseInfo_jni.cpp b/android/library/maply/jni/src/base/BaseInfo_jni.cpp index 99f126f0d0..af44031eb3 100644 --- a/android/library/maply/jni/src/base/BaseInfo_jni.cpp +++ b/android/library/maply/jni/src/base/BaseInfo_jni.cpp @@ -317,7 +317,8 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_BaseInfo_setFade BaseInfoRef *info = classInfo->getObject(env,obj); if (!info) return; - (*info)->fade = fade; + (*info)->fadeIn = fade; + (*info)->fadeOut = fade; } catch (...) { diff --git a/common/WhirlyGlobeLib/include/BaseInfo.h b/common/WhirlyGlobeLib/include/BaseInfo.h index 50d5adaaf9..154a62f2b3 100644 --- a/common/WhirlyGlobeLib/include/BaseInfo.h +++ b/common/WhirlyGlobeLib/include/BaseInfo.h @@ -94,7 +94,7 @@ struct BaseInfo { EIGEN_MAKE_ALIGNED_OPERATOR_NEW; - BaseInfo(); + BaseInfo() = default; BaseInfo(const BaseInfo &that); BaseInfo(const Dictionary &dict); @@ -109,26 +109,31 @@ struct BaseInfo void setupBasicDrawableInstance(BasicDrawableInstanceBuilder *drawBuild) const; void setupBasicDrawableInstance(const BasicDrawableInstanceBuilderRef &drawBuild) const; - double minVis,maxVis; - double minVisBand,maxVisBand; - double minViewerDist,maxViewerDist; - int zoomSlot; - double minZoomVis,maxZoomVis; - Point3d viewerCenter; - double drawOffset; + double minVis = DrawVisibleInvalid; + double maxVis = DrawVisibleInvalid; + double minVisBand = DrawVisibleInvalid; + double maxVisBand = DrawVisibleInvalid; + double minViewerDist = DrawVisibleInvalid; + double maxViewerDist = DrawVisibleInvalid; + double minZoomVis = DrawVisibleInvalid; + double maxZoomVis = DrawVisibleInvalid; + int zoomSlot = -1; + Point3d viewerCenter = {DrawVisibleInvalid,DrawVisibleInvalid,DrawVisibleInvalid}; + double drawOffset = 0.0; int64_t drawOrder = DrawOrderTiles; - int drawPriority; - bool enable; - double fade; - double fadeIn; - double fadeOut; - TimeInterval fadeOutTime; - TimeInterval startEnable,endEnable; - SimpleIdentity programID; - int extraFrames; - bool zBufferRead,zBufferWrite; - SimpleIdentity renderTargetID; - bool hasExp; // Set if we're requiring the expressions to be passed through (problem on Metal) + int drawPriority = 0; + bool enable = true; + TimeInterval fadeIn = 0.0; + TimeInterval fadeOut = 0.0; + TimeInterval fadeOutTime = 0.0; + TimeInterval startEnable = 0.0; + TimeInterval endEnable = 0.0; + SimpleIdentity programID = EmptyIdentity; + int extraFrames = 0; + bool zBufferRead = false; + bool zBufferWrite = false; + SimpleIdentity renderTargetID = EmptyIdentity; + bool hasExp = false; // Set if we're requiring the expressions to be passed through (problem on Metal) SingleVertexAttributeSet uniforms; diff --git a/common/WhirlyGlobeLib/include/BillboardManager.h b/common/WhirlyGlobeLib/include/BillboardManager.h index 1a7a72136f..bdb89c7df6 100644 --- a/common/WhirlyGlobeLib/include/BillboardManager.h +++ b/common/WhirlyGlobeLib/include/BillboardManager.h @@ -94,19 +94,17 @@ class BillboardInfo : public BaseInfo typedef std::shared_ptr BillboardInfoRef; /// Used internally to track billboard geometry -class BillboardSceneRep : public Identifiable +struct BillboardSceneRep : public Identifiable { -public: - BillboardSceneRep(); - BillboardSceneRep(SimpleIdentity inId); - ~BillboardSceneRep() = default; + BillboardSceneRep() = default; + BillboardSceneRep(SimpleIdentity inId) : Identifiable(inId) {} // Clear the contents out of the scene void clearContents(SelectionManagerRef &selectManager,ChangeSet &changes,TimeInterval when); SimpleIDSet drawIDs; // Drawables created for this SimpleIDSet selectIDs; // IDs used for selection - float fade; // Time to fade away for removal + float fadeOut = 0.0; // Time to fade away for removal }; typedef std::set BillboardSceneRepSet; diff --git a/common/WhirlyGlobeLib/include/LoftManager.h b/common/WhirlyGlobeLib/include/LoftManager.h index 051ba6add1..2f3ef2a71c 100644 --- a/common/WhirlyGlobeLib/include/LoftManager.h +++ b/common/WhirlyGlobeLib/include/LoftManager.h @@ -60,15 +60,13 @@ typedef std::shared_ptr LoftedPolyInfoRef; /** Representation of one or more lofted polygons. Used to keep track of the assets we create. */ -class LoftedPolySceneRep : public WhirlyKit::Identifiable +struct LoftedPolySceneRep : public WhirlyKit::Identifiable { -public: - LoftedPolySceneRep() { } + LoftedPolySceneRep() = default; LoftedPolySceneRep(SimpleIdentity theId) : Identifiable(theId) { } - ~LoftedPolySceneRep() { } WhirlyKit::SimpleIDSet drawIDs; // Drawables created for this - float fade; // Fade out, used for delete + float fadeOut = 0.0; // Fade out, used for delete }; typedef std::set LoftedPolySceneRepSet; diff --git a/common/WhirlyGlobeLib/include/ShapeManager.h b/common/WhirlyGlobeLib/include/ShapeManager.h index dc9ba632c2..69d0f63534 100644 --- a/common/WhirlyGlobeLib/include/ShapeManager.h +++ b/common/WhirlyGlobeLib/include/ShapeManager.h @@ -43,7 +43,7 @@ struct ShapeSceneRep : public Identifiable SimpleIDSet drawIDs; // Drawables created for this SimpleIDSet selectIDs; // IDs in the selection layer - float fade; // Time to fade away for removal + float fadeOut = 0.0; // Time to fade away for removal }; typedef std::set ShapeSceneRepSet; diff --git a/common/WhirlyGlobeLib/include/VectorManager.h b/common/WhirlyGlobeLib/include/VectorManager.h index 0740612701..393fff2c8f 100644 --- a/common/WhirlyGlobeLib/include/VectorManager.h +++ b/common/WhirlyGlobeLib/include/VectorManager.h @@ -45,7 +45,7 @@ namespace WhirlyKit class VectorSceneRep : public Identifiable { public: - VectorSceneRep() : fade(0.0) { } + VectorSceneRep() = default; VectorSceneRep(SimpleIdentity theId) : Identifiable(theId) { } // Clean out the representation @@ -53,7 +53,7 @@ class VectorSceneRep : public Identifiable SimpleIDSet drawIDs; // The drawables we created SimpleIDSet instIDs; // Instances if we're doing that - float fade; // If set, the amount of time to fade out before deletion + float fadeOut = 0.0; // If set, the amount of time to fade out before deletion }; typedef std::set VectorSceneRepSet; diff --git a/common/WhirlyGlobeLib/include/WideVectorManager.h b/common/WhirlyGlobeLib/include/WideVectorManager.h index 74e3e859f3..b333586819 100644 --- a/common/WhirlyGlobeLib/include/WideVectorManager.h +++ b/common/WhirlyGlobeLib/include/WideVectorManager.h @@ -86,7 +86,7 @@ typedef std::shared_ptr WideVectorInfoRef; struct WideVectorSceneRep : public Identifiable { WideVectorSceneRep() = default; - WideVectorSceneRep(SimpleIdentity inId) : Identifiable(inId), fade(0.0) { + WideVectorSceneRep(SimpleIdentity inId) : Identifiable(inId), fadeOut(0.0) { } ~WideVectorSceneRep() = default; @@ -95,7 +95,7 @@ struct WideVectorSceneRep : public Identifiable SimpleIDSet drawIDs; SimpleIDSet instIDs; // Instances if we're doing that - float fade = 0.0f; + float fadeOut = 0.0f; }; typedef std::set WideVectorSceneRepSet; diff --git a/common/WhirlyGlobeLib/src/BaseInfo.cpp b/common/WhirlyGlobeLib/src/BaseInfo.cpp index b7b3ad4f0e..b9359dc730 100644 --- a/common/WhirlyGlobeLib/src/BaseInfo.cpp +++ b/common/WhirlyGlobeLib/src/BaseInfo.cpp @@ -134,31 +134,12 @@ Vector4f ColorExpressionInfo::evaluateF(float zoom, RGBAColor def) return evalExpr(zoom,base,def,stopInputs,stopOutputs,toVec,lerpVec); } -BaseInfo::BaseInfo() - : minVis(DrawVisibleInvalid), maxVis(DrawVisibleInvalid), - minVisBand(DrawVisibleInvalid), maxVisBand(DrawVisibleInvalid), - minViewerDist(DrawVisibleInvalid), maxViewerDist(DrawVisibleInvalid), - zoomSlot(-1),minZoomVis(DrawVisibleInvalid),maxZoomVis(DrawVisibleInvalid), - viewerCenter(DrawVisibleInvalid,DrawVisibleInvalid,DrawVisibleInvalid), - drawOffset(0.0), - drawPriority(0), - enable(true), - fade(0.0), fadeIn(0.0), fadeOut(0.0), fadeOutTime(0.0), - startEnable(0.0), endEnable(0.0), - programID(EmptyIdentity), - extraFrames(0), - zBufferRead(false), zBufferWrite(false), - renderTargetID(EmptyIdentity), - hasExp(false) -{ -} - BaseInfo::BaseInfo(const BaseInfo &that) : minVis(that.minVis), maxVis(that.minVis), minVisBand(that.minVisBand), maxVisBand(that.maxVisBand), minViewerDist(that.minViewerDist), maxViewerDist(that.maxViewerDist), zoomSlot(that.zoomSlot), minZoomVis(that.minZoomVis),maxZoomVis(that.maxZoomVis), viewerCenter(that.viewerCenter), drawOffset(that.drawOffset), drawPriority(that.drawPriority), drawOrder(that.drawOrder), - enable(that.enable), fade(that.fade), fadeIn(that.fadeIn), fadeOut(that.fadeOut), + enable(that.enable), fadeIn(that.fadeIn), fadeOut(that.fadeOut), fadeOutTime(that.fadeOutTime), startEnable(that.startEnable), endEnable(that.endEnable), programID(that.programID), extraFrames(that.extraFrames), zBufferRead(that.zBufferRead), zBufferWrite(that.zBufferWrite), renderTargetID(that.renderTargetID), hasExp(that.hasExp) @@ -179,11 +160,9 @@ BaseInfo::BaseInfo(const Dictionary &dict) viewerCenter.x() = dict.getDouble(MaplyViewableCenterX,DrawVisibleInvalid); viewerCenter.y() = dict.getDouble(MaplyViewableCenterY,DrawVisibleInvalid); viewerCenter.z() = dict.getDouble(MaplyViewableCenterZ,DrawVisibleInvalid); - fade = dict.getDouble(MaplyFade,0.0); - fadeIn = fade; - fadeOut = fade; - fadeIn = dict.getDouble(MaplyFadeIn,fadeIn); - fadeOut = dict.getDouble(MaplyFadeOut,fadeOut); + const auto fade = dict.getDouble(MaplyFade,0.0); + fadeIn = dict.getDouble(MaplyFadeIn,fade); + fadeOut = dict.getDouble(MaplyFadeOut,fade); fadeOutTime = dict.getDouble(MaplyFadeOutTime,0.0); drawPriority = dict.getInt("priority",0); drawPriority = dict.getInt(MaplyDrawPriority,drawPriority); @@ -192,13 +171,11 @@ BaseInfo::BaseInfo(const Dictionary &dict) enable = dict.getBool(MaplyEnable,true); startEnable = dict.getDouble(MaplyEnableStart,0.0); endEnable = dict.getDouble(MaplyEnableEnd,0.0); - SimpleIdentity shaderID = dict.getInt(MaplyShaderString,EmptyIdentity); - programID = dict.getInt("program",shaderID); + programID = dict.getInt("program",dict.getInt(MaplyShaderString,EmptyIdentity)); extraFrames = dict.getInt("extraFrames",0); zBufferRead = dict.getBool(MaplyZBufferRead,false); zBufferWrite = dict.getBool(MaplyZBufferWrite, false); renderTargetID = dict.getInt(MaplyRenderTargetDesc,EmptyIdentity); - hasExp = false; // Note: Porting // Uniforms to be passed to shader @@ -238,18 +215,10 @@ BaseInfo::BaseInfo(const Dictionary &dict) } #endif } - -// Really Android? Really? -template -std::string to_string(T value) -{ - std::ostringstream os; - os << value; - return os.str(); -} std::string BaseInfo::toString() const { + using std::to_string; return "minVis = " + to_string(minVis) + ";" + " maxVis = " + to_string(maxVis) + ";" + " minVisBand = " + to_string(minVisBand) + ";" + @@ -263,7 +232,6 @@ std::string BaseInfo::toString() const " drawOffset = " + to_string(drawOffset) + ";" + " drawPriority = " + to_string(drawPriority) + ";" + " enable = " + (enable ? "yes" : "no") + ";" + - " fade = " + to_string(fade) + ";" + " fadeIn = " + to_string(fadeIn) + ";" + " fadeOut = " + to_string(fadeOut) + ";" + " fadeOutTime = " + to_string(fadeOutTime) + ";" + diff --git a/common/WhirlyGlobeLib/src/BillboardManager.cpp b/common/WhirlyGlobeLib/src/BillboardManager.cpp index c331f74cb1..21357d0ea7 100644 --- a/common/WhirlyGlobeLib/src/BillboardManager.cpp +++ b/common/WhirlyGlobeLib/src/BillboardManager.cpp @@ -57,18 +57,6 @@ Billboard::Billboard() : { } -BillboardSceneRep::BillboardSceneRep() : - Identifiable(), - fade(0.0f) -{ -} - -BillboardSceneRep::BillboardSceneRep(SimpleIdentity inId) : - Identifiable(inId), - fade(0.0f) -{ -} - void BillboardSceneRep::clearContents(SelectionManagerRef &selectManager,ChangeSet &changes,TimeInterval when) { for (const auto it: drawIDs){ @@ -197,7 +185,7 @@ SimpleIdentity BillboardManager::addBillboards(const std::vector &bi const auto selectManager = scene->getManager(kWKSelectionManager); auto sceneRep = new BillboardSceneRep(); - sceneRep->fade = (float)billboardInfo.fade; + sceneRep->fadeOut = billboardInfo.fadeOut; CoordSystemDisplayAdapter *coordAdapter = scene->getCoordAdapter(); @@ -289,7 +277,7 @@ void BillboardManager::removeBillboards(const SimpleIDSet &billIDs,ChangeSet &ch std::lock_guard guardLock(lock); const TimeInterval curTime = scene->getCurrentTime(); - for (auto billID : billIDs) + for (const auto billID : billIDs) { BillboardSceneRep dummyRep(billID); auto it = sceneReps.find(&dummyRep); @@ -298,16 +286,16 @@ void BillboardManager::removeBillboards(const SimpleIDSet &billIDs,ChangeSet &ch auto *sceneRep = *it; TimeInterval removeTime = 0.0; - if (sceneRep->fade > 0.0) + if (sceneRep->fadeOut > 0.0) { - for (auto id : sceneRep->drawIDs) + for (const auto id : sceneRep->drawIDs) { - changes.push_back(new FadeChangeRequest(id, curTime, curTime+sceneRep->fade)); + changes.push_back(new FadeChangeRequest(id, curTime, curTime+sceneRep->fadeOut)); } - removeTime = curTime + sceneRep->fade; + removeTime = curTime + sceneRep->fadeOut; } - + sceneRep->clearContents(selectManager,changes,removeTime); sceneReps.erase(it); delete sceneRep; diff --git a/common/WhirlyGlobeLib/src/LabelRenderer.cpp b/common/WhirlyGlobeLib/src/LabelRenderer.cpp index b9e2c65884..1c2c1fc92e 100644 --- a/common/WhirlyGlobeLib/src/LabelRenderer.cpp +++ b/common/WhirlyGlobeLib/src/LabelRenderer.cpp @@ -222,7 +222,10 @@ void LabelRenderer::render(PlatformThreadInfo *threadInfo, if (labelInfo->fadeIn > 0.0) screenShape->setFade(curTime+labelInfo->fadeIn, curTime); else if (labelInfo->fadeOutTime != 0.0) - screenShape->setFade(labelInfo->fadeOutTime, labelInfo->fadeOutTime+labelInfo->fadeOut); + { + // upsetFade(/*up=*/labelInfo->fadeOutTime, /*down=*/labelInfo->fadeOutTime+labelInfo->fadeOut); + } if (label->isSelectable && label->selectID != EmptyIdentity) screenShape->setId(label->selectID); screenShape->setWorldLoc(coordAdapter->localToDisplay(coordAdapter->getCoordSystem()->geographicToLocal3d(label->loc))); diff --git a/common/WhirlyGlobeLib/src/LoftManager.cpp b/common/WhirlyGlobeLib/src/LoftManager.cpp index 843f85244c..934974c4ed 100644 --- a/common/WhirlyGlobeLib/src/LoftManager.cpp +++ b/common/WhirlyGlobeLib/src/LoftManager.cpp @@ -347,15 +347,23 @@ class DrawableBuilder2 drawable->setLocalMbr(Mbr(Point2f(drawMbr.ll().x(),drawMbr.ll().y()),Point2f(drawMbr.ur().x(),drawMbr.ur().y()))); if (centerValid) { - Eigen::Affine3d trans(Eigen::Translation3d(center.x(),center.y(),center.z())); - Matrix4d transMat = trans.matrix(); + const Eigen::Affine3d trans(Eigen::Translation3d(center.x(),center.y(),center.z())); + const Matrix4d transMat = trans.matrix(); drawable->setMatrix(&transMat); } - if (polyInfo.fade > 0) + + if (polyInfo.fadeIn > 0.0) + { + // fadeDown < fadeUp : fading in + const TimeInterval curTime = scene->getCurrentTime(); + drawable->setFade(curTime,curTime+polyInfo.fadeIn); + } + else if (polyInfo.fadeOut > 0.0 && polyInfo.fadeOutTime > 0.0) { - TimeInterval curTime = scene->getCurrentTime(); - drawable->setFade(curTime,curTime+polyInfo.fade); + // fadeUp < fadeDown : fading out + drawable->setFade(/*down=*/polyInfo.fadeOutTime+polyInfo.fadeOut, /*up=*/polyInfo.fadeOutTime); } + sceneRep->drawIDs.insert(drawable->getDrawableID()); changes.push_back(new AddDrawableReq(drawable->getDrawable())); } @@ -458,7 +466,7 @@ SimpleIdentity LoftManager::addLoftedPolys(WhirlyKit::ShapeSet *shapes,const Lof CoordSystem *coordSys = coordAdapter->getCoordSystem(); LoftedPolySceneRep *sceneRep = new LoftedPolySceneRep(); loftID = sceneRep->getId(); - sceneRep->fade = polyInfo.fade; + sceneRep->fadeOut = polyInfo.fadeOut; Point3d center(0,0,0); bool centerValid = false; @@ -563,30 +571,25 @@ void LoftManager::removeLoftedPolys(const SimpleIDSet &polyIDs,ChangeSet &change { std::lock_guard guardLock(lock); - for (SimpleIDSet::iterator idIt = polyIDs.begin(); idIt != polyIDs.end(); ++idIt) + for (const auto polyID : polyIDs) { - LoftedPolySceneRep dummyRep(*idIt); - LoftedPolySceneRepSet::iterator it = loftReps.find(&dummyRep); + LoftedPolySceneRep dummyRep(polyID); + const auto it = loftReps.find(&dummyRep); if (it != loftReps.end()) { - LoftedPolySceneRep *sceneRep = *it; - - TimeInterval removeTime = 0.0; - if (sceneRep->fade > 0.0) + const LoftedPolySceneRep *sceneRep = *it; + const TimeInterval curTime = scene->getCurrentTime(); + for (const auto id : sceneRep->drawIDs) { - TimeInterval curTime = scene->getCurrentTime(); - - for (SimpleIDSet::iterator idIt = sceneRep->drawIDs.begin(); - idIt != sceneRep->drawIDs.end(); ++idIt) - changes.push_back(new FadeChangeRequest(*idIt,curTime,curTime+sceneRep->fade)); - - removeTime = curTime + sceneRep->fade; + TimeInterval removeTime = 0.0; + if (sceneRep->fadeOut > 0.0) + { + changes.push_back(new FadeChangeRequest(id,curTime,curTime+sceneRep->fadeOut)); + removeTime = curTime + sceneRep->fadeOut; + } + changes.push_back(new RemDrawableReq(id,removeTime)); } - - - for (SimpleIDSet::iterator idIt = sceneRep->drawIDs.begin(); - idIt != sceneRep->drawIDs.end(); ++idIt) - changes.push_back(new RemDrawableReq(*idIt,removeTime)); + loftReps.erase(it); delete sceneRep; } diff --git a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp index b97a360242..b669270b00 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp @@ -222,7 +222,8 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, vecInfo.hasExp = true; vecInfo.coordType = WideVecCoordScreen; vecInfo.programID = styleSet->wideVectorProgramID; - vecInfo.fade = fade; + vecInfo.fadeIn = fade; + vecInfo.fadeOut = fade; vecInfo.zoomSlot = styleSet->zoomSlot; vecInfo.color = *color; vecInfo.width = (float)width; diff --git a/common/WhirlyGlobeLib/src/MarkerManager.cpp b/common/WhirlyGlobeLib/src/MarkerManager.cpp index 3a65c7b266..111505d9f4 100644 --- a/common/WhirlyGlobeLib/src/MarkerManager.cpp +++ b/common/WhirlyGlobeLib/src/MarkerManager.cpp @@ -319,7 +319,8 @@ SimpleIdentity MarkerManager::addMarkers(const std::vector &markers,co } else if (markerInfo.fadeOut > 0.0 && markerInfo.fadeOutTime > 0.0) { - shape->setFade(markerInfo.fadeOutTime, markerInfo.fadeOutTime+markerInfo.fadeOut); + // upsetFade(/*up=*/markerInfo.fadeOutTime, /*down=*/markerInfo.fadeOutTime+markerInfo.fadeOut); } shape->setVisibility((float)markerInfo.minVis, (float)markerInfo.maxVis); diff --git a/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp b/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp index cc461083fa..e8776847b3 100644 --- a/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp +++ b/common/WhirlyGlobeLib/src/ShapeDrawableBuilder.cpp @@ -143,11 +143,18 @@ void ShapeDrawableBuilder::flush() { drawable->setLocalMbr(drawMbr); - if (shapeInfo.fade > 0.0) + if (shapeInfo.fadeIn > 0.0) { + // fadeDown < fadeUp : fading in const TimeInterval curTime = sceneRender->getScene()->getCurrentTime(); - drawable->setFade(curTime,curTime+shapeInfo.fade); + drawable->setFade(curTime,curTime+shapeInfo.fadeIn); } + else if (shapeInfo.fadeOut > 0.0 && shapeInfo.fadeOutTime > 0.0) + { + // fadeUp < fadeDown : fading out + drawable->setFade(/*down=*/shapeInfo.fadeOutTime+shapeInfo.fadeOut, /*up=*/shapeInfo.fadeOutTime); + } + drawables.push_back(drawable); } drawable = nullptr; @@ -407,11 +414,18 @@ void ShapeDrawableBuilderTri::flush() { drawable->setLocalMbr(drawMbr); - if (shapeInfo.fade > 0.0) + if (shapeInfo.fadeIn > 0.0) { + // fadeDown < fadeUp : fading in const TimeInterval curTime = sceneRender->getScene()->getCurrentTime(); - drawable->setFade(curTime,curTime+shapeInfo.fade); + drawable->setFade(curTime,curTime+shapeInfo.fadeIn); } + else if (shapeInfo.fadeOut > 0.0 && shapeInfo.fadeOutTime > 0.0) + { + // fadeUp < fadeDown : fading out + drawable->setFade(/*down=*/shapeInfo.fadeOutTime+shapeInfo.fadeOut, /*up=*/shapeInfo.fadeOutTime); + } + drawables.push_back(drawable); } drawable = NULL; diff --git a/common/WhirlyGlobeLib/src/ShapeManager.cpp b/common/WhirlyGlobeLib/src/ShapeManager.cpp index 650dd14573..9209f4a13c 100644 --- a/common/WhirlyGlobeLib/src/ShapeManager.cpp +++ b/common/WhirlyGlobeLib/src/ShapeManager.cpp @@ -692,7 +692,7 @@ SimpleIdentity ShapeManager::addShapes(const std::vector &shapes, const auto selectManager = scene->getManager(kWKSelectionManager); auto sceneRep = std::make_unique(); - sceneRep->fade = (float)shapeInfo.fade; + sceneRep->fadeOut = (float)shapeInfo.fadeOut; // Figure out a good center Point3d center(0,0,0); @@ -757,16 +757,20 @@ void ShapeManager::removeShapes(const SimpleIDSet &shapeIDs,ChangeSet &changes) std::lock_guard guardLock(lock); const TimeInterval curTime = scene->getCurrentTime(); - for (auto shapeID : shapeIDs) { + for (auto shapeID : shapeIDs) + { ShapeSceneRep dummyRep(shapeID); auto sit = shapeReps.find(&dummyRep); - if (sit != shapeReps.end()) { + if (sit != shapeReps.end()) + { ShapeSceneRep *shapeRep = *sit; - TimeInterval removeTime = 0.0; - if (shapeRep->fade > 0.0) { - for (auto idIt = shapeRep->drawIDs.begin(); idIt != shapeRep->drawIDs.end(); ++idIt) - changes.push_back(new FadeChangeRequest(*idIt, curTime, curTime+shapeRep->fade)); + if (shapeRep->fadeOut > 0.0) + { + for (auto id : shapeRep->drawIDs) + { + changes.push_back(new FadeChangeRequest(id, curTime, curTime+shapeRep->fadeOut)); + } } shapeRep->clearContents(selectManager, changes, removeTime); diff --git a/common/WhirlyGlobeLib/src/VectorManager.cpp b/common/WhirlyGlobeLib/src/VectorManager.cpp index 7d5ca4768e..5c2c9a1db5 100644 --- a/common/WhirlyGlobeLib/src/VectorManager.cpp +++ b/common/WhirlyGlobeLib/src/VectorManager.cpp @@ -240,11 +240,18 @@ class VectorDrawableBuilder drawable->setMatrix(&transMat); } - if (vecInfo->fade > 0.0) + if (vecInfo->fadeIn > 0.0) { + // fadeDown < fadeUp : fading in const TimeInterval curTime = scene->getCurrentTime(); - drawable->setFade(curTime,curTime+vecInfo->fade); + drawable->setFade(curTime,curTime+vecInfo->fadeIn); } + else if (vecInfo->fadeOut > 0.0 && vecInfo->fadeOutTime > 0.0) + { + // fadeUp < fadeDown : fading out + drawable->setFade(/*down=*/vecInfo->fadeOutTime+vecInfo->fadeOut, /*up=*/vecInfo->fadeOutTime); + } + changeRequests.push_back(new AddDrawableReq(drawable->getDrawable())); } drawable = nullptr; @@ -555,13 +562,19 @@ class VectorDrawableBuilderTri drawable->setMatrix(trans.matrix()); } sceneRep->drawIDs.insert(drawable->getDrawableID()); - - if (vecInfo->fade > 0.0) + + if (vecInfo->fadeIn > 0.0) { + // fadeDown < fadeUp = fading in const TimeInterval curTime = scene->getCurrentTime(); - drawable->setFade(curTime,curTime+vecInfo->fade); + drawable->setFade(curTime,curTime+vecInfo->fadeIn); } - + else if (vecInfo->fadeOutTime > 0.0) + { + // fadeUp < fadeDown = fading out + drawable->setFade(/*down=*/vecInfo->fadeOutTime+vecInfo->fadeOut, /*up=*/vecInfo->fadeOutTime); + } + changeRequests.push_back(new AddDrawableReq(drawable->getDrawable())); } drawable = nullptr; @@ -598,7 +611,7 @@ SimpleIdentity VectorManager::addVectors(const ShapeSet *shapes, const VectorInf return EmptyIdentity; auto *sceneRep = new VectorSceneRep(); - sceneRep->fade = (float)vecInfo.fade; + sceneRep->fadeOut = (float)vecInfo.fadeOut; // Look for per vector colors bool doColors = false; @@ -795,7 +808,7 @@ SimpleIdentity VectorManager::addVectors(const std::vector &shap } auto sceneRep = std::make_unique(); - sceneRep->fade = (float)vecInfo.fade; + sceneRep->fadeOut = (float)vecInfo.fadeOut; // Look for per vector colors bool doColors = (vecInfo.colorExp || vecInfo.opacityExp); @@ -1072,8 +1085,8 @@ void VectorManager::removeVectors(SimpleIDSet &vecIDs,ChangeSet &changes) std::unique_ptr sceneRep(*it); vectorReps.erase(it); - const bool fade = (sceneRep->fade > 0.0); - const auto fadeT = fade ? (curTime + sceneRep->fade) : 0.0; + const bool fade = (sceneRep->fadeOut > 0.0); + const auto fadeT = fade ? (curTime + sceneRep->fadeOut) : 0.0; // Make a copy and merge the IDs into it allIDs.clear(); diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index dd51dbf164..f0328cc5e9 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -961,15 +961,15 @@ struct WideVectorDrawableConstructor const TimeInterval curTime = scene->getCurrentTime(); auto *sceneRep = new WideVectorSceneRep(); - sceneRep->fade = (float)vecInfo->fade; + sceneRep->fadeOut = (float)vecInfo->fadeOut; for (const auto &theDrawable : drawables) { if (auto drawID = theDrawable->getBasicDrawableID()) sceneRep->drawIDs.insert(drawID); if (auto drawID = theDrawable->getInstanceDrawableID()) sceneRep->instIDs.insert(drawID); - if (vecInfo->fade > 0.0) - theDrawable->setFade(curTime, curTime + vecInfo->fade); + if (vecInfo->fadeOut > 0.0) + theDrawable->setFade(curTime, curTime + vecInfo->fadeOut); if (auto draw = theDrawable->getBasicDrawable()) changes.push_back(new AddDrawableReq(draw)); if (auto draw = theDrawable->getInstanceDrawable()) @@ -1283,7 +1283,7 @@ void WideVectorManager::removeVectors(SimpleIDSet &vecIDs,ChangeSet &changes) WideVectorSceneRep *sceneRep = *it; TimeInterval removeTime = 0.0; - if (sceneRep->fade > 0.0) + if (sceneRep->fadeOut > 0.0) { std::unordered_set allIDs(sceneRep->drawIDs.size() + sceneRep->instIDs.size()); allIDs.insert(sceneRep->drawIDs.begin(), sceneRep->drawIDs.end()); @@ -1291,10 +1291,10 @@ void WideVectorManager::removeVectors(SimpleIDSet &vecIDs,ChangeSet &changes) for (const auto id : allIDs) { - changes.push_back(new FadeChangeRequest(id, curTime, curTime+sceneRep->fade)); + changes.push_back(new FadeChangeRequest(id, curTime, curTime+sceneRep->fadeOut)); } - removeTime = curTime + sceneRep->fade; + removeTime = curTime + sceneRep->fadeOut; } sceneRep->clearContents(changes,removeTime); diff --git a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj index 0a792897e5..dc03e0813d 100644 --- a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj +++ b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj @@ -109,6 +109,7 @@ 2BFC7E511D132DCB0040E2A3 /* ScreenMarkersTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */; }; 31041A2227A36D53004B25E1 /* WhirlyGlobe.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8F858AFC1E7FE60C00037D4E /* WhirlyGlobe.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 31041A3E27A4AE76004B25E1 /* ActiveObjectTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */; }; + 311C6A0B27B1C3FC0016BC7E /* FadeTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 311C6A0927B1C3FC0016BC7E /* FadeTestCase.swift */; }; 311E0A9C2680F597007BE16F /* ATS_Route.shp in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A902680F597007BE16F /* ATS_Route.shp */; }; 311E0A9D2680F597007BE16F /* Airspace_Boundary.dbf in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */; }; 311E0A9E2680F597007BE16F /* Airspace_Boundary.shx in Resources */ = {isa = PBXBuildFile; fileRef = 311E0A922680F597007BE16F /* Airspace_Boundary.shx */; }; @@ -720,6 +721,7 @@ 2BFC7E501D132DCB0040E2A3 /* ScreenMarkersTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenMarkersTestCase.m; sourceTree = ""; }; 31041A3D27A4AE76004B25E1 /* ActiveObjectTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveObjectTestCase.swift; sourceTree = ""; }; 311C6A0227B193AE0016BC7E /* SwiftBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwiftBridge.h; sourceTree = ""; }; + 311C6A0927B1C3FC0016BC7E /* FadeTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FadeTestCase.swift; sourceTree = ""; }; 311E0A902680F597007BE16F /* ATS_Route.shp */ = {isa = PBXFileReference; lastKnownFileType = file; name = ATS_Route.shp; path = ../../../resources/vectors/faa/ATS_Route.shp; sourceTree = SOURCE_ROOT; }; 311E0A912680F597007BE16F /* Airspace_Boundary.dbf */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.dbf; path = ../../../resources/vectors/faa/Airspace_Boundary.dbf; sourceTree = SOURCE_ROOT; }; 311E0A922680F597007BE16F /* Airspace_Boundary.shx */ = {isa = PBXFileReference; lastKnownFileType = file; name = Airspace_Boundary.shx; path = ../../../resources/vectors/faa/Airspace_Boundary.shx; sourceTree = SOURCE_ROOT; }; @@ -1364,6 +1366,7 @@ 311E0AAA26865D2C007BE16F /* ESRIRemoteTestCase.swift */, 2BDEB3001C924842003259B3 /* ExtrudedModelTestCase.h */, 2BDEB3011C924842003259B3 /* ExtrudedModelTestCase.m */, + 311C6A0927B1C3FC0016BC7E /* FadeTestCase.swift */, E5679F461CB72DE800369A15 /* FindHeightTestCase.h */, E5679F471CB72DE800369A15 /* FindHeightTestCase.m */, 2B249F3E23F4A82600CFA3D0 /* GeographyClass.swift */, @@ -2657,6 +2660,7 @@ 2BBCE41C2220A4170013E158 /* PagingLayerTestCase.m in Sources */, 2B4B30AB2395E0DE00854073 /* StartupShutdownTestCase.swift in Sources */, D8F2FE2C1BE7CAD30058A310 /* MegaMarkersTestCase.m in Sources */, + 311C6A0B27B1C3FC0016BC7E /* FadeTestCase.swift in Sources */, 31D328AD26387E7900456B93 /* GreatCircleTestCase.swift in Sources */, 2B4B30AA2395E0DE00854073 /* MapboxTestCase.swift in Sources */, D8341A711BE2C8D200411A46 /* VectorsTestCase.mm in Sources */, diff --git a/ios/apps/AutoTester/AutoTester/StartupViewController.swift b/ios/apps/AutoTester/AutoTester/StartupViewController.swift index e4f10a31e7..8efe05363e 100644 --- a/ios/apps/AutoTester/AutoTester/StartupViewController.swift +++ b/ios/apps/AutoTester/AutoTester/StartupViewController.swift @@ -25,6 +25,7 @@ class StartupViewController: UITableViewController, UIPopoverPresentationControl ClusteredMarkersTestCase(), ESRIRemoteTestCase(), ExtrudedModelTestCase(), + FadeTestCase(), FindHeightTestCase(), GeoJSONStyleTestCase(), GeographyClassTestCase(), diff --git a/ios/apps/AutoTester/AutoTester/testCases/FadeTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/FadeTestCase.swift new file mode 100644 index 0000000000..71ed4ee16d --- /dev/null +++ b/ios/apps/AutoTester/AutoTester/testCases/FadeTestCase.swift @@ -0,0 +1,135 @@ +// +// FadeTestCase.swift +// AutoTester +// +// Created by Tim Sylvester on 02/07/22. +// Copyright 2022 mousebird consulting. All rights reserved. +// + +import Foundation +import WhirlyGlobe + +class FadeTestCase: MaplyTestCase { + + override init() { + super.init() + self.name = "Fade" + self.implementations = [.globe,.map] + } + + func setup() { + if let vc = baseViewController { + addStuff(vc) + } + timer = Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) { [weak self] _ in + if let self = self, let vc = self.baseViewController { + self.addStuff(vc) + } + } + } + + func addStuff(_ vc: MaplyBaseViewController) { + let oldObjs = [MaplyComponentObject](self.objs) + var newObjs = [MaplyComponentObject]() + let fillDesc = [ + kMaplyEnable: false, + kMaplyColor: UIColor.red.withAlphaComponent(0.5), + kMaplyFilled: true + ] as [AnyHashable: Any] + let lineDesc = [ + kMaplyEnable: false, + kMaplyColor: UIColor.magenta.withAlphaComponent(0.75), + kMaplyFilled: false + ] as [AnyHashable: Any] + + do { + var coords = [ + MaplyCoordinateMakeWithDegrees(-90, 40+offset), + MaplyCoordinateMakeWithDegrees(-89, 42+offset), + MaplyCoordinateMakeWithDegrees(-88, 40+offset), + ] + let area = MaplyVectorObject.init(areal: &coords, numCoords: Int32(coords.count), attributes: nil) + // Fade in over two seconds, fade out over two seconds when removed + let desc = [ kMaplyFade: 2.0 ] as [AnyHashable: Any] + if let obj = vc.addVectors([area], desc: fillDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + if let obj = vc.addVectors([area], desc: lineDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + } + + do { + var coords = [ + MaplyCoordinateMakeWithDegrees(-88, 40+offset), + MaplyCoordinateMakeWithDegrees(-87, 42+offset), + MaplyCoordinateMakeWithDegrees(-86, 40+offset), + ] + let area = MaplyVectorObject.init(areal: &coords, numCoords: Int32(coords.count), attributes: nil) + // Fade in over two seconds + let desc = [ kMaplyFadeIn: 2.0 ] as [AnyHashable: Any] + if let obj = vc.addVectors([area], desc: fillDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + if let obj = vc.addVectors([area], desc: lineDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + } + + do { + var coords = [ + MaplyCoordinateMakeWithDegrees(-86, 40+offset), + MaplyCoordinateMakeWithDegrees(-85, 42+offset), + MaplyCoordinateMakeWithDegrees(-84, 40+offset), + ] + let area = MaplyVectorObject.init(areal: &coords, numCoords: Int32(coords.count), attributes: nil) + // Fade out over two seconds (when removed) + let desc = [ kMaplyFadeOut: 2.0 ] as [AnyHashable: Any] + if let obj = vc.addVectors([area], desc: fillDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + if let obj = vc.addVectors([area], desc: lineDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + } + + do { + var coords = [ + MaplyCoordinateMakeWithDegrees(-84, 40+offset), + MaplyCoordinateMakeWithDegrees(-83, 42+offset), + MaplyCoordinateMakeWithDegrees(-82, 40+offset), + ] + let area = MaplyVectorObject.init(areal: &coords, numCoords: Int32(coords.count), attributes: nil) + let desc = [ + // Fade out over two seconds, starting one second from now + kMaplyFadeOut: 2.0, + kMaplyFadeOutTime: CFAbsoluteTimeGetCurrent() + 1.0, + ] as [AnyHashable: Any] + if let obj = vc.addVectors([area], desc: fillDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + if let obj = vc.addVectors([area], desc: lineDesc.merging(desc) { $1 }, mode: .current) { newObjs.append(obj) } + } + + // todo: Add other stuff that supports fades: wide vectors, labels, markers, shapes, ... + + offset = (offset == 0.0) ? 2.0 : 0.0 + + vc.enable(newObjs, mode: .current) + vc.remove(oldObjs) + objs = newObjs + } + + override func setUpWithGlobe(_ globeVC: WhirlyGlobeViewController) { + baseCase.setUpWithGlobe(globeVC) + globeVC.animate(toPosition: MaplyCoordinateMakeWithDegrees(-80, 40), height: 0.5, heading: 0, time: 3) + setup() + } + + override func setUpWithMap(_ mapVC: MaplyViewController) { + baseCase.setUpWithMap(mapVC) + setup() + mapVC.animate(toPosition: MaplyCoordinateMakeWithDegrees(-80, 40), height: 0.5, time: 3) + } + + override func stop() { + timer?.invalidate() + timer = nil + baseViewController?.remove(objs, mode: MaplyThreadMode.current); + objs.removeAll() + baseCase.stop() + super.stop() + } + + let baseCase = CartoDBLightTestCase() + var objs = [MaplyComponentObject]() + var timer: Timer? + var offset = Float(0.0) +} + diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 4959b760ce..46c572c31c 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -41,19 +41,17 @@ float calculateFade(constant Uniforms &uni, fade = 1.0; else fade = (uni.currentTime - uniA.fadeDown)/(uniA.fadeUp - uniA.fadeDown); - } else { - if (uniA.fadeUp < uniA.fadeDown) - { - // Heading to 0 - if (uni.currentTime < uniA.fadeUp) - fade = 1.0; + } else if (uniA.fadeUp < uniA.fadeDown) { + // Heading to 0 + if (uni.currentTime < uniA.fadeUp) + fade = 1.0; + else + if (uni.currentTime > uniA.fadeDown) + fade = 0.0; else - if (uni.currentTime > uniA.fadeDown) - fade = 0.0; - else - fade = 1.0-(uni.currentTime - uniA.fadeUp)/(uniA.fadeDown - uniA.fadeUp); - } + fade = 1.0-(uni.currentTime - uniA.fadeUp)/(uniA.fadeDown - uniA.fadeUp); } + // Deal with the range based fade if (uni.height > 0.0) { From d7d7a61df6b5565c2d3fe533aee2dac8d9421e27 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 9 Feb 2022 15:48:26 -0800 Subject: [PATCH 29/78] Fix copy/paste error --- .../src/control/MaplyRenderController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm index 10c29b30cd..0c977cf7a4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm @@ -995,7 +995,7 @@ - (void)setupShadersMTL // Night/Day Shader [self addShader:kMaplyShaderDefaultTriNightDay program: std::make_shared( - [kMaplyShaderDefaultModelTri cStringUsingEncoding:NSASCIIStringEncoding], + [kMaplyShaderDefaultTriNightDay cStringUsingEncoding:NSASCIIStringEncoding], [mtlLib newFunctionWithName:@"vertexTri_multiTex_nightDay"], [mtlLib newFunctionWithName:@"fragmentTri_multiTex_nightDay"])]; From a1526894117f85bdd2477d93e88af819c2ca9a02 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 9 Feb 2022 15:48:51 -0800 Subject: [PATCH 30/78] Add missing method implementation --- ios/library/WhirlyGlobeLib/include/DrawableMTL.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/include/DrawableMTL.h b/ios/library/WhirlyGlobeLib/include/DrawableMTL.h index f9280a1d04..94a45a7620 100644 --- a/ios/library/WhirlyGlobeLib/include/DrawableMTL.h +++ b/ios/library/WhirlyGlobeLib/include/DrawableMTL.h @@ -76,8 +76,8 @@ class ArgBuffContentsMTL { BufferEntryMTL &getBuffer() { return buff; } // False if this failed to set up correctly - bool isValid(); - + bool isValid() const { return valid; } + protected: bool valid; bool isSetup; From 7f1f5c9e1590c2b3872ad54fdb6c3941fd590bca Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 9 Feb 2022 15:49:56 -0800 Subject: [PATCH 31/78] Eliminate unnecessary copies --- .../src/control/MaplyBaseInteractionLayer.mm | 20 ++++++++++--------- .../src/visual_objects/MaplyGeomModel.mm | 16 ++++++++------- .../src/BasicDrawableInstanceMTL.mm | 12 +++++------ .../WhirlyGlobeLib/src/BasicDrawableMTL.mm | 4 ++-- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm index 9f2cd40cec..b00ee2ecc1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseInteractionLayer.mm @@ -2318,13 +2318,16 @@ - (void)addModelInstancesRun:(NSArray *)argArray if (geomManager) { // Regular geometry instances - for (auto it : instSort) + for (const auto &it : instSort) { // Set up the textures and convert the geometry - MaplyGeomModel *model = it->model; + const MaplyGeomModel *model = it->model; // Return an existing base model or make a new one - SimpleIdentity baseModelID = [model getBaseModel:self fontTexManager:fontTexManager compObj:compObj mode:threadMode]; + const SimpleIdentity baseModelID = [model getBaseModel:self + fontTexManager:fontTexManager + compObj:compObj + mode:threadMode]; // Reference count the textures for this comp obj compObj->contents->texs.insert(model->maplyTextures.begin(),model->maplyTextures.end()); @@ -2333,19 +2336,18 @@ - (void)addModelInstancesRun:(NSArray *)argArray { // Convert the instances std::vector matInst; + matInst.reserve(it->instances.size()); for (unsigned int ii=0;iiinstances.size();ii++) { MaplyGeomModelInstance *modelInst = it->instances[ii]; - Matrix4d localMat = localMat.Identity(); // Local transformation, before the placement - if (modelInst.transform) - localMat = modelInst.transform.mat; + Matrix4d localMat = modelInst.transform ? modelInst.transform.mat : localMat.Identity(); // Add in the placement - Point3d localPt = coordSys->geographicToLocal(Point2d(modelInst.center.x,modelInst.center.y)); - Point3d dispLoc = coordAdapter->localToDisplay(Point3d(localPt.x(),localPt.y(),modelInst.center.z)); - Point3d norm = coordAdapter->normalForLocal(localPt); + const Point3d localPt = coordSys->geographicToLocal(Point2d(modelInst.center.x,modelInst.center.y)); + const Point3d dispLoc = coordAdapter->localToDisplay(Point3d(localPt.x(),localPt.y(),modelInst.center.z)); + const Point3d norm = coordAdapter->normalForLocal(localPt); // Construct a set of axes to build the shape around Point3d xAxis,yAxis; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyGeomModel.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyGeomModel.mm index 95f6d19f75..5e1f6770e4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyGeomModel.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyGeomModel.mm @@ -74,19 +74,21 @@ - (void)getTextureFileNames:(std::vector &)texFileNames } // Convert to raw geometry -- (void)asRawGeometry:(std::vector &)outRawGeom withTexMapping:(const std::vector &)texFileMap +- (void)asRawGeometry:(std::vector &)outRawGeom + withTexMapping:(const std::vector &)texFileMap { - outRawGeom.reserve(outRawGeom.size()+rawGeom.size()); + outRawGeom.reserve(rawGeom.size()); // Remap the texture IDs to something used by the scene - for (auto geom : rawGeom) + for (const auto &geom : rawGeom) { - for (unsigned int ii=0;ii= 0 && geom.texIDs[ii] < texFileMap.size()) + outRawGeom.push_back(geom); + for (auto &texID : outRawGeom.back().texIDs) + { + if (texID >= 0 && texID < texFileMap.size()) { - geom.texIDs[ii] = (int)texFileMap[geom.texIDs[ii]]; + texID = (int)texFileMap[texID]; } } - outRawGeom.push_back(geom); } } diff --git a/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm b/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm index 94e29a6975..ed7ba71b2c 100644 --- a/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm @@ -533,8 +533,8 @@ id renderState = getRenderPipelineState(sceneRender, scene, program, renderTarget, basicDrawMTL); // Wire up the various inputs that we know about - for (auto vertAttr : basicDrawMTL->vertexAttributes) { - VertexAttributeMTL *vertAttrMTL = (VertexAttributeMTL *)vertAttr; + for (const auto &vertAttr : basicDrawMTL->vertexAttributes) { + auto vertAttrMTL = (const VertexAttributeMTL *)vertAttr; if (vertAttrMTL->buffer.buffer && (vertAttrMTL->slot >= 0)) { [cmdEncode setVertexBuffer:vertAttrMTL->buffer.buffer offset:vertAttrMTL->buffer.offset atIndex:vertAttrMTL->slot]; } @@ -746,16 +746,16 @@ id renderState = getRenderPipelineState(sceneRender, scene, program, renderTarget, basicDrawMTL); // Wire up the various inputs that we know about - for (auto vertAttr : basicDrawMTL->vertexAttributes) { - VertexAttributeMTL *vertAttrMTL = (VertexAttributeMTL *)vertAttr; + for (const auto &vertAttr : basicDrawMTL->vertexAttributes) { + auto vertAttrMTL = (const VertexAttributeMTL *)vertAttr; if (vertAttrMTL->buffer.buffer && (vertAttrMTL->slot >= 0)) [cmdEncode setVertexBuffer:vertAttrMTL->buffer.buffer offset:vertAttrMTL->buffer.offset atIndex:vertAttrMTL->slot]; } // And provide defaults for the ones we don't. Both in the basic drawable and our instance - for (auto defAttr : basicDrawMTL->defaultAttrs) + for (const auto &defAttr : basicDrawMTL->defaultAttrs) [cmdEncode setVertexBuffer:defAttr.buffer.buffer offset:defAttr.buffer.offset atIndex:defAttr.bufferIndex]; - for (auto defAttr : defaultAttrs) + for (const auto &defAttr : defaultAttrs) [cmdEncode setVertexBuffer:defAttr.buffer.buffer offset:defAttr.buffer.offset atIndex:defAttr.bufferIndex]; [cmdEncode setRenderPipelineState:renderState]; diff --git a/ios/library/WhirlyGlobeLib/src/BasicDrawableMTL.mm b/ios/library/WhirlyGlobeLib/src/BasicDrawableMTL.mm index 19e9600c91..3d537fdd85 100644 --- a/ios/library/WhirlyGlobeLib/src/BasicDrawableMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/BasicDrawableMTL.mm @@ -656,7 +656,7 @@ id renderState = getRenderPipelineState(sceneRender,scene,(ProgramMTL *)frameInfo->program,(RenderTargetMTL *)frameInfo->renderTarget); // Wire up the various inputs that we know about - for (auto vertAttr : vertexAttributes) { + for (const auto &vertAttr : vertexAttributes) { VertexAttributeMTL *vertAttrMTL = (VertexAttributeMTL *)vertAttr; if (vertAttrMTL->buffer.buffer && (vertAttrMTL->slot >= 0)) [cmdEncode setVertexBuffer:vertAttrMTL->buffer.buffer offset:vertAttrMTL->buffer.offset atIndex:vertAttrMTL->slot]; @@ -777,7 +777,7 @@ id renderState = getRenderPipelineState(sceneRender,scene,program,renderTarget); // Wire up the various inputs that we know about - for (auto vertAttr : vertexAttributes) { + for (const auto &vertAttr : vertexAttributes) { VertexAttributeMTL *vertAttrMTL = (VertexAttributeMTL *)vertAttr; if (vertAttrMTL->buffer.buffer && (vertAttrMTL->slot >= 0)) [cmdEncode setVertexBuffer:vertAttrMTL->buffer.buffer offset:vertAttrMTL->buffer.offset atIndex:vertAttrMTL->slot]; From 6d6dd6fc810e3a2318d8c112876fb897b60f02aa Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 9 Feb 2022 15:50:37 -0800 Subject: [PATCH 32/78] Ensure that model points always have texture coordinates to avoid shader errors --- common/WhirlyGlobeLib/src/GeometryManager.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/common/WhirlyGlobeLib/src/GeometryManager.cpp b/common/WhirlyGlobeLib/src/GeometryManager.cpp index cc8d37451d..7fafb4c173 100644 --- a/common/WhirlyGlobeLib/src/GeometryManager.cpp +++ b/common/WhirlyGlobeLib/src/GeometryManager.cpp @@ -194,23 +194,23 @@ void GeometryRaw::buildDrawables(std::vector &draws,con int baseVert = draw->getNumPoints(); for (unsigned int jj=0;jj<3;jj++) { - const Point3d &pt = pts[tri.verts[jj]]; + const int vjj = tri.verts[jj]; + const Point3d &pt = pts[vjj]; Vector4d outPt = mat * Eigen::Vector4d(pt.x(),pt.y(),pt.z(),1.0); Point3d newPt(outPt.x()/outPt.w(),outPt.y()/outPt.w(),outPt.z()/outPt.w()); draw->addPoint(newPt); if (!norms.empty()) { - const Point3d &norm = norms[tri.verts[jj]]; + const Point3d &norm = norms[vjj]; // Note: Not the right way to transform normals Vector4d projNorm = mat * Eigen::Vector4d(norm.x(),norm.y(),norm.z(),0.0); Point3d newNorm(projNorm.x(),projNorm.y(),projNorm.z()); newNorm.normalize(); draw->addNormal(newNorm); } - if (!texCoords.empty()) - draw->addTexCoord(0,texCoords[tri.verts[jj]]); + draw->addTexCoord(0, (vjj < texCoords.size()) ? texCoords[vjj] : TexCoord(0,0)); if (!colors.empty() && !colorOverride) - draw->addColor(colors[tri.verts[jj]]); + draw->addColor(colors[vjj]); } draw->addTriangle(BasicDrawable::Triangle(baseVert,baseVert+1,baseVert+2)); @@ -822,8 +822,13 @@ SimpleIdentity GeometryManager::addGeometryInstances(SimpleIdentity baseGeomID,c // Check for moving models bool hasMotion = false; for (const GeometryInstance &inst : instances) + { if (inst.duration > 0.0) + { hasMotion = true; + break; + } + } // Work through the model instances std::vector singleInsts; From efd7e3b4d1f61ecb2b6dcb6f4c3854e2194febd9 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 10 Feb 2022 16:30:04 -0800 Subject: [PATCH 33/78] Improve exception safety around pixel locking --- .../WhirlyGlobeLib/src/ImageTile_Android.cpp | 33 ++++++++++++------- .../jni/src/renderer/RenderController_jni.cpp | 10 ++---- .../maply/jni/src/scene/Texture_jni.cpp | 21 ++++++++---- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/android/library/maply/WhirlyGlobeLib/src/ImageTile_Android.cpp b/android/library/maply/WhirlyGlobeLib/src/ImageTile_Android.cpp index cc985d62bb..1d3e58c1b9 100644 --- a/android/library/maply/WhirlyGlobeLib/src/ImageTile_Android.cpp +++ b/android/library/maply/WhirlyGlobeLib/src/ImageTile_Android.cpp @@ -59,24 +59,33 @@ void ImageTile_Android::setBitmap(JNIEnv *env,jobject bitmapObj) return; } // Copy the raw data over to the texture - void* bitmapPixels; - if (AndroidBitmap_lockPixels(env, bitmapObj, &bitmapPixels) < 0) + void* bitmapPixels = nullptr; + if (AndroidBitmap_lockPixels(env, bitmapObj, &bitmapPixels) != ANDROID_BITMAP_RESULT_SUCCESS) { return; } - if (info.height > 0 && info.width > 0) + try { - //uint32_t* src = (uint32_t*) bitmapPixels; - rawData = std::make_shared(bitmapPixels,info.height*info.width*4); + if (info.height > 0 && info.width > 0) + { + rawData = std::make_shared(bitmapPixels, info.height * info.width * 4); + } + + type = MaplyImgTypeRawImage; + borderSize = 0; + width = (int)info.width; + targetWidth = width; + height = (int)info.height; + targetHeight = height; + components = 4; + } + catch (...) + { + // Make sure to release the lock, even in case of an exception + AndroidBitmap_unlockPixels(env, bitmapObj); + throw; } - - type = MaplyImgTypeRawImage; - borderSize = 0; - width = info.width; targetWidth = width; - height = info.height; targetHeight = height; - components = 4; - AndroidBitmap_unlockPixels(env, bitmapObj); } diff --git a/android/library/maply/jni/src/renderer/RenderController_jni.cpp b/android/library/maply/jni/src/renderer/RenderController_jni.cpp index e22ff42c85..07d85dedf1 100644 --- a/android/library/maply/jni/src/renderer/RenderController_jni.cpp +++ b/android/library/maply/jni/src/renderer/RenderController_jni.cpp @@ -415,7 +415,7 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_RenderController_renderToBitmapN // Copy the data void* bitmapPixels = nullptr; - if (AndroidBitmap_lockPixels(env, bitmapObj, &bitmapPixels) < 0) { + if (AndroidBitmap_lockPixels(env, bitmapObj, &bitmapPixels) != ANDROID_BITMAP_RESULT_SUCCESS) { wkLogLevel(Warn,"Failed to snapshot in RenderController:renderToBitmapNative() because of lockPixels."); return; } @@ -427,21 +427,15 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_RenderController_renderToBitmapN auto *bt = (unsigned *) bitmapPixels; for (int i = 0, k = 0; i < height; i++, k++) { - //for (int j = 0; j < width; j++) - //{ - // bt[(height - k - 1) * width + j] = b[i * width + j]; - //} memcpy(&bt[(height - k - 1) * width], &b[i * width], width * 4); } -// memmove(bitmapPixels,snapshot->data->getRawData(),snapshot->data->getLen()); - - AndroidBitmap_unlockPixels(env, bitmapObj); } catch (...) { AndroidBitmap_unlockPixels(env, bitmapObj); throw; } + AndroidBitmap_unlockPixels(env, bitmapObj); } catch (...) { diff --git a/android/library/maply/jni/src/scene/Texture_jni.cpp b/android/library/maply/jni/src/scene/Texture_jni.cpp index 807e098cec..54af561e07 100644 --- a/android/library/maply/jni/src/scene/Texture_jni.cpp +++ b/android/library/maply/jni/src/scene/Texture_jni.cpp @@ -87,15 +87,24 @@ JNIEXPORT jboolean JNICALL Java_com_mousebird_maply_Texture_setBitmap return false; // Copy the raw data over to the texture - void* bitmapPixels; - if (AndroidBitmap_lockPixels(env, bitmapObj, &bitmapPixels) < 0) + void* bitmapPixels = nullptr; + if (AndroidBitmap_lockPixels(env, bitmapObj, &bitmapPixels) != ANDROID_BITMAP_RESULT_SUCCESS) return false; - //uint32_t* src = (uint32_t*) bitmapPixels; - MutableRawData *rawData = new MutableRawData(bitmapPixels,info.height*info.width*4); - tex->setRawData(rawData, info.width, info.height); + try + { + // Make a copy + auto rawData = new MutableRawData(bitmapPixels, info.height * info.width * 4); + // takes ownership + tex->setRawData(rawData, (int)info.width, (int)info.height); + } + catch (...) + { + // Make sure to release the lock, even in case of an exception + AndroidBitmap_unlockPixels(env, bitmapObj); + throw; + } AndroidBitmap_unlockPixels(env, bitmapObj); - classInfo->setHandle(env, obj, tex); return true; } From 8389d535148f76dfc11414218ec6bd771ab45e41 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 10 Feb 2022 14:53:26 -0800 Subject: [PATCH 34/78] Prevent change requests and overlay objects from being lost on early return --- .../maply/MapboxVectorInterpreter.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/android/library/maply/src/main/java/com/mousebird/maply/MapboxVectorInterpreter.java b/android/library/maply/src/main/java/com/mousebird/maply/MapboxVectorInterpreter.java index 1a6537eece..1f134620bf 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/MapboxVectorInterpreter.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/MapboxVectorInterpreter.java @@ -264,6 +264,22 @@ public void dataForTile(LoaderReturn loadReturn,QuadLoaderBase loader) } } + ArrayList ovlObjs = new ArrayList<>(); + ComponentObject[] thisOvjObjs = tileData.getComponentObjects("overlay"); + if (thisOvjObjs != null) { + Collections.addAll(ovlObjs, thisOvjObjs); + } + + // Capture changes immediately so they are cleaned up + loadReturn.mergeChanges(tileData.getChangeSet()); + + if (loadReturn.isCanceled()) { + // We'll lose the component objects if we don't put them in here + loadReturn.addComponentObjects(tileData.getComponentObjects()); + loadReturn.addOverlayComponentObjects(ovlObjs.toArray(new ComponentObject[0])); + return; + } + if (images.isEmpty() && pbfData.isEmpty()) { loadReturn.errorString = "No usable data"; return; @@ -280,20 +296,6 @@ public void dataForTile(LoaderReturn loadReturn,QuadLoaderBase loader) return; } - ArrayList ovlObjs = new ArrayList<>(); - ComponentObject[] thisOvjObjs = tileData.getComponentObjects("overlay"); - if (thisOvjObjs != null) { - Collections.addAll(ovlObjs, thisOvjObjs); - } - - loadReturn.mergeChanges(tileData.getChangeSet()); - - if (loadReturn.isCanceled()) { - // We'll lose the component objects if we don't put them in here - loadReturn.addComponentObjects(tileData.getComponentObjects()); - return; - } - // If we have a tile renderer, draw the data into that Bitmap tileBitmap = null; // multiple checks and synchronization are ok, tileRender is never set to null From bc174c0434d926c9e708c6edee7a9f96383e2722 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 10 Feb 2022 16:34:13 -0800 Subject: [PATCH 35/78] Improve cleanup of font textures on teardown. Fix compiler warnings. --- .../include/FontTextureManager_Android.h | 1 - .../src/FontTextureManager_Android.cpp | 5 +++ common/WhirlyGlobeLib/include/ChangeRequest.h | 4 +- .../include/FontTextureManager.h | 26 +++++++------ common/WhirlyGlobeLib/src/ChangeRequest.cpp | 10 +++++ .../WhirlyGlobeLib/src/FontTextureManager.cpp | 37 ++++++------------- common/WhirlyGlobeLib/src/VectorData.cpp | 10 ++--- 7 files changed, 49 insertions(+), 44 deletions(-) diff --git a/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h b/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h index 1bc3b06730..66a16899d5 100644 --- a/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h +++ b/android/library/maply/WhirlyGlobeLib/include/FontTextureManager_Android.h @@ -36,7 +36,6 @@ class FontTextureManager_Android : public FontTextureManager // Wrapper for FontManager. struct FontManager_Android : public FontManager { - FontManager_Android() = default; FontManager_Android(PlatformThreadInfo *inst,jobject typefaceObj); virtual ~FontManager_Android(); diff --git a/android/library/maply/WhirlyGlobeLib/src/FontTextureManager_Android.cpp b/android/library/maply/WhirlyGlobeLib/src/FontTextureManager_Android.cpp index 8e40595a4f..d02f60373c 100644 --- a/android/library/maply/WhirlyGlobeLib/src/FontTextureManager_Android.cpp +++ b/android/library/maply/WhirlyGlobeLib/src/FontTextureManager_Android.cpp @@ -57,6 +57,7 @@ void FontTextureManager_Android::FontManager_Android::teardown(PlatformThreadInf ((PlatformInfo_Android*)inst)->env->DeleteGlobalRef(typefaceObj); typefaceObj = nullptr; } + this->FontManager::teardown(inst); } FontTextureManager_Android::FontTextureManager_Android(PlatformThreadInfo *inst, @@ -135,6 +136,10 @@ void FontTextureManager_Android::teardown(PlatformThreadInfo* threadInfo) charRenderObj = nullptr; renderMethodID = nullptr; glyphClassRef = nullptr; + + ChangeSet changes; + clear(changes); + discardChanges(changes); } std::unique_ptr FontTextureManager_Android::addString( diff --git a/common/WhirlyGlobeLib/include/ChangeRequest.h b/common/WhirlyGlobeLib/include/ChangeRequest.h index 6b39e20f68..7d9f8e7e75 100644 --- a/common/WhirlyGlobeLib/include/ChangeRequest.h +++ b/common/WhirlyGlobeLib/include/ChangeRequest.h @@ -56,7 +56,7 @@ typedef std::shared_ptr RenderTeardownInfoRef; class Scene; class SceneRenderer; -/** This is the base clase for a change request. Change requests +/** This is the base class for a change request. Change requests are how we modify things in the scene. The renderer is running on the main thread and we want to keep our interaction with it very simple. So instead of deleting things or modifying them @@ -88,6 +88,8 @@ class ChangeRequest typedef std::vector ChangeSet; typedef std::shared_ptr ChangeSetRef; +void discardChanges(ChangeSet &changes); + typedef struct ChangeSorter { bool operator () (const ChangeRequest *a,const ChangeRequest *b) const diff --git a/common/WhirlyGlobeLib/include/FontTextureManager.h b/common/WhirlyGlobeLib/include/FontTextureManager.h index 1c0ba961d6..a5eff3a0b4 100644 --- a/common/WhirlyGlobeLib/include/FontTextureManager.h +++ b/common/WhirlyGlobeLib/include/FontTextureManager.h @@ -43,8 +43,8 @@ class FontManager : public Identifiable public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW; + FontManager() = default; FontManager(SimpleIdentity theId) : Identifiable(theId) { } - FontManager(); virtual ~FontManager(); // Comparison operator @@ -82,7 +82,9 @@ class FontManager : public Identifiable GlyphInfo *findGlyph(WKGlyph glyph); // Add the given glyph info - GlyphInfo *addGlyph(WKGlyph glyph,SubTexture subTex,const Point2f &size,const Point2f &offset,const Point2f &textureOffset); + GlyphInfo *addGlyph(WKGlyph glyph,const SubTexture &subTex, + const Point2f &size,const Point2f &offset, + const Point2f &textureOffset); // Remove references to the given glyphs. void addGlyphRefs(const GlyphSet &usedGlyphs); @@ -90,14 +92,14 @@ class FontManager : public Identifiable // Returns a list of texture references to remove void removeGlyphRefs(const GlyphSet &usedGlyphs,std::vector &toRemove); - int refCount; - RGBAColor color; - RGBAColor backColor; + int refCount = 0; + RGBAColor color = RGBAColor::white(); + RGBAColor backColor = RGBAColor::black(); + RGBAColor outlineColor = RGBAColor::black(); std::string fontName; - RGBAColor outlineColor; - float outlineSize; - float pointSize; - + float outlineSize = 0.0f; + float pointSize = 0.0f; + protected: // Maps Glyphs (shorts) to texture and region typedef std::set GlyphInfoSet; @@ -177,9 +179,9 @@ class FontTextureManager FontManagerMap fontManagers; - SceneRenderer *sceneRender; - Scene *scene; - DynamicTextureAtlas *texAtlas; + SceneRenderer *sceneRender = nullptr; + Scene *scene = nullptr; + DynamicTextureAtlas *texAtlas = nullptr; DrawStringRepSet drawStringReps; std::mutex lock; }; diff --git a/common/WhirlyGlobeLib/src/ChangeRequest.cpp b/common/WhirlyGlobeLib/src/ChangeRequest.cpp index 4d6dfe854f..9e7fde1f3c 100644 --- a/common/WhirlyGlobeLib/src/ChangeRequest.cpp +++ b/common/WhirlyGlobeLib/src/ChangeRequest.cpp @@ -24,6 +24,16 @@ namespace WhirlyKit { +void discardChanges(ChangeSet &changes) +{ + for (auto &change : changes) + { + delete change; + change = nullptr; + } + changes.clear(); +} + void RenderTeardownInfo::destroyTexture(SceneRenderer *renderer,const TextureBaseRef &tex) { tex->destroyInRenderer(renderer->getRenderSetupInfo(), renderer->getScene()); diff --git a/common/WhirlyGlobeLib/src/FontTextureManager.cpp b/common/WhirlyGlobeLib/src/FontTextureManager.cpp index 978d174755..da7d9d5d93 100644 --- a/common/WhirlyGlobeLib/src/FontTextureManager.cpp +++ b/common/WhirlyGlobeLib/src/FontTextureManager.cpp @@ -18,7 +18,6 @@ #import "FontTextureManager.h" #import "WhirlyVector.h" -#import "WhirlyKitLog.h" using namespace Eigen; using namespace WhirlyKit; @@ -26,15 +25,6 @@ using namespace WhirlyKit; namespace WhirlyKit { -FontManager::FontManager() : - refCount(0), - color(255,255,255,255), - outlineColor(0,0,0,0), - backColor(0,0,0,0), - outlineSize(0.0) -{ -} - FontManager::~FontManager() { for (auto glyph : glyphs) @@ -53,9 +43,9 @@ FontManager::GlyphInfo *FontManager::findGlyph(WKGlyph glyph) } // Add the given glyph info -FontManager::GlyphInfo *FontManager::addGlyph(WKGlyph glyph,SubTexture subTex,const Point2f &size,const Point2f &offset,const Point2f &textureOffset) +FontManager::GlyphInfo *FontManager::addGlyph(WKGlyph glyph,const SubTexture &subTex,const Point2f &size,const Point2f &offset,const Point2f &textureOffset) { - GlyphInfo *info = new GlyphInfo(glyph); + auto info = new GlyphInfo(glyph); info->size = size; info->offset = offset; info->textureOffset = textureOffset; @@ -110,27 +100,23 @@ void FontManager::removeGlyphRefs(const GlyphSet &usedGlyphs,std::vector guardLock(lock); - - delete texAtlas; - texAtlas = nullptr; - for (auto drawStringRep : drawStringReps) - { - delete drawStringRep; - } - drawStringReps.clear(); - fontManagers.clear(); + ChangeSet changes; + clear(changes); + discardChanges(changes); } void FontTextureManager::init() { + // Note: caller must own mutex lock + if (!texAtlas) { // Let's do the biggest possible texture with small cells 32 bits deep @@ -154,6 +140,7 @@ void FontTextureManager::clear(ChangeSet &changes) { delete drawStringRep; } + drawStringReps.clear(); fontManagers.clear(); } @@ -161,7 +148,7 @@ void FontTextureManager::removeString(PlatformThreadInfo *inst, SimpleIdentity d { std::lock_guard guardLock(lock); - DrawStringRep *theRep = nullptr; + DrawStringRep *theRep; { DrawStringRep dummyRep(drawStringId); auto it = drawStringReps.find(&dummyRep); diff --git a/common/WhirlyGlobeLib/src/VectorData.cpp b/common/WhirlyGlobeLib/src/VectorData.cpp index 1604049ad1..80a0d1e9bb 100644 --- a/common/WhirlyGlobeLib/src/VectorData.cpp +++ b/common/WhirlyGlobeLib/src/VectorData.cpp @@ -44,7 +44,7 @@ TRet CalcLoopArea(const std::vector> &loop, size_t const auto &p1 = loop[ii]; const auto &p2 = loop[(ii+1)%loopSize]; - // Inputs may be floats or doubles. Watch out for truncation on itermediate values. + // Inputs may be floats or doubles. Watch out for truncation on intermediate values. area += (TInt)p1.x() * (TInt)p2.y(); area -= (TInt)p1.y() * (TInt)p2.x(); } @@ -304,10 +304,10 @@ void SubdivideEdgesToSurfaceGC(const VectorRing &inPts,Point3dVector &outPts,boo const Point2f &p0 = inPts[ii]; const Point2f &p1 = inPts[(ii+1)%inPts.size()]; Point3d dp0 = adapter->localToDisplay(coordSys->geographicToLocal3d(GeoCoord(p0.x(),p0.y()))); - if (adapter && !adapter->isFlat()) + if (!adapter->isFlat()) dp0 = dp0.normalized() * (1.0 + surfOffset); Point3d dp1 = adapter->localToDisplay(coordSys->geographicToLocal3d(GeoCoord(p1.x(),p1.y()))); - if (adapter && !adapter->isFlat()) + if (!adapter->isFlat()) dp1 = dp1.normalized() * (1.0 + surfOffset); outPts.push_back(dp0); subdivideToSurfaceRecurseGC(dp0,dp1,outPts,adapter,eps2,surfOffset,minPts); @@ -856,8 +856,8 @@ bool VectorParseCoordinates(JSONNode node,VectorRing &pts, bool subCall=false) if (node.size() < 2) return false; - float lon = it->as_float(); ++it; - float lat = it->as_float(); + const auto lon = (float)it->as_float(); ++it; + const auto lat = (float)it->as_float(); pts.push_back(GeoCoord::CoordFromDegrees(lon,lat)); // There might be a Z value or even other junk. We just want the first two coordinates From 5af60058dfb23a757eef827931d3c09be1e1d2a8 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 10 Feb 2022 17:57:11 -0800 Subject: [PATCH 36/78] Fix some cases where change requests could potentially be leaked --- .../jni/src/formats/VectorTileData_jni.cpp | 40 +++++++++++-------- .../maply/jni/src/scene/ChangeSet_jni.cpp | 9 +++-- .../library/maply/jni/src/scene/Scene_jni.cpp | 6 +-- common/WhirlyGlobeLib/include/Scene.h | 2 +- common/WhirlyGlobeLib/src/Scene.cpp | 38 +++++++++++------- .../WhirlyGlobeLib/src/SceneGraphManager.cpp | 2 +- .../WhirlyGlobeLib/include/LayerThread.h | 2 +- ios/library/WhirlyGlobeLib/src/LayerThread.mm | 6 +-- 8 files changed, 62 insertions(+), 43 deletions(-) diff --git a/android/library/maply/jni/src/formats/VectorTileData_jni.cpp b/android/library/maply/jni/src/formats/VectorTileData_jni.cpp index 3bce71524b..2e56602c16 100644 --- a/android/library/maply/jni/src/formats/VectorTileData_jni.cpp +++ b/android/library/maply/jni/src/formats/VectorTileData_jni.cpp @@ -83,18 +83,30 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_VectorTileData_initialise__IIILc tileData->geoBBox.ur() = *geoUR; // Make sure the get/set are atomic. - std::lock_guard lock(disposeMutex); - - if (auto existingPtr = tileDataClassInfo->getObject(env, obj)) { - // Swap the new data into the existing shared_ptr. The old value (if any) - // controlled by the shared_ptr will be released outside of the mutex region. - existingPtr->swap(tileData); + std::lock_guard lock(disposeMutex); + if (auto existingPtr = tileDataClassInfo->getObject(env, obj)) + { + // Swap the new data into the existing shared_ptr. The old value (if any) + // controlled by the shared_ptr will be released outside of the mutex region. + existingPtr->swap(tileData); + } + else + { + // Called from a constructor or after a dispose, we need a new shared_ptr + tileDataClassInfo->setHandle(env, obj, new VectorTileDataRef(tileData)); + tileData.reset(); + } } - else + + if (tileData) { - // Called from a constructor or after a dispose, we need a new shared_ptr - tileDataClassInfo->setHandle(env, obj, new VectorTileDataRef(tileData)); + // Discard any changes in the item being replaced + for (auto change : tileData->changes) + { + delete change; + } + tileData->changes.clear(); } } MAPLY_STD_JNI_CATCH() @@ -106,13 +118,9 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_VectorTileData_dispose(JNIEnv *e try { const auto classInfo = VectorTileDataClassInfo::getClassInfo(); - VectorTileDataRef *inst; - { - std::lock_guard lock(disposeMutex); - inst = classInfo->getObject(env,obj); - classInfo->clearHandle(env,obj); - } - delete inst; + std::lock_guard lock(disposeMutex); + delete classInfo->getObject(env,obj); + classInfo->clearHandle(env,obj); } MAPLY_STD_JNI_CATCH() } diff --git a/android/library/maply/jni/src/scene/ChangeSet_jni.cpp b/android/library/maply/jni/src/scene/ChangeSet_jni.cpp index bccdc0b259..04191de3c9 100644 --- a/android/library/maply/jni/src/scene/ChangeSet_jni.cpp +++ b/android/library/maply/jni/src/scene/ChangeSet_jni.cpp @@ -37,6 +37,7 @@ JNIEXPORT jobject JNICALL MakeChangeSet(JNIEnv *env,const ChangeSet &changeSet) ChangeSetClassInfo *classInfo = ChangeSetClassInfo::getClassInfo(env,"com/mousebird/maply/ChangeSet"); jobject newObj = classInfo->makeWrapperObject(env,nullptr); WhirlyKit::ChangeSetRef *inst = classInfo->getObject(env,newObj); + (*inst)->reserve(changeSet.size()); (*inst)->insert((*inst)->end(),changeSet.begin(),changeSet.end()); return newObj; } @@ -61,9 +62,12 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_ChangeSet_dispose try { ChangeSetClassInfo *classInfo = ChangeSetClassInfo::getClassInfo(); - std::lock_guard lock(disposeMutex); + std::unique_lock lock(disposeMutex); if (const auto changeSet = classInfo->getObject(env,obj)) { + classInfo->clearHandle(env,obj); + lock.unlock(); + // Be sure to delete the contents for (auto &change : **changeSet) { @@ -72,7 +76,6 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_ChangeSet_dispose } delete changeSet; } - classInfo->clearHandle(env,obj); } MAPLY_STD_JNI_CATCH() } @@ -128,6 +131,7 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_ChangeSet_process requiresFlush = true; } } + (*changes)->clear(); // If anything needed a flush after that, let's do it if (requiresFlush) @@ -136,7 +140,6 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_ChangeSet_process } scene->addChangeRequests(changesToAdd); - (*changes)->clear(); } MAPLY_STD_JNI_CATCH() diff --git a/android/library/maply/jni/src/scene/Scene_jni.cpp b/android/library/maply/jni/src/scene/Scene_jni.cpp index bd8e107ac0..114021a90f 100644 --- a/android/library/maply/jni/src/scene/Scene_jni.cpp +++ b/android/library/maply/jni/src/scene/Scene_jni.cpp @@ -167,8 +167,7 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_Scene_changeRenderTarget(JNIEnv { if (Scene *scene = SceneClassInfo::get(env,obj)) { - ChangeSet changes = { new ChangeRenderTargetReq(renderTargetID, texID) }; - scene->addChangeRequests(changes); + scene->addChangeRequest(new ChangeRenderTargetReq(renderTargetID, texID)); } } MAPLY_STD_JNI_CATCH() @@ -181,8 +180,7 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_Scene_removeRenderTargetNative(J { if (Scene *scene = SceneClassInfo::get(env,obj)) { - ChangeSet changes = { new RemRenderTargetReq(targetID) }; - scene->addChangeRequests(changes); + scene->addChangeRequest(new RemRenderTargetReq(targetID)); } } MAPLY_STD_JNI_CATCH() diff --git a/common/WhirlyGlobeLib/include/Scene.h b/common/WhirlyGlobeLib/include/Scene.h index 14dab45d81..122502534d 100644 --- a/common/WhirlyGlobeLib/include/Scene.h +++ b/common/WhirlyGlobeLib/include/Scene.h @@ -272,7 +272,7 @@ class Scene : public DelayedDeletable void addChangeRequest(ChangeRequest *newChange); /// Add a list of change requets. You can call this from any thread. /// This is the faster option if you have more than one change request - void addChangeRequests(const ChangeSet &newchanges); + void addChangeRequests(ChangeSet &newchanges); /// Process change requests /// Only the renderer should call this in the rendering thread diff --git a/common/WhirlyGlobeLib/src/Scene.cpp b/common/WhirlyGlobeLib/src/Scene.cpp index 3ce77c9a23..2876c4d2be 100644 --- a/common/WhirlyGlobeLib/src/Scene.cpp +++ b/common/WhirlyGlobeLib/src/Scene.cpp @@ -180,20 +180,23 @@ Scene::~Scene() } theChangeRequests.clear(); - auto timedChanges = std::move(timedChangeRequests); - for (auto *theChangeRequest : timedChanges) + for (auto *theChangeRequest : timedChangeRequests) { delete theChangeRequest; } - timedChanges.clear(); + timedChangeRequests.clear(); activeModels.clear(); subTextureMap.clear(); programs.clear(); - - fontTextureManager = nullptr; + + if (fontTextureManager) + { + fontTextureManager->teardown(nullptr); + fontTextureManager.reset(); + } } void Scene::teardown(PlatformThreadInfo*) @@ -220,17 +223,16 @@ void Scene::setDisplayAdapter(CoordSystemDisplayAdapter *newCoordAdapter) } // Add change requests to our list -void Scene::addChangeRequests(const ChangeSet &newChanges) +void Scene::addChangeRequests(ChangeSet &newChanges) { std::lock_guard guardLock(changeRequestLock); - - for (ChangeRequest *change : newChanges) - { + for (ChangeRequest *change : newChanges) { if (change && change->when > 0.0) timedChangeRequests.insert(change); else changeRequests.push_back(change); } + newChanges.clear(); } // Add a single change request @@ -406,13 +408,16 @@ int Scene::preProcessChanges(WhirlyKit::View *view,SceneRenderer *renderer,__unu } // Run these outside of the lock, since they might use the lock - for (auto req : preRequests) + for (auto &req : preRequests) { req->execute(this,renderer,view); delete req; + req = nullptr; } - return preRequests.size(); + const auto processed = (int)preRequests.size(); + preRequests.clear(); + return processed; } // Process outstanding changes. @@ -440,7 +445,9 @@ int Scene::processChanges(WhirlyKit::View *view,SceneRenderer *renderer,TimeInte // Move them if (end != beg) { - std::copy(beg, end, std::back_inserter(changeRequests)); + changeRequests.insert(changeRequests.end(), + std::make_move_iterator(beg), + std::make_move_iterator(end)); timedChangeRequests.erase(beg, end); } } @@ -449,16 +456,19 @@ int Scene::processChanges(WhirlyKit::View *view,SceneRenderer *renderer,TimeInte localChanges.swap(changeRequests); } - for (auto req : localChanges) + for (auto &req : localChanges) { if (req) { req->execute(this,renderer,view); delete req; + req = nullptr; } } - return localChanges.size(); + const auto processed = (int)localChanges.size(); + localChanges.clear(); + return processed; } bool Scene::hasChanges(TimeInterval now) const diff --git a/common/WhirlyGlobeLib/src/SceneGraphManager.cpp b/common/WhirlyGlobeLib/src/SceneGraphManager.cpp index 8e45bb276e..dc8434155e 100644 --- a/common/WhirlyGlobeLib/src/SceneGraphManager.cpp +++ b/common/WhirlyGlobeLib/src/SceneGraphManager.cpp @@ -107,7 +107,7 @@ SceneGraphManager::~SceneGraphManager() drawables.clear(); } -void SceneGraphManager::removeDrawable(SimpleIdentity drawID,std::vector &changes) +void SceneGraphManager::removeDrawable(SimpleIdentity drawID,ChangeSet &changes) { auto it = drawables.find(drawID); if (it == drawables.end()) diff --git a/ios/library/WhirlyGlobeLib/include/LayerThread.h b/ios/library/WhirlyGlobeLib/include/LayerThread.h index 7669aae8af..c0f6795161 100644 --- a/ios/library/WhirlyGlobeLib/include/LayerThread.h +++ b/ios/library/WhirlyGlobeLib/include/LayerThread.h @@ -79,7 +79,7 @@ /// Layers should send their change requests through here /// You can call this from any thread. -- (void)addChangeRequests:(std::vector &)changeRequests; +- (void)addChangeRequests:(WhirlyKit::ChangeSet &)changeRequests; /// Called by a layer to request a flush at the next opportunity. /// Presumably the layer did something worth flushing diff --git a/ios/library/WhirlyGlobeLib/src/LayerThread.mm b/ios/library/WhirlyGlobeLib/src/LayerThread.mm index 7426166a6f..5013752731 100644 --- a/ios/library/WhirlyGlobeLib/src/LayerThread.mm +++ b/ios/library/WhirlyGlobeLib/src/LayerThread.mm @@ -151,13 +151,12 @@ - (void)addThreadToShutdown:(WhirlyKitLayerThread *)thread - (void)addChangeRequest:(WhirlyKit::ChangeRequest *)changeRequest { - std::vector requests; + ChangeSet requests; requests.push_back(changeRequest); - [self addChangeRequests:requests]; } -- (void)addChangeRequests:(std::vector &)newChangeRequests +- (void)addChangeRequests:(ChangeSet &)newChangeRequests { if (self.isCancelled) { @@ -182,6 +181,7 @@ - (void)addChangeRequests:(std::vector &)newChangeRe [self performSelector:@selector(runAddChangeRequests) onThread:self withObject:nil waitUntilDone:NO]; changeRequests.insert(changeRequests.end(), newChangeRequests.begin(), newChangeRequests.end()); + newChangeRequests.clear(); } - (void)flushChangeRequests From f92885b3a9fa8c0b50cfc4478efbbee01101b4f9 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 10 Feb 2022 18:03:23 -0800 Subject: [PATCH 37/78] Avoid leaking changes from vector tile data. Improve merge process, categories weren't really being merged. --- .../include/MapboxVectorTileParser.h | 16 +-- .../src/MapboxVectorTileParser.cpp | 109 ++++++++++++------ 2 files changed, 80 insertions(+), 45 deletions(-) diff --git a/common/WhirlyGlobeLib/include/MapboxVectorTileParser.h b/common/WhirlyGlobeLib/include/MapboxVectorTileParser.h index c622ae8302..785938ac34 100644 --- a/common/WhirlyGlobeLib/include/MapboxVectorTileParser.h +++ b/common/WhirlyGlobeLib/include/MapboxVectorTileParser.h @@ -51,7 +51,7 @@ class PlatformThreadInfo; class VectorTileData { public: - VectorTileData(); + VectorTileData() = default; // Construct by just taking the outline information. No data. VectorTileData(const VectorTileData &); virtual ~VectorTileData(); @@ -102,7 +102,7 @@ class MapboxVectorTileParser { public: MapboxVectorTileParser(PlatformThreadInfo *inst,VectorStyleDelegateImplRef styleDelegate); - virtual ~MapboxVectorTileParser(); + virtual ~MapboxVectorTileParser() = default; /// If set, we'll parse into local coordinates as specified by the bounding box, rather than geo coords void setLocalCoords(bool b = true) { localCoords = b; } @@ -113,7 +113,7 @@ class MapboxVectorTileParser /// Parse everything, even if there's no style for it void setParseAll(bool b = true) { parseAll = b; } - /// Add a category for a particulary style ID + /// Add a category for a particular style ID /// These are used for sorting later on void addCategory(const std::string &category,long long styleID); @@ -155,19 +155,19 @@ class MapboxVectorTileParser const VectorStyleDelegateImplRef &getStyleDelegate() const { return styleDelegate; } protected: /// If set, we'll parse into local coordinates as specified by the bounding box, rather than geo coords - bool localCoords; + bool localCoords = false; /// Keep the vector objects around as we parse them - bool keepVectors; + bool keepVectors = false; /// Parse everything, even if there's no style for it - bool parseAll; + bool parseAll = false; /// If set, we'll tack a debug label in the middle of the tile - bool debugLabel; + bool debugLabel = false; /// If set, we'll put an outline around the tile - bool debugOutline; + bool debugOutline = false; std::string uuidName; diff --git a/common/WhirlyGlobeLib/src/MapboxVectorTileParser.cpp b/common/WhirlyGlobeLib/src/MapboxVectorTileParser.cpp index d07b724c6b..ba155a62c7 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorTileParser.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorTileParser.cpp @@ -31,10 +31,6 @@ using namespace Eigen; namespace WhirlyKit { -VectorTileData::VectorTileData() -{ -} - VectorTileData::VectorTileData(const VectorTileData &that) : ident(that.ident), bbox(that.bbox), geoBBox(that.geoBBox) { @@ -42,30 +38,62 @@ VectorTileData::VectorTileData(const VectorTileData &that) VectorTileData::~VectorTileData() { - for (auto it : vecObjsByStyle) - delete it.second; +#if defined(DEBUG) + if (std::any_of(changes.begin(), changes.end(), [](auto i){ return i; })) + { + wkLogLevel(Debug, "VectorTileData disposed with pending changes"); + } +#endif + clear(); } void VectorTileData::mergeFrom(VectorTileData *that) { - compObjs.insert(compObjs.end(),that->compObjs.begin(),that->compObjs.end()); - images.insert(images.end(),that->images.begin(),that->images.end()); - vecObjs.insert(vecObjs.end(),that->vecObjs.begin(),that->vecObjs.end()); - for (auto it : that->vecObjsByStyle) { - auto it2 = vecObjsByStyle.find(it.first); - if (it2 != vecObjsByStyle.end()) - it2->second->insert(it2->second->end(),it.second->begin(),it.second->end()); - else - vecObjsByStyle[it.first] = it.second; + compObjs.insert(compObjs.end(), + std::make_move_iterator(that->compObjs.begin()), + std::make_move_iterator(that->compObjs.end())); + images.insert(images.end(), + std::make_move_iterator(that->images.begin()), + std::make_move_iterator(that->images.end())); + vecObjs.insert(vecObjs.end(), + std::make_move_iterator(that->vecObjs.begin()), + std::make_move_iterator(that->vecObjs.end())); + + for (auto &kv : that->vecObjsByStyle) + { + const auto res = vecObjsByStyle.insert(kv); + if (!res.second) + { + // Already present, merge + auto &curVal = *(res.first->second); + curVal.insert(curVal.end(), + std::make_move_iterator(kv.second->begin()), + std::make_move_iterator(kv.second->end())); + } + kv.second = nullptr; // ownership transferred, don't delete } - that->vecObjsByStyle.clear(); - for (auto it : that->categories) { - categories[it.first] = it.second; + + for (auto &kv : that->categories) + { + const auto res = categories.insert(std::make_pair(kv.first, decltype(kv.second)())); + auto &newVal = res.first->second; + if (newVal.empty()) + { + // replace + std::swap(newVal, kv.second); + } + else + { + // merge + newVal.insert(newVal.end(), + std::make_move_iterator(kv.second.begin()), + std::make_move_iterator(kv.second.end())); + } } - if (!that->changes.empty()) - changes.insert(changes.end(),that->changes.begin(),that->changes.end()); - + changes.insert(changes.end(),that->changes.begin(),that->changes.end()); + that->changes.clear(); + that->clear(); } @@ -74,33 +102,40 @@ void VectorTileData::clear() compObjs.clear(); images.clear(); vecObjs.clear(); + categories.clear(); + + for (auto it : changes) + { + delete it; + } + changes.clear(); for (auto it : vecObjsByStyle) + { delete it.second; + } vecObjsByStyle.clear(); - categories.clear(); - - changes.clear(); } -MapboxVectorTileParser::MapboxVectorTileParser(PlatformThreadInfo *inst,VectorStyleDelegateImplRef styleDelegate) - : localCoords(false), keepVectors(false), parseAll(false), styleDelegate(styleDelegate) +MapboxVectorTileParser::MapboxVectorTileParser(PlatformThreadInfo *inst, + VectorStyleDelegateImplRef inStyleDelegate) : + styleDelegate(std::move(inStyleDelegate)) { // Index all the categories ahead of time. Once. - std::vector allStyles = styleDelegate->allStyles(inst); - for (VectorStyleImplRef style: allStyles) { - std::string category = style->getCategory(inst); - if (!category.empty()) { - long long styleID = style->getUuid(inst); - addCategory(category, styleID); + if (styleDelegate) + { + for (const VectorStyleImplRef &style : styleDelegate->allStyles(inst)) + { + const std::string category = style->getCategory(inst); + if (!category.empty()) + { + const long long styleID = style->getUuid(inst); + addCategory(category, styleID); + } } } } -MapboxVectorTileParser::~MapboxVectorTileParser() -{ -} - void MapboxVectorTileParser::setUUIDName(const std::string &name) { uuidName = name; @@ -126,7 +161,7 @@ void MapboxVectorTileParser::addCategory(const std::string &category,long long s static inline double secondsSince(const std::chrono::steady_clock::time_point &t0) { using namespace std::chrono; - return duration_cast(steady_clock::now() - t0).count() / 1.0e9; + return (double)duration_cast(steady_clock::now() - t0).count() / 1.0e9; } static bool noCancel(PlatformThreadInfo*) { return false; } From 82f3093231b786dd774a2e86e829b7dce500398a Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 11 Feb 2022 08:54:55 -0800 Subject: [PATCH 38/78] Fix native call --- common/WhirlyGlobeLib/src/Scene.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/WhirlyGlobeLib/src/Scene.cpp b/common/WhirlyGlobeLib/src/Scene.cpp index 2876c4d2be..15ac8fb9e7 100644 --- a/common/WhirlyGlobeLib/src/Scene.cpp +++ b/common/WhirlyGlobeLib/src/Scene.cpp @@ -194,12 +194,14 @@ Scene::~Scene() if (fontTextureManager) { - fontTextureManager->teardown(nullptr); + ChangeSet changes; + fontTextureManager->clear(changes); + discardChanges(changes); fontTextureManager.reset(); } } -void Scene::teardown(PlatformThreadInfo*) +void Scene::teardown(PlatformThreadInfo* env) { { std::lock_guard guardLock(managerLock); @@ -207,6 +209,10 @@ void Scene::teardown(PlatformThreadInfo*) { manager.second->teardown(); } + if (fontTextureManager) + { + fontTextureManager->teardown(env); + } } setRenderer(nullptr); } From e34c36bdd2705704502dd4a1e05322f5cf7b664d Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 21 Feb 2022 17:22:26 -0800 Subject: [PATCH 39/78] Allow `setTexture(null)` to clear instead of crashing --- .../src/main/java/com/mousebird/maply/WideVectorInfo.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java b/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java index c47a05d861..206bb3d4c5 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java @@ -20,6 +20,7 @@ import android.graphics.Color; import androidx.annotation.ColorInt; +import androidx.annotation.Nullable; /** * The Wide Vector Info class holds visual information related to groups of vectors. @@ -112,10 +113,10 @@ public enum JoinType {MiterJoin,RoundJoin,BevelJoin}; public native double getMitreLimit(); /** - * This the texture to be applied to the widened vector. + * This is the texture to be applied to the widened vector. */ - public void setTexture(MaplyTexture tex) { - setTexID(tex.texID); + public void setTexture(@Nullable MaplyTexture tex) { + setTexID((tex != null) ? tex.texID : 0); } /** From a51de4094dd1824b9bad70660d519732d3d69a2f Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 14 Mar 2022 13:39:22 -0700 Subject: [PATCH 40/78] Fix incorrect attribute constant aliases. Add viewer distance bounds to model test case. --- .../AutoTester/testCases/ModelsTestCase.swift | 13 +++++++++++-- .../src/control/MaplySharedAttributes.mm | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift index 417654818c..24b6b8df8b 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/ModelsTestCase.swift @@ -61,9 +61,18 @@ class ModelsTestCase: MaplyTestCase { modelInstances.append(mInst) } - globeVC.addModelInstances(modelInstances, desc: [:], mode: MaplyThreadMode.current) + let h = Float(0.1) + let desc = [ + kMaplyEnable: true, + kMaplyViewerMinDist: 1.01, + kMaplyViewerMaxDist: 1.01 + h, + kMaplyViewableCenterX: 0.0, + kMaplyViewableCenterY: 0.0, + kMaplyViewableCenterZ: 0.0, + ] as [AnyHashable:Any] + globeVC.addModelInstances(modelInstances, desc: desc, mode: MaplyThreadMode.current) globeVC.animate(toPosition: MaplyCoordinateMakeWithDegrees(-94.58, 39.1) ,time: 1.0) - globeVC.height = 0.1 + globeVC.height = h } } } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm index 3c5d590311..ee632b5a0c 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm @@ -45,9 +45,9 @@ /// Maximum point at which a feature is visible. Takes an NSNumber float. The radius of the globe is 1.0 NSString* const kMaplyMaxVis = MaplyMaxVis; /// Minimum distance from the viewer at which to display geometry. -NSString* const kMaplyViewerMinDist = MaplyMinVisBand; +NSString* const kMaplyViewerMinDist = MaplyMinViewerDist; /// Maximum distance from the viewer at which to display geometry. -NSString* const kMaplyViewerMaxDist = MaplyMaxVisBand; +NSString* const kMaplyViewerMaxDist = MaplyMaxViewerDist; /// Center to use when evaluating distance to viewable geometry (X) NSString* const kMaplyViewableCenterX = MaplyViewableCenterX; /// Center to use when evaluating distance to viewable geometry (Y) From b7bc8953900045ffa6f6a775b78f9c70c0f5729c Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 15 Mar 2022 11:16:46 -0700 Subject: [PATCH 41/78] Strip color attributes from vector stylesheet elements unless explicitly enabled. Don't create a new Metal command queue for every frame. (See https://noahgilmore.com/blog/gpu-capture-flickering/) --- .../include/MaplyVectorStyleC.h | 71 ++++++++++--------- .../src/MapboxVectorStyleLine.cpp | 10 +++ .../WhirlyGlobeLib/src/MaplyVectorStyleC.cpp | 27 ++----- .../include/vector_styles/MaplyVectorStyle.h | 3 + .../src/vector_tiles/MaplyVectorStyle.mm | 9 +++ .../WhirlyGlobeLib/include/SceneRendererMTL.h | 4 +- .../WhirlyGlobeLib/include/WrapperMTL.h | 5 +- .../WhirlyGlobeLib/src/SceneRendererMTL.mm | 29 ++++---- 8 files changed, 87 insertions(+), 71 deletions(-) diff --git a/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h b/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h index bdb5ec32f9..f2464001bc 100644 --- a/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h +++ b/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h @@ -30,65 +30,76 @@ namespace WhirlyKit This is the object backing the ObjC and Android versions. */ -class VectorStyleSettingsImpl +struct VectorStyleSettingsImpl { -public: - VectorStyleSettingsImpl(double scale); + VectorStyleSettingsImpl(float scale); /// Local renderer scale (iOS only) - float rendererScale; + float rendererScale = 1.0f; /// Line widths will be scaled by this amount before display. - float lineScale; + float lineScale = 1.0f; /// Text sizes will be scaled by this amount before display. - float textScale; + float textScale = 1.0f; /// Markers (symbols+circles) will be scaled by this amount before display. - float markerScale; + float markerScale = 1.0f; /// Circles will be scaled by this amount before display. - float circleScale; + float circleScale = 1.0f; /// Symbols will be scaled by this amount before display. - float symbolScale; + float symbolScale = 1.0f; /// Importance for markers in the layout engine - float markerImportance; + float markerImportance = 2.0f; /// Default marker size when none is specified - float markerSize; + float markerSize = 10.0f; /// Importance for labels in the layout engine - float labelImportance; - /// If set we'll use the zoom levels defined in the style - bool useZoomLevels; + float labelImportance = 1.5f; /// For symbols we'll try to pull a UUID out of this field to stick in the marker and label uniqueID std::string uuidField; /// Draw priority calculated as offset from here - int baseDrawPriority; + int baseDrawPriority = 0; /// Offset between levels - int drawPriorityPerLevel; + int drawPriorityPerLevel = 0; /** The overall map scale calculations will be scaled by this amount. - - We use the map scale calculations to figure out what is dispalyed and when. Not what to load in, mind you, that's a separate, but related calculation. This controls the scaling of those calculations. Scale it down to load things in later, up to load them in sooner. + + We use the map scale calculations to figure out what is dispalyed and when. Not what to load in, mind you, + that's a separate, but related calculation. This controls the scaling of those calculations. Scale it down to + load things in later, up to load them in sooner. */ - float mapScaleScale; + float mapScaleScale = 1.0f; /// Dashed lines will be scaled by this amount before display. - float dashPatternScale; - - /// Use widened vectors (which do anti-aliasing and such) - bool useWideVectors; + float dashPatternScale = 1.0f; /// Where we're using old vectors (e.g. not wide) scale them by this amount - float oldVecWidthScale; + float oldVecWidthScale = 1.0f; /// If we're using widened vectors, only activate them for strokes wider than this. Defaults to zero. - float wideVecCuttoff; + float wideVecCuttoff = 0.0f; /// If set, this is the shader we'll use on the areal features. std::string arealShaderName; + /// If set we'll use the zoom levels defined in the style + bool useZoomLevels = false; + + /// Use widened vectors (which do anti-aliasing and such) + bool useWideVectors = false; + /// If set, we'll make all the features selectable. If not, we won't. - bool selectable; + bool selectable = false; + + // Allow color attributes on individual vector objects to override layer styles + bool enableOverrideColor = false; + + /// Read from the z buffer (fill) + bool zBufferRead = false; + + /// Write to the z buffer (fill) + bool zBufferWrite = false; /// If set, icons will be loaded from this directory std::string iconDirectory; @@ -97,13 +108,7 @@ class VectorStyleSettingsImpl std::string fontName; /// If we're using a dfiferent areal shader, set it up here - SimpleIdentity settingsArealShaderID; - - /// Read from the z buffer (fill) - bool zBufferRead; - - /// Write to the z buffer (fill) - bool zBufferWrite; + SimpleIdentity settingsArealShaderID = EmptyIdentity; }; typedef std::shared_ptr VectorStyleSettingsImplRef; diff --git a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp index b669270b00..a3d0381100 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp @@ -133,6 +133,8 @@ MapboxVectorStyleLayer& MapboxVectorLayerLine::copy(const MapboxVectorStyleLayer return *this; } +static const std::string colorStr = "color"; // NOLINT(cert-err58-cpp) constructor can throw + void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, const std::vector &inVecObjs, const VectorTileDataRef &tileInfo, @@ -259,6 +261,8 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, auto const capacity = inVecObjs.size() * 5; // ? std::unordered_map shapesByUUID(capacity); + const bool colorOverride = styleSet->tileStyleSettings->enableOverrideColor; + // Gather all the linear features for (const auto &vecObj : vecObjs) { @@ -281,6 +285,12 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, if (shapes.empty()) shapes.reserve(shapes.size() + vecObj->shapes.size()); std::copy(vecObj->shapes.begin(),vecObj->shapes.end(),std::back_inserter(shapes)); + + // If individual vector objects aren't allowed to override colors, drop the color attribute. + if (!colorOverride) + { + attrs->removeField(colorStr); + } } for (const auto &kvp : shapesByUUID) diff --git a/common/WhirlyGlobeLib/src/MaplyVectorStyleC.cpp b/common/WhirlyGlobeLib/src/MaplyVectorStyleC.cpp index 55f2410558..a6a00fca42 100644 --- a/common/WhirlyGlobeLib/src/MaplyVectorStyleC.cpp +++ b/common/WhirlyGlobeLib/src/MaplyVectorStyleC.cpp @@ -21,29 +21,12 @@ namespace WhirlyKit { -VectorStyleSettingsImpl::VectorStyleSettingsImpl(double scale) +VectorStyleSettingsImpl::VectorStyleSettingsImpl(float scale) : + rendererScale(scale), + lineScale (scale), + textScale (scale), + markerScale (scale) { - rendererScale = (float)scale; - lineScale = rendererScale; - textScale = rendererScale; - markerScale = rendererScale; - circleScale = 1.0f; - symbolScale = 1.0f; - markerImportance = 2.0f; - markerSize = 10.0f; - labelImportance = 1.5f; - useZoomLevels = false; - baseDrawPriority = 0; - drawPriorityPerLevel = 0; - mapScaleScale = 1.0f; - dashPatternScale = 1.0f; - useWideVectors = false; - oldVecWidthScale = 1.0f; - wideVecCuttoff = 0.0f; - selectable = false; - settingsArealShaderID = EmptyIdentity; - zBufferRead = false; - zBufferWrite = false; } } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h index 2d30fab660..e8aa866a93 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h @@ -85,6 +85,9 @@ /// If set, we'll make all the features selectable. If not, we won't. @property (nonatomic) bool selectable; +/// Allow- per-object color overrides +@property (nonatomic) bool enableOverrideColor; + /// If set, icons will be loaded from this directory @property (nonatomic, strong) NSString * _Nullable iconDirectory; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm index d13b457931..5a3073f717 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm @@ -244,6 +244,15 @@ - (bool)selectable return impl->selectable; } +- (bool)enableOverrideColor +{ + return impl->enableOverrideColor; +} +- (void)setEnableOverrideColor:(bool)enable +{ + impl->enableOverrideColor = enable; +} + - (void)setIconDirectory:(NSString *)iconDirectory { if (iconDirectory) diff --git a/ios/library/WhirlyGlobeLib/include/SceneRendererMTL.h b/ios/library/WhirlyGlobeLib/include/SceneRendererMTL.h index c4c938a96d..87f39303af 100644 --- a/ios/library/WhirlyGlobeLib/include/SceneRendererMTL.h +++ b/ios/library/WhirlyGlobeLib/include/SceneRendererMTL.h @@ -203,7 +203,9 @@ class SceneRendererMTL : public SceneRenderer RenderSetupInfoMTL setupInfo; std::vector *> snapshotDelegates; dispatch_queue_t releaseQueue; - + + id cmdQueue; + // This keeps us from stomping on the previous frame's uniforms int lastRenderNo; id renderEvent; diff --git a/ios/library/WhirlyGlobeLib/include/WrapperMTL.h b/ios/library/WhirlyGlobeLib/include/WrapperMTL.h index 9e0a95705f..ba5d07af93 100644 --- a/ios/library/WhirlyGlobeLib/include/WrapperMTL.h +++ b/ios/library/WhirlyGlobeLib/include/WrapperMTL.h @@ -224,13 +224,12 @@ class HeapManagerMTL }; /// Passed around to various init and teardown routines -class RenderSetupInfoMTL : public RenderSetupInfo +struct RenderSetupInfoMTL : public RenderSetupInfo { -public: RenderSetupInfoMTL(id mtlDevice,id mtlLibrary); id mtlDevice; - + HeapManagerMTL heapManage; // Keep Metal allocations aligned to this diff --git a/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm b/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm index 9874fbe68d..f747d33b2f 100644 --- a/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm @@ -67,9 +67,12 @@ return std::make_shared(std::move(renderTarget)); } -SceneRendererMTL::SceneRendererMTL(id mtlDevice,id mtlLibrary, float inScale) - : setupInfo(mtlDevice,mtlLibrary), - _isShuttingDown(std::make_shared(false)), lastRenderNo(0), renderEvent(nil) +SceneRendererMTL::SceneRendererMTL(id mtlDevice,id mtlLibrary, float inScale) : + setupInfo(mtlDevice,mtlLibrary), + cmdQueue([mtlDevice newCommandQueue]), + _isShuttingDown(std::make_shared(false)), + lastRenderNo(0), + renderEvent(nil) { offscreenBlendEnable = false; indirectRender = false; @@ -521,8 +524,8 @@ frameCount++; const TimeInterval now = scene->getCurrentTime(); - - teardownInfo = NULL; + + teardownInfo.reset(); const Point2f frameSize = getFramebufferSize(); if (frameSize.x() <= 0 || frameSize.y() <= 0) @@ -579,7 +582,6 @@ // Send the command buffer and encoders id mtlDevice = setupInfo.mtlDevice; - id cmdQueue = [mtlDevice newCommandQueue]; const auto frameInfoRef = makeFrameInfo(); auto &baseFrameInfo = *frameInfoRef; @@ -1041,7 +1043,8 @@ scene->markProgramsUnchanged(); // No teardown info available between frames - if (teardownInfo) { + if (teardownInfo) + { teardownInfo.reset(); } @@ -1052,15 +1055,17 @@ { *_isShuttingDown = true; - if (lastCmdBuff) - [lastCmdBuff waitUntilCompleted]; + [lastCmdBuff waitUntilCompleted]; lastCmdBuff = nil; snapshotDelegates.clear(); - auto drawables = scene->getDrawables(); - for (auto draw: drawables) - draw->teardownForRenderer(nil, NULL, NULL); + for (auto &draw: scene->getDrawables()) + { + draw->teardownForRenderer(nullptr, nullptr, nullptr); + } + + cmdQueue = nil; SceneRenderer::shutdown(); } From 29b82189c01f80efbfba2bdab2ed8e0f1cc38b29 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 15 Mar 2022 11:40:23 -0700 Subject: [PATCH 42/78] Fix broken link, add some helpful comments. --- common/WhirlyGlobeLib/src/WhirlyGeometry.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/WhirlyGlobeLib/src/WhirlyGeometry.cpp b/common/WhirlyGlobeLib/src/WhirlyGeometry.cpp index cb038c1bc5..b722973350 100644 --- a/common/WhirlyGlobeLib/src/WhirlyGeometry.cpp +++ b/common/WhirlyGlobeLib/src/WhirlyGeometry.cpp @@ -87,8 +87,11 @@ bool IntersectSphereRadius(Point3d org,Vector3d dir,double radius,Point3d &hit,d return true; } -// Point in poly routine -// Courtesy: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html +// Planar point in poly routine based on Jordan curve theorem +// Courtesy: https://wrf.ecse.rpi.edu//Research/Short_Notes/pnpoly.html +// Vertices may be listed either clockwise or counter-clockwise. +// If there is only one connected component, then it is optional to repeat the first vertex at the end. +// If there are multiple (including "holes"), they must be closed and separated by zeros bool PointInPolygon(const Point2f &pt,const Point2fVector &ring) { From 225d8fefb87c3f58d46977df155668e1e7a58683 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 15 Mar 2022 11:55:39 -0700 Subject: [PATCH 43/78] Add null check based on crash reports. Not clear how a controller could be created before `SceneRenderer::setScene` is called. --- common/WhirlyGlobeLib/src/QuadDisplayControllerNew.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/WhirlyGlobeLib/src/QuadDisplayControllerNew.cpp b/common/WhirlyGlobeLib/src/QuadDisplayControllerNew.cpp index de6159a95d..529f1a7194 100644 --- a/common/WhirlyGlobeLib/src/QuadDisplayControllerNew.cpp +++ b/common/WhirlyGlobeLib/src/QuadDisplayControllerNew.cpp @@ -35,7 +35,10 @@ QuadDisplayControllerNew::QuadDisplayControllerNew(QuadDataStructure *dataStruct maxZoom = dataStructure->getMaxZoom(); reportedMaxZoom = dataStructure->getReportedMaxZoom(); scene = renderer->getScene(); - zoomSlot = scene->retainZoomSlot(); + if (scene) + { + zoomSlot = scene->retainZoomSlot(); + } } Scene *QuadDisplayControllerNew::getScene() const From 18942785d2a7495a77c2c70c05fe910913c0e0b2 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 15 Mar 2022 17:00:44 -0700 Subject: [PATCH 44/78] Fix minor type issue --- .../src/control/MaplyViewController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm index dec202cec5..fcefaa76fa 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyViewController.mm @@ -392,7 +392,7 @@ - (void) loadSetup // Wire up the gesture recognizers tapDelegate = [MaplyTapDelegate tapDelegateForView:wrapView mapView:mapView.get()]; - panDelegate = [MaplyPanDelegate panDelegateForView:wrapView mapView:mapView useCustomPanRecognizer:nil]; + panDelegate = [MaplyPanDelegate panDelegateForView:wrapView mapView:mapView useCustomPanRecognizer:false]; if (_pinchGesture) { pinchDelegate = [MaplyPinchDelegate pinchDelegateForView:wrapView mapView:mapView]; From 83f4099c2f636e0fa6246d9709ce237a05d7da01 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 16 Mar 2022 10:12:33 -0700 Subject: [PATCH 45/78] Refactor selection logic to reduce repeated identical code. Check three-point/un-closed polygons. Check remaining points in partially-clipped scenarios. Reuse collection allocations and eliminate unnecessary copies. Reduce excessive indentation. --- .../WhirlyGlobeLib/include/SelectionManager.h | 9 +- .../WhirlyGlobeLib/src/SelectionManager.cpp | 523 ++++++++---------- 2 files changed, 250 insertions(+), 282 deletions(-) diff --git a/common/WhirlyGlobeLib/include/SelectionManager.h b/common/WhirlyGlobeLib/include/SelectionManager.h index 9f6e65cd37..8952d905f1 100644 --- a/common/WhirlyGlobeLib/include/SelectionManager.h +++ b/common/WhirlyGlobeLib/include/SelectionManager.h @@ -41,7 +41,14 @@ struct Selectable Selectable() = default; Selectable(SimpleIdentity theID) : selectID(theID) { } - + + bool isVisibleAt(double heightAboveSurface) const + { + return enable && selectID != EmptyIdentity && + (minVis == DrawVisibleInvalid || heightAboveSurface >= minVis) && + (maxVis == DrawVisibleInvalid || heightAboveSurface <= maxVis); + } + bool enable = true; /// Used to identify this selectable SimpleIdentity selectID = EmptyIdentity; diff --git a/common/WhirlyGlobeLib/src/SelectionManager.cpp b/common/WhirlyGlobeLib/src/SelectionManager.cpp index c3def9ede4..96cca3a3d2 100644 --- a/common/WhirlyGlobeLib/src/SelectionManager.cpp +++ b/common/WhirlyGlobeLib/src/SelectionManager.cpp @@ -1,5 +1,3 @@ -#include - /* SelectionManager.cpp * WhirlyGlobeLib * @@ -732,46 +730,41 @@ void SelectionManager::removeSelectables(const SimpleIDSet &selectIDs) void SelectionManager::getScreenSpaceObjects(const PlacementInfo &pInfo,std::vector &screenPts,TimeInterval now) { - screenPts.reserve(screenPts.size() + rect2Dselectables.size() + movingRect2Dselectables.size()); + screenPts.reserve(rect2Dselectables.size() + movingRect2Dselectables.size()); for (const auto &sel : rect2Dselectables) { - if (sel.selectID != EmptyIdentity && sel.enable) + if (!sel.isVisibleAt(pInfo.heightAboveSurface)) { - if (sel.minVis == DrawVisibleInvalid || - (sel.minVis < pInfo.heightAboveSurface && pInfo.heightAboveSurface < sel.maxVis)) - { - screenPts.emplace_back(); - ScreenSpaceObjectLocation &objLoc = screenPts.back(); - objLoc.shapeIDs.push_back(sel.selectID); - objLoc.dispLoc = sel.center; - objLoc.offset = Point2d(0,0); - for (const auto &pt : sel.pts) - { - objLoc.pts.emplace_back(pt.x(),pt.y()); - objLoc.mbr.addPoint(pt); - } - } + continue; + } + + screenPts.emplace_back(); + ScreenSpaceObjectLocation &objLoc = screenPts.back(); + objLoc.shapeIDs.push_back(sel.selectID); + objLoc.dispLoc = sel.center; + objLoc.offset = Point2d(0,0); + for (const auto &pt : sel.pts) + { + objLoc.pts.emplace_back(pt.x(),pt.y()); + objLoc.mbr.addPoint(pt); } } for (const auto & sel : movingRect2Dselectables) { - if (sel.selectID != EmptyIdentity) + if (!sel.isVisibleAt(pInfo.heightAboveSurface)) { - if (sel.minVis == DrawVisibleInvalid || - (sel.minVis < pInfo.heightAboveSurface && pInfo.heightAboveSurface < sel.maxVis)) - { - screenPts.emplace_back(); - ScreenSpaceObjectLocation &objLoc = screenPts.back(); - objLoc.shapeIDs.push_back(sel.selectID); - objLoc.dispLoc = sel.centerForTime(now); - objLoc.offset = Point2d(0,0); - for (const auto &pt : sel.pts) - { - objLoc.pts.emplace_back(pt.x(),pt.y()); - objLoc.mbr.addPoint(pt); - } - } + continue; + } + screenPts.emplace_back(); + ScreenSpaceObjectLocation &objLoc = screenPts.back(); + objLoc.shapeIDs.push_back(sel.selectID); + objLoc.dispLoc = sel.centerForTime(now); + objLoc.offset = Point2d(0,0); + for (const auto &pt : sel.pts) + { + objLoc.pts.emplace_back(pt.x(),pt.y()); + objLoc.mbr.addPoint(pt); } } } @@ -908,6 +901,20 @@ Matrix2d SelectionManager::calcScreenRot(float &screenRot,const ViewStateRef &vi return Matrix2d(Eigen::Rotation2Dd(screenRot)); } +static double checkScreenPts(const Point2fVector &screenPts, const Point2f &touchPt, double dist2) +{ + for (unsigned int jj=0;jj &selObjs) @@ -941,11 +948,15 @@ void SelectionManager::pickObjects(const Point2f &touchPt,float maxDist,const Vi getScreenSpaceObjects(pInfo,ssObjs,now); if (layoutManager) layoutManager->getScreenSpaceObjects(pInfo,ssObjs); - + + Point2fVector screenPts; + Point2dVector projPts; + Point3dVector poly; + // Work through the 2D rectangles for (const auto &screenObj : ssObjs) { - Point2dVector projPts; + projPts.clear(); projectWorldPointToScreen(screenObj.dispLoc, pInfo, projPts, renderer->getScale()); double closeDist2 = std::numeric_limits::max(); @@ -953,61 +964,56 @@ void SelectionManager::pickObjects(const Point2f &touchPt,float maxDist,const Vi for (const auto &projPt : projPts) { Mbr objMbr = screenObj.mbr; - objMbr.ll() += Point2f(projPt.x(),projPt.y()); - objMbr.ur() += Point2f(projPt.x(),projPt.y()); + objMbr.ll() += projPt.cast(); + objMbr.ur() += projPt.cast(); // Make sure it's on the screen at least if (!pInfo.frameMbr.overlaps(objMbr)) { continue; } - + if (!screenObj.shapeIDs.empty()) { Matrix2d screenRotMat; float screenRot = 0.0; - Point2f objPt = projPt.cast(); + const Point2f objPt = projPt.cast(); if (screenObj.rotation != 0.0) { screenRotMat = calcScreenRot(screenRot,pInfo.viewState,pInfo.globeViewState,&screenObj,objPt,modelTrans,normalMat,frameBufferSize); } - Point2fVector screenPts; + screenPts.clear(); + screenPts.reserve(screenObj.pts.size()); if (screenRot == 0.0) { for (unsigned int kk=0;kk()); } } else { for (unsigned int kk=0;kk()); + const Point2d theScreenPt = Point2d(screenObjPt.x(),-screenObjPt.y()) + projPt; + screenPts.push_back(theScreenPt.cast()); } } // See if we fall within that polygon - if (PointInPolygon(touchPt, screenPts)) + if (screenPts.size() > 2 && PointInPolygon(touchPt, screenPts)) { // Distance is zero since we're inside, but maybe distance from the center would be more useful... closeDist2 = 0.0; break; } - + // Now for a proximity check around the edges - for (unsigned int kk=0; kk < screenObj.pts.size(); kk++) - { - float t; - const Point2f closePt = ClosestPointOnLineSegment(screenPts[kk], screenPts[(kk + 1) % 4], touchPt, t); - const double dist2 = (closePt-touchPt).squaredNorm(); - closeDist2 = std::min(dist2,closeDist2); - } + closeDist2 = checkScreenPts(screenPts, touchPt, closeDist2); } } // Got close enough to this object to select it @@ -1041,51 +1047,39 @@ void SelectionManager::pickObjects(const Point2f &touchPt,float maxDist,const Vi // Work through the axis aligned rectangular solids for (const auto &sel : polytopeSelectables) { - if (sel.selectID != EmptyIdentity && sel.enable) + if (!sel.isVisibleAt(pInfo.heightAboveSurface)) + { + continue; + } + + float closeDist2 = MAXFLOAT; + // Project each plane to the screen, including clipping + for (unsigned int ii=0;ii() + sel.centerPt); - } - - Point2fVector screenPts; - ClipAndProjectPolygon(pInfo.viewState->fullMatrices[0],pInfo.viewState->projMatrix,pInfo.frameSizeScale,poly,screenPts); - - if (screenPts.size() > 3) - { - if (PointInPolygon(touchPt, screenPts)) - { - closeDist2 = 0.0; - break; - } - - for (unsigned int jj=0;jj() + sel.centerPt); + } - if (closeDist2 < maxDist2) - { - float dist3d = (sel.centerPt - eyePos).norm(); - SelectedObject selObj(sel.selectID,dist3d,sqrtf(closeDist2)); - selObjs.push_back(selObj); - } + screenPts.clear(); + ClipAndProjectPolygon(pInfo.viewState->fullMatrices[0],pInfo.viewState->projMatrix,pInfo.frameSizeScale,poly,screenPts); + + if (screenPts.size() > 2 && PointInPolygon(touchPt, screenPts)) + { + closeDist2 = 0.0; + break; } + + closeDist2 = checkScreenPts(screenPts, touchPt, closeDist2); + } + + if (closeDist2 < maxDist2) + { + const float dist3d = (sel.centerPt - eyePos).norm(); + selObjs.emplace_back(sel.selectID,dist3d,std::sqrt(closeDist2)); } } } @@ -1095,223 +1089,190 @@ void SelectionManager::pickObjects(const Point2f &touchPt,float maxDist,const Vi // Work through the axis aligned rectangular solids for (const auto &sel : movingPolytopeSelectables) { - if (sel.selectID != EmptyIdentity && sel.enable) + if (!sel.isVisibleAt(pInfo.heightAboveSurface)) + { + continue; + } + + // Current center + const double t = (now-sel.startTime)/sel.duration; + const Point3d centerPt = (sel.endCenterPt - sel.centerPt)*t + sel.centerPt; + + float closeDist2 = MAXFLOAT; + // Project each plane to the screen, including clipping + for (const auto &poly3f : sel.polys) { - if (sel.minVis == DrawVisibleInvalid || - (sel.minVis < pInfo.heightAboveSurface && pInfo.heightAboveSurface < sel.maxVis)) + poly.clear(); + poly.reserve(poly3f.size()); + for (const auto &pt : poly3f) { - // Current center - const double t = (now-sel.startTime)/sel.duration; - const Point3d centerPt = (sel.endCenterPt - sel.centerPt)*t + sel.centerPt; - - float closeDist2 = MAXFLOAT; - // Project each plane to the screen, including clipping - for (const auto &poly3f : sel.polys) - { - Point3dVector poly; - poly.reserve(poly3f.size()); - for (const auto &pt : poly3f) - { - poly.push_back(pt.cast() + centerPt); - } - - Point2fVector screenPts; - ClipAndProjectPolygon(pInfo.viewState->fullMatrices[0],pInfo.viewState->projMatrix,pInfo.frameSizeScale,poly,screenPts); - - if (screenPts.size() > 3) - { - if (PointInPolygon(touchPt, screenPts)) - { - closeDist2 = 0.0; - break; - } - - for (unsigned int jj=0;jj() + centerPt); } + + screenPts.clear(); + ClipAndProjectPolygon(pInfo.viewState->fullMatrices[0],pInfo.viewState->projMatrix,pInfo.frameSizeScale,poly,screenPts); + + if (screenPts.size() > 2 && PointInPolygon(touchPt, screenPts)) + { + closeDist2 = 0.0; + break; + } + + closeDist2 = checkScreenPts(screenPts, touchPt, closeDist2); + } + + if (closeDist2 < maxDist2) + { + const double dist3d = (centerPt - eyePos).norm(); + selObjs.emplace_back(sel.selectID,dist3d,std::sqrt(closeDist2)); } } } - if (!linearSelectables.empty()) + for (const auto &sel : linearSelectables) { - for (const auto &sel : linearSelectables) + if (!sel.isVisibleAt(pInfo.heightAboveSurface)) { - if (sel.selectID != EmptyIdentity && sel.enable) + continue; + } + + Point2dVector p0Pts; + projectWorldPointToScreen(sel.pts[0],pInfo,p0Pts,renderer->getScale()); + float closeDist2 = MAXFLOAT; + float closeDist3d = MAXFLOAT; + for (unsigned int ip=1;ipgetScale()); + + if (p0Pts.size() == p1Pts.size()) { - if (sel.minVis == DrawVisibleInvalid || - (sel.minVis < pInfo.heightAboveSurface && pInfo.heightAboveSurface < sel.maxVis)) + // Look for a nearby hit along the line + for (unsigned int iw=0;iwgetScale()); - float closeDist2 = MAXFLOAT; - float closeDist3d = MAXFLOAT; - for (unsigned int ip=1;ipgetScale()); - - if (p0Pts.size() == p1Pts.size()) - { - // Look for a nearby hit along the line - for (unsigned int iw=0;iw(),p1Pts[iw].cast(),touchPt,t); + const float dist2 = (closePt-touchPt).squaredNorm(); + if (dist2 < closeDist2) { - SelectedObject selObj(sel.selectID,closeDist3d,sqrtf(closeDist2)); - selObjs.push_back(selObj); + // Calculate the point in 3D we almost hit + const Point3d &p0 = sel.pts[ip-1], &p1 = sel.pts[ip]; + const Point3d midPt = (p1-p0)*t + p0; + closeDist3d = (midPt-eyePos).norm(); + closeDist2 = dist2; } } } + + p0Pts.swap(p1Pts); + } + if (closeDist2 < maxDist2) + { + selObjs.emplace_back(sel.selectID,closeDist3d,sqrtf(closeDist2)); } } - - if (!rect3Dselectables.empty()) + + // Work through the 3D rectangles + for (const auto &sel : rect3Dselectables) { - // Work through the 3D rectangles - for (const auto &sel : rect3Dselectables) + if (!sel.isVisibleAt(pInfo.heightAboveSurface)) + { + continue; + } + + screenPts.clear(); + + for (const auto &pt : sel.pts) { - if (sel.selectID != EmptyIdentity && sel.enable) + const Point3d pt3d = pt.cast(); + const Point2f screenPt = pInfo.globeViewState ? + pInfo.globeViewState->pointOnScreenFromDisplay(pt3d, &pInfo.viewState->fullMatrices[0], pInfo.frameSizeScale) : + pInfo.mapViewState->pointOnScreenFromDisplay(pt3d, &pInfo.viewState->fullMatrices[0], pInfo.frameSizeScale); + screenPts.push_back(screenPt); + } + + float closeDist2 = MAXFLOAT; + float closeDist3d = MAXFLOAT; + constexpr auto npts = sizeof(sel.pts)/sizeof(sel.pts[0]); + + // See if we fall within that polygon + if (screenPts.size() > 2 && PointInPolygon(touchPt, screenPts)) + { + closeDist2 = 0.0; + Point3d midPt(0,0,0); + for (const auto &pt : sel.pts) { - if (sel.minVis == DrawVisibleInvalid || - (sel.minVis < pInfo.heightAboveSurface && pInfo.heightAboveSurface < sel.maxVis)) - { - Point2fVector screenPts; - - for (const auto &pt : sel.pts) - { - const Point3d pt3d = pt.cast(); - const Point2f screenPt = pInfo.globeViewState ? - pInfo.globeViewState->pointOnScreenFromDisplay(pt3d, &pInfo.viewState->fullMatrices[0], pInfo.frameSizeScale) : - pInfo.mapViewState->pointOnScreenFromDisplay(pt3d, &pInfo.viewState->fullMatrices[0], pInfo.frameSizeScale); - screenPts.push_back(screenPt); - } - - float closeDist2 = MAXFLOAT; - float closeDist3d = MAXFLOAT; + midPt += pt.cast(); + } + midPt /= npts; + closeDist3d = (midPt - eyePos).norm(); + } - // See if we fall within that polygon - if (PointInPolygon(touchPt, screenPts)) - { - closeDist2 = 0.0; - Point3d midPt(0,0,0); - for (const auto &pt : sel.pts) - { - midPt += Vector3fToVector3d(pt); - } - midPt /= 4.0; - closeDist3d = (midPt - eyePos).norm(); - } else { - // Now for a proximity check around the edges - for (unsigned int ii=0;ii<4;ii++) - { - float t; - Point2f closePt = ClosestPointOnLineSegment(screenPts[ii],screenPts[(ii+1)%4],touchPt,t); - float dist2 = (closePt-touchPt).squaredNorm(); - const Point3d p0 = Vector3fToVector3d(sel.pts[ii]), p1 = Vector3fToVector3d(sel.pts[(ii+1)%4]); - Point3d midPt = (p1-p0)*t + p0; - if (dist2 <= maxDist2 && (dist2 < closeDist2)) - { - closeDist2 = dist2; - closeDist3d = (midPt-eyePos).norm(); - } - } - } - - if (closeDist2 < maxDist2) - { - SelectedObject selObj(sel.selectID,closeDist3d,sqrtf(closeDist2)); - selObjs.push_back(selObj); - } + if (closeDist2 > 0) + { + // Now for a proximity check around the edges + for (unsigned int ii=0;ii() - eyePos).norm(); } } } + + if (closeDist2 < maxDist2) + { + selObjs.emplace_back(sel.selectID,closeDist3d,sqrtf(closeDist2)); + } } - - if (!billboardSelectables.empty()) + + // Work through the billboards + for (const auto &billboardSelectable : billboardSelectables) { - // Work through the billboards - for (const auto &billboardSelectable : billboardSelectables) + const BillboardSelectable &sel = billboardSelectable; + if (sel.selectID == EmptyIdentity || !sel.enable) { - BillboardSelectable sel = billboardSelectable; - if (sel.selectID != EmptyIdentity && sel.enable) - { - // Come up with a rectangle in display space - Point3dVector poly(4); - const Vector3d normal3d = sel.normal; - const Point3d axisX = eyeVec.cross(normal3d); - const Point3d center3d = sel.center; -// Point3d axisZ = axisX.cross(Vector3fToVector3d(sel.normal)); - poly[0] = -sel.size.x()/2.0 * axisX + center3d; - poly[3] = sel.size.x()/2.0 * axisX + center3d; - poly[2] = -sel.size.x()/2.0 * axisX + sel.size.y() * normal3d + center3d; - poly[1] = sel.size.x()/2.0 * axisX + sel.size.y() * normal3d + center3d; - - const BillboardSelectable &bbSel = billboardSelectable; + continue; + } - Point2fVector screenPts; - ClipAndProjectPolygon(pInfo.viewState->fullMatrices[0],pInfo.viewState->projMatrix,pInfo.frameSizeScale,poly,screenPts); + // Come up with a rectangle in display space + const Vector3d normal3d = sel.normal; + const Point3d axisX = eyeVec.cross(normal3d); + const Point3d center3d = sel.center; + Point3dVector poly = { + -sel.size.x()/2.0 * axisX + center3d, + sel.size.x()/2.0 * axisX + sel.size.y() * normal3d + center3d, + -sel.size.x()/2.0 * axisX + sel.size.y() * normal3d + center3d, + sel.size.x()/2.0 * axisX + center3d, + }; - double closeDist2 = std::numeric_limits::max(); - double closeDist3d = closeDist2; + screenPts.clear(); + ClipAndProjectPolygon(pInfo.viewState->fullMatrices[0],pInfo.viewState->projMatrix,pInfo.frameSizeScale,poly,screenPts); - if (screenPts.size() > 3) - { - if (PointInPolygon(touchPt, screenPts)) - { - //closeDist3d = (sel.center - eyePos).norm(); - break; - } - - for (unsigned int jj=0;jj::max(); + if (screenPts.size() > 2 && PointInPolygon(touchPt, screenPts)) + { + closeDist2 = 0.0; + break; + } - if (closeDist2 < maxDist2) - { - selObjs.emplace_back(bbSel.selectID, closeDist3d, std::sqrt(closeDist2)); - } - } + closeDist2 = checkScreenPts(screenPts, touchPt, closeDist2); + + if (closeDist2 < maxDist2) + { + const auto closeDist3d = (sel.center - eyePos).norm(); + selObjs.emplace_back(sel.selectID, closeDist3d, std::sqrt(closeDist2)); } } - -// NSLog(@"Found %d selected objects",selObjs.size()); + +// NSLog(@"Found %d selected objects",selObjs.size()); } From 15060a6f57fe6cb653be41128090c15c447d625b Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 16 Mar 2022 10:14:29 -0700 Subject: [PATCH 46/78] Set uniform start time for the `LocalStyle` instanced drawable case --- ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm b/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm index ed7ba71b2c..5ba4f44ca9 100644 --- a/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/BasicDrawableInstanceMTL.mm @@ -58,6 +58,7 @@ if (instanceStyle == LocalStyle) { bzero(&uniMI,sizeof(uniMI)); + uniMI.startTime = TimeGetCurrent() - scene->getBaseTime(); // In this version we just have the raw data if (instData && numInstances > 0) { From fbf31f61f403216e003b751d3c8ef0fe3068f4e1 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 21 Mar 2022 08:09:55 -0700 Subject: [PATCH 47/78] Short-circuit startup call of `startLoader` if `stop` has been called --- .../src/main/java/com/mousebird/maply/MapboxKindaMap.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/android/library/maply/src/main/java/com/mousebird/maply/MapboxKindaMap.kt b/android/library/maply/src/main/java/com/mousebird/maply/MapboxKindaMap.kt index 46c8be1b70..f811238498 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/MapboxKindaMap.kt +++ b/android/library/maply/src/main/java/com/mousebird/maply/MapboxKindaMap.kt @@ -73,7 +73,7 @@ open class MapboxKindaMap( var markerScale = 0.0 var maxConcurrentLoad: Int? = null var debugMode = false - var running: Boolean = false; private set + var running: Boolean = false; private set // true after resource fetch and stylesheet setup /* If set, we build an image/vector hybrid where the polygons go into * the image layer and the linears and points are represented as vectors @@ -199,12 +199,11 @@ open class MapboxKindaMap( protected fun checkFinished() { // Start the map if no outstanding fetches are running control.get()?.activity?.runOnUiThread { - if (!finished && outstandingFetches.all { it == null }) { + if (!stopping && !finished && outstandingFetches.all { it == null }) { finished = true startLoader() } - } - } + } } // If we're using a cache dir, look for the file there protected fun cacheResolve(url: Uri) : File? { From f3e092edb8f08b1897f5a5f8050804e7ce87f11f Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 22 Mar 2022 07:39:26 -0700 Subject: [PATCH 48/78] Add support for expressions to the ObjC API --- .../include/MapboxVectorStyleSetC.h | 16 ++-- .../WhirlyGlobeLib/include/SharedAttributes.h | 7 ++ .../src/MapboxVectorStyleSetC.cpp | 90 ++++++++++--------- common/WhirlyGlobeLib/src/MarkerManager.cpp | 51 +++++++++++ .../WhirlyGlobeLib/src/WideVectorManager.cpp | 47 ++++++++++ .../AutoTester/testCases/GeographyClass.swift | 7 +- .../testCases/WideVectorsTestCase.mm | 63 +++++++++++++ .../include/MaplySharedAttributes.h | 11 +++ .../include/loading/MaplyQuadLoader.h | 8 ++ .../include/private/MaplyQuadLoader_private.h | 3 + .../src/control/MaplySharedAttributes.mm | 11 +++ .../src/helpers/MapboxKindaMap.swift | 2 +- .../src/loading/MaplyQuadImageLoader.mm | 12 ++- .../src/loading/MaplyQuadLoader.mm | 37 +++++++- .../src/loading/MaplyQuadPagingLoader.mm | 2 + .../WhirlyGlobeLib/src/SceneRendererMTL.mm | 4 +- 16 files changed, 312 insertions(+), 59 deletions(-) diff --git a/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h b/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h index c8d16fd072..9edd33b38f 100644 --- a/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h +++ b/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h @@ -102,7 +102,7 @@ class MaplyVectorFunctionStop class MaplyVectorFunctionStops { public: - bool parse(const DictionaryRef &entry,MapboxVectorStyleSetImpl *styleSet,bool isText); + bool parse(const DictionaryRef &entry,bool isText); /// @brief Calculate a value given the zoom level double valueForZoom(double zoom); @@ -255,15 +255,17 @@ class MapboxVectorStyleSetImpl : public VectorStyleDelegateImpl static int enumValue(const DictionaryEntryRef &entry, const char * const options[],int defVal); /// Builds a transitionable double object from a style entry and returns that - MapboxTransDoubleRef transDouble(const DictionaryEntryRef &entry,double defVal); - + static MapboxTransDoubleRef transDouble(const DictionaryEntryRef &entry, double defVal); + static MapboxTransDoubleRef transDouble(const DictionaryEntryRef &entry, const char *valName, double defVal); + /// Builds a transitionable double object from a style entry lookup and returns that - MapboxTransDoubleRef transDouble(const std::string &valName, const DictionaryRef &entry, double defVal); + static MapboxTransDoubleRef transDouble(const std::string &valName, const DictionaryRef &entry, double defVal); /// Builds a transitionable color object and returns that - MapboxTransColorRef transColor(const std::string &valName, const DictionaryRef &entry, const RGBAColor *); - MapboxTransColorRef transColor(const std::string &name,const DictionaryRef &entry,const RGBAColor &); - + static MapboxTransColorRef transColor(const DictionaryEntryRef &entry, const char *valName, const RGBAColorRef &); + static MapboxTransColorRef transColor(const std::string &name, const DictionaryRef &entry, const RGBAColorRef &); + static MapboxTransColorRef transColor(const std::string &name, const DictionaryRef &entry, const RGBAColor &); + /// Builds a transitional text object MapboxTransTextRef transText(const std::string &name,const DictionaryRef &entry,const std::string &str); diff --git a/common/WhirlyGlobeLib/include/SharedAttributes.h b/common/WhirlyGlobeLib/include/SharedAttributes.h index ecdab8b3ab..4da704092d 100644 --- a/common/WhirlyGlobeLib/include/SharedAttributes.h +++ b/common/WhirlyGlobeLib/include/SharedAttributes.h @@ -198,6 +198,10 @@ /// if there is one or it will be visible if there is no texture. Takes a UIColor #define MaplyColor WKString("color") +/// Specify the opacity separately from the alpha channel of "color" +/// Not widely supported +#define MaplyOpacity WKString("opacity") + /// Width is used by the vector layer for line widths #define MaplyVecWidth WKString("width") @@ -214,6 +218,9 @@ #define MaplyVecTexScaleX WKString("texscalex") #define MaplyVecTexScaleY WKString("texscaley") +// scale for markers +#define MaplyMarkerScale WKString("markerScale") + /// The projection to use when generating texture coordinates #define MaplyVecTextureProjection WKString("texprojection") /// Tangent plane projection for texture coordinates diff --git a/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp b/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp index 789bea1793..23507d52ab 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp @@ -166,7 +166,7 @@ MaplyVectorFunctionStop::MaplyVectorFunctionStop() { } -bool MaplyVectorFunctionStops::parse(const DictionaryRef &entry,MapboxVectorStyleSetImpl *,bool isText) +bool MaplyVectorFunctionStops::parse(const DictionaryRef &entry,bool isText) { base = entry->getDouble(strBase,1.0); @@ -800,7 +800,8 @@ int MapboxVectorStyleSetImpl::enumValue(const DictionaryEntryRef &entry,const ch return defVal; } -MapboxTransDoubleRef MapboxVectorStyleSetImpl::transDouble(const DictionaryEntryRef &theEntry, double defVal) +MapboxTransDoubleRef MapboxVectorStyleSetImpl::transDouble(const DictionaryEntryRef &theEntry, + const char *valName, double defVal) { if (!theEntry) return std::make_shared(defVal); @@ -808,77 +809,80 @@ MapboxTransDoubleRef MapboxVectorStyleSetImpl::transDouble(const DictionaryEntry // This is probably stops if (theEntry->getType() == DictTypeDictionary) { auto stops = std::make_shared(); - stops->parse(theEntry->getDict(), this, false); + stops->parse(theEntry->getDict(), false); if (stops) { return MapboxTransDoubleRef(new MapboxTransDouble(stops)); } else { - wkLogLevel(Warn, "Expecting key word 'stops' in entry %s",name.c_str()); + wkLogLevel(Warn, "Expecting key word 'stops' in '%s'", valName ? valName : ""); } } else if (theEntry->getType() == DictTypeDouble || theEntry->getType() == DictTypeInt) { return std::make_shared(theEntry->getDouble()); } else { - wkLogLevel(Warn,"Unexpected type found in entry %s. Was expecting a double.",name.c_str()); + wkLogLevel(Warn,"Unexpected type found in '%s'. Was expecting a double.", valName ? valName : ""); } return MapboxTransDoubleRef(); } - -MapboxTransDoubleRef MapboxVectorStyleSetImpl::transDouble(const std::string &valName, const DictionaryRef &entry, double defVal) +MapboxTransDoubleRef MapboxVectorStyleSetImpl::transDouble(const DictionaryEntryRef &theEntry, double defVal) { - return transDouble(entry ? entry->getEntry(valName) : DictionaryEntryRef(), defVal); + return transDouble(theEntry, "(unnamed)", defVal); } -MapboxTransColorRef MapboxVectorStyleSetImpl::transColor(const std::string &valName, const DictionaryRef &entry, const RGBAColor *defVal) +MapboxTransDoubleRef MapboxVectorStyleSetImpl::transDouble(const std::string &valName, const DictionaryRef &dict, double defVal) { - const auto defValRef = defVal ? std::make_shared(*defVal) : RGBAColorRef(); - - if (!entry) { - return defVal ? std::make_shared(defValRef) : MapboxTransColorRef(); - } - - // They pass in the whole dictionary and let us look the field up - const DictionaryEntryRef theEntry = entry->getEntry(valName); - if (!theEntry) { - return defVal ? std::make_shared(defValRef) : MapboxTransColorRef(); - } + return transDouble(dict ? dict->getEntry(valName) : DictionaryEntryRef(), valName.c_str(), defVal); +} - // This is probably stops - if (theEntry->getType() == DictTypeDictionary) { - auto stops = std::make_shared(); - if (stops->parse(theEntry->getDict(), this, false)) { - return std::make_shared(stops); - } else { - wkLogLevel(Warn, "Expecting key word 'stops' in entry %s", valName.c_str()); +MapboxTransColorRef MapboxVectorStyleSetImpl::transColor(const DictionaryEntryRef &entry, const char *valName, const RGBAColorRef &defVal) +{ + switch (entry ? entry->getType() : DictTypeNone) + { + case DictTypeDictionary: + { + auto stops = std::make_shared(); + if (stops->parse(entry->getDict(), false)) + { + return std::make_shared(stops); + } + wkLogLevel(Warn, "Expecting key word 'stops' in '%s'", valName ? valName : ""); + break; } - } else if (theEntry->getType() == DictTypeString) { - RGBAColorRef color = colorValue(valName, theEntry, DictionaryRef(), defValRef, false); - if (color) - return std::make_shared(color); - else { - wkLogLevel(Warn, "Unexpected type found in entry %s. Was expecting a color.", valName.c_str()); + case DictTypeString: + { + if (auto color = colorValue(valName, entry, DictionaryRef(), defVal, false)) + { + return std::make_shared(color); + } + wkLogLevel(Warn, "Unexpected type found in '%s'. Expecting a color.", valName ? valName : ""); + break; } - } else { - wkLogLevel(Warn, "Unexpected type found in entry %s. Was expecting a color.", valName.c_str()); + case DictTypeNone: + break; + default: + wkLogLevel(Warn, "Unexpected type found in '%s'. Expecting a color.", valName ? valName : ""); } + return defVal ? std::make_shared(defVal) : MapboxTransColorRef(); +} - return MapboxTransColorRef(); +MapboxTransColorRef MapboxVectorStyleSetImpl::transColor(const std::string &valName, const DictionaryRef &dict, const RGBAColorRef &defVal) +{ + return transColor(dict ? dict->getEntry(valName) : DictionaryEntryRef(), valName.c_str(), defVal); } -MapboxTransColorRef MapboxVectorStyleSetImpl::transColor(const std::string &inName, const DictionaryRef &entry, const RGBAColor &inColor) +MapboxTransColorRef MapboxVectorStyleSetImpl::transColor(const std::string &valName, const DictionaryRef &dict, const RGBAColor &defVal) { - const RGBAColor color = inColor; - return transColor(inName, entry, &color); + return transColor(valName, dict, std::make_shared(defVal)); } -MapboxTransTextRef MapboxVectorStyleSetImpl::transText(const std::string &inName, const DictionaryRef &entry, const std::string &str) +MapboxTransTextRef MapboxVectorStyleSetImpl::transText(const std::string &inName, const DictionaryRef &dict, const std::string &str) { - if (!entry) { + if (!dict) { return str.empty() ? MapboxTransTextRef() : std::make_shared(str); } // They pass in the whole dictionary and let us look the field up - const DictionaryEntryRef theEntry = entry->getEntry(inName); + const DictionaryEntryRef theEntry = dict->getEntry(inName); if (!theEntry) { return str.empty() ? MapboxTransTextRef() : std::make_shared(str); } @@ -886,7 +890,7 @@ MapboxTransTextRef MapboxVectorStyleSetImpl::transText(const std::string &inName // This is probably stops if (theEntry->getType() == DictTypeDictionary) { auto stops = std::make_shared(); - if (stops->parse(theEntry->getDict(), this, true)) { + if (stops->parse(theEntry->getDict(), true)) { return std::make_shared(stops); } else { wkLogLevel(Warn, "Expecting key word 'stops' in entry %s", inName.c_str()); diff --git a/common/WhirlyGlobeLib/src/MarkerManager.cpp b/common/WhirlyGlobeLib/src/MarkerManager.cpp index 111505d9f4..7fc6ab53e6 100644 --- a/common/WhirlyGlobeLib/src/MarkerManager.cpp +++ b/common/WhirlyGlobeLib/src/MarkerManager.cpp @@ -22,6 +22,7 @@ #import "SharedAttributes.h" #import "CoordSystem.h" #import "WhirlyKitLog.h" +#import "MapboxVectorStyleSetC.h" using namespace Eigen; using namespace WhirlyKit; @@ -52,6 +53,56 @@ MarkerInfo::MarkerInfo(const Dictionary &dict,bool screenObject) : layoutRepeat = dict.getInt(MaplyTextLayoutRepeat,-1); layoutSpacing = (float)dict.getDouble(MaplyTextLayoutSpacing,24.0); layoutOffset = (float)dict.getDouble(MaplyTextLayoutOffset,0.0); + + if (const auto entry = dict.getEntry(MaplyOpacity)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transDouble(entry, MaplyOpacity, 1.0)) + { + opacityExp = expr->expression(); + } + } + } + + if (const auto entry = dict.getEntry(MaplyColor)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transColor(entry, MaplyColor, nullptr)) + { + colorExp = expr->expression(); + } + } + } + + if (const auto entry = dict.getEntry(MaplyMarkerScale)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transDouble(entry, MaplyOpacity, 1.0)) + { + scaleExp = expr->expression(); + } + } + + // Since we don't have a simple scale member, allow them to specify + // a scale by producing an expression that always produces that value. + if (!scaleExp) + { + const double scale = entry->getDouble(); + if (scale != 0.0 && scale != 1.0) + { + scaleExp = std::make_shared(); + scaleExp->base = 1.0f; + scaleExp->type = ExpressionInfoType::ExpressionLinear; + scaleExp->stopInputs = { 1.0f, 1.0f }; + scaleExp->stopOutputs = { (float)scale }; + } + } + } + + hasExp = scaleExp || colorExp || opacityExp; } MarkerSceneRep::MarkerSceneRep() : diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index f0328cc5e9..876522fe0b 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -23,6 +23,7 @@ #import "StringIndexer.h" #import "SharedAttributes.h" #import "WideVectorDrawableBuilder.h" +#import "MapboxVectorStyleSetC.h" using namespace WhirlyKit; using namespace Eigen; @@ -58,6 +59,52 @@ WideVectorInfo::WideVectorInfo(const Dictionary &dict) //_joinType = (WhirlyKit::WideVectorLineJoinType)[desc enumForKey:@"wideveclinejointype" values:@[@"miter",@"round",@"bevel"] default:WideVecMiterJoin]; //const std::string capTypeStr = dict.getString(MaplyWideVecCapType); //_capType = (WhirlyKit::WideVectorLineCapType)[desc enumForKey:@"wideveclinecaptype" values:@[@"butt",@"round",@"square"] default:WideVecButtCap]; + + if (const auto entry = dict.getEntry(MaplyVecWidth)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transDouble(entry, MaplyVecWidth, width)) + { + widthExp = expr->expression(); + } + } + } + + if (const auto entry = dict.getEntry(MaplyWideVecOffset)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transDouble(entry, MaplyWideVecOffset, offset)) + { + offsetExp = expr->expression(); + } + } + } + + if (const auto entry = dict.getEntry(MaplyOpacity)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transDouble(entry, MaplyOpacity, 1.0)) + { + opacityExp = expr->expression(); + } + } + } + + if (const auto entry = dict.getEntry(MaplyColor)) + { + if (entry->getType() == DictionaryType::DictTypeDictionary) + { + if (const auto expr = MapboxVectorStyleSetImpl::transColor(entry, MaplyColor, nullptr)) + { + colorExp = expr->expression(); + } + } + } + + hasExp = widthExp || offsetExp || opacityExp || colorExp; } std::string WideVectorInfo::toString() const diff --git a/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift b/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift index b59a709908..941c808a55 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/GeographyClass.swift @@ -9,6 +9,7 @@ import UIKit import WhirlyGlobe +@objcMembers public class GeographyClassTestCase: MaplyTestCase { override init() { @@ -21,7 +22,11 @@ public class GeographyClassTestCase: MaplyTestCase { typealias ImageLayer = (loader: MaplyQuadImageLoader, fetcher: MaplyMBTileFetcher) var layers : [ImageLayer] = [] var varTarget : MaplyVariableTarget? = nil - + + public func getLoader() -> MaplyQuadImageLoader? { + return layers.first?.loader + } + func setupMBTiles(_ name: String, offscreen: Bool, transparent: Bool, drawPriority: Int32, viewC: MaplyBaseViewController, cacheSize: Int32 = -1) -> ImageLayer? { diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm index 1fdb07e806..8fb83a7e12 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm @@ -9,6 +9,10 @@ #import "WideVectorsTestCase.h" #import "SwiftBridge.h" +@interface NSDictionary(Stuff) +- (NSDictionary *_Nonnull) dictionaryByMergingWith:(NSDictionary *_Nullable)dict; +@end + @implementation WideVectorsTestCase { GeographyClassTestCase * baseCase; @@ -345,6 +349,55 @@ - (void)overlap:(MaplyBaseViewController *)viewC { } } +- (void) exprs:(MaplyBaseViewController *)viewC withLoader:(MaplyQuadLoaderBase*)loader perf:(bool)perf { + + const MaplyCoordinate coords[] = { + MaplyCoordinateMakeWithDegrees(-100, 60 + (perf?0:2)), + MaplyCoordinateMakeWithDegrees(-110, 61 + (perf?0:2)), + MaplyCoordinateMakeWithDegrees(-120, 62 + (perf?0:2)), + }; + + MaplyVectorObject *vecObj = [[MaplyVectorObject alloc] initWithLineString:&coords[0] + numCoords:sizeof(coords)/sizeof(coords[0]) + attributes:nil]; + [vecObj subdivideToGlobe:0.0001]; + + NSMutableArray *objs = [NSMutableArray array]; + [objs addObject:vecObj]; + + NSDictionary *desc = @{ + kMaplyColor: [UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:1.0], + kMaplyEnable: @YES, + kMaplyDrawPriority: @(kMaplyVectorDrawPriorityDefault + 2), + }; + + const int slot = [loader getZoomSlot]; + + UIColor *c1 = [UIColor colorWithRed:0.0 green:1.0 blue:0.0 alpha:0.8]; + UIColor *c2 = [UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:0.8]; + NSDictionary *wideDesc = [desc dictionaryByMergingWith:@{ + kMaplyDrawPriority: @(kMaplyVectorDrawPriorityDefault + 1), + kMaplyWideVecEdgeFalloff: @(1), + kMaplyZoomSlot: @(slot), + kMaplyVecWidth: @{@"stops":@[@[@0,@4],@[@10,@20]]}, + kMaplyWideVecOffset: @{@"stops":@[@[@0,@-50],@[@10,@50]]}, + kMaplyOpacity: @{@"stops":@[@[@0,@0.1],@[@10,@0.9]]}, + kMaplyColor: @{@"stops":@[@[@0,c1],@[@10,c2]]}, + kMaplyShader: perf ? kMaplyShaderWideVectorPerformance : kMaplyShaderWideVectorExp, + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + }]; + + NSMutableArray *cos = [NSMutableArray new]; + if (MaplyComponentObject *co = [viewC addVectors:objs desc:desc mode:MaplyThreadCurrent]) + { + [cos addObject:co]; + } + if (MaplyComponentObject *co = [viewC addWideVectors:objs desc:wideDesc mode:MaplyThreadCurrent]) + { + [cos addObject:co]; + } +} + - (void)wideLineTest:(MaplyBaseViewController *)viewC { [self addGeoJson:@"sawtooth.geojson" dashPattern:nil width:50.0 edge:20.0 simple:false viewC:viewC]; @@ -364,6 +417,16 @@ - (void)wideLineTest:(MaplyBaseViewController *)viewC [self overlap:viewC]; [self vecColors:viewC]; + + // Dynamic properties require a zoom slot, which may not be set up yet + __weak MaplyQuadLoaderBase *weakLoader = [baseCase getLoader]; + [weakLoader addPostInitBlock:^{ + if (__strong MaplyQuadLoaderBase *loader = weakLoader) + { + [self exprs:viewC withLoader:loader perf:false]; + [self exprs:viewC withLoader:loader perf:true]; + } + }]; } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h index ae6187aba1..bdaf6b8cf1 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h @@ -44,6 +44,10 @@ extern NSString * const _Nonnull kMaplyMinVis; /// Maximum point at which a feature is visible. Takes an NSNumber float. The radius of the globe is 1.0 extern NSString * const _Nonnull kMaplyMaxVis; #define kWGMaxVis kMaplyMaxVis +/// Zoom related control +extern NSString * const _Nonnull kMaplyZoomSlot; +extern NSString * const _Nonnull kMaplyMinZoomVis; +extern NSString * const _Nonnull kMaplyMaxZoomVis; /// Minimum distance from the viewer at which to display geometry. extern NSString * const _Nonnull kMaplyViewerMinDist; /// Maximum distance from the viewer at which to display geometry. @@ -177,6 +181,10 @@ extern NSString * const _Nonnull kMaplyClusterGroup; extern NSString * const _Nonnull kMaplyColor; #define kWGColor kMaplyColor +/// Specify the opacity separately from the alpha channel of "color" +/// Not widely supported +extern NSString * const _Nonnull kMaplyOpacity; + /// Width is used by the vector layer for line widths extern NSString * const _Nonnull kMaplyVecWidth; #define kWGVecWidth kMaplyVecWidth @@ -194,6 +202,9 @@ extern NSString * const _Nonnull kMaplyVecTexScaleX; /// Y scale for textures applied to vectors extern NSString * const _Nonnull kMaplyVecTexScaleY; +// scale for markers +extern NSString * const _Nonnull kMaplyMarkerScale; + /// The projection to use when generating texture coordinates extern NSString * const _Nonnull kMaplyVecTextureProjection; /// Tangent plane projection for texture coordinates diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h index 65ad61fe40..5cd930ad98 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/loading/MaplyQuadLoader.h @@ -25,6 +25,8 @@ #import #import +typedef void (__strong ^InitCompletionBlock)(void); + @class MaplyQuadLoaderBase; /** @@ -233,4 +235,10 @@ */ - (void)shutdown; +/** + Blocks to be called after the view is set up, or immediately if it is already set up. + Similar to `addPostSurfaceRunnable` on Android. +*/ +- (void)addPostInitBlock:(_Nonnull InitCompletionBlock)block; + @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadLoader_private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadLoader_private.h index ce815444ae..f856fb74f4 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadLoader_private.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/private/MaplyQuadLoader_private.h @@ -54,6 +54,9 @@ // We delay setup by a tick so the user can mess with settings - (bool)delayedInit; +// Call after subclass is successfully delayed-initialized +- (bool)postDelayedInit; + // Change the tile source to a new one (if they match) - (void)changeTileInfos:(NSArray *> * __nullable)tileInfos; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm index ee632b5a0c..6621a0be66 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm @@ -44,6 +44,10 @@ NSString* const kMaplyMinVis = MaplyMinVis; /// Maximum point at which a feature is visible. Takes an NSNumber float. The radius of the globe is 1.0 NSString* const kMaplyMaxVis = MaplyMaxVis; +/// Zoom related control +NSString* const kMaplyZoomSlot = MaplyZoomSlot; +NSString* const kMaplyMinZoomVis = MaplyMinZoomVis; +NSString* const kMaplyMaxZoomVis = MaplyMaxZoomVis; /// Minimum distance from the viewer at which to display geometry. NSString* const kMaplyViewerMinDist = MaplyMinViewerDist; /// Maximum distance from the viewer at which to display geometry. @@ -151,6 +155,10 @@ /// if there is one or it will be visible if there is no texture. Takes a UIColor NSString* const kMaplyColor = MaplyColor; +/// Specify the opacity separately from the alpha channel of "color" +/// Not widely supported +NSString* const kMaplyOpacity = MaplyOpacity; + /// Width is used by the vector layer for line widths NSString* const kMaplyVecWidth = MaplyVecWidth; @@ -166,6 +174,9 @@ /// Y scale for textures applied to vectors NSString* const kMaplyVecTexScaleY = MaplyVecTexScaleY; +// scale for markers +WKDefineConst(MarkerScale); + /// The projection to use when generating texture coordinates NSString* const kMaplyVecTextureProjection = MaplyVecTextureProjection; /// Tangent plane projection for texture coordinates diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift index c49506729a..d1577201a7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/MapboxKindaMap.swift @@ -230,7 +230,7 @@ public class MapboxKindaMap { source.tileSpec = resp cacheFile(origURL, data: data) - DispatchQueue.main.async { + DispatchQueue.main.async { [self] in outstandingFetches[fetchIdx] = nil checkFinished() } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadImageLoader.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadImageLoader.mm index 570007e431..5fe88b7939 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadImageLoader.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadImageLoader.mm @@ -328,7 +328,7 @@ - (instancetype)initWithViewC:(NSObject *)inViewC _drawPriorityPerLevel = 1; _color = [UIColor whiteColor]; _imageFormat = MaplyImageIntRGBA; - + // Start things out after a delay // This lets the caller mess with settings [self performSelector:@selector(delayedInit) withObject:nil afterDelay:0.0]; @@ -338,8 +338,10 @@ - (instancetype)initWithViewC:(NSObject *)inViewC - (bool)delayedInit { - if (!valid) + if (![super delayedInit]) + { return false; + } auto const __strong vc = self.viewC; if (![vc getRenderControl]) @@ -430,6 +432,8 @@ - (bool)delayedInit const RGBAColor color = [_color asRGBAColor]; loader->setColor(color,NULL); + [super postDelayedInit]; + return true; } @@ -565,7 +569,9 @@ - (bool)delayedInit if (![super delayedInit]) return false; - + + [super postDelayedInit]; + return true; } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm index 88637674bc..347d884a21 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm @@ -102,6 +102,7 @@ @implementation MaplyQuadLoaderBase { NSMutableSet *pendingReturns; std::mutex pendingReturnsLock; + NSMutableArray *_postInitCalls; } - (instancetype)initWithViewC:(NSObject *)inViewC @@ -114,7 +115,8 @@ - (instancetype)initWithViewC:(NSObject *)inViewC _flipY = true; _viewC = inViewC; _numSimultaneousTiles = 8; - + _postInitCalls = [NSMutableArray new]; + pendingReturns = [NSMutableSet new]; return self; @@ -125,6 +127,39 @@ - (bool)delayedInit return valid; } +- (bool)postDelayedInit +{ + if (valid) + { + for (InitCompletionBlock block in _postInitCalls) + { + block(); + } + _postInitCalls = nil; + } + + return valid; +} + +/** + Blocks to be called after the view is set up, or immediately if it is already set up. + Similar to `addPostSurfaceRunnable` on Android. +*/ +- (void)addPostInitBlock:(_Nonnull InitCompletionBlock)block +{ + if (block) + { + if (_postInitCalls) + { + [_postInitCalls addObject:block]; + } + else + { + block(); + } + } +} + - (void)dealloc { if (valid) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadPagingLoader.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadPagingLoader.mm index 8dabe4600c..65b50dd359 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadPagingLoader.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadPagingLoader.mm @@ -132,6 +132,8 @@ - (bool)delayedInit [loadInterp setLoader:self]; + [super postDelayedInit]; + return true; } diff --git a/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm b/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm index f747d33b2f..26ec6dff37 100644 --- a/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm @@ -221,9 +221,7 @@ uniforms.globeMode = !coordAdapter->isFlat(); uniforms.frameCount = frameCount; uniforms.currentTime = frameInfo->currentTime - scene->getBaseTime(); - for (unsigned int ii=0;iiscene->copyZoomSlots(uniforms.zoomSlots); - } + frameInfo->scene->copyZoomSlots(uniforms.zoomSlots); // Copy this to a buffer and then blit that buffer into place // TODO: Try to reuse these From 2f0624f38188bbcd77402c42252a90859ef0170e Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 22 Mar 2022 11:13:27 -0700 Subject: [PATCH 49/78] tweak test case --- .../AutoTester/testCases/WideVectorsTestCase.mm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm index 8fb83a7e12..f570a2c545 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm @@ -371,18 +371,19 @@ - (void) exprs:(MaplyBaseViewController *)viewC withLoader:(MaplyQuadLoaderBase* kMaplyDrawPriority: @(kMaplyVectorDrawPriorityDefault + 2), }; + // Note that for GeographyClass, this loader only does zoom levels 0-6 const int slot = [loader getZoomSlot]; - UIColor *c1 = [UIColor colorWithRed:0.0 green:1.0 blue:0.0 alpha:0.8]; + UIColor *c1 = [UIColor colorWithRed:1.0 green:0.0 blue:1.0 alpha:0.8]; UIColor *c2 = [UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:0.8]; NSDictionary *wideDesc = [desc dictionaryByMergingWith:@{ kMaplyDrawPriority: @(kMaplyVectorDrawPriorityDefault + 1), kMaplyWideVecEdgeFalloff: @(1), kMaplyZoomSlot: @(slot), - kMaplyVecWidth: @{@"stops":@[@[@0,@4],@[@10,@20]]}, - kMaplyWideVecOffset: @{@"stops":@[@[@0,@-50],@[@10,@50]]}, - kMaplyOpacity: @{@"stops":@[@[@0,@0.1],@[@10,@0.9]]}, - kMaplyColor: @{@"stops":@[@[@0,c1],@[@10,c2]]}, + kMaplyVecWidth: @{@"stops":@[@[@2,@1],@[@6,@20]]}, + kMaplyWideVecOffset: @{@"stops":@[@[@2,@-20],@[@6,@20]]}, + kMaplyOpacity: @{@"stops":@[@[@2,@0.2],@[@6,@0.9]]}, + kMaplyColor: @{@"stops":@[@[@2,c1],@[@6,c2]]}, kMaplyShader: perf ? kMaplyShaderWideVectorPerformance : kMaplyShaderWideVectorExp, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, }]; From d4de8f5b410c5fd861030e1af3e572afd879a180 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 22 Mar 2022 11:15:56 -0700 Subject: [PATCH 50/78] Fix incorrect widths on performance wide lines with expression widths --- ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 46c572c31c..ab7b9893c3 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1034,7 +1034,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } outVert.color = color * calculateFade(uniforms,vertArgs.uniDrawState); - outVert.w2 = vertArgs.wideVec.w2; + outVert.w2 = w2; outVert.edge = vertArgs.wideVec.edge; outVert.texCoord = float2(interDir,0); @@ -1044,7 +1044,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } else { // Return a vertex offset from the base int basePt = (whichVert == 6 || whichVert == 7) ? 2 : 1; - float2 offset = (centers[2].norm * interDir) * screenScale * (vertArgs.wideVec.w2 + centerLine + vertArgs.wideVec.edge); + float2 offset = (centers[2].norm * interDir) * screenScale * (w2 + centerLine + vertArgs.wideVec.edge); outVert.position = float4(centers[basePt].screenPos + offset, 0.0, 1.0); } From adbae24b62fbaa470fc5386d1197f851e1861d3b Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 22 Mar 2022 11:18:36 -0700 Subject: [PATCH 51/78] simplify --- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 107 ++++++++---------- 1 file changed, 49 insertions(+), 58 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index ab7b9893c3..98e5f55d32 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -891,63 +891,66 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( constant VertexTriWideVecInstance *wideVecInsts [[ buffer(WKSVertModelInstanceArgBuffer) ]], constant RegularTextures & texArgs [[buffer(WKSVertTextureArgBuffer)]]) { - ProjVertexTriWideVecPerf outVert; + ProjVertexTriWideVecPerf outVert = { .position = float4(0.0,0.0,-1000.0,1.0) }; - int whichVert = (vert.index >> 16) & 0xffff; - int whichPoly = vert.index & 0xffff; + const int whichVert = (vert.index >> 16) & 0xffff; + const int whichPoly = vert.index & 0xffff; // Find the various instances representing center points // We need one behind and two ahead of us - bool instValid[4]; - VertexTriWideVecInstance inst[4]; - inst[1] = wideVecInsts[instanceID]; - instValid[1] = true; + bool instValid[4] = { false, true, false, false }; + VertexTriWideVecInstance inst[4] = { {}, wideVecInsts[instanceID], {}, {} }; outVert.maskIDs[0] = inst[1].mask0; outVert.maskIDs[1] = inst[1].mask1; if (inst[1].prev != -1) { inst[0] = wideVecInsts[inst[1].prev]; instValid[0] = true; - } else - instValid[0] = false; + } if (inst[1].next != -1) { inst[2] = wideVecInsts[inst[1].next]; instValid[2] = true; - } else - instValid[2] = false; + } if (instValid[2] && inst[2].next != -1) { inst[3] = wideVecInsts[inst[2].next]; instValid[3] = true; - } else - instValid[3] = false; + } + + // Direction and normal info for three segments we may look at + bool isValid = instValid[2]; - float dotProd = 1.0; - // Figure out position on the screen for every center point CenterInfo centers[4]; - for (unsigned int ii=0;ii<4;ii++) + for (unsigned int ii=0;ii<4;ii++) { if (instValid[ii]) { - float3 centerPos = (vertArgs.uniDrawState.singleMat * float4(inst[ii].center,1.0)).xyz; - float4 screenPt = uniforms.pMatrix * (uniforms.mvMatrix * float4(centerPos,1.0) + uniforms.mvMatrixDiff * float4(centerPos,1.0)); - screenPt /= screenPt.w; - centers[ii].screenPos = screenPt.xy; + const float3 centerPos = (vertArgs.uniDrawState.singleMat * float4(inst[ii].center,1.0)).xyz; + const float4 screenPt = uniforms.pMatrix * (uniforms.mvMatrix * float4(centerPos,1.0) + uniforms.mvMatrixDiff * float4(centerPos,1.0)); + centers[ii].screenPos = screenPt.xy / screenPt.w; // Make sure the object is facing the user (only for the globe) if (uniforms.globeMode && ii == 1) { float4 pt = uniforms.mvMatrix * float4(centerPos,1.0); pt /= pt.w; - float4 testNorm = uniforms.mvNormalMatrix * float4(centerPos,0.0); - dotProd = dot(-pt.xyz,testNorm.xyz); - if (pt.z > 0.0) - dotProd = -1.0; + if (pt.z > 0.0) { + isValid = false; + } else { + const float4 testNorm = uniforms.mvNormalMatrix * float4(centerPos,0.0); + if (dot(-pt.xyz, testNorm.xyz) <= 0.0) { + isValid = false; + } + } } } - + } + + if (!isValid) { + return outVert; + } + // Size of pixels - float2 screenScale(2.0/uniforms.frameSize.x,2.0/uniforms.frameSize.y); + const float2 screenScale(2.0/uniforms.frameSize.x,2.0/uniforms.frameSize.y); + const float zoom = ZoomFromSlot(uniforms, vertArgs.uniDrawState.zoomSlot); - // Direction and normal info for three segments we may look at - bool isValid = instValid[2]; for (unsigned int ii=1;ii<4;ii++) { if (instValid[ii-1]) { centers[ii].dir = centers[ii].screenPos - centers[ii-1].screenPos; @@ -955,8 +958,6 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( centers[ii].norm = normalize(float2(-centers[ii].dir.y,centers[ii].dir.x) * screenScale); } } - - float zoom = ZoomFromSlot(uniforms, vertArgs.uniDrawState.zoomSlot); // Pull out the width and possibly calculate one float w2 = vertArgs.wideVec.w2; @@ -973,19 +974,13 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // centerLine = ExpCalculateFloat(vertArgs.wideVecExp.offsetExp, zoom, centerLine); // Intersect on the left or right depending - float interDir = whichVert & 0x1 ? 1.0 : -1.0; + const float interDir = whichVert & 0x1 ? 1.0 : -1.0; // Turn off the end caps for the moment switch (whichPoly) { case 0: - isValid &= false; - break; - case 1: - isValid &= true; - break; case 2: - isValid &= false; - break; + isValid = false; } // Do the offset intersection @@ -994,12 +989,12 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( float2 iPts; if (isValid) { // We'll reject - float nearDist = 1.42 * w2 * max(screenScale.x,screenScale.y); + const float nearDist = 1.42 * w2 * max(screenScale.x,screenScale.y); // We only need one intersection depending - int interPt = (whichVert == 6 || whichVert == 7) ? 1 : 0; + const int interPt = (whichVert == 6 || whichVert == 7) ? 1 : 0; if (instValid[interPt] && instValid[interPt+1] && instValid[interPt+2]) { - float dotProd = dot(centers[interPt+1].nDir, centers[interPt+2].nDir); + const float dotProd = dot(centers[interPt+1].nDir, centers[interPt+2].nDir); if (dotProd > -0.99999998476 && dotProd < 0.99999998476) { // Acute angles tend to break things // angleBetween = acos(dotProd); @@ -1007,14 +1002,15 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( //// iPtsValid = false; // } - float2 nudge = w2 * interDir * screenScale; - IntersectInfo interInfo = intersectWideLines(centers[interPt].screenPos,centers[interPt+1].screenPos,centers[interPt+2].screenPos, - nudge * centers[interPt+1].norm, nudge * centers[interPt+2].norm); + const float2 nudge = w2 * interDir * screenScale; + const IntersectInfo interInfo = intersectWideLines(centers[interPt].screenPos, + centers[interPt+1].screenPos, + centers[interPt+2].screenPos, + nudge * centers[interPt+1].norm, + nudge * centers[interPt+2].norm); if (interInfo.valid) { // If the intersection is too far away, we'll drop it - if (distance_squared(centers[interPt+1].screenPos,interInfo.interPt) > nearDist*nearDist) { - iPtsValid = false; - } else { + if (distance_squared(centers[interPt+1].screenPos,interInfo.interPt) <= nearDist*nearDist) { iPtsValid = true; iPts = interInfo.interPt; } @@ -1025,33 +1021,28 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Note: We're putting a color in the instance, but then it's hard to change // So we'll pull the color out of the basic drawable -// float4 color = inst[1].color; float4 color = vert.color; if (vertArgs.wideVec.hasExp) { color = ExpCalculateColor(vertArgs.wideVecExp.colorExp, zoom, color); - float opacity = ExpCalculateFloat(vertArgs.wideVecExp.opacityExp, zoom, color.a); - color.a = /*color.a * */opacity; + color.a = ExpCalculateFloat(vertArgs.wideVecExp.opacityExp, zoom, color.a); } - outVert.color = color * calculateFade(uniforms,vertArgs.uniDrawState); + outVert.color = color * calculateFade(uniforms,vertArgs.uniDrawState); outVert.w2 = w2; outVert.edge = vertArgs.wideVec.edge; outVert.texCoord = float2(interDir,0); - if (isValid && dotProd > 0.0) { + if (isValid) { if (iPtsValid) { outVert.position = float4(iPts, 0.0, 1.0); } else { // Return a vertex offset from the base - int basePt = (whichVert == 6 || whichVert == 7) ? 2 : 1; - float2 offset = (centers[2].norm * interDir) * screenScale * (w2 + centerLine + vertArgs.wideVec.edge); - + const int basePt = (whichVert == 6 || whichVert == 7) ? 2 : 1; + const float2 offset = (centers[2].norm * interDir) * screenScale * (w2 + centerLine + vertArgs.wideVec.edge); outVert.position = float4(centers[basePt].screenPos + offset, 0.0, 1.0); } - } else { - outVert.position = float4(0.0,0.0,-1000.0,1.0); } - + return outVert; } From 2f35b3fbc24903dc92e09516ed2ecfbf1fd4c3ea Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 22 Mar 2022 14:00:31 -0700 Subject: [PATCH 52/78] Add JNI for expressions --- android/library/maply/jni/CMakeLists.txt | 4 + .../jni/include/classInfo/Expressions_jni.h | 31 ++ .../expressions/ColorExpressionInfo_jni.cpp | 88 +++++ .../expressions/FloatExpressionInfo_jni.cpp | 87 +++++ .../jni/src/labelsMarkers/MarkerInfo_jni.cpp | 320 +++++++++++++++--- .../jni/src/vectors/WideVectorInfo_jni.cpp | 223 ++++++++++++ .../mousebird/maply/ColorExpressionInfo.kt | 51 +++ .../mousebird/maply/FloatExpressionInfo.kt | 44 +++ .../java/com/mousebird/maply/MarkerInfo.java | 86 ++++- .../com/mousebird/maply/WideVectorInfo.java | 50 +++ common/WhirlyGlobeLib/include/BaseInfo.h | 24 +- 11 files changed, 934 insertions(+), 74 deletions(-) create mode 100644 android/library/maply/jni/include/classInfo/Expressions_jni.h create mode 100644 android/library/maply/jni/src/expressions/ColorExpressionInfo_jni.cpp create mode 100644 android/library/maply/jni/src/expressions/FloatExpressionInfo_jni.cpp create mode 100644 android/library/maply/src/main/java/com/mousebird/maply/ColorExpressionInfo.kt create mode 100644 android/library/maply/src/main/java/com/mousebird/maply/FloatExpressionInfo.kt diff --git a/android/library/maply/jni/CMakeLists.txt b/android/library/maply/jni/CMakeLists.txt index e763c6cefb..35fbcc3e3f 100644 --- a/android/library/maply/jni/CMakeLists.txt +++ b/android/library/maply/jni/CMakeLists.txt @@ -23,6 +23,7 @@ target_sources( "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/Billboard_jni.h" "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/Components_jni.h" "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/CoordSystem_jni.h" + "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/Expressions_jni.h" "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/Formats_jni.h" "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/Geometry_jni.h" "${CMAKE_CURRENT_LIST_DIR}/include/classInfo/GeometryManager_jni.h" @@ -58,6 +59,9 @@ target_sources( "${CMAKE_CURRENT_LIST_DIR}/src/coordSystem/Proj4CoordSystem_jni.cpp" "${CMAKE_CURRENT_LIST_DIR}/src/coordSystem/SphericalMercatorCoordSystem_jni.cpp" + "${CMAKE_CURRENT_LIST_DIR}/src/expressions/ColorExpressionInfo_jni.cpp" + "${CMAKE_CURRENT_LIST_DIR}/src/expressions/FloatExpressionInfo_jni.cpp" + "${CMAKE_CURRENT_LIST_DIR}/src/scene/ChangeSet_jni.cpp" "${CMAKE_CURRENT_LIST_DIR}/src/scene/DirectionalLight_jni.cpp" "${CMAKE_CURRENT_LIST_DIR}/src/scene/Material_jni.cpp" diff --git a/android/library/maply/jni/include/classInfo/Expressions_jni.h b/android/library/maply/jni/include/classInfo/Expressions_jni.h new file mode 100644 index 0000000000..284fad81fa --- /dev/null +++ b/android/library/maply/jni/include/classInfo/Expressions_jni.h @@ -0,0 +1,31 @@ +/* Expressions_jni.h + * WhirlyGlobeLib + * + * Created by Tim Sylvester on 03/22/2022. + * Copyright 2022-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "Maply_jni.h" +#import "WhirlyGlobe_Android.h" +#import "BaseInfo.h" + +namespace WhirlyKit { + +typedef JavaClassInfo ColorExpressionClassInfo; +typedef JavaClassInfo FloatExpressionClassInfo; + +extern jobject MakeWrapper(JNIEnv *env, ColorExpressionInfoRef exp); +extern jobject MakeWrapper(JNIEnv *env, FloatExpressionInfoRef exp); + +} \ No newline at end of file diff --git a/android/library/maply/jni/src/expressions/ColorExpressionInfo_jni.cpp b/android/library/maply/jni/src/expressions/ColorExpressionInfo_jni.cpp new file mode 100644 index 0000000000..335fc9346d --- /dev/null +++ b/android/library/maply/jni/src/expressions/ColorExpressionInfo_jni.cpp @@ -0,0 +1,88 @@ +/* ColorExpressionInfo_jni.cpp + * WhirlyGlobeLib + * + * Created by Tim Sylvester on 03/22/2022 + * Copyright 2022-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#import + +using namespace WhirlyKit; +using namespace Eigen; + +template<> ColorExpressionClassInfo *ColorExpressionClassInfo::classInfoObj = nullptr; + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_ColorExpressionInfo_nativeInit( + JNIEnv *env, jclass cls) +{ + ColorExpressionClassInfo::getClassInfo(env, cls); +} + +jobject WhirlyKit::MakeWrapper(JNIEnv *env, ColorExpressionInfoRef exp) +{ + if (exp) + { + constexpr char const *className = "com/mousebird/maply/ColorExpressionInfo"; + if (const auto expInfo = ColorExpressionClassInfo::getClassInfo(env, className)) + { + if (jobject newObj = expInfo->makeWrapperObject(env, nullptr)) + { + expInfo->setHandle(env, newObj, new ColorExpressionInfoRef(std::move(exp))); + return newObj; + } + } + } + return nullptr; +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_ColorExpressionInfo_createLinear( + JNIEnv *env, jclass cls, + jfloat minZoom, jint minColor, + jfloat maxZoom, jint maxColor) +{ + try + { + if (jobject newJObj = MakeWrapper(env, std::make_shared())) + { + if (const auto &obj = *ColorExpressionClassInfo::get(env, newJObj)) + { + obj->base = 1.0; + obj->type = ExpressionInfoType::ExpressionLinear; + obj->stopInputs = { minZoom, maxZoom }; + obj->stopOutputs = { RGBAColor::FromARGBInt(minColor), + RGBAColor::FromARGBInt(maxColor) }; + return newJObj; + } + } + } + MAPLY_STD_JNI_CATCH() + return nullptr; +} + +static std::mutex disposeMutex; + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_ColorExpressionInfo_dispose( + JNIEnv *env, jobject obj) +{ + try + { + const auto classInfo = ColorExpressionClassInfo::getClassInfo(); + std::lock_guard lock(disposeMutex); + delete classInfo->getObject(env,obj); + classInfo->clearHandle(env,obj); + } + MAPLY_STD_JNI_CATCH() +} + diff --git a/android/library/maply/jni/src/expressions/FloatExpressionInfo_jni.cpp b/android/library/maply/jni/src/expressions/FloatExpressionInfo_jni.cpp new file mode 100644 index 0000000000..cda39f82b0 --- /dev/null +++ b/android/library/maply/jni/src/expressions/FloatExpressionInfo_jni.cpp @@ -0,0 +1,87 @@ +/* FloatExpressionInfo_jni.cpp + * WhirlyGlobeLib + * + * Created by Tim Sylvester on 03/22/2022 + * Copyright 2022-2022 mousebird consulting + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +#import + +using namespace WhirlyKit; +using namespace Eigen; + +template<> FloatExpressionClassInfo *FloatExpressionClassInfo::classInfoObj = nullptr; + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_FloatExpressionInfo_nativeInit( + JNIEnv *env, jclass cls) +{ + FloatExpressionClassInfo::getClassInfo(env, cls); +} + +jobject WhirlyKit::MakeWrapper(JNIEnv *env, FloatExpressionInfoRef exp) +{ + if (exp) + { + constexpr char const *className = "com/mousebird/maply/FloatExpressionInfo"; + if (const auto expInfo = FloatExpressionClassInfo::getClassInfo(env, className)) + { + if (jobject newObj = expInfo->makeWrapperObject(env, nullptr)) + { + expInfo->setHandle(env, newObj, new FloatExpressionInfoRef(std::move(exp))); + return newObj; + } + } + } + return nullptr; +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_FloatExpressionInfo_createLinear( + JNIEnv *env, jclass cls, + jfloat minZoom, jfloat minValue, + jfloat maxZoom, jfloat maxValue) +{ + try + { + if (jobject newJObj = MakeWrapper(env, std::make_shared())) + { + if (const auto &obj = *FloatExpressionClassInfo::get(env, newJObj)) + { + obj->base = 1.0; + obj->type = ExpressionInfoType::ExpressionLinear; + obj->stopInputs = { minZoom, maxZoom }; + obj->stopOutputs = { minValue, maxValue }; + return newJObj; + } + } + } + MAPLY_STD_JNI_CATCH() + return nullptr; +} + +static std::mutex disposeMutex; + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_FloatExpressionInfo_dispose( + JNIEnv *env, jobject obj) +{ + try + { + const auto classInfo = FloatExpressionClassInfo::getClassInfo(); + std::lock_guard lock(disposeMutex); + delete classInfo->getObject(env,obj); + classInfo->clearHandle(env,obj); + } + MAPLY_STD_JNI_CATCH() +} + diff --git a/android/library/maply/jni/src/labelsMarkers/MarkerInfo_jni.cpp b/android/library/maply/jni/src/labelsMarkers/MarkerInfo_jni.cpp index 67e4228cd4..b616d8c09b 100644 --- a/android/library/maply/jni/src/labelsMarkers/MarkerInfo_jni.cpp +++ b/android/library/maply/jni/src/labelsMarkers/MarkerInfo_jni.cpp @@ -1,5 +1,4 @@ -/* - * MarkerInfo_jni.cpp +/* MarkerInfo_jni.cpp * WhirlyGlobeLib * * Created by Steve Gifford on 6/2/14. @@ -15,107 +14,328 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "LabelsAndMarkers_jni.h" +#import "Expressions_jni.h" #import "com_mousebird_maply_MarkerInfo.h" using namespace WhirlyKit; -template<> MarkerInfoClassInfo *MarkerInfoClassInfo::classInfoObj = NULL; +template<> MarkerInfoClassInfo *MarkerInfoClassInfo::classInfoObj = nullptr; +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_nativeInit (JNIEnv *env, jclass cls) { MarkerInfoClassInfo::getClassInfo(env,cls); } +static std::mutex disposeMutex; + +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_initialise (JNIEnv *env, jobject obj) { try { - MarkerInfoRef *info = new MarkerInfoRef(new MarkerInfo(true)); - MarkerInfoClassInfo::getClassInfo()->setHandle(env,obj,info); - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in MarkerInfo::initialise()"); + MarkerInfoRef *info = new MarkerInfoRef(std::make_shared(true)); + std::lock_guard lock(disposeMutex); + delete MarkerInfoClassInfo::get(env, obj); + MarkerInfoClassInfo::set(env,obj,info); } + MAPLY_STD_JNI_CATCH() } -static std::mutex disposeMutex; - +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_dispose (JNIEnv *env, jobject obj) { try { MarkerInfoClassInfo *classInfo = MarkerInfoClassInfo::getClassInfo(); - { - std::lock_guard lock(disposeMutex); - MarkerInfoRef *info = classInfo->getObject(env,obj); - if (!info) - return; - delete info; + std::lock_guard lock(disposeMutex); + delete classInfo->getObject(env,obj); + classInfo->clearHandle(env,obj); + } + MAPLY_STD_JNI_CATCH() +} - classInfo->clearHandle(env,obj); +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setColorARGB + (JNIEnv *env, jobject obj, jint color) +{ + try + { + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + (*info)->color = RGBAColor::FromARGBInt(color); } - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in MarkerInfo::dispose()"); - } + } + MAPLY_STD_JNI_CATCH() } -JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setColor - (JNIEnv *env, jobject obj, jfloat r, jfloat g, jfloat b, jfloat a) +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setComponents + (JNIEnv *env, jobject obj, jint r, jint g, jint b, jint a) { try { - MarkerInfoClassInfo *classInfo = MarkerInfoClassInfo::getClassInfo(); - MarkerInfoRef *info = classInfo->getObject(env,obj); - if (!info) - return; - (*info)->color = RGBAColor(r*255,g*255,b*255,a*255); - } - catch (...) - { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in MarkerInfo::setColor()"); + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + (*info)->color = RGBAColor(r, g, b, a); + } } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jint JNICALL Java_com_mousebird_maply_MarkerInfo_getColorARGB + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + return (*info)->color.asARGBInt(); + } + } + MAPLY_STD_JNI_CATCH() + return -1; +} + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setColorExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &mrkInfo = *MarkerInfoClassInfo::get(env, obj)) + { + mrkInfo->colorExp.reset(); + if (exprObj) + { + if (const auto wrap = ColorExpressionClassInfo::get(env, exprObj)) + { + mrkInfo->colorExp = *wrap; + } + } + mrkInfo->hasExp = mrkInfo->colorExp || mrkInfo->opacityExp || mrkInfo->scaleExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_MarkerInfo_getColorExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto mrkInfo = MarkerInfoClassInfo::get(env, obj)) + { + if (const auto exp = (*mrkInfo)->colorExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; +} + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setOpacityExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &mrkInfo = *MarkerInfoClassInfo::get(env, obj)) + { + mrkInfo->opacityExp.reset(); + if (exprObj) + { + if (const auto wrap = FloatExpressionClassInfo::get(env, exprObj)) + { + mrkInfo->opacityExp = *wrap; + } + } + mrkInfo->hasExp = mrkInfo->colorExp || mrkInfo->opacityExp || mrkInfo->scaleExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_MarkerInfo_geOpacityExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto mrkInfo = MarkerInfoClassInfo::get(env, obj)) + { + if (const auto exp = (*mrkInfo)->opacityExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; } +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setScaleExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &mrkInfo = *MarkerInfoClassInfo::get(env, obj)) + { + mrkInfo->scaleExp.reset(); + if (exprObj) + { + if (const auto wrap = FloatExpressionClassInfo::get(env, exprObj)) + { + mrkInfo->scaleExp = *wrap; + } + } + mrkInfo->hasExp = mrkInfo->colorExp || mrkInfo->opacityExp || mrkInfo->scaleExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_MarkerInfo_getScaleExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto mrkInfo = MarkerInfoClassInfo::get(env, obj)) + { + if (const auto exp = (*mrkInfo)->scaleExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; +} + +extern "C" +JNIEXPORT jfloat JNICALL Java_com_mousebird_maply_MarkerInfo_getLayoutImportance + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + return (*info)->layoutImportance; + } + } + MAPLY_STD_JNI_CATCH() + return -1.0f; +} + +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setLayoutImportance -(JNIEnv *env, jobject obj, jfloat import) + (JNIEnv *env, jobject obj, jfloat import) { try { - MarkerInfoClassInfo *classInfo = MarkerInfoClassInfo::getClassInfo(); - MarkerInfoRef *info = classInfo->getObject(env,obj); - if (!info) - return; - (*info)->layoutImportance = import; + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + (*info)->layoutImportance = import; + } } - catch (...) + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jint JNICALL Java_com_mousebird_maply_MarkerInfo_getClusterGroup + (JNIEnv *env, jobject obj) +{ + try { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in MarkerInfo::setLayoutImportance()"); + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + return (*info)->clusterGroup; + } } + MAPLY_STD_JNI_CATCH() + return -1; } +extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setClusterGroup (JNIEnv *env, jobject obj, jint clusterGroup) { try { - MarkerInfoClassInfo *classInfo = MarkerInfoClassInfo::getClassInfo(); - MarkerInfoRef *info = classInfo->getObject(env,obj); - if (!info) - return; - (*info)->clusterGroup = clusterGroup; + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + (*info)->clusterGroup = clusterGroup; + } } - catch (...) + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setZoomSlot + (JNIEnv *env, jobject obj, jint slot) +{ + try { - __android_log_print(ANDROID_LOG_VERBOSE, "Maply", "Crash in MarkerInfo::setLayoutImportance()"); + if (const auto vecInfo = MarkerInfoClassInfo::get(env,obj)) + { + (*vecInfo)->zoomSlot = slot; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jint JNICALL Java_com_mousebird_maply_MarkerInfo_getZoomSlot + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = MarkerInfoClassInfo::get(env,obj)) + { + return (*vecInfo)->zoomSlot; + } + } + MAPLY_STD_JNI_CATCH() + return false; +} + +extern "C" +JNIEXPORT jlong JNICALL Java_com_mousebird_maply_MarkerInfo_getShaderProgramId + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + return (*info)->programID; + } + } + MAPLY_STD_JNI_CATCH() + return -1; +} + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_MarkerInfo_setShaderProgramId + (JNIEnv *env, jobject obj, jlong id) +{ + try + { + if (const auto info = MarkerInfoClassInfo::get(env,obj)) + { + (*info)->programID = id; + } } + MAPLY_STD_JNI_CATCH() } diff --git a/android/library/maply/jni/src/vectors/WideVectorInfo_jni.cpp b/android/library/maply/jni/src/vectors/WideVectorInfo_jni.cpp index 04ac1220c3..2a8e9d834e 100644 --- a/android/library/maply/jni/src/vectors/WideVectorInfo_jni.cpp +++ b/android/library/maply/jni/src/vectors/WideVectorInfo_jni.cpp @@ -17,6 +17,7 @@ */ #include +#import "Expressions_jni.h" #import "Vectors_jni.h" #import "com_mousebird_maply_WideVectorInfo.h" @@ -96,6 +97,88 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setColor (jint)(r*255.0f),(jint)(g*255.0f),(jint)(b*255.0f),(jint)(a*255.0f)); } +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setColorExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &vecInfo = *WideVectorInfoClassInfo::get(env,obj)) + { + vecInfo->colorExp.reset(); + if (exprObj) + { + if (const auto wrap = ColorExpressionClassInfo::get(env, exprObj)) + { + vecInfo->colorExp = *wrap; + } + } + vecInfo->hasExp = vecInfo->colorExp || vecInfo->opacityExp || + vecInfo->widthExp || vecInfo->offsetExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_WideVectorInfo_getColorExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + if (const auto exp = (*vecInfo)->colorExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; +} + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setOpacityExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &vecInfo = *WideVectorInfoClassInfo::get(env,obj)) + { + vecInfo->opacityExp.reset(); + if (exprObj) + { + if (const auto wrap = FloatExpressionClassInfo::get(env, exprObj)) + { + vecInfo->opacityExp = *wrap; + } + } + vecInfo->hasExp = vecInfo->colorExp || vecInfo->opacityExp || + vecInfo->widthExp || vecInfo->offsetExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_WideVectorInfo_geOpacityExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + if (const auto exp = (*vecInfo)->opacityExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; +} + extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setLineWidth (JNIEnv *env, jobject obj, jfloat val) @@ -125,6 +208,47 @@ JNIEXPORT jfloat JNICALL Java_com_mousebird_maply_WideVectorInfo_getLineWidth return 0.0f; } +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setWidthExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &vecInfo = *WideVectorInfoClassInfo::get(env,obj)) + { + vecInfo->widthExp.reset(); + if (exprObj) + { + if (const auto wrap = FloatExpressionClassInfo::get(env, exprObj)) + { + vecInfo->widthExp = *wrap; + } + } + vecInfo->hasExp = vecInfo->colorExp || vecInfo->opacityExp || + vecInfo->widthExp || vecInfo->offsetExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_WideVectorInfo_geWidthExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + if (const auto exp = (*vecInfo)->widthExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; +} + extern "C" JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setTextureRepeatLength (JNIEnv *env, jobject obj, jdouble repeatLen) @@ -313,6 +437,47 @@ JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setOffset MAPLY_STD_JNI_CATCH() } +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setOffsetExp + (JNIEnv *env, jobject obj, jobject exprObj) +{ + try + { + if (const auto &vecInfo = *WideVectorInfoClassInfo::get(env,obj)) + { + vecInfo->offsetExp.reset(); + if (exprObj) + { + if (const auto wrap = FloatExpressionClassInfo::get(env, exprObj)) + { + vecInfo->offsetExp = *wrap; + } + } + vecInfo->hasExp = vecInfo->colorExp || vecInfo->opacityExp || + vecInfo->widthExp || vecInfo->offsetExp; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jobject JNICALL Java_com_mousebird_maply_WideVectorInfo_geOffsetExp + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + if (const auto exp = (*vecInfo)->offsetExp) + { + return MakeWrapper(env, std::move(exp)); + } + } + } + MAPLY_STD_JNI_CATCH() + return 0; +} + extern "C" JNIEXPORT jdouble JNICALL Java_com_mousebird_maply_WideVectorInfo_getOffset (JNIEnv *env, jobject obj) @@ -356,3 +521,61 @@ JNIEXPORT jboolean JNICALL Java_com_mousebird_maply_WideVectorInfo_getCloseAreal MAPLY_STD_JNI_CATCH() return false; } + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setZoomSlot + (JNIEnv *env, jobject obj, jint slot) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + (*vecInfo)->zoomSlot = slot; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jint JNICALL Java_com_mousebird_maply_WideVectorInfo_getZoomSlot + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + return (*vecInfo)->zoomSlot; + } + } + MAPLY_STD_JNI_CATCH() + return false; +} + +extern "C" +JNIEXPORT void JNICALL Java_com_mousebird_maply_WideVectorInfo_setShaderProgramId + (JNIEnv *env, jobject obj, jlong id) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + (*vecInfo)->programID = id; + } + } + MAPLY_STD_JNI_CATCH() +} + +extern "C" +JNIEXPORT jlong JNICALL Java_com_mousebird_maply_WideVectorInfo_getShaderProgramId + (JNIEnv *env, jobject obj) +{ + try + { + if (const auto vecInfo = WideVectorInfoClassInfo::get(env,obj)) + { + return (*vecInfo)->programID; + } + } + MAPLY_STD_JNI_CATCH() + return false; +} diff --git a/android/library/maply/src/main/java/com/mousebird/maply/ColorExpressionInfo.kt b/android/library/maply/src/main/java/com/mousebird/maply/ColorExpressionInfo.kt new file mode 100644 index 0000000000..85b571c519 --- /dev/null +++ b/android/library/maply/src/main/java/com/mousebird/maply/ColorExpressionInfo.kt @@ -0,0 +1,51 @@ +/* ColorExpressionInfo.kt + * AutoTesterAndroid.maply + * + * Created by Tim Sylvester on 22/03/2022 + * Copyright © 2022 mousebird consulting, inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.mousebird.maply + +import android.graphics.Color +import android.os.Build +import androidx.annotation.* + +class ColorExpressionInfo { + + fun finalize() { + dispose() + } + + external fun dispose() + + companion object { + @RequiresApi(Build.VERSION_CODES.O) + fun createLinear(minZoom: Float, minColor: Color, + maxZoom: Float, maxColor: Color): ColorExpressionInfo? = + createLinear(minZoom, minColor.toArgb(), maxZoom, maxColor.toArgb()) + + @JvmStatic + external fun createLinear(minZoom: Float, @ColorInt minColor: Int, + maxZoom: Float, @ColorInt maxColor: Int): ColorExpressionInfo? + @JvmStatic + private external fun nativeInit() + + init { + nativeInit() + } + } + + @Keep + @Suppress("unused") // Used by JNI + private var nativeHandle: Long = 0 +} \ No newline at end of file diff --git a/android/library/maply/src/main/java/com/mousebird/maply/FloatExpressionInfo.kt b/android/library/maply/src/main/java/com/mousebird/maply/FloatExpressionInfo.kt new file mode 100644 index 0000000000..e5fce097cb --- /dev/null +++ b/android/library/maply/src/main/java/com/mousebird/maply/FloatExpressionInfo.kt @@ -0,0 +1,44 @@ +/* FloatExpressionInfo.kt + * AutoTesterAndroid.maply + * + * Created by Tim Sylvester on 22/03/2022 + * Copyright © 2022 mousebird consulting, inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package com.mousebird.maply + +import androidx.annotation.* + +class FloatExpressionInfo { + + fun finalize() { + dispose() + } + + external fun dispose() + + companion object { + @JvmStatic + external fun createLinear(minZoom: Float, minValue: Float, + maxZoom: Float, maxValue: Float): FloatExpressionInfo? + @JvmStatic + private external fun nativeInit() + + init { + nativeInit() + } + } + + @Keep + @Suppress("unused") // Used by JNI + private var nativeHandle: Long = 0 +} \ No newline at end of file diff --git a/android/library/maply/src/main/java/com/mousebird/maply/MarkerInfo.java b/android/library/maply/src/main/java/com/mousebird/maply/MarkerInfo.java index aa8e3c03ed..f30e283fa8 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/MarkerInfo.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/MarkerInfo.java @@ -1,5 +1,4 @@ -/* - * MarkerInfo.java +/* MarkerInfo.java * WhirlyGlobeLib * * Created by Steve Gifford on 6/2/14. @@ -15,12 +14,18 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ package com.mousebird.maply; import android.graphics.Color; +import android.os.Build; + +import androidx.annotation.ColorInt; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; + +import org.jetbrains.annotations.NotNull; /** * This class holds the visual information for a set of 2D or 3D markers. @@ -49,18 +54,33 @@ public MarkerInfo() setClusterGroup(-1); } - public void finalize() - { + public void finalize() { dispose(); } /** * Set the color from a standard Android Color value. - * @param color Color value, including alpha. + * @param argb Color value, including alpha. */ - public void setColor(int color) - { - setColor(Color.red(color)/255.f,Color.green(color)/255.f,Color.blue(color)/255.f,Color.alpha(color)/255.f); + public native void setColorARGB(@ColorInt int argb); + public native @ColorInt int getColorARGB(); + + public void setColor(@ColorInt int color) { + setColorARGB(color); + } + + @RequiresApi(api = Build.VERSION_CODES.O) + public Color getColor() { + return Color.valueOf(getColorARGB()); + } + + @RequiresApi(api = Build.VERSION_CODES.O) + public void setColor(@NotNull Color color) { + setColorARGB(color.toArgb()); + } + + public void setColor(float r,float g,float b,float a) { + setComponents((int)(r*255),(int)(g*255),(int)(b*255),(int)(a*255)); } /** @@ -73,7 +93,25 @@ public void setColor(int color) * @param b blue * @param a alpha */ - public native void setColor(float r,float g,float b,float a); + private native void setComponents(int r,int g,int b,int a); + + /** + * Set the color expression, overriding color + */ + public native void setColorExp(@Nullable ColorExpressionInfo expr); + public native ColorExpressionInfo getColorExp(); + + /** + * Set the opacity expression, overriding the alpha component of color/colorExpr + */ + public native void setOpacityExp(@Nullable FloatExpressionInfo expr); + public native FloatExpressionInfo getOpacityExp(); + + /** + * Set the scale expression + */ + public native void setScaleExp(@Nullable FloatExpressionInfo expr); + public native FloatExpressionInfo getScaleExp(); /** * Set the default layout importance for any markers added with this info. @@ -89,12 +127,40 @@ public void setColor(int color) * it must be set to MAXFLOAT here. */ public native void setLayoutImportance(float newImport); + public native float getLayoutImportance(); /** * If greater than -1 we'll sort these markers into cluster groups when zooming out. * The number passed in determines which group it's sorted into. */ public native void setClusterGroup(int clusterGroup); + public native int getClusterGroup(); + + /** + * Set the zoom slot to use for expression-based properties. + * + * Must be set for expression properties to work correctly + */ + public native void setZoomSlot(int slot); + public native int getZoomSlot(); + + /** + * Set the shader program to use + */ + public void setShader(@Nullable Shader shader) { + if (shader != null) { + setShaderProgramId(shader.getID()); + } else { + setShaderProgramId(0); + + } + } + + /** + * Set the shader program to use + */ + public native void setShaderProgramId(long id); + public native long getShaderProgramId(); static { diff --git a/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java b/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java index 206bb3d4c5..72fd2c3ffc 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/WideVectorInfo.java @@ -74,12 +74,30 @@ public void setColor(int color) { */ public native void setColorInt(int r,int g,int b,int a); + /** + * Set the color expression, overriding color + */ + public native void setColorExp(ColorExpressionInfo expr); + public native ColorExpressionInfo getColorExp(); + + /** + * Set the opacity expression, overriding the alpha component of color/colorExpr + */ + public native void setOpacityExp(FloatExpressionInfo expr); + public native FloatExpressionInfo getOpacityExp(); + /** * This is the line width for vector features. By default this is 1.0. */ public native void setLineWidth(float lineWidth); public native float getLineWidth(); + /** + * Set the width expression, overriding width + */ + public native void setWidthExp(FloatExpressionInfo expr); + public native FloatExpressionInfo getWidthExp(); + /** * This is the repeat size for a texture applied along the widened line. * The value is in pixels for screen widths. @@ -137,12 +155,44 @@ public void setTexture(@Nullable MaplyTexture tex) { public native void setOffset(double pixels); public native double getOffset(); + /** + * Set the offset expression, overriding offset + */ + public native void setOffsetExp(FloatExpressionInfo expr); + public native FloatExpressionInfo getOffsetExp(); + /** * Close any un-closed areal features when drawing lines for them */ public native void setCloseAreals(boolean close); public native boolean getCloseAreals(); + /** + * Set the zoom slot to use for expression-based properties. + * + * Must be set for expression properties to work correctly + */ + public native void setZoomSlot(int slot); + public native int getZoomSlot(); + + /** + * Set the shader program to use + */ + public void setShader(@Nullable Shader shader) { + if (shader != null) { + setShaderProgramId(shader.getID()); + } else { + setShaderProgramId(0); + + } + } + + /** + * Set the shader program to use + */ + public native void setShaderProgramId(long id); + public native long getShaderProgramId(); + static { nativeInit(); } diff --git a/common/WhirlyGlobeLib/include/BaseInfo.h b/common/WhirlyGlobeLib/include/BaseInfo.h index 154a62f2b3..90200b34e7 100644 --- a/common/WhirlyGlobeLib/include/BaseInfo.h +++ b/common/WhirlyGlobeLib/include/BaseInfo.h @@ -1,5 +1,4 @@ -/* - * BaseInfo.h +/* BaseInfo.h * WhirlyGlobeLib * * Created by Steve Gifford on 7/6/15. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import @@ -40,9 +38,8 @@ typedef std::shared_ptr BasicDrawableInstanceBuild typedef enum {ExpressionNone,ExpressionLinear,ExpressionExponential} ExpressionInfoType; /// Base class for expressions -class ExpressionInfo : public Identifiable +struct ExpressionInfo : public Identifiable { -public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW; ExpressionInfo(); @@ -55,9 +52,8 @@ class ExpressionInfo : public Identifiable }; /// Single float expression (e.g. opacity or what have you) -class FloatExpressionInfo: public ExpressionInfo +struct FloatExpressionInfo: public ExpressionInfo { -public: FloatExpressionInfo() = default; FloatExpressionInfo(const FloatExpressionInfo &that) = default; @@ -72,9 +68,8 @@ class FloatExpressionInfo: public ExpressionInfo typedef std::shared_ptr FloatExpressionInfoRef; /// Color expression (e.g. for continuous color changes) -class ColorExpressionInfo: public ExpressionInfo +struct ColorExpressionInfo: public ExpressionInfo { -public: ColorExpressionInfo() = default; ColorExpressionInfo(const ColorExpressionInfo &that) = default; @@ -86,6 +81,7 @@ class ColorExpressionInfo: public ExpressionInfo std::vector stopOutputs; }; + typedef std::shared_ptr ColorExpressionInfoRef; /** Object use as the base for parsing description dictionaries. @@ -117,24 +113,24 @@ struct BaseInfo double maxViewerDist = DrawVisibleInvalid; double minZoomVis = DrawVisibleInvalid; double maxZoomVis = DrawVisibleInvalid; - int zoomSlot = -1; Point3d viewerCenter = {DrawVisibleInvalid,DrawVisibleInvalid,DrawVisibleInvalid}; double drawOffset = 0.0; int64_t drawOrder = DrawOrderTiles; - int drawPriority = 0; - bool enable = true; TimeInterval fadeIn = 0.0; TimeInterval fadeOut = 0.0; TimeInterval fadeOutTime = 0.0; TimeInterval startEnable = 0.0; TimeInterval endEnable = 0.0; SimpleIdentity programID = EmptyIdentity; + int zoomSlot = -1; + int drawPriority = 0; int extraFrames = 0; + bool enable = true; bool zBufferRead = false; bool zBufferWrite = false; - SimpleIdentity renderTargetID = EmptyIdentity; bool hasExp = false; // Set if we're requiring the expressions to be passed through (problem on Metal) - + SimpleIdentity renderTargetID = EmptyIdentity; + SingleVertexAttributeSet uniforms; // 2^48 = 0x1000000000000 = 281474976710656 From bd88d9eccca8e6c0defe57f2d78a903b707e506d Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 22 Mar 2022 14:41:15 -0700 Subject: [PATCH 53/78] Update test case --- .../apps/AutoTesterAndroid/app/build.gradle | 6 +- .../autotester/TestCases/GeographyClass.java | 10 ++- .../TestCases/WideVectorsTestCase.kt | 71 ++++++++++++++++--- 3 files changed, 73 insertions(+), 14 deletions(-) diff --git a/android/apps/AutoTesterAndroid/app/build.gradle b/android/apps/AutoTesterAndroid/app/build.gradle index 60cc8781da..ac9dfd9628 100644 --- a/android/apps/AutoTesterAndroid/app/build.gradle +++ b/android/apps/AutoTesterAndroid/app/build.gradle @@ -25,11 +25,11 @@ android { storePassword System.getenv('BITRISEIO_ANDROID_KEYSTORE_PASSWORD') } } - compileSdkVersion 29 + compileSdkVersion 30 defaultConfig { applicationId "com.mousebirdconsulting.autotester" - minSdkVersion 21 - targetSdkVersion 29 + minSdkVersion 26 + targetSdkVersion 30 versionCode 1 versionName "1.0" diff --git a/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/GeographyClass.java b/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/GeographyClass.java index 03759317a5..349fd465e3 100644 --- a/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/GeographyClass.java +++ b/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/GeographyClass.java @@ -5,6 +5,8 @@ import android.content.ContextWrapper; import android.util.Log; +import androidx.annotation.Nullable; + import com.mousebird.maply.GlobeController; import com.mousebird.maply.MBTileFetcher; import com.mousebird.maply.MapController; @@ -160,8 +162,12 @@ private void setupImageLoader(BaseController baseController, String mbTilesName, } } - private MBTileFetcher mbTileFetcher; - private QuadImageLoader loader; + public @Nullable QuadImageLoader getLoader() { + return loader; + } + + private @Nullable MBTileFetcher mbTileFetcher; + private @Nullable QuadImageLoader loader; @Override public boolean setUpWithGlobe(GlobeController globeVC) throws Exception { diff --git a/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/WideVectorsTestCase.kt b/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/WideVectorsTestCase.kt index 6d41f6ba8e..623d0cc702 100644 --- a/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/WideVectorsTestCase.kt +++ b/android/apps/AutoTesterAndroid/app/src/main/java/com/mousebirdconsulting/autotester/TestCases/WideVectorsTestCase.kt @@ -5,6 +5,8 @@ import okio.buffer import android.app.Activity import com.mousebirdconsulting.autotester.Framework.MaplyTestCase import android.graphics.Color +import android.os.Handler +import android.os.Looper import android.util.Log import com.mousebird.maply.* import com.mousebird.maply.RenderControllerInterface.TextureSettings @@ -42,7 +44,7 @@ class WideVectorsTestCase(activity: Activity?) : it.drawPriority = drawPriority if (tex != null) { it.setTexture(tex) - it.setTextureRepeatLength(8.0) + it.textureRepeatLength = 8.0 } it.edgeFalloff = edge } @@ -77,6 +79,13 @@ class WideVectorsTestCase(activity: Activity?) : componentObjects.addAll(addGeoJSON(baseController, "testJson.geojson", 20.0f, pri, Color.BLUE, true, 1.0)) componentObjects.addAll(addGeoJSON(baseController, "sawtooth.geojson", 50.0f, pri, Color.RED, false, 20.0)) componentObjects.addAll(offsetTests(baseController)) + + // Expressions require the loader to be set up so we can get a zoom slot... at least until + // we have a non-loader-dependent zoom slot (See #1523). Lacking a way to run code after + // the loader setup completes, a la `addPostSurfaceRunnable`, just wait a while. + Handler(Looper.getMainLooper()).postDelayed({ + componentObjects.addAll(expressionTests(baseController)) + }, 1000) } private fun offsetTests(vc: BaseController): Collection { @@ -117,9 +126,9 @@ class WideVectorsTestCase(activity: Activity?) : val vecAttrs = AttrDictionary() val clAttrs = AttrDictionary() if (k > 0) { - val cc = 50 * i; - vecAttrs.setInt("color", Color.argb(129, 0,cc,255 - cc)); - clAttrs.setInt("color", Color.argb(192,0,255 - cc,cc)); + val cc = 50 * i + vecAttrs.setInt("color", Color.argb(129, 0,cc,255 - cc)) + clAttrs.setInt("color", Color.argb(192,0,255 - cc,cc)) } val vecObj = VectorObject.createLineString(coords, vecAttrs)?.subdivideToGlobe(0.0001) val clObj = VectorObject.createLineString(coords, clAttrs)?.subdivideToGlobe(0.0001) @@ -133,17 +142,61 @@ class WideVectorsTestCase(activity: Activity?) : } } + private fun expressionTests(vc: BaseController): Collection { + val coords = arrayOf( + Point2d.FromDegrees(-100.0, 60.0), + Point2d.FromDegrees(-110.0, 61.0), + Point2d.FromDegrees(-120.0, 62.0), + ) + + val wideInfo = WideVectorInfo().also { + it.setColor(1.0f, 0.0f, 0.0f, 1.0f) + it.enable = true + it.setFade(0.0) + it.drawPriority = VectorInfo.VectorPriorityDefault + it.edgeFalloff = 1.0 + it.offset = 2.0 + it.lineWidth = 20.0f + + it.zoomSlot = baseTestCase.loader?.zoomSlot ?: -1 + + val c1 = Color.argb(1.0f, 0.0f, 1.0f, 0.8f) + val c2 = Color.argb(0.0f, 0.0f, 1.0f, 0.8f) + it.colorExp = ColorExpressionInfo.createLinear(2.0f, c1, 6.0f, c2) + it.opacityExp = FloatExpressionInfo.createLinear(2.0f, 0.2f, 6.0f, 0.9f) + it.widthExp = FloatExpressionInfo.createLinear(2.0f, 1.0f, 6.0f, 20.0f) + it.offsetExp = FloatExpressionInfo.createLinear(2.0f, -20.0f, 6.0f, 20.0f) + } + val info = VectorInfo().also { + it.setColor(1.0f, 0.0f, 1.0f, 0.8f) + it.enable = true + it.drawPriority = wideInfo.drawPriority + 10 + } + + val vecObj = VectorObject.createLineString(coords, null)?.subdivideToGlobe(0.0001) + val clObj = VectorObject.createLineString(coords, null)?.subdivideToGlobe(0.0001) + + return listOfNotNull( + vc.addVector(clObj, info, ThreadMode.ThreadCurrent), + vc.addWideVector(vecObj, wideInfo, ThreadMode.ThreadCurrent) + ) + } + override fun setUpWithMap(mapVC: MapController): Boolean { baseTestCase.setUpWithMap(mapVC) - wideVecTest(mapVC) - mapVC.animatePositionGeo(Point2d.FromDegrees(-100.0, 40.0), 0.5, 0.0, 1.0) + mapVC.addPostSurfaceRunnable { + wideVecTest(mapVC) + mapVC.animatePositionGeo(Point2d.FromDegrees(-100.0, 40.0), 0.5, 0.0, 1.0) + } return true } override fun setUpWithGlobe(globeVC: GlobeController): Boolean { baseTestCase.setUpWithGlobe(globeVC) - wideVecTest(globeVC) - globeVC.animatePositionGeo(Point2d.FromDegrees(-100.0, 40.0), 0.5, 0.0, 1.0) + globeVC.addPostSurfaceRunnable { + wideVecTest(globeVC) + globeVC.animatePositionGeo(Point2d.FromDegrees(-100.0, 40.0), 0.5, 0.0, 1.0) + } return true } @@ -154,6 +207,6 @@ class WideVectorsTestCase(activity: Activity?) : super.shutdown() } - private val baseTestCase = CartoLightTestCase(getActivity()) + private val baseTestCase = GeographyClass(getActivity()) private val componentObjects: MutableList = ArrayList() } \ No newline at end of file From 391781ca309497a798d397c926f58dbbd30b38f0 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 23 Mar 2022 11:15:06 -0700 Subject: [PATCH 54/78] Fix a potential crash from not synchronizing `MaplyTextureAtlas.dealloc`. Fix a crash from using `entry.atlas` after freeing it. Eliminate unnecessary copies and iterator loops. --- .../include/DynamicTextureAtlas.h | 23 ++- .../src/DynamicTextureAtlas.cpp | 165 +++++++++--------- .../src/rendering/MaplyTextureAtlas.mm | 73 ++++---- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 17 +- 4 files changed, 146 insertions(+), 132 deletions(-) diff --git a/common/WhirlyGlobeLib/include/DynamicTextureAtlas.h b/common/WhirlyGlobeLib/include/DynamicTextureAtlas.h index 37b489fd89..029d5a0a76 100644 --- a/common/WhirlyGlobeLib/include/DynamicTextureAtlas.h +++ b/common/WhirlyGlobeLib/include/DynamicTextureAtlas.h @@ -42,11 +42,9 @@ class DynamicTexture : virtual public TextureBase virtual ~DynamicTexture(); /// Represents a region in the texture - class Region + struct Region { - public: - Region(); - int sx,sy,ex,ey; + int sx = 0,sy = 0,ex = 0,ey = 0; }; /// Create an appropriately empty texture in OpenGL ES @@ -77,8 +75,9 @@ class DynamicTexture : virtual public TextureBase bool findRegion(int cellsX,int cellsY,Region ®ion); /// Return a list of released regions - void getReleasedRegions(std::vector &toClear); - + void getReleasedRegions(std::vector &toClear) const; + std::vector getReleasedRegions() const; + /// Add a region to the list of ones to be cleared. /// This is called by the renderer void addRegionToClear(const Region ®ion); @@ -110,7 +109,7 @@ class DynamicTexture : virtual public TextureBase // Use to track where sub textures are bool *layoutGrid; - std::mutex regionLock; + mutable std::mutex regionLock; /// These regions have been released by the renderer std::vector releasedRegions; @@ -192,10 +191,10 @@ class DynamicTextureAtlas /// Set the interpolation type used for min and mag void setInterpType(TextureInterpType inType); - TextureInterpType getInterpType(); + TextureInterpType getInterpType() const; /// Return the dynamic texture's format - TextureType getFormat(); + TextureType getFormat() const; /// Fudge factor for border pixels. We'll add this/pixelSize to the lower left /// and subtract this/pixelSize from the upper right for each texture application. @@ -220,7 +219,7 @@ class DynamicTextureAtlas /// Check if the dynamic texture atlas is empty. /// Call cleanup() first - bool empty(); + bool empty() const; /// Look for any textures that should be cleaned up void cleanup(ChangeSet &changes,TimeInterval when); @@ -230,10 +229,10 @@ class DynamicTextureAtlas void teardown(ChangeSet &changes); /// Get some basic info out - void getUsage(int &numRegions,int &dynamicTextures); + void getUsage(int &numRegions,int &dynamicTextures) const; /// Print out some utilization info - void log(); + void log() const; protected: std::string name; diff --git a/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp b/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp index b08f17544b..97ad485e41 100644 --- a/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp +++ b/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp @@ -26,11 +26,6 @@ using namespace Eigen; namespace WhirlyKit { -DynamicTexture::Region::Region() - : sx(0), sy(0), ex(0), ey(0) -{ -} - DynamicTexture::DynamicTexture(const std::string &name) : TextureBase(name), layoutGrid(NULL) { @@ -70,8 +65,8 @@ void DynamicTexture::addTexture(Texture *tex,const Region ®ion) void DynamicTexture::setRegion(const Region ®ion, bool enable) { - int sx = std::max(region.sx,0), sy = std::max(region.sy,0); - int ex = std::min(region.ex,numCell-1), ey = std::min(region.ey,numCell-1); + const int sx = std::max(region.sx,0), sy = std::max(region.sy,0); + const int ex = std::min(region.ex,numCell-1), ey = std::min(region.ey,numCell-1); for (unsigned int ix=sx;ix<=ex;ix++) for (unsigned int iy=sy;iy<=ey;iy++) @@ -89,12 +84,18 @@ void DynamicTexture::clearRegion(const Region &clearRegion,ChangeSet &changes,bo clearTextureData(startX,startY,width,height,changes,mainThreadMerge,emptyData); } -void DynamicTexture::getReleasedRegions(std::vector &toClear) +void DynamicTexture::getReleasedRegions(std::vector &toClear) const { std::lock_guard guardLock(regionLock); toClear = releasedRegions; } - + +std::vector DynamicTexture::getReleasedRegions() const +{ + std::lock_guard guardLock(regionLock); + return releasedRegions; +} + bool DynamicTexture::findRegion(int sizeX,int sizeY,Region ®ion) { // First thing we need to do is clear any outstanding regions @@ -106,7 +107,7 @@ bool DynamicTexture::findRegion(int sizeX,int sizeY,Region ®ion) releasedRegions.clear(); } - for (auto &ii : toClear) + for (const auto &ii : toClear) { setRegion(ii, false); } @@ -223,9 +224,10 @@ DynamicTextureAtlas::DynamicTextureAtlas(const std::string &name,int texSize,int DynamicTextureAtlas::~DynamicTextureAtlas() { // Clean up anything we might have left over - for (DynamicTextureSet::iterator it = textures.begin();it != textures.end(); ++it) - delete *it; - + for (auto *it : textures) + { + delete it; + } textures.clear(); } @@ -235,12 +237,12 @@ void DynamicTextureAtlas::setInterpType(TextureInterpType inType) interpType = inType; } -TextureInterpType DynamicTextureAtlas::getInterpType() +TextureInterpType DynamicTextureAtlas::getInterpType() const { return interpType; } -TextureType DynamicTextureAtlas::getFormat() +TextureType DynamicTextureAtlas::getFormat() const { return format; } @@ -249,7 +251,7 @@ void DynamicTextureAtlas::setPixelFudgeFactor(float pixFudge) { pixelFudge = pixFudge; } - + bool DynamicTextureAtlas::addTexture(SceneRenderer *sceneRender,const std::vector &newTextures,int frame,const Point2f *realSize,const Point2f *realOffset,SubTexture &subTex,ChangeSet &changes,int borderPixels,int bufferPixels,TextureRegion *outTexRegion) { if (newTextures.size() != imageDepth && frame < 0) @@ -261,21 +263,21 @@ bool DynamicTextureAtlas::addTexture(SceneRenderer *sceneRender,const std::vecto return false; TextureRegion texRegion; - + const bool doMainThreadMerge = MainThreadMerge || mainThreadMerge; + // Clear out any released regions - for (auto it = textures.begin();it != textures.end(); ++it) + for (const auto *dynTexVec : textures) { - DynamicTextureVec *dynTexVec = *it; - DynamicTextureRef firstDynTex = dynTexVec->at(0); - std::vector toClear; - firstDynTex->getReleasedRegions(toClear); + const DynamicTextureRef &firstDynTex = dynTexVec->at(0); + std::vector toClear = firstDynTex->getReleasedRegions(); for (const DynamicTexture::Region &clearRegion : toClear) + { for (unsigned int ii=0;iisize();ii++) { - DynamicTextureRef dynTex = dynTexVec->at(ii); - bool doMainThreadMerge = MainThreadMerge || mainThreadMerge; - dynTex->clearRegion(clearRegion,changes,doMainThreadMerge,doMainThreadMerge ? &emptyPixelBuffer[0] : NULL); + const DynamicTextureRef &dynTex = dynTexVec->at(ii); + dynTex->clearRegion(clearRegion,changes,doMainThreadMerge,doMainThreadMerge ? &emptyPixelBuffer[0] : nullptr); } + } } // Now look for space @@ -283,10 +285,9 @@ bool DynamicTextureAtlas::addTexture(SceneRenderer *sceneRender,const std::vecto bool found = false; const int numCellX = ceil((float)(firstTex->getWidth()+bufferPixels) / (float)cellSize); const int numCellY = ceil((float)(firstTex->getHeight()+bufferPixels) / (float)cellSize); - for (auto it = textures.begin(); it != textures.end(); ++it) + for (auto *dynTex : textures) { - DynamicTextureVec *dynTex = *it; - DynamicTextureRef firstDynTex = dynTex->at(0); + const DynamicTextureRef &firstDynTex = dynTex->at(0); DynamicTexture::Region thisRegion; if (firstDynTex->findRegion(numCellX, numCellY, thisRegion)) { @@ -303,13 +304,14 @@ bool DynamicTextureAtlas::addTexture(SceneRenderer *sceneRender,const std::vecto if (!found) { dynTexVec = new std::vector(); + dynTexVec->reserve(imageDepth); for (unsigned int ii=0;iimakeDynamicTexture(name); + auto dynTex = sceneRender->makeDynamicTexture(name); dynTex->setup(texSize,cellSize,format,clearTextures); dynTex->setInterpType(interpType); - dynTexVec->push_back(dynTex); dynTex->createInRenderer(sceneRender->getRenderSetupInfo()); + dynTexVec->push_back(std::move(dynTex)); } // NSLog(@"Added dynamic texture %ld (%ld)",dynTex->getId(),textures.size()); @@ -387,25 +389,33 @@ bool DynamicTextureAtlas::addTexture(SceneRenderer *sceneRender,const std::vecto bool DynamicTextureAtlas::updateTexture(Texture *tex,int frame,const TextureRegion &texRegion,ChangeSet &changes) { - DynamicTextureVec *dynTexVec = NULL; + const DynamicTextureVec *dynTexVec = nullptr; // Look for the right dynamic texture (list) - for (DynamicTextureSet::iterator it = textures.begin(); - it != textures.end(); ++it) + for (const auto *texVec : textures) { - dynTexVec = *it; - DynamicTextureRef firstDynTex = dynTexVec->at(0); + const DynamicTextureRef &firstDynTex = dynTexVec->at(0); if (firstDynTex->getId() == texRegion.dynTexId) + { + dynTexVec = texVec; break; + } } if (!dynTexVec) - return false; - + { + if (textures.empty()) + { + return false; + } + // Just use the last one + // todo: the one with the most space would be best + dynTexVec = *textures.end(); + } // Look for the matching dynamic texture - int which = frame == -1 ? 0 : frame; - DynamicTextureRef dynTex = dynTexVec->at(which); + const int which = (frame == -1) ? 0 : frame; + const DynamicTextureRef &dynTex = dynTexVec->at(which); // Merge in the data // NSLog(@"Region: (%d,%d)->(%d,%d) texture: %ld",texRegion.region.sx,texRegion.region.sy,texRegion.region.ex,texRegion.region.ey,dynTex->getId()); @@ -424,30 +434,33 @@ void DynamicTextureAtlas::removeTexture(const SubTexture &subTex,ChangeSet &chan { TextureRegion texRegion; texRegion.subTex.setId(subTex.getId()); - TextureRegionSet::iterator it = regions.find(texRegion); - if (it != regions.end()) + const auto it = regions.find(texRegion); + if (it == regions.end()) { - // We'll stop keeping track of the region - TextureRegion theRegion = *it; - // Tell the dynamic texture to clear it out, but we'll send that request over to - // the renderer so we can be sure we're not still using it - changes.push_back(new DynamicTextureClearRegion(theRegion.dynTexId,theRegion.region,when)); - regions.erase(it); - - // See if that texture is now empty - for (auto it : textures) { - if (theRegion.dynTexId == it->at(0)->getId()) { - DynamicTextureVec *texVec = it; - DynamicTextureRef tex = texVec->at(0); - tex->getNumRegions()--; - break; - } - } - } else wkLogLevel(Warn,"DynamicTextureAtlas: Request to remove non-existent texture."); -} + return; + } + + // We'll stop keeping track of the region + const TextureRegion &theRegion = *it; + // Tell the dynamic texture to clear it out, but we'll send that request over to + // the renderer so we can be sure we're not still using it + changes.push_back(new DynamicTextureClearRegion(theRegion.dynTexId,theRegion.region,when)); + regions.erase(it); -bool DynamicTextureAtlas::empty() + // See if that texture is now empty + for (const auto *texVec : textures) + { + if (theRegion.dynTexId == texVec->at(0)->getId()) + { + const DynamicTextureRef &tex = texVec->at(0); + tex->getNumRegions()--; + break; + } + } +} + +bool DynamicTextureAtlas::empty() const { return textures.empty(); } @@ -455,16 +468,17 @@ bool DynamicTextureAtlas::empty() void DynamicTextureAtlas::cleanup(ChangeSet &changes,TimeInterval when) { DynamicTextureSet::iterator itNext; - for (DynamicTextureSet::iterator it = textures.begin();it != textures.end(); it = itNext) + for (auto it = textures.begin();it != textures.end(); it = itNext) { - itNext = it; - ++itNext; + itNext = std::next(it); DynamicTextureVec *texVec = *it; - DynamicTextureRef tex = texVec->at(0); + const DynamicTextureRef &tex = texVec->at(0); if (tex->getNumRegions() == 0) { - for (unsigned int ii=0;iisize();ii++) - changes.push_back(new RemTextureReq(texVec->at(ii)->getId(),when)); + for (const auto &ti : *texVec) + { + changes.push_back(new RemTextureReq(ti->getId(),when)); + } delete texVec; textures.erase(it); } @@ -473,10 +487,8 @@ void DynamicTextureAtlas::cleanup(ChangeSet &changes,TimeInterval when) void DynamicTextureAtlas::getTextureIDs(std::vector &texIDs,int which) { - for (DynamicTextureSet::iterator it = textures.begin(); - it != textures.end(); ++it) + for (const auto *dynTexVec : textures) { - DynamicTextureVec *dynTexVec = *it; if (which < dynTexVec->size()) texIDs.push_back(dynTexVec->at(which)->getId()); } @@ -484,10 +496,8 @@ void DynamicTextureAtlas::getTextureIDs(std::vector &texIDs,int SimpleIdentity DynamicTextureAtlas::getTextureIDForFrame(SimpleIdentity baseTexID,int which) { - for (DynamicTextureSet::iterator it = textures.begin(); - it != textures.end(); ++it) + for (const auto *dynTexVec : textures) { - DynamicTextureVec *dynTexVec = *it; if (((*dynTexVec)[0])->getId() == baseTexID && which < dynTexVec->size()) return ((*dynTexVec)[which])->getId(); } @@ -497,9 +507,8 @@ SimpleIdentity DynamicTextureAtlas::getTextureIDForFrame(SimpleIdentity baseTexI void DynamicTextureAtlas::teardown(ChangeSet &changes) { - for (DynamicTextureSet::iterator it = textures.begin(); it != textures.end(); ++it) + for (auto *texVec : textures) { - DynamicTextureVec *texVec = *it; for (unsigned int ii=0;iisize();ii++) changes.push_back(new RemTextureReq(texVec->at(ii)->getId())); delete texVec; @@ -508,19 +517,17 @@ void DynamicTextureAtlas::teardown(ChangeSet &changes) regions.clear(); } -void DynamicTextureAtlas::getUsage(int &numRegions,int &dynamicTextures) +void DynamicTextureAtlas::getUsage(int &numRegions,int &dynamicTextures) const { numRegions = regions.size(); dynamicTextures = textures.size(); } -void DynamicTextureAtlas::log() +void DynamicTextureAtlas::log() const { int numCells=0,usedCells=0; - for (DynamicTextureSet::iterator it = textures.begin(); - it != textures.end(); ++it) + for (const auto *texVec : textures) { - DynamicTextureVec *texVec = *it; int thisNumCells,thisUsedCells; texVec->at(0)->getUtilization(thisNumCells,thisUsedCells); numCells += thisNumCells; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyTextureAtlas.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyTextureAtlas.mm index cf35395001..a9e64400d3 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyTextureAtlas.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/rendering/MaplyTextureAtlas.mm @@ -1,5 +1,4 @@ -/* - * MaplyTextureAtlas_private.h +/* MaplyTextureAtlas_private.h * WhirlyGlobe-MaplyComponent * * Created by Steve Gifford on 9/11/14. @@ -15,10 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import "MaplyTextureAtlas_private.h" +#import "WhirlyKitLog.h" using namespace WhirlyKit; @@ -27,8 +26,8 @@ class SubTexToAtlas { public: - SubTexToAtlas() : atlas(NULL) { } - SubTexToAtlas(SimpleIdentity subTexID) : subTex(subTexID), atlas(NULL) { } + SubTexToAtlas() = default; + SubTexToAtlas(SimpleIdentity subTexID) : subTex(subTexID) { } SubTexToAtlas(SimpleIdentity subTexID, DynamicTextureAtlas *atlas) : subTex(subTexID), atlas(atlas) { } // Comparison operator @@ -40,7 +39,7 @@ // Which sub texture SubTexture subTex; // Is in which atlas - DynamicTextureAtlas *atlas; + DynamicTextureAtlas *atlas = nullptr; }; typedef std::set SubTexToAtlasSet; @@ -69,11 +68,12 @@ - (instancetype)initWithScene:(WhirlyKit::Scene *)inScene sceneRender:(SceneRend - (void)dealloc { - for (DynamicTextureAtlasSet::iterator it = atlases.begin(); - it != atlases.end(); ++it) + @synchronized(self) { - DynamicTextureAtlas *atlas = *it; - delete atlas; + for (auto *atlas : atlases) + { + delete atlas; + } } } @@ -82,28 +82,27 @@ - (void)setSize:(int)size atlasSize = size; } -- (bool)addTexture:(Texture *)tex subTex:(WhirlyKit::SubTexture &)outSubTex changes:(WhirlyKit::ChangeSet &)changes +- (bool)addTexture:(Texture *)tex + subTex:(WhirlyKit::SubTexture &)outSubTex + changes:(WhirlyKit::ChangeSet &)changes { - std::vector texs; - texs.push_back(tex); + std::vector texs = { tex }; - DynamicTextureAtlas *foundAtlas = NULL; + DynamicTextureAtlas *foundAtlas = nullptr; SubTexture subTex; @synchronized(self) { // Look for a match - for (DynamicTextureAtlasSet::iterator it = atlases.begin(); - it != atlases.end(); ++it) + for (auto *atlas : atlases) { - DynamicTextureAtlas *atlas = *it; - if (tex->getFormat() == atlas->getFormat()) - if (atlas->addTexture(sceneRender,texs,-1,NULL,NULL,subTex,changes,0)) - { - scene->addSubTexture(subTex); - foundAtlas = atlas; - break; - } + if (tex->getFormat() == atlas->getFormat() && + atlas->addTexture(sceneRender,texs,-1,nullptr,nullptr,subTex,changes,0)) + { + scene->addSubTexture(subTex); + foundAtlas = atlas; + break; + } } // Make up a new texture atlas @@ -111,14 +110,14 @@ - (bool)addTexture:(Texture *)tex subTex:(WhirlyKit::SubTexture &)outSubTex chan { foundAtlas = new DynamicTextureAtlas("Maply Texture Atlas",atlasSize,16,tex->getFormat()); atlases.insert(foundAtlas); - if (foundAtlas->addTexture(sceneRender,texs, -1, NULL, NULL, subTex, changes, 0)) + if (foundAtlas->addTexture(sceneRender,texs, -1, nullptr, nullptr, subTex, changes, 0)) scene->addSubTexture(subTex); } // If we put the texture somewhere, return true if (subTex.texId != EmptyIdentity) { - subTexMap.insert(SubTexToAtlas(subTex.getId(), foundAtlas)); + subTexMap.emplace(subTex.getId(), foundAtlas); outSubTex = subTex; return true; } @@ -131,25 +130,26 @@ - (void)removeTexture:(WhirlyKit::SimpleIdentity)subTexID changes:(WhirlyKit::Ch { @synchronized(self) { - SubTexToAtlasSet::iterator it = subTexMap.find(SubTexToAtlas(subTexID)); + const auto it = subTexMap.find(SubTexToAtlas(subTexID)); if (it != subTexMap.end()) { - // Clear out the + // Clear out the texture const SubTexToAtlas &entry = *it; entry.atlas->removeTexture(entry.subTex, changes, when); - - // May need to remove the texture atlas + + // May need to remove the texture atlas, if that left it empty entry.atlas->cleanup(changes,when); if (entry.atlas->empty()) { entry.atlas->teardown(changes); - delete entry.atlas; atlases.erase(entry.atlas); + // Note: We assume that only one map entry can ever point to a given atlas + delete entry.atlas; } subTexMap.erase(it); } else { - NSLog(@"SubTex: Asked to remove sub texture that isn't present."); + wkLogLevel(Warn, "SubTex: Asked to remove sub texture that isn't present"); } } } @@ -158,15 +158,14 @@ - (void)clear:(WhirlyKit::ChangeSet &)changes { @synchronized(self) { - for (DynamicTextureAtlasSet::iterator it = atlases.begin(); - it != atlases.end(); ++it) + for (auto *atlas : atlases) { - DynamicTextureAtlas *atlas = *it; atlas->cleanup(changes,0.0); delete atlas; } atlases.clear(); + subTexMap.clear(); } } @@ -176,7 +175,7 @@ - (void)dumpStats @synchronized(self) { - for (auto &it : atlases) + for (const auto *it : atlases) { int nr,ndt; it->getUsage(nr, ndt); @@ -185,7 +184,7 @@ - (void)dumpStats } } - NSLog(@"Texture Atlas: %d regions, %d dynamic textures",numRegions,numDynamicTextures); + wkLogLevel(Info,"Texture Atlas: %d regions, %d dynamic textures",numRegions,numDynamicTextures); } @end diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 98e5f55d32..2f42b7c98f 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -974,7 +974,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // centerLine = ExpCalculateFloat(vertArgs.wideVecExp.offsetExp, zoom, centerLine); // Intersect on the left or right depending - const float interDir = whichVert & 0x1 ? 1.0 : -1.0; + const float interDir = (whichVert & 0x1) ? 1.0 : -1.0; // Turn off the end caps for the moment switch (whichPoly) { @@ -1030,7 +1030,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.color = color * calculateFade(uniforms,vertArgs.uniDrawState); outVert.w2 = w2; outVert.edge = vertArgs.wideVec.edge; - outVert.texCoord = float2(interDir,0); + outVert.texCoord = float2(interDir,0); // todo: this is incomplete if (isValid) { if (iPtsValid) { @@ -1064,9 +1064,18 @@ fragment float4 fragmentTri_wideVecPerf( } } - float edgeAlpha = (vert.edge > 0) ? clamp((1 - abs(vert.texCoord.x)) * vert.w2 / vert.edge, 0.0, 1.0) : 1.0; + const int numTextures = TexturesBase(texArgs.texPresent); + float patternAlpha = 1.0; + if (numTextures > 0) { + constexpr sampler sampler2d(coord::normalized, address::repeat, filter::linear); + // Just pulling the alpha at the moment + // If we use the rest, we get interpolation down to zero, which isn't quite what we want here + patternAlpha = texArgs.tex[0].sample(sampler2d, vert.texCoord).a; + } + + const float edgeAlpha = (vert.edge > 0) ? clamp((1 - abs(vert.texCoord.x)) * vert.w2 / vert.edge, 0.0, 1.0) : 1.0; - return vert.color * float4(1,1,1,edgeAlpha); + return vert.color * float4(1,1,1,edgeAlpha * patternAlpha); } From 0943f945fc48dff6f7a839c1b9407a3f7241b89d Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 23 Mar 2022 12:08:02 -0700 Subject: [PATCH 55/78] missed one --- common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp b/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp index 97ad485e41..7940b7caa7 100644 --- a/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp +++ b/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp @@ -103,8 +103,7 @@ bool DynamicTexture::findRegion(int sizeX,int sizeY,Region ®ion) std::vector toClear; { std::lock_guard guardLock(regionLock); - toClear = releasedRegions; - releasedRegions.clear(); + toClear.swap(releasedRegions); } for (const auto &ii : toClear) From f2536ad94191a507db438998b113d39478895770 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 24 Mar 2022 11:48:33 -0700 Subject: [PATCH 56/78] Add null check. Don't dispatch async tasks that won't do anything. --- .../WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm | 2 +- .../src/loading/MaplySimpleTileFetcher.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm index 88637674bc..9ddfb454cc 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyQuadLoader.mm @@ -55,7 +55,7 @@ - (MaplyTileID)tileID - (int)frame { - return loadReturn->frame->frameIndex; + return (loadReturn && loadReturn->frame) ? loadReturn->frame->frameIndex : -1; } - (void)addTileData:(id __nonnull) inTileData diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm index b4fed5f119..0ab4d80070 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplySimpleTileFetcher.mm @@ -223,7 +223,7 @@ - (void)scheduleLoading - (void)startTileFetches:(NSArray * _Nonnull)requests { - if (!active) + if (!active || !requests.count) return; // Check each of the fetchInfo objects @@ -251,7 +251,7 @@ - (void)startTileFetches:(NSArray * _Nonnull)requests - (void)cancelTileFetches:(NSArray * _Nonnull)requests { - if (!active) + if (!active || !requests.count) return; dispatch_async(self.queue, ^{ From 954548220d0a6b3167bb9896a724bae0c964557a Mon Sep 17 00:00:00 2001 From: BACEM FATNASSI Date: Fri, 18 Mar 2022 10:35:27 +0100 Subject: [PATCH 57/78] Add the possibility to handle the self-signed certificates --- .../project.pbxproj | 48 +++++++++++++++++++ .../include/MaplyComponent.h | 2 +- .../include/WhirlyGlobeComponent.h | 1 + .../http/MaplyURLSessionManager+Private.h | 27 +++++++++++ .../include/http/MaplyURLSessionManager.h | 41 ++++++++++++++++ .../src/control/MaplyBaseViewController.mm | 4 +- .../http/URLSession/MaplyURLSessionManager.m | 45 +++++++++++++++++ .../private/MaplyURLSessionManager+Private.m | 24 ++++++++++ .../src/loading/MaplyRemoteTileFetcher.mm | 4 +- .../src/vector_tiles/SLDSymbolizers.mm | 7 ++- 10 files changed, 194 insertions(+), 9 deletions(-) create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager+Private.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager.h create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/MaplyURLSessionManager.m create mode 100644 ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/private/MaplyURLSessionManager+Private.m diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index e075ca1f4e..a395bb515d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -1007,6 +1007,10 @@ 31DDA4CE27AB477300865ECE /* DefaultShadersMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B6998872293418F00C31E3F /* DefaultShadersMTL.h */; }; 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7E689E22A1E34B00BBFD9E /* MaplySimpleTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9547BAE327E480C5004BF3E5 /* MaplyURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 9547BAE127E480C5004BF3E5 /* MaplyURLSessionManager.h */; }; + 9547BAE427E480C5004BF3E5 /* MaplyURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9547BAE227E480C5004BF3E5 /* MaplyURLSessionManager.m */; }; + 9547BAE827E48284004BF3E5 /* MaplyURLSessionManager+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 9547BAE627E48284004BF3E5 /* MaplyURLSessionManager+Private.h */; }; + 9547BAE927E48284004BF3E5 /* MaplyURLSessionManager+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 9547BAE727E48284004BF3E5 /* MaplyURLSessionManager+Private.m */; }; C490572A265AB9E3001E4A98 /* bucketalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4905728265AB9E3001E4A98 /* bucketalloc.cpp */; }; C490572B265AB9E3001E4A98 /* bucketalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = C4905729265AB9E3001E4A98 /* bucketalloc.h */; }; C490572D265ABAB8001E4A98 /* glues.h in Headers */ = {isa = PBXBuildFile; fileRef = C490572C265ABAB8001E4A98 /* glues.h */; }; @@ -2035,6 +2039,10 @@ 31DDA0A527A4D3B800865ECE /* WhirlyGlobe_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe_iOS.h; sourceTree = ""; }; 31DDA4B927A8787D00865ECE /* WhirlyGlobe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WhirlyGlobe.h; sourceTree = ""; }; 31DDA4CC27AB475F00865ECE /* AtmosphereShadersMTL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtmosphereShadersMTL.h; sourceTree = ""; }; + 9547BAE127E480C5004BF3E5 /* MaplyURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MaplyURLSessionManager.h; sourceTree = ""; }; + 9547BAE227E480C5004BF3E5 /* MaplyURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MaplyURLSessionManager.m; sourceTree = ""; }; + 9547BAE627E48284004BF3E5 /* MaplyURLSessionManager+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MaplyURLSessionManager+Private.h"; sourceTree = ""; }; + 9547BAE727E48284004BF3E5 /* MaplyURLSessionManager+Private.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MaplyURLSessionManager+Private.m"; sourceTree = ""; }; C4905728265AB9E3001E4A98 /* bucketalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bucketalloc.cpp; sourceTree = ""; }; C4905729265AB9E3001E4A98 /* bucketalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bucketalloc.h; sourceTree = ""; }; C490572C265ABAB8001E4A98 /* glues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glues.h; path = ../../include/glues.h; sourceTree = ""; }; @@ -3477,6 +3485,7 @@ 2BE537281D249A1200B60FAD /* MaplyComponent.h */, 2BE537251D249A1200B60FAD /* MaplyBridge.h */, 2BE537491D249A1200B60FAD /* MaplySharedAttributes.h */, + 9547BAED27E49488004BF3E5 /* http */, 2BC41C9121F1062B002926B7 /* UIKit */, 2BC41C9021F10179002926B7 /* helpers */, 2BC41C8F21F1015B002926B7 /* math */, @@ -3572,6 +3581,7 @@ 2BE537991D249A1200B60FAD /* src */ = { isa = PBXGroup; children = ( + 9547BADF27E480B1004BF3E5 /* http */, 2B8797092203B40900EF801D /* UIKit */, 2B8797102203B5A400EF801D /* helpers */, 2B8797112203B5C700EF801D /* math */, @@ -3936,6 +3946,40 @@ path = ../../../../common/local_libs/nanopb; sourceTree = ""; }; + 9547BADF27E480B1004BF3E5 /* http */ = { + isa = PBXGroup; + children = ( + 9547BAE027E480C5004BF3E5 /* URLSession */, + ); + path = http; + sourceTree = ""; + }; + 9547BAE027E480C5004BF3E5 /* URLSession */ = { + isa = PBXGroup; + children = ( + 9547BAE527E48260004BF3E5 /* private */, + 9547BAE227E480C5004BF3E5 /* MaplyURLSessionManager.m */, + ); + path = URLSession; + sourceTree = ""; + }; + 9547BAE527E48260004BF3E5 /* private */ = { + isa = PBXGroup; + children = ( + 9547BAE727E48284004BF3E5 /* MaplyURLSessionManager+Private.m */, + ); + path = private; + sourceTree = ""; + }; + 9547BAED27E49488004BF3E5 /* http */ = { + isa = PBXGroup; + children = ( + 9547BAE127E480C5004BF3E5 /* MaplyURLSessionManager.h */, + 9547BAE627E48284004BF3E5 /* MaplyURLSessionManager+Private.h */, + ); + path = http; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -4166,6 +4210,7 @@ 2BE5396C1D249BEF00B60FAD /* AAMoonMaxDeclinations.h in Headers */, 2B446B4F21F7E7B80078A975 /* WideVectorDrawableBuilder.h in Headers */, 2B699855228DD31F00C31E3F /* SceneRendererMTL.h in Headers */, + 9547BAE827E48284004BF3E5 /* MaplyURLSessionManager+Private.h in Headers */, E5EF69F71D6B931500A2A660 /* SLDOperators.h in Headers */, 2BB8A3EF21ED43D10025DA98 /* MaplyRotateDelegate.h in Headers */, 2BB4767B2000486F006AAACB /* MapboxVectorStyleSet.h in Headers */, @@ -4296,6 +4341,7 @@ 2B846F1321F158E100EF2A82 /* BaseInfo.h in Headers */, 2BE53A831D249C7E00B60FAD /* DDXMLPrivate.h in Headers */, 31833136259112BA005FEF70 /* DMS.hpp in Headers */, + 9547BAE327E480C5004BF3E5 /* MaplyURLSessionManager.h in Headers */, 2B82B61C1E82E2490095FB14 /* JSONWorker.h in Headers */, 2BE5383A1D249A1200B60FAD /* MaplyBaseViewController_private.h in Headers */, 2BB8A3F021ED43D10025DA98 /* GlobeDoubleTapDragDelegate.h in Headers */, @@ -4986,6 +5032,7 @@ 2B82B6511E82E2490095FB14 /* PJ_collg.c in Sources */, 2B82B6651E82E24A0095FB14 /* pj_fwd.c in Sources */, 2BC3D6CB2203E9D700CE91D0 /* MaplyMoon.mm in Sources */, + 9547BAE927E48284004BF3E5 /* MaplyURLSessionManager+Private.m in Sources */, 31833148259112BA005FEF70 /* Math.cpp in Sources */, 2B82B6BD1E82E24A0095FB14 /* PJ_vandg2.c in Sources */, 31833152259112BA005FEF70 /* GeodesicExact.cpp in Sources */, @@ -5030,6 +5077,7 @@ 2B82B61D1E82E2490095FB14 /* JSONWriter.cpp in Sources */, 2B82B67A1E82E24A0095FB14 /* PJ_krovak.c in Sources */, 2B8A78CD228B7B63008B0A1F /* ScreenSpaceDrawableBuilder.cpp in Sources */, + 9547BAE427E480C5004BF3E5 /* MaplyURLSessionManager.m in Sources */, 2BC3D6F8220CAAC700CE91D0 /* WhirlyKitLog.mm in Sources */, 2B82B6B11E82E24A0095FB14 /* PJ_sts.c in Sources */, 2B82B6611E82E24A0095FB14 /* pj_errno.c in Sources */, diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h index 1d51b1ba0d..47756df784 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h @@ -20,7 +20,7 @@ #import #import - +#import #import #import #import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h index babfdf7259..29c5b0bad5 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/WhirlyGlobeComponent.h @@ -18,6 +18,7 @@ * */ +#import #import #import #import diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager+Private.h b/ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager+Private.h new file mode 100644 index 0000000000..f960d0988d --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager+Private.h @@ -0,0 +1,27 @@ +// +// MaplyURLSessionManager+Private.h +// WhirlyGlobeMaplyComponent +// +// Created by BACEM FATNASSI on 18/3/2022. +// Copyright © 2022 mousebird consulting. All rights reserved. +// + +#import "MaplyURLSessionManager.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + this header must be a private header +*/ + +@interface MaplyURLSessionManager (Private) + +/** Create an URL session + + All url session must be created by MaplyURLSessionManager using createURLSession method + */ +- (NSURLSession*)createURLSession; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager.h b/ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager.h new file mode 100644 index 0000000000..cf59068788 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/http/MaplyURLSessionManager.h @@ -0,0 +1,41 @@ +// +// MaplyURLSessionManager.h +// WhirlyGlobeMaplyComponent +// +// Created by BACEM FATNASSI on 17/2/2022. +// Copyright © 2022 mousebird consulting. All rights reserved. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol MaplyURLSessionManagerDelegate + + +@optional +/** + this method will be implemented by the application to do a custom challenge with the http server (very useful in the case of the server with self-signed certificates) + */ +-(void)didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge +completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler; + + +@end + +/** + this header must be a public header + */ +@interface MaplyURLSessionManager : NSObject + +@property (nonatomic,weak) id sessionManagerDelegate; + + + ++ (instancetype)sharedManager; + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm index cadd9de12c..2384d4b654 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm @@ -30,7 +30,7 @@ #import "UIColor+Stuff.h" #import "MTLView.h" #import "WorkRegion_private.h" - +#import "MaplyURLSessionManager+Private.h" #import using namespace Eigen; @@ -260,7 +260,7 @@ - (void)sendAnalytics:(NSString *)serverName [req setHTTPMethod:@"POST"]; [req setHTTPBody:[postArgs dataUsingEncoding:NSASCIIStringEncoding]]; - NSURLSession *session = [NSURLSession sharedSession]; + NSURLSession *session = [[MaplyURLSessionManager sharedManager] createURLSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:req completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { TimeInterval now = TimeGetCurrent(); NSHTTPURLResponse *resp = (NSHTTPURLResponse *)response; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/MaplyURLSessionManager.m b/ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/MaplyURLSessionManager.m new file mode 100644 index 0000000000..4ffc2773f6 --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/MaplyURLSessionManager.m @@ -0,0 +1,45 @@ +// +// MaplyURLSessionManager.m +// WhirlyGlobeMaplyComponent +// +// Created by BACEM FATNASSI on 17/2/2022. +// Copyright © 2022 mousebird consulting. All rights reserved. +// + +#import "MaplyURLSessionManager.h" + +static MaplyURLSessionManager * sharedManager = nil; + +@interface MaplyURLSessionManager () + +@end + +@implementation MaplyURLSessionManager + ++ (instancetype)sharedManager +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + if (sharedManager == nil){ + sharedManager = [[self alloc] init]; + } + }); + return sharedManager; +} + + + + +- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler{ + + id delegate = self.sessionManagerDelegate; + + if ([delegate respondsToSelector:@selector(didReceiveChallenge:completionHandler:)]){ + [delegate didReceiveChallenge:challenge completionHandler:completionHandler]; + }else{ + NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, credential); + } +} +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/private/MaplyURLSessionManager+Private.m b/ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/private/MaplyURLSessionManager+Private.m new file mode 100644 index 0000000000..a0627cd7ea --- /dev/null +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/http/URLSession/private/MaplyURLSessionManager+Private.m @@ -0,0 +1,24 @@ +// +// MaplyURLSessionManager+Private.m +// WhirlyGlobeMaplyComponent +// +// Created by BACEM FATNASSI on 18/3/2022. +// Copyright © 2022 mousebird consulting. All rights reserved. +// + +#import "MaplyURLSessionManager+Private.h" + +@implementation MaplyURLSessionManager (Private) + +-(NSURLSession*)createURLSession{ + + + NSURLSession * session = [NSURLSession sessionWithConfiguration:NSURLSessionConfiguration.defaultSessionConfiguration + delegate:(id )self + delegateQueue:NSOperationQueue.mainQueue]; + + + return session; +} + +@end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyRemoteTileFetcher.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyRemoteTileFetcher.mm index b20329a6f7..ff10c8397f 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyRemoteTileFetcher.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/loading/MaplyRemoteTileFetcher.mm @@ -20,7 +20,7 @@ #import "loading/MaplyRemoteTileFetcher.h" #import "MaplyRenderController_private.h" - +#import "MaplyURLSessionManager+Private.h" namespace WhirlyKit { @@ -419,7 +419,7 @@ - (instancetype)initWithName:(NSString *)inName connections:(int)numConnections _numConnections = numConnections; // All the internal work is done on a single queue. Nothing significant, really. queue = dispatch_queue_create("MaplyRemoteTileFetcher", DISPATCH_QUEUE_SERIAL); - session = [NSURLSession sharedSession]; + session = [[MaplyURLSessionManager sharedManager] createURLSession]; allStats = [[MaplyRemoteTileFetcherStats alloc] initWithFetcher:self]; recentStats = [[MaplyRemoteTileFetcherStats alloc] initWithFetcher:self]; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDSymbolizers.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDSymbolizers.mm index 02ddad22cc..8819af3b22 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDSymbolizers.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/SLDSymbolizers.mm @@ -11,7 +11,7 @@ #import "vector_styles/MaplyVectorTileStyle.h" #import "visual_objects/MaplyScreenLabel.h" #import "DDXML.h" - +#import "MaplyURLSessionManager+Private.h" @implementation SLDSymbolizer /** @@ -213,9 +213,8 @@ + (UIImage *)imageForHref:(NSString *)href baseURL:(NSURL *)baseURL { dispatch_group_t group = dispatch_group_create(); dispatch_group_enter(group); - - NSURLSessionConfiguration *defaultConfigObject = [NSURLSessionConfiguration defaultSessionConfiguration]; - NSURLSession *defaultSession = [NSURLSession sessionWithConfiguration: defaultConfigObject]; + + NSURLSession *defaultSession = [[MaplyURLSessionManager sharedManager] createURLSession]; NSURL * url = [NSURL URLWithString:href relativeToURL:baseURL]; __block NSData *imageData; From 3fae4dc7e0d3f9b9472dbccfa7a01817bc010e0e Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 24 Mar 2022 12:12:18 -0700 Subject: [PATCH 58/78] Mark header public, fix path for modular imports. --- .../WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj | 2 +- ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj index a395bb515d..1e9ce11d83 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj +++ b/ios/library/WhirlyGlobe-MaplyComponent/WhirlyGlobeMaplyComponent.xcodeproj/project.pbxproj @@ -1007,7 +1007,7 @@ 31DDA4CE27AB477300865ECE /* DefaultShadersMTL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B6998872293418F00C31E3F /* DefaultShadersMTL.h */; }; 727E05F327158118005576CB /* MaplyRenderController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B127BF720126FBD0099F405 /* MaplyRenderController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 727E05F4271583AC005576CB /* MaplySimpleTileFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B7E689E22A1E34B00BBFD9E /* MaplySimpleTileFetcher.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9547BAE327E480C5004BF3E5 /* MaplyURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 9547BAE127E480C5004BF3E5 /* MaplyURLSessionManager.h */; }; + 9547BAE327E480C5004BF3E5 /* MaplyURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 9547BAE127E480C5004BF3E5 /* MaplyURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9547BAE427E480C5004BF3E5 /* MaplyURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9547BAE227E480C5004BF3E5 /* MaplyURLSessionManager.m */; }; 9547BAE827E48284004BF3E5 /* MaplyURLSessionManager+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 9547BAE627E48284004BF3E5 /* MaplyURLSessionManager+Private.h */; }; 9547BAE927E48284004BF3E5 /* MaplyURLSessionManager+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 9547BAE727E48284004BF3E5 /* MaplyURLSessionManager+Private.m */; }; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h index 47756df784..1661728068 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplyComponent.h @@ -20,7 +20,7 @@ #import #import -#import +#import #import #import #import From f5221eb563bdc475713a214be4815afbb5aabd1f Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 31 Mar 2022 16:32:37 -0700 Subject: [PATCH 59/78] Make `MapboxVectorStyleSet initWithDict:` less likely to crash when things aren't fully set up --- .../src/vector_tiles/MapboxVectorStyleSet.mm | 72 ++++++++++++------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorStyleSet.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorStyleSet.mm index ffa05e8185..b395534812 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorStyleSet.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MapboxVectorStyleSet.mm @@ -38,43 +38,61 @@ - (id __nullable)initWithDict:(NSDictionary * __nonnull)styleDict settings:(MaplyVectorStyleSettings * __nonnull)settings viewC:(NSObject * __nonnull)viewC { - self = [super init]; - if (!self) + if (!(self = [super init])) + { return nil; + } - _viewC = viewC; - VectorStyleSettingsImplRef styleSettings; - if (settings) - styleSettings = settings->impl; - else - styleSettings = std::make_shared([UIScreen mainScreen].scale); - - style = std::make_shared([viewC getRenderControl]->scene, - [viewC getRenderControl]->visualView->coordAdapter->getCoordSystem(), - styleSettings); - style->viewC = viewC; + if (!(_viewC = viewC)) + { + return nil; + } -// iosDictionaryRef dictWrap(new iosDictionary(styleDict)); + if (const auto *renderControl = [viewC getRenderControl]) + if (auto *scene = renderControl->scene) + if (const auto &view = renderControl->visualView) + if (const auto *coordAdapter = view->coordAdapter) + if (auto *coordSys = coordAdapter->getCoordSystem()) + { + const auto styleSettings = (settings && settings->impl) ? settings->impl : + std::make_shared([UIScreen mainScreen].scale); + style = std::make_shared(scene, coordSys, styleSettings); + style->viewC = viewC; + } + if (!style) + { + return nil; + } // Copy from NSDictionary to our internal version - MutableDictionaryCRef dictWrap = [styleDict toDictionaryC]; - if (!style->parse(NULL,dictWrap)) - return nil; + if (auto dictWrap = [styleDict toDictionaryC]) + { + if (!style->parse(nullptr, dictWrap)) + { + return nil; + } + } _spriteURL = styleDict[@"sprite"]; // Sources tell us where to get tiles - NSDictionary *sourceStyles = styleDict[@"sources"]; - NSMutableArray *sources = [NSMutableArray array]; - for (NSString *sourceName in sourceStyles.allKeys) { - NSDictionary *styleEntry = sourceStyles[sourceName]; - MaplyMapboxVectorStyleSource *source = [[MaplyMapboxVectorStyleSource alloc] initWithName:sourceName styleEntry:styleEntry styleSet:self viewC:viewC]; - if (source) - [sources addObject:source]; + if (NSDictionary *sourceStyles = styleDict[@"sources"]) + { + NSMutableArray *sources = [NSMutableArray array]; + for (NSString *sourceName in sourceStyles.allKeys) + { + NSDictionary *styleEntry = sourceStyles[sourceName]; + if (MaplyMapboxVectorStyleSource *source = [[MaplyMapboxVectorStyleSource alloc] initWithName:sourceName + styleEntry:styleEntry + styleSet:self + viewC:viewC]) + { + [sources addObject:source]; + } + } + _sources = sources; } - - _sources = sources; - + return self; } From 27e102fb354a11f9ba6ff21f4e1d2fb7853b9ff0 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 7 Apr 2022 10:19:29 -0700 Subject: [PATCH 60/78] Fix use-after-free bug --- common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp b/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp index 7940b7caa7..fea28b65c3 100644 --- a/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp +++ b/common/WhirlyGlobeLib/src/DynamicTextureAtlas.cpp @@ -441,16 +441,17 @@ void DynamicTextureAtlas::removeTexture(const SubTexture &subTex,ChangeSet &chan } // We'll stop keeping track of the region - const TextureRegion &theRegion = *it; + const auto dynTexId = it->dynTexId; + // Tell the dynamic texture to clear it out, but we'll send that request over to // the renderer so we can be sure we're not still using it - changes.push_back(new DynamicTextureClearRegion(theRegion.dynTexId,theRegion.region,when)); + changes.push_back(new DynamicTextureClearRegion(dynTexId,it->region,when)); regions.erase(it); // See if that texture is now empty for (const auto *texVec : textures) { - if (theRegion.dynTexId == texVec->at(0)->getId()) + if (dynTexId == texVec->at(0)->getId()) { const DynamicTextureRef &tex = texVec->at(0); tex->getNumRegions()--; From 5af767af570dbcc8a8ec12cf4ce7cd56a2816beb Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 25 Mar 2022 09:38:37 -0700 Subject: [PATCH 61/78] Add joins to wide test case --- .../AutoTester.xcodeproj/project.pbxproj | 4 + .../testCases/WideVectorsTestCase.h | 31 +++- .../testCases/WideVectorsTestCase.mm | 74 +-------- .../testCases/WideVectorsTestCase.swift | 157 ++++++++++++++++++ 4 files changed, 194 insertions(+), 72 deletions(-) create mode 100644 ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift diff --git a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj index dc03e0813d..7a061c573e 100644 --- a/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj +++ b/ios/apps/AutoTester/AutoTester.xcodeproj/project.pbxproj @@ -135,6 +135,7 @@ 3183380F25A67CD8005FEF70 /* RepresentationsTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3183380C25A67CD8005FEF70 /* RepresentationsTestCase.mm */; }; 31D3287C262FADF100456B93 /* TestTileImageFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31D3287B262FADF100456B93 /* TestTileImageFetcher.swift */; }; 31D328AD26387E7900456B93 /* GreatCircleTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31D328AC26387E7900456B93 /* GreatCircleTestCase.swift */; }; + 31EFBCDC27EE036D007143F4 /* WideVectorsTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31EFBCDB27EE036D007143F4 /* WideVectorsTestCase.swift */; }; 8820852B1DC81051008F8E76 /* Issue721TestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8820852A1DC81051008F8E76 /* Issue721TestCase.swift */; }; 88BF11491BCD3DA40002205E /* MaplyTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 88BF11481BCD3DA40002205E /* MaplyTestCase.m */; }; 88E4B8CA1B83B6AB0050D21B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 88E4B8C81B83B6AB0050D21B /* Main.storyboard */; }; @@ -747,6 +748,7 @@ 3183380E25A67CD8005FEF70 /* RepresentationsTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepresentationsTestCase.h; sourceTree = ""; }; 31D3287B262FADF100456B93 /* TestTileImageFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestTileImageFetcher.swift; sourceTree = ""; }; 31D328AC26387E7900456B93 /* GreatCircleTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GreatCircleTestCase.swift; sourceTree = ""; }; + 31EFBCDB27EE036D007143F4 /* WideVectorsTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WideVectorsTestCase.swift; sourceTree = ""; }; 8810B2D11BA9D45F00446CE3 /* MaplyTesterBridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaplyTesterBridge.h; sourceTree = ""; }; 8820852A1DC81051008F8E76 /* Issue721TestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Issue721TestCase.swift; sourceTree = ""; }; 886FCCC21BA73C1D00494BB0 /* StartupViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StartupViewController.swift; sourceTree = ""; }; @@ -1435,6 +1437,7 @@ D8200C901BE92B2F00B22CF5 /* WideVectorsTestCase.mm */, E5679F441CB72DE800369A15 /* WMSTestCase.h */, E5679F451CB72DE800369A15 /* WMSTestCase.m */, + 31EFBCDB27EE036D007143F4 /* WideVectorsTestCase.swift */, ); path = testCases; sourceTree = ""; @@ -2647,6 +2650,7 @@ 311E0AB9268F79CC007BE16F /* ParticleTestCase.swift in Sources */, 2B392B711C5AC59D001EE40B /* RunwayBuilderTestCase.m in Sources */, 2B68A43C225D06A8009CC720 /* ImageReloadTestCase.swift in Sources */, + 31EFBCDC27EE036D007143F4 /* WideVectorsTestCase.swift in Sources */, D8F2FE2E1BE7CF310058A310 /* ModelsTestCase.swift in Sources */, 2B81009C221F4EA900CFF779 /* CartoDBInterpreter.m in Sources */, 2B29944B243BA08D00677DE4 /* MapboxKindaMap.swift in Sources */, diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h index 30e41d3853..20e87cca7f 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h @@ -8,6 +8,35 @@ #import "MaplyTestCase.h" -@interface WideVectorsTestCase : MaplyTestCase +@interface WideVectorsTestCaseBase : MaplyTestCase + +- (instancetype)initWithName:(NSString*)name supporting:(MaplyTestCaseImplementations)impl; + +- (void) loadShapeFile: (MaplyBaseViewController*) baseViewC; + +- (NSArray *)addGeoJson:(NSString*)name + dashPattern:(NSArray*)dashPattern + width:(CGFloat)width + edge:(double)edge + simple:(bool)simple + viewC:(MaplyBaseViewController *)baseViewC; + +- (NSArray *)addGeoJson:(NSString*)name + dashPattern:(NSArray*)dashPattern + width:(CGFloat)width + viewC:(MaplyBaseViewController *)baseViewC; + +- (NSArray *)addGeoJson:(NSString*)name viewC:(MaplyBaseViewController *)viewC; + +- (NSArray *)addWideVectors:(MaplyVectorObject *)vecObj + baseViewC:(MaplyBaseViewController*)baseViewC + dashedLineTex:(MaplyTexture*)dashedLineTex + filledLineTex:(MaplyTexture*)filledLineTex; + +- (void)vecColors:(MaplyBaseViewController *)viewC; + +- (void)overlap:(MaplyBaseViewController *)viewC; + +- (void)exprs:(MaplyBaseViewController *)viewC withLoader:(MaplyQuadLoaderBase*)loader perf:(bool)perf; @end diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm index f570a2c545..380173fde9 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm @@ -13,18 +13,14 @@ @interface NSDictionary(Stuff) - (NSDictionary *_Nonnull) dictionaryByMergingWith:(NSDictionary *_Nullable)dict; @end -@implementation WideVectorsTestCase +@implementation WideVectorsTestCaseBase { GeographyClassTestCase * baseCase; } -- (instancetype)init +- (instancetype)initWithName:(NSString*)name supporting:(MaplyTestCaseImplementations)impl { - if (self = [super init]) { - self.name = @"Wide Vectors"; - self.implementations = MaplyTestCaseImplementationMap | MaplyTestCaseImplementationGlobe; - } - return self; + return (self = [super initWithName:name supporting:impl]); } @@ -140,7 +136,6 @@ - (NSArray *)addGeoJson:(NSString*)name - (NSArray *)addGeoJson:(NSString*)name viewC:(MaplyBaseViewController *)viewC { return [self addGeoJson:name dashPattern:@[@8, @8] width:4 viewC:viewC]; -// return [self addGeoJson:name dashPattern:@[@8, @8] width:100 viewC:viewC]; } - (NSArray *)addWideVectors:(MaplyVectorObject *)vecObj @@ -217,20 +212,6 @@ - (NSArray *)addWideVectors:(MaplyVectorObject *)vecObj kMaplyDrawPriority: @(200) }]; - if ([baseViewC isKindOfClass:[WhirlyGlobeViewController class]]) { - [(WhirlyGlobeViewController*)baseViewC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) height:0.3 heading:0.8 time:0.1]; - [(WhirlyGlobeViewController*)baseViewC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) height:0.1 heading:0.8 time:0.1]; - [(WhirlyGlobeViewController*)baseViewC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) height:0.005 heading:0.8 time:0.1]; - } - else { - if ([baseViewC isKindOfClass:[MaplyViewController class]]) { - [(MaplyViewController*)baseViewC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) height:0.3 time:0.1]; - [(MaplyViewController*)baseViewC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) height:0.1 time:0.1]; - [(MaplyViewController*)baseViewC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) height:0.005 time:0.1]; - - } - } - return @[lines,screenLines,realLines,labelObj]; } @@ -399,53 +380,4 @@ - (void) exprs:(MaplyBaseViewController *)viewC withLoader:(MaplyQuadLoaderBase* } } -- (void)wideLineTest:(MaplyBaseViewController *)viewC -{ - [self addGeoJson:@"sawtooth.geojson" dashPattern:nil width:50.0 edge:20.0 simple:false viewC:viewC]; - [self addGeoJson:@"moving-lawn.geojson" viewC:viewC]; - [self addGeoJson:@"spiral.geojson" viewC:viewC]; - [self addGeoJson:@"square.geojson" dashPattern:@[@2, @2] width:10.0 viewC:viewC]; - [self addGeoJson:@"track.geojson" viewC:viewC]; -// [self addGeoJson:@"uturn2.geojson" dashPattern:@[@16, @16] width:40 viewC:viewC]; - - [self addGeoJson:@"USA.geojson" viewC:viewC]; - -// [self addGeoJson:@"testJson.json" viewC:viewC]; - - // [self addGeoJson:@"straight.geojson"]; - // [self addGeoJson:@"uturn.geojson"]; - - [self overlap:viewC]; - - [self vecColors:viewC]; - - // Dynamic properties require a zoom slot, which may not be set up yet - __weak MaplyQuadLoaderBase *weakLoader = [baseCase getLoader]; - [weakLoader addPostInitBlock:^{ - if (__strong MaplyQuadLoaderBase *loader = weakLoader) - { - [self exprs:viewC withLoader:loader perf:false]; - [self exprs:viewC withLoader:loader perf:true]; - } - }]; -} - - -- (void)setUpWithGlobe:(WhirlyGlobeViewController *)globeVC{ - - baseCase = [[GeographyClassTestCase alloc]init]; - [baseCase setUpWithGlobe:globeVC]; - [self wideLineTest:globeVC]; - [globeVC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) time:0.1]; - -} - -- (void)setUpWithMap:(MaplyViewController *)mapVC{ - baseCase = [[GeographyClassTestCase alloc]init]; - [baseCase setUpWithMap:mapVC]; - [self wideLineTest:mapVC]; - [mapVC animateToPosition:MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793) time:0.1]; - [self loadShapeFile:mapVC]; -} - @end diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift new file mode 100644 index 0000000000..1cc9b9b6db --- /dev/null +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -0,0 +1,157 @@ +// +// WideVectorsTestCase.swift +// AutoTester +// +// Created by Tim Sylvester on 3/25/22. +// Copyright © 2022 mousebird consulting. All rights reserved. +// + +import Foundation + +class WideVectorsTestCase : WideVectorsTestCaseBase +{ + override init() { + super.init(name: "Wide Vectors", supporting: [.map, .globe]) + } + + private func joins(_ vc: MaplyBaseViewController, join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject] { + let lat = Float(30.0) + (perf ? 2.0 : 0.0) + (subdiv ? 4.0 : 0.0) + (close ? 8.0 : 0.0) + let lon = Float(-140.0) + Float(join) * 3.0 + var coords = [ + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + Float(joinN) / 100.0), + MaplyCoordinateMakeWithDegrees(lon + 2.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count - (close ? 0 : 1))) + + if (subdiv) { + if vc is WhirlyGlobeViewController { + vecObj.subdivide(toGlobeGreatCircle: 0.0001) + } else { + vecObj.subdivide(toFlatGreatCircle: 0.0001) + } + } + + let desc = [ + kMaplyVecWidth: 20.0, + kMaplyColor: UIColor.red.withAlphaComponent(0.5), + kMaplyEnable: false, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + kMaplyWideVecJoinType: joinAttr(join) ?? NSNull() + ] as [AnyHashable: Any] + + let co = vc.addWideVectors([vecObj], desc: desc, mode: .current) + + let lblDesc = [ + kMaplyTextColor: UIColor.magenta, + kMaplyEnable: false, + kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, + ] as [AnyHashable: Any] + let lbl = MaplyScreenLabel() + lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) + lbl.text = String(format: "%@ p=%d s=%d", joinAttr(join) ?? "", perf, subdiv) + let lco = vc.addScreenLabels([lbl], desc: lblDesc, mode: .current) + + return [co, lco].compactMap { $0 } + } + + private func joinAttr(_ n: Int) -> String? { + switch (n) { + case 0: return kMaplyWideVecBevelJoin; + case 1: return kMaplyWideVecMiterJoin; + default: return nil + } + } + + private func joins(_ vc: MaplyBaseViewController, add: Bool = true) { + let oldObjs = joinObjs + joinObjs.removeAll() + + if (add) { + let yn = [ true, false ] + (0..<2).forEach { join in + yn.forEach { perf in + yn.forEach { close in + yn.forEach { subdiv in + joinObjs.append(contentsOf: joins(vc, join: join, perf: perf, close: close, subdiv: subdiv)) + } + } + } + } + vc.enable(joinObjs, mode: .current) + } + vc.remove(oldObjs, mode: .current) + + joinN += joinD + if (joinN > 100 || joinN < -100) { + joinD = -joinD + joinN += joinD + } + } + + private func wideLineTest(_ vc: MaplyBaseViewController) { + addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); + addGeoJson("moving-lawn.geojson", viewC: vc); + addGeoJson("spiral.geojson", viewC: vc); + addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); + addGeoJson("track.geojson", viewC: vc); + //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); + + addGeoJson("USA.geojson", viewC:vc); + + //addGeoJson("testJson.json", viewC:vc); + //addGeoJson("straight.geojson", viewC:vc); + //addGeoJson("uturn.geojson", viewC:vc); + + overlap(vc); + vecColors(vc); + + // Dynamic properties require a zoom slot, which may not be set up yet + baseCase.getLoader()?.addPostInitBlock { [weak self] in + guard let self = self, let loader = self.baseCase.getLoader() else { return } + self.exprs(vc, withLoader: loader, perf: false) + self.exprs(vc, withLoader: loader, perf: true) + } + + joinTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in + if let self = self { + self.joins(vc) + } + } + } + + override func setUpWithGlobe(_ vc: WhirlyGlobeViewController) { + baseCase.setUpWithGlobe(vc) + wideLineTest(vc) + loadShapeFile(vc) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-100.0, 40.0), height: 1.0, heading: 0.0, time: 0.1) + //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + } + + override func setUpWithMap(_ vc: MaplyViewController) { + baseCase.setUpWithMap(vc) + wideLineTest(vc) + loadShapeFile(vc) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-100.0, 40.0), height: 1.0, heading: 0.0, time: 0.1) + //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + } + + override func stop() { + joinTimer?.invalidate() + if let vc = baseViewController { + joins(vc, add: false); + } + baseCase.stop() + } + + private var objs = [MaplyComponentObject]() + private var joinTimer: Timer? + private var joinObjs = [MaplyComponentObject]() + private var joinN = 0 + private var joinD = 1 + private let baseCase = GeographyClassTestCase() +} From 96d5510a3680c5d51336150d72c182c21f8f0cbb Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 25 Mar 2022 12:29:32 -0700 Subject: [PATCH 62/78] Fix closed linear joins --- common/WhirlyGlobeLib/src/WideVectorManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index 876522fe0b..983047f7f4 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -1162,7 +1162,8 @@ SimpleIdentity WideVectorManager::addVectors(const std::vector & if (const auto lin = dynamic_cast(shape.get())) { - builder.addLinear(lin->pts, centerUp, maskIDs, false); + const bool closed = lin->pts.size() > 2 && (lin->pts.front() == lin->pts.back()); + builder.addLinear(lin->pts, centerUp, maskIDs, closed); } else if (const auto ar = dynamic_cast(shape.get())) { From bdfcb051ff9d394e57035681615da2f4a0eed490 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 25 Mar 2022 12:31:13 -0700 Subject: [PATCH 63/78] Initialize properties Instance coordinates aren't actually used. Add performance implementation texture test. Simplify. --- .../WhirlyGlobeLib/src/WideVectorManager.cpp | 30 ++-- .../testCases/WideVectorsTestCase.swift | 50 ++++++ .../src/visual_objects/MaplyTexture.mm | 6 +- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 147 ++++++++++-------- 4 files changed, 150 insertions(+), 83 deletions(-) diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index 983047f7f4..d3d4067d0c 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -842,38 +842,38 @@ struct WideVectorDrawableConstructor // will be handled differently by the fragment shader // End cap: vertices [0,3], polygon 0 - drawable->addInstancePoint(Point3f(-1.0,-2.0,0.0),0,0); - drawable->addInstancePoint(Point3f(1.0,-2.0,0.0),1,0); - drawable->addInstancePoint(Point3f(-1.0,-1.0,0.0),2,0); - drawable->addInstancePoint(Point3f(1.0,-1.0,0.0),3,0); + drawable->addInstancePoint(Point3f(0,0,0),0,0); + drawable->addInstancePoint(Point3f(0,0,0),1,0); + drawable->addInstancePoint(Point3f(0,0,0),2,0); + drawable->addInstancePoint(Point3f(0,0,0),3,0); drawable->addTriangle(BasicDrawable::Triangle(0,3,1)); drawable->addTriangle(BasicDrawable::Triangle(0,2,3)); // Middle segment: vertices [4,7], polygon 1 - drawable->addInstancePoint(Point3f(-1.0,-1.0,0.0),4,1); - drawable->addInstancePoint(Point3f(1.0,-1.0,0.0),5,1); - drawable->addInstancePoint(Point3f(-1.0,1.0,0.0),6,1); - drawable->addInstancePoint(Point3f(1.0,1.0,0.0),7,1); + drawable->addInstancePoint(Point3f(0,0,0),4,1); + drawable->addInstancePoint(Point3f(0,0,0),5,1); + drawable->addInstancePoint(Point3f(0,0,0),6,1); + drawable->addInstancePoint(Point3f(0,0,0),7,1); drawable->addTriangle(BasicDrawable::Triangle(4,7,5)); drawable->addTriangle(BasicDrawable::Triangle(4,6,7)); // End cap: vertices [8,11], polygon 2 - drawable->addInstancePoint(Point3f(-1.0,1.0,0.0),8,2); - drawable->addInstancePoint(Point3f(1.0,1.0,0.0),9,2); - drawable->addInstancePoint(Point3f(-1.0,2.0,0.0),10,2); - drawable->addInstancePoint(Point3f(1.0,2.0,0.0),11,2); + drawable->addInstancePoint(Point3f(0,0,0),8,2); + drawable->addInstancePoint(Point3f(0,0,0),9,2); + drawable->addInstancePoint(Point3f(0,0,0),10,2); + drawable->addInstancePoint(Point3f(0,0,0),11,2); drawable->addTriangle(BasicDrawable::Triangle(8,11,9)); drawable->addTriangle(BasicDrawable::Triangle(8,10,11)); } // Run through the points, adding centerline instances double len = 0.0; - int startPt = drawable->getCenterLineCount(); + const int startPt = drawable->getCenterLineCount(); for (unsigned int ii=0;iigeographicToLocal3d(GeoCoord(pt.x(),pt.y())); - Point3d dispPa = coordAdapter->localToDisplay(localPa); + const Point3d localPa = coordSys->geographicToLocal3d(pt); + const Point3d dispPa = coordAdapter->localToDisplay(localPa); unsigned int prev = startPt + ii - 1; if (ii == 0) { diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 1cc9b9b6db..9c1559cee6 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -67,6 +67,51 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } } + private func texs(_ vc: MaplyBaseViewController, perf: Bool) -> [MaplyComponentObject] { + if dashTex == nil { + let b = MaplyLinearTextureBuilder() + b.setPattern([1, 1]) + if let img = b.makeImage() { + let desc = [ + kMaplyTexWrapY: true, + kMaplyTexFormat: MaplyQuadImageFormat.imageIntRGBA, + ] as [AnyHashable: Any] + dashTex = vc.addTexture(img, desc: desc, mode: .current) + } + } + + let lat = Float(30.0) + (perf ? 2.0 : 0.0) + let lon = Float(-150.0) + var coords = [ + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.0), + MaplyCoordinateMakeWithDegrees(lon + 2.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + + if vc is WhirlyGlobeViewController { + vecObj.subdivide(toGlobeGreatCircle: 0.0001) + } else { + vecObj.subdivide(toFlatGreatCircle: 0.0001) + } + + let desc = [ + kMaplyVecWidth: 20.0, + kMaplyColor: UIColor.red.withAlphaComponent(0.5), + kMaplyEnable: true, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + kMaplyWideVecJoinType: kMaplyWideVecBevelJoin, + kMaplyVecTexture: dashTex ?? NSNull() + ] as [AnyHashable: Any] + + let co = vc.addWideVectors([vecObj], desc: desc, mode: .current) + + return [co].compactMap { $0 } + } + private func joins(_ vc: MaplyBaseViewController, add: Bool = true) { let oldObjs = joinObjs joinObjs.removeAll() @@ -109,6 +154,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase overlap(vc); vecColors(vc); + objs.append(contentsOf: texs(vc, perf: false)) + objs.append(contentsOf: texs(vc, perf: true)) // Dynamic properties require a zoom slot, which may not be set up yet baseCase.getLoader()?.addPostInitBlock { [weak self] in @@ -144,10 +191,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase joinTimer?.invalidate() if let vc = baseViewController { joins(vc, add: false); + vc.remove(objs, mode: .current) + objs.removeAll() } baseCase.stop() } + private var dashTex: MaplyTexture? private var objs = [MaplyComponentObject]() private var joinTimer: Timer? private var joinObjs = [MaplyComponentObject]() diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyTexture.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyTexture.mm index 0c9abf1576..528ac746ac 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyTexture.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/visual_objects/MaplyTexture.mm @@ -33,9 +33,13 @@ - (instancetype)init if (!self) return nil; + _interactLayer = nil; + _image = nil; _isSubTex = false; + _isBeingRemoved = false; _texID = EmptyIdentity; - + _width = _height = -1; + return self; } diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 2f42b7c98f..6092027afe 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -839,30 +839,24 @@ struct IntersectInfo { // Intersect two offset lines IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, - float2 n0,float2 n1) + float2 n0,float2 n1) { - IntersectInfo iInfo; - iInfo.valid = false; - - float2 lineA[2]; - lineA[0] = p0 + n0; - lineA[1] = p1 + n0; - float2 lineB[2]; - lineB[0] = p1 + n1; - lineB[1] = p2 + n1; - - float denom = (lineA[0].x-lineA[1].x)*(lineB[0].y-lineB[1].y) - (lineA[0].y - lineA[1].y)*(lineB[0].x - lineB[1].x); - if (denom == 0.0) - return iInfo; - - float termA = (lineA[0].x * lineA[1].y - lineA[0].y * lineA[1].x); - float termB = (lineB[0].x * lineB[1].y - lineB[0].y * lineB[1].x); - iInfo.interPt.x = ( termA * (lineB[0].x - lineB[1].x) - (lineA[0].x - lineA[1].x) * termB)/denom; - iInfo.interPt.y = ( termA * (lineB[0].y - lineB[1].y) - (lineA[0].y - lineA[1].y) * termB)/denom; - - iInfo.ta = 0.0; iInfo.tb = 0.0; - iInfo.valid = true; - + IntersectInfo iInfo = { .valid = false }; + + const float2 lineA[2] = { p0 + n0, p1 + n0 }; + const float2 lineB[2] = { p1 + n1, p2 + n1 }; + + const float denom = (lineA[0].x - lineA[1].x) * (lineB[0].y - lineB[1].y) - + (lineA[0].y - lineA[1].y) * (lineB[0].x - lineB[1].x); + if (denom != 0.0) { + const float termA = (lineA[0].x * lineA[1].y - lineA[0].y * lineA[1].x); + const float termB = (lineB[0].x * lineB[1].y - lineB[0].y * lineB[1].x); + iInfo.interPt.x = ( termA * (lineB[0].x - lineB[1].x) - (lineA[0].x - lineA[1].x) * termB)/denom; + iInfo.interPt.y = ( termA * (lineB[0].y - lineB[1].y) - (lineA[0].y - lineA[1].y) * termB)/denom; + iInfo.ta = 0.0; + iInfo.tb = 0.0; + iInfo.valid = true; + } return iInfo; } @@ -881,6 +875,17 @@ struct CenterInfo { float2 norm; }; +float3 viewPos(constant simd::float4x4 &mat, float3 vec) { + const float4 p = mat * float4(vec,1.0); + return p.xyz; // / p.w; ? +} + +float2 screenPos(constant Uniforms &u, float3 viewPos) { + const float4 p4 = float4(viewPos, 1.0); + const float4 s = u.pMatrix * (u.mvMatrix * p4 + u.mvMatrixDiff * p4); + return s.xy / s.w; +} + // Performance version of wide vector shader vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( VertexTriWideVecB vert [[stage_in]], @@ -892,16 +897,23 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( constant RegularTextures & texArgs [[buffer(WKSVertTextureArgBuffer)]]) { ProjVertexTriWideVecPerf outVert = { .position = float4(0.0,0.0,-1000.0,1.0) }; + float2 texOffset(0, 0); // todo: uniforms? + // Vertex index within the polygon, 0-11 + // Odd indexes are on the left, evens are on the right. const int whichVert = (vert.index >> 16) & 0xffff; + // Polygon index within the segment. 0=Start cap, 1=body, 2=end cap const int whichPoly = vert.index & 0xffff; - // Find the various instances representing center points - // We need one behind and two ahead of us + // Find the various instances representing center points. + // We need one behind and one ahead of us. + // behind + // | us + // | | ahead + // | | | bool instValid[4] = { false, true, false, false }; VertexTriWideVecInstance inst[4] = { {}, wideVecInsts[instanceID], {}, {} }; - outVert.maskIDs[0] = inst[1].mask0; - outVert.maskIDs[1] = inst[1].mask1; + if (inst[1].prev != -1) { inst[0] = wideVecInsts[inst[1].prev]; instValid[0] = true; @@ -909,22 +921,26 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (inst[1].next != -1) { inst[2] = wideVecInsts[inst[1].next]; instValid[2] = true; + + if (inst[2].next != -1) { + inst[3] = wideVecInsts[inst[2].next]; + instValid[3] = true; + } + } else { + return outVert; } - if (instValid[2] && inst[2].next != -1) { - inst[3] = wideVecInsts[inst[2].next]; - instValid[3] = true; - } - // Direction and normal info for three segments we may look at - bool isValid = instValid[2]; + outVert.maskIDs[0] = inst[1].mask0; + outVert.maskIDs[1] = inst[1].mask1; + + bool isValid = true; // Figure out position on the screen for every center point CenterInfo centers[4]; for (unsigned int ii=0;ii<4;ii++) { if (instValid[ii]) { - const float3 centerPos = (vertArgs.uniDrawState.singleMat * float4(inst[ii].center,1.0)).xyz; - const float4 screenPt = uniforms.pMatrix * (uniforms.mvMatrix * float4(centerPos,1.0) + uniforms.mvMatrixDiff * float4(centerPos,1.0)); - centers[ii].screenPos = screenPt.xy / screenPt.w; + const float3 centerPos = viewPos(vertArgs.uniDrawState.singleMat, inst[ii].center); + centers[ii].screenPos = screenPos(uniforms, centerPos); // Make sure the object is facing the user (only for the globe) if (uniforms.globeMode && ii == 1) { @@ -961,15 +977,15 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Pull out the width and possibly calculate one float w2 = vertArgs.wideVec.w2; - if (vertArgs.wideVec.hasExp) + if (vertArgs.wideVec.hasExp) { w2 = ExpCalculateFloat(vertArgs.wideVecExp.widthExp, zoom, 2.0*w2)/2.0; + } if (w2 > 0.0) { w2 = w2 + vertArgs.wideVec.edge; } - + // Pull out the center line offset, or calculate one -// float centerLine = vertArgs.wideVec.offset; - float centerLine = 0.0; + float centerLine = 0.0; // vertArgs.wideVec.offset; // if (vertArgs.wideVec.hasExp) // centerLine = ExpCalculateFloat(vertArgs.wideVecExp.offsetExp, zoom, centerLine); @@ -986,35 +1002,32 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Do the offset intersection // float angleBetween = 0.0; bool iPtsValid = false; + const int interPt = (whichVert == 6 || whichVert == 7) ? 1 : 0; float2 iPts; - if (isValid) { - // We'll reject - const float nearDist = 1.42 * w2 * max(screenScale.x,screenScale.y); - - // We only need one intersection depending - const int interPt = (whichVert == 6 || whichVert == 7) ? 1 : 0; - if (instValid[interPt] && instValid[interPt+1] && instValid[interPt+2]) { - const float dotProd = dot(centers[interPt+1].nDir, centers[interPt+2].nDir); - if (dotProd > -0.99999998476 && dotProd < 0.99999998476) { - // Acute angles tend to break things + // If we're on the far end of the body segment, we need this and the next two segments. + // Otherwise we need the previous, this, and the next segment. + if (instValid[interPt] && instValid[interPt+1] && instValid[interPt+2]) { + const float dotProd = dot(centers[interPt+1].nDir, centers[interPt+2].nDir); + const float limit = 0.99999998476; // cos(0.01 deg) + if (dotProd > -limit && dotProd < limit) { + // Acute angles tend to break things // angleBetween = acos(dotProd); // if (angleBetween < 4.0 / 180.0 * M_PI_F) { -//// iPtsValid = false; +// iPtsValid = false; // } - const float2 nudge = w2 * interDir * screenScale; - const IntersectInfo interInfo = intersectWideLines(centers[interPt].screenPos, - centers[interPt+1].screenPos, - centers[interPt+2].screenPos, - nudge * centers[interPt+1].norm, - nudge * centers[interPt+2].norm); - if (interInfo.valid) { - // If the intersection is too far away, we'll drop it - if (distance_squared(centers[interPt+1].screenPos,interInfo.interPt) <= nearDist*nearDist) { - iPtsValid = true; - iPts = interInfo.interPt; - } - } + const float2 nudge = w2 * interDir * screenScale; + const IntersectInfo interInfo = intersectWideLines(centers[interPt].screenPos, + centers[interPt+1].screenPos, + centers[interPt+2].screenPos, + nudge * centers[interPt+1].norm, + nudge * centers[interPt+2].norm); + // If the intersection is too far away, we'll drop it + const float nearDist = 1.42 * w2 * max(screenScale.x,screenScale.y); + if (interInfo.valid && + distance_squared(centers[interPt+1].screenPos,interInfo.interPt) <= nearDist*nearDist) { + iPtsValid = true; + iPts = interInfo.interPt; } } } @@ -1030,9 +1043,10 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.color = color * calculateFade(uniforms,vertArgs.uniDrawState); outVert.w2 = w2; outVert.edge = vertArgs.wideVec.edge; - outVert.texCoord = float2(interDir,0); // todo: this is incomplete if (isValid) { + outVert.texCoord.x = texOffset.x + ((whichVert & 0x1) ? 0.0 : 1.0); + outVert.texCoord.y = texOffset.y + inst[interPt].len / screenScale.x; if (iPtsValid) { outVert.position = float4(iPts, 0.0, 1.0); } else { @@ -1042,11 +1056,10 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.position = float4(centers[basePt].screenPos + offset, 0.0, 1.0); } } - return outVert; } -// Fragment share that takes the back of the globe into account +// Fragment shader that takes the back of the globe into account fragment float4 fragmentTri_wideVecPerf( ProjVertexTriWideVecPerf vert [[stage_in]], constant Uniforms &uniforms [[ buffer(WKSFragUniformArgBuffer) ]], From 43ed0cc97180821d44ad0fc3c6643cb9d5349284 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 29 Mar 2022 08:34:13 -0700 Subject: [PATCH 64/78] Tweak texture coordinates based on line intersections --- .../include/WideVectorDrawableBuilder.h | 3 +- .../src/WideVectorDrawableBuilder.cpp | 3 +- .../WhirlyGlobeLib/src/WideVectorManager.cpp | 7 +- .../testCases/WideVectorsTestCase.swift | 6 + .../include/DefaultShadersMTL.h | 6 +- .../src/WideVectorDrawableBuilderMTL.mm | 3 +- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 134 ++++++++++++------ 7 files changed, 111 insertions(+), 51 deletions(-) diff --git a/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h b/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h index 88d8f863ff..96da01020c 100644 --- a/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h +++ b/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h @@ -229,7 +229,8 @@ class WideVectorDrawableBuilder typedef struct { Point3f center; Point3f up; - float len; + float segLen; + float totalLen; RGBAColor color; int prev,next; int maskIDs[2]; diff --git a/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp b/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp index 128eefdda8..523e8a1c78 100644 --- a/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp @@ -232,7 +232,8 @@ void WideVectorDrawableBuilder::addCenterLine(const Point3d ¢erPt, CenterPoint pt; pt.center = Point3f(centerPt.x(),centerPt.y(),centerPt.z()); pt.up = Point3f(up.x(),up.y(),up.z()); - pt.len = (float)len; + pt.segLen = (float)len; + pt.totalLen = (centerline.empty() ? 0.0f : centerline.back().totalLen) + pt.segLen; pt.color = inColor; pt.maskIDs[0] = maskIDs.empty() ? 0 : (int)maskIDs[0]; pt.maskIDs[1] = maskIDs.size() > 1 ? (int)maskIDs[1] : 0; diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index d3d4067d0c..3fe3de2b3d 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -24,6 +24,7 @@ #import "SharedAttributes.h" #import "WideVectorDrawableBuilder.h" #import "MapboxVectorStyleSetC.h" +#import "WhirlyKitLog.h" using namespace WhirlyKit; using namespace Eigen; @@ -867,7 +868,6 @@ struct WideVectorDrawableConstructor } // Run through the points, adding centerline instances - double len = 0.0; const int startPt = drawable->getCenterLineCount(); for (unsigned int ii=0;iiaddCenterLine(dispPa,up,len,vecInfo->color,maskIDs,(int)prev,(int)next); - - if (iicenter,inPtr->center); CopyIntoMtlFloat3(outPtr->up, inPtr->up); - outPtr->len = inPtr->len; + outPtr->segLen = inPtr->segLen; + outPtr->totalLen = inPtr->totalLen; float color[4]; inPtr->color.asUnitFloats(color); CopyIntoMtlFloat4(outPtr->color,color); diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 6092027afe..747c798dc5 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -834,30 +834,44 @@ fragment float4 fragmentTri_wideVec( struct IntersectInfo { bool valid; float2 interPt; + float c, d2; float ta,tb; }; +// wedge product (2D cross product) +// if A ^ B > 0, A is to the right of B +float wedge(float2 a, float2 b) { + return a.x * b.y - a.y * b.x; +} + // Intersect two offset lines IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, float2 n0,float2 n1) { - IntersectInfo iInfo = { .valid = false }; - - const float2 lineA[2] = { p0 + n0, p1 + n0 }; - const float2 lineB[2] = { p1 + n1, p2 + n1 }; - - const float denom = (lineA[0].x - lineA[1].x) * (lineB[0].y - lineB[1].y) - - (lineA[0].y - lineA[1].y) * (lineB[0].x - lineB[1].x); - if (denom != 0.0) { - const float termA = (lineA[0].x * lineA[1].y - lineA[0].y * lineA[1].x); - const float termB = (lineB[0].x * lineB[1].y - lineB[0].y * lineB[1].x); - iInfo.interPt.x = ( termA * (lineB[0].x - lineB[1].x) - (lineA[0].x - lineA[1].x) * termB)/denom; - iInfo.interPt.y = ( termA * (lineB[0].y - lineB[1].y) - (lineA[0].y - lineA[1].y) * termB)/denom; - iInfo.ta = 0.0; - iInfo.tb = 0.0; - iInfo.valid = true; + const float2 lineA[] = { p0 + n0, p1 + n0 }; + const float2 lineB[] = { p1 + n1, p2 + n1 }; + const float2 dA = lineA[0] - lineA[1]; + const float2 dB = lineB[0] - lineB[1]; + + // Solve the system of equations formed by equating the lines to get their common point. + const float denom = wedge(dA, dB); + if (denom == 0.0) { + // If the denominator comes out zero, the lines are parallel and do not intersect + return { .valid = false }; } - return iInfo; + + const float tA = (lineA[0].x * lineA[1].y - lineA[0].y * lineA[1].x); + const float tB = (lineB[0].x * lineB[1].y - lineB[0].y * lineB[1].x); + const float2 inter = float2((tA * dB.x - dA.x * tB), (tA * dB.y - dA.y * tB)) / denom; + + return { + .valid = true, + .interPt = inter, + .d2 = distance_squared(p1, inter), + .c = wedge(p2 - p1, n0 - n1) / denom, + .ta = 0.0, + .tb = 0.0, + }; } struct TriWideArgBufferC { @@ -897,9 +911,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( constant RegularTextures & texArgs [[buffer(WKSVertTextureArgBuffer)]]) { ProjVertexTriWideVecPerf outVert = { .position = float4(0.0,0.0,-1000.0,1.0) }; - float2 texOffset(0, 0); // todo: uniforms? - // Vertex index within the polygon, 0-11 + // Vertex index within the instance, 0-11 // Odd indexes are on the left, evens are on the right. const int whichVert = (vert.index >> 16) & 0xffff; // Polygon index within the segment. 0=Start cap, 1=body, 2=end cap @@ -907,9 +920,9 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Find the various instances representing center points. // We need one behind and one ahead of us. - // behind - // | us - // | | ahead + // previous segment + // | this segment + // | | next segment // | | | bool instValid[4] = { false, true, false, false }; VertexTriWideVecInstance inst[4] = { {}, wideVecInsts[instanceID], {}, {} }; @@ -964,17 +977,36 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } // Size of pixels - const float2 screenScale(2.0/uniforms.frameSize.x,2.0/uniforms.frameSize.y); + const float2 screenScale(2.0/uniforms.frameSize.x,2.0/uniforms.frameSize.y); // ~(0.001,0.001) + //const float avgScreenScale = 0.5/(uniforms.frameSize.x + uniforms.frameSize.y); + + const float pixScale = min(uniforms.screenSizeInDisplayCoords.x,uniforms.screenSizeInDisplayCoords.y) / + min(uniforms.frameSize.x,uniforms.frameSize.y); + const float texScale = 1 / pixScale / vertArgs.wideVec.texRepeat; // texture coords / display coords = ~1000 + + // (1.0/2 (uniforms.frameSize.x + uniforms.frameSize.y) const float zoom = ZoomFromSlot(uniforms, vertArgs.uniDrawState.zoomSlot); + float2 texOffset(0, 0); // todo: uniforms? + //float texPos = ((vert.texInfo.z - vert.texInfo.y) * t0 + vert.texInfo.y + vert.texInfo.w * realWidth2) * texScale; + //outVert.texCoord = texOffset + float2((whichVert & 1) ? 1 : 0, texScale * inst[interPt].len); + +// outVert.screenScale = screenScale; +// outVert.frameSize = uniforms.frameSize; // (1536,2048) +// outVert.screenSize = uniforms.screenSizeInDisplayCoords; // ~(0.035, 0.05) + for (unsigned int ii=1;ii<4;ii++) { if (instValid[ii-1]) { centers[ii].dir = centers[ii].screenPos - centers[ii-1].screenPos; centers[ii].nDir = normalize(centers[ii].dir); - centers[ii].norm = normalize(float2(-centers[ii].dir.y,centers[ii].dir.x) * screenScale); + centers[ii].norm = normalize(float2(-centers[ii].dir.y,centers[ii].dir.x)); } } + // Textures are based on un-projected coords, we'll need to know how that relates to projected + // ones in order to adjust texture coordinates based on screen-based intersections. + const float projScale = length(centers[1].dir) / inst[1].segLen; + // Pull out the width and possibly calculate one float w2 = vertArgs.wideVec.w2; if (vertArgs.wideVec.hasExp) { @@ -983,14 +1015,16 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (w2 > 0.0) { w2 = w2 + vertArgs.wideVec.edge; } + const float realWidth2 = w2 * pixScale; // Pull out the center line offset, or calculate one float centerLine = 0.0; // vertArgs.wideVec.offset; // if (vertArgs.wideVec.hasExp) // centerLine = ExpCalculateFloat(vertArgs.wideVecExp.offsetExp, zoom, centerLine); - + const float realCenterLine = centerLine * pixScale; + // Intersect on the left or right depending - const float interDir = (whichVert & 0x1) ? 1.0 : -1.0; + const float interDir = (whichVert & 1) ? 1 : -1; // Turn off the end caps for the moment switch (whichPoly) { @@ -1000,10 +1034,10 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } // Do the offset intersection -// float angleBetween = 0.0; bool iPtsValid = false; const int interPt = (whichVert == 6 || whichVert == 7) ? 1 : 0; float2 iPts; + IntersectInfo interInfo; // If we're on the far end of the body segment, we need this and the next two segments. // Otherwise we need the previous, this, and the next segment. if (instValid[interPt] && instValid[interPt+1] && instValid[interPt+2]) { @@ -1016,16 +1050,17 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // iPtsValid = false; // } + // Intersect the left or right normals const float2 nudge = w2 * interDir * screenScale; - const IntersectInfo interInfo = intersectWideLines(centers[interPt].screenPos, - centers[interPt+1].screenPos, - centers[interPt+2].screenPos, - nudge * centers[interPt+1].norm, - nudge * centers[interPt+2].norm); + interInfo = intersectWideLines(centers[interPt].screenPos, + centers[interPt+1].screenPos, + centers[interPt+2].screenPos, + nudge * centers[interPt+1].norm, + nudge * centers[interPt+2].norm); + // If the intersection is too far away, we'll drop it - const float nearDist = 1.42 * w2 * max(screenScale.x,screenScale.y); - if (interInfo.valid && - distance_squared(centers[interPt+1].screenPos,interInfo.interPt) <= nearDist*nearDist) { + const float nearDist = 2 * 1.42 * w2 * max(screenScale.x,screenScale.y); + if (interInfo.valid && interInfo.d2 <= nearDist*nearDist) { iPtsValid = true; iPts = interInfo.interPt; } @@ -1045,16 +1080,29 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.edge = vertArgs.wideVec.edge; if (isValid) { - outVert.texCoord.x = texOffset.x + ((whichVert & 0x1) ? 0.0 : 1.0); - outVert.texCoord.y = texOffset.y + inst[interPt].len / screenScale.x; + // Work out the corner position by extending the normal + const int basePt = (whichVert == 6 || whichVert == 7) ? 2 : 1; + const float2 offset = centers[2].norm * interDir * screenScale * (w2 + centerLine + vertArgs.wideVec.edge); + const float2 corner = centers[basePt].screenPos + offset; + + // Use the intersect point instead of the corner + outVert.position = float4(iPtsValid ? iPts : corner, 0, 1); + + // Default texture position is based on cumulative distance along the line + float texY = inst[interPt+1].totalLen; + if (iPtsValid) { - outVert.position = float4(iPts, 0.0, 1.0); - } else { - // Return a vertex offset from the base - const int basePt = (whichVert == 6 || whichVert == 7) ? 2 : 1; - const float2 offset = (centers[2].norm * interDir) * screenScale * (w2 + centerLine + vertArgs.wideVec.edge); - outVert.position = float4(centers[basePt].screenPos + offset, 0.0, 1.0); + // Apply the fraction of the offset along the current segment to the texture coordinate. + texY += dot(corner - iPts, centers[1].nDir) / projScale; + + outVert.offset = offset; + outVert.a += dot(corner - iPts, centers[1].nDir); + outVert.b += dot(corner - iPts, centers[1].nDir) / projScale; + outVert.c += dot(corner - iPts, centers[1].nDir) / projScale * texScale; } + + outVert.texCoord.x = texOffset.x + ((whichVert & 1) ? 0 : 1); + outVert.texCoord.y = texOffset.y + texY * texScale; } return outVert; } @@ -1080,7 +1128,7 @@ fragment float4 fragmentTri_wideVecPerf( const int numTextures = TexturesBase(texArgs.texPresent); float patternAlpha = 1.0; if (numTextures > 0) { - constexpr sampler sampler2d(coord::normalized, address::repeat, filter::linear); + constexpr sampler sampler2d(coord::normalized, address::repeat, filter::bicubic); // Just pulling the alpha at the moment // If we use the rest, we get interpolation down to zero, which isn't quite what we want here patternAlpha = texArgs.tex[0].sample(sampler2d, vert.texCoord).a; From 8fa3fcd7a71dd2b20027088f33d484cab2f8799a Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 29 Mar 2022 12:55:41 -0700 Subject: [PATCH 65/78] Add dynamic zoom slots, texture offsets, more join/cap types. Improve globe view extents. Better test cases. More progress toward bevels and miter-clip. Add drawable names for easier shader debugging. Add some missing attribute names. --- common/WhirlyGlobeLib/include/BaseInfo.h | 1 + common/WhirlyGlobeLib/include/BasicDrawable.h | 3 +- common/WhirlyGlobeLib/include/SceneRenderer.h | 15 + .../WhirlyGlobeLib/include/SharedAttributes.h | 39 +- .../include/WideVectorDrawableBuilder.h | 33 +- .../include/WideVectorManager.h | 11 +- common/WhirlyGlobeLib/src/BaseInfo.cpp | 1 + .../src/QuadImageFrameLoader.cpp | 12 +- common/WhirlyGlobeLib/src/Scene.cpp | 8 +- common/WhirlyGlobeLib/src/SceneRenderer.cpp | 64 ++- common/WhirlyGlobeLib/src/VectorManager.cpp | 5 +- .../src/WideVectorDrawableBuilder.cpp | 14 +- .../WhirlyGlobeLib/src/WideVectorManager.cpp | 133 +++-- .../AutoTester/testCases/AirwayTestCase.swift | 2 +- .../testCases/WideVectorsTestCase.h | 2 - .../testCases/WideVectorsTestCase.mm | 50 -- .../testCases/WideVectorsTestCase.swift | 390 ++++++++++---- .../include/MaplySharedAttributes.h | 26 +- .../include/control/MaplyBaseViewController.h | 9 + .../include/control/MaplyRenderController.h | 11 +- .../src/control/MaplyBaseViewController.mm | 20 + .../src/control/MaplyRenderController.mm | 16 + .../src/control/MaplySharedAttributes.mm | 59 ++- .../src/control/WhirlyGlobeViewController.mm | 48 +- .../include/DefaultShadersMTL.h | 44 +- ios/library/WhirlyGlobeLib/src/MTLView.mm | 2 + .../WhirlyGlobeLib/src/SceneRendererMTL.mm | 2 +- .../src/WideVectorDrawableBuilderMTL.mm | 34 +- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 496 +++++++++++++----- 29 files changed, 1110 insertions(+), 440 deletions(-) diff --git a/common/WhirlyGlobeLib/include/BaseInfo.h b/common/WhirlyGlobeLib/include/BaseInfo.h index 90200b34e7..8af0e7f29f 100644 --- a/common/WhirlyGlobeLib/include/BaseInfo.h +++ b/common/WhirlyGlobeLib/include/BaseInfo.h @@ -130,6 +130,7 @@ struct BaseInfo bool zBufferWrite = false; bool hasExp = false; // Set if we're requiring the expressions to be passed through (problem on Metal) SimpleIdentity renderTargetID = EmptyIdentity; + std::string drawableName; SingleVertexAttributeSet uniforms; diff --git a/common/WhirlyGlobeLib/include/BasicDrawable.h b/common/WhirlyGlobeLib/include/BasicDrawable.h index 0e985499b6..7b25de16e6 100644 --- a/common/WhirlyGlobeLib/include/BasicDrawable.h +++ b/common/WhirlyGlobeLib/include/BasicDrawable.h @@ -190,9 +190,8 @@ friend class BasicDrawableBuilderMTL; // Block of data to be passed into a given buffer ID // We do this in Metal rather than setting individual uniforms (like OpenGL) - class UniformBlock + struct UniformBlock { - public: int bufferID; // Actually an index into a shared shader structure, not a buffer RawDataRef blockData; }; diff --git a/common/WhirlyGlobeLib/include/SceneRenderer.h b/common/WhirlyGlobeLib/include/SceneRenderer.h index c45c34015b..dd5c776373 100644 --- a/common/WhirlyGlobeLib/include/SceneRenderer.h +++ b/common/WhirlyGlobeLib/include/SceneRenderer.h @@ -347,6 +347,11 @@ class SceneRenderer : public DelayedDeletable const RenderTeardownInfoRef &getTeardownInfo() const { return teardownInfo; } + int retainZoomSlot(double minZoom, double maxHeight, double maxZoom, double minHeight); + void releaseZoomSlot(int slot); + + void updateZoomSlots(); + protected: /// Set the framebuffer size /// You probably want resize() instead. @@ -417,6 +422,16 @@ class SceneRenderer : public DelayedDeletable // Map Name IDs to slots (when using Metal) std::map slotMap; + struct ZoomSlotInfo + { + double minZoom; + double maxZoom; + double minHeight; + double maxHeight; + double zoom(double height) const; + }; + std::unordered_map zoomSlotMap; + protected: /// The pixel width of the CAEAGLLayer. int framebufferWidth; diff --git a/common/WhirlyGlobeLib/include/SharedAttributes.h b/common/WhirlyGlobeLib/include/SharedAttributes.h index 4da704092d..948f7bb3de 100644 --- a/common/WhirlyGlobeLib/include/SharedAttributes.h +++ b/common/WhirlyGlobeLib/include/SharedAttributes.h @@ -257,27 +257,27 @@ /// Widened vectors are joined with miters #define MaplyWideVecMiterJoin WKString("miter") -// Note: Not yet implemented +#define MaplyWideVecMiterClipJoin WKString("miter-clip") /// Widened vectors are joined with a curve -//#define kMaplyWideVecRoundJoin @"round" +#define MaplyWideVecRoundJoin WKString("round") /// Widened vectors are joined with a bevel #define MaplyWideVecBevelJoin WKString("bevel") +/// No joins (fastest) +#define MaplyWideVecNoneJoin WKString("none") /// Number of pixels to use in blending the edges of the wide vectors #define MaplyWideVecEdgeFalloff WKString("edgefalloff") /// For wide vectors we can control the ends /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty -//#define kMaplyWideVecLineCapType @"wideveclinecaptype" - -// Note: These are not currently implemented +#define MaplyWideVecLineCapType WKString("wideveclinecaptype") /// Widened vector ends are flush -//#define kMaplyWideVecButtCap @"butt" +#define MaplyWideVecButtCap WKString("butt") /// Widened vector ends are round (e.g. hot dog roads) -//#define kMaplyWideVecRoundCap @"round" +#define MaplyWideVecRoundCap WKString("round") /// Widened vector ends are extended a bit and then flush -//#define kMaplyWideVecSquareCap @"square" +#define MaplyWideVecSquareCap WKString("square") /// Miter joins will turn to bevel joins past this number of degrees #define MaplyWideVecMiterLimit WKString("miterLimit") @@ -286,6 +286,10 @@ /// It's real world coordinates for kMaplyWideVecCoordTypeReal and pixel size for kMaplyWideVecCoordTypeScreen #define MaplyWideVecTexRepeatLen WKString("repeatSize") +/// Initial texture coords +#define MaplyWideVecTexOffsetX WKString("texOffsetX") +#define MaplyWideVecTexOffsetY WKString("texOffsetY") + /// Offset to left (negative) or right (positive) of the centerline #define MaplyWideVecOffset WKString("vecOffset") @@ -371,3 +375,22 @@ #define MaplyUUIDDesc WKString("uuid") /// Used to distinguish the particular representation of a unique ID #define MaplyRepresentationDesc WKString("representation") + +/// Attach a name to the drawable(s) generated for debugging purposes +#define MaplyDrawableName WKString("drawablename") + +#define MaplyTexSizeX WKString("texsizex"); +#define MaplyTexSizeY WKString("texsizey"); +#define MaplySubdivStatic WKString("static"); +#define MaplySelectable WKString("selectable"); +#define MaplyShapeSampleX WKString("shapesamplex"); +#define MaplyShapeSampleY WKString("shapesampley"); +#define MaplyTexFormat WKString("texformat"); +#define MaplyTexMinFilter WKString("texminfilter"); +#define MaplyTexMagFilter WKString("texmagfilter"); +#define MaplyMinFilterNearest WKString("texfilternearest"); +#define MaplyMinFilterLinear WKString("texfilterlinear"); +#define MaplyTexAtlas WKString("texatlas"); +#define MaplyTexWrapX WKString("texwrapx"); +#define MaplyTexWrapY WKString("texwrapy"); +#define MaplyTexMipmap WKString("texmipmap"); diff --git a/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h b/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h index 96da01020c..91aa1ec96d 100644 --- a/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h +++ b/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h @@ -118,21 +118,34 @@ class WideVectorDrawableBuilder /// Adds a point for instanced geometry and an ID for tracking it in the shader virtual void addInstancePoint(const Point3f &pt,int vertIndex,int polyIndex); - // We set color globally + /// We set color globally void setColor(RGBAColor inColor); - // Line width for vectors is a bit different + /// Line width for vectors is a bit different virtual void setLineWidth(float inWidth); - // Line offset for vectors + /// Line offset for vectors void setLineOffset(float inOffset); - + + /// Line join type + WideVectorLineJoinType getLineJoin() const { return joinType; } + void setLineJoin(WideVectorLineJoinType type) { joinType = type; } + + /// Miter join limit as a multiple of width + void setMiterLimit(float limit) { miterLimit = limit; } + + /// Line cap type + void setLineCap(WideVectorLineCapType type) { capType = type; } + /// How often the texture repeats - void setTexRepeat(float inTexRepeat); - + void setTexRepeat(float inTexRepeat) { texRepeat = inTexRepeat; } + + /// Starting point for texture coords + void setTexOffset(const Point2f &offset) { texOffset = offset; } + /// Number of pixels to interpolate at the edges - void setEdgeSize(float inEdgeSize); - + void setEdgeSize(float inEdgeSize) { edgeSize = inEdgeSize; } + // Apply a dynamic color expression void setColorExpression(ColorExpressionInfoRef colorExp); @@ -198,6 +211,7 @@ class WideVectorDrawableBuilder bool lineOffsetSet = false; bool globeMode = true; float texRepeat = 1.0f; + Point2f texOffset = { 0.0f, 0.0f }; float edgeSize = 1.0f; int p1_index = -1; int n0_index = -1; @@ -205,6 +219,9 @@ class WideVectorDrawableBuilder int c0_index = -1; int tex_index = -1; int inst_index = -1; + WideVectorLineJoinType joinType = WideVecBevelJoin; + WideVectorLineCapType capType = WideVecSquareCap; + float miterLimit = 2.0; std::string name; Scene *scene; const SceneRenderer *renderer; diff --git a/common/WhirlyGlobeLib/include/WideVectorManager.h b/common/WhirlyGlobeLib/include/WideVectorManager.h index b333586819..06a972b59b 100644 --- a/common/WhirlyGlobeLib/include/WideVectorManager.h +++ b/common/WhirlyGlobeLib/include/WideVectorManager.h @@ -38,8 +38,14 @@ class VectorInfo; typedef enum {WideVecCoordReal,WideVecCoordScreen} WideVectorCoordsType; /// How the lines are joined. See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty -typedef enum {WideVecMiterJoin,WideVecRoundJoin,WideVecBevelJoin} WideVectorLineJoinType; - +typedef enum { + WideVecMiterJoin, + WideVecMiterClipJoin, + WideVecRoundJoin, + WideVecBevelJoin, + WideVecNoneJoin, +} WideVectorLineJoinType; + /// How the lines begin and end. See: http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty typedef enum {WideVecButtCap,WideVecRoundCap,WideVecSquareCap} WideVectorLineCapType; @@ -63,6 +69,7 @@ class WideVectorInfo : public BaseInfo float width = 2.0f; float offset = 0.0f; float repeatSize = 32.0f; + Point2f texOffset = { 0.0f, 0.0f }; float edgeSize = 1.0f; float subdivEps = 0.0f; float miterLimit = 2.0f; diff --git a/common/WhirlyGlobeLib/src/BaseInfo.cpp b/common/WhirlyGlobeLib/src/BaseInfo.cpp index b9359dc730..a29671cebb 100644 --- a/common/WhirlyGlobeLib/src/BaseInfo.cpp +++ b/common/WhirlyGlobeLib/src/BaseInfo.cpp @@ -176,6 +176,7 @@ BaseInfo::BaseInfo(const Dictionary &dict) zBufferRead = dict.getBool(MaplyZBufferRead,false); zBufferWrite = dict.getBool(MaplyZBufferWrite, false); renderTargetID = dict.getInt(MaplyRenderTargetDesc,EmptyIdentity); + drawableName = dict.getString(MaplyDrawableName); // Note: Porting // Uniforms to be passed to shader diff --git a/common/WhirlyGlobeLib/src/QuadImageFrameLoader.cpp b/common/WhirlyGlobeLib/src/QuadImageFrameLoader.cpp index bcd14bc429..e232885f3c 100644 --- a/common/WhirlyGlobeLib/src/QuadImageFrameLoader.cpp +++ b/common/WhirlyGlobeLib/src/QuadImageFrameLoader.cpp @@ -238,7 +238,8 @@ void QIFTileAsset::setupContents(QuadImageFrameLoader *loader, { std::vector drawIDs; drawIDs.reserve(loadedTile->drawInfo.size()); - for (const auto &di : loadedTile->drawInfo) { + for (const auto &di : loadedTile->drawInfo) + { int newDrawPriority = defaultDrawPriority; bool zBufferRead = false; bool zBufferWrite = true; @@ -257,9 +258,14 @@ void QIFTileAsset::setupContents(QuadImageFrameLoader *loader, zBufferRead = false; break; } - + + std::vector buf(256); + snprintf(&buf[0], buf.size() - 1, "MaplyQuadImageFrameLoader[%d:(%d,%d)-%d-%d]", + loadedTile->ident.level, loadedTile->ident.x, loadedTile->ident.y, + focusID, di.kind); + // Make a drawable instance to shadow the geometry - auto drawInst = loader->getController()->getRenderer()->makeBasicDrawableInstanceBuilder("MaplyQuadImageFrameLoader"); + auto drawInst = loader->getController()->getRenderer()->makeBasicDrawableInstanceBuilder(&buf[0]); drawInst->setMasterID(di.drawID, BasicDrawableInstance::ReuseStyle); drawInst->setTexId(0, EmptyIdentity); if (loader->getNumFrames() > 1) diff --git a/common/WhirlyGlobeLib/src/Scene.cpp b/common/WhirlyGlobeLib/src/Scene.cpp index 15ac8fb9e7..051726f22e 100644 --- a/common/WhirlyGlobeLib/src/Scene.cpp +++ b/common/WhirlyGlobeLib/src/Scene.cpp @@ -680,9 +680,11 @@ int Scene::retainZoomSlot() void Scene::releaseZoomSlot(int zoomSlot) { - std::lock_guard guardLock(zoomSlotLock); - - zoomSlots[zoomSlot] = MAXFLOAT; + if (0 <= zoomSlot && zoomSlot < MaplyMaxZoomSlots) + { + std::lock_guard guardLock(zoomSlotLock); + zoomSlots[zoomSlot] = MAXFLOAT; + } } void Scene::setZoomSlotValue(int zoomSlot,float zoom) diff --git a/common/WhirlyGlobeLib/src/SceneRenderer.cpp b/common/WhirlyGlobeLib/src/SceneRenderer.cpp index c1746ce946..00c7bdf1a9 100644 --- a/common/WhirlyGlobeLib/src/SceneRenderer.cpp +++ b/common/WhirlyGlobeLib/src/SceneRenderer.cpp @@ -17,6 +17,7 @@ */ #import "SceneRenderer.h" +#import "WhirlyKitLog.h" using namespace Eigen; @@ -25,16 +26,9 @@ namespace WhirlyKit // Compare two matrices float by float // The default comparison seems to have an epsilon and the cwise version isn't getting picked up -bool matrixAisSameAsB(Matrix4d &a,Matrix4d &b) +static bool matrixAisSameAsB(const Matrix4d &a,const Matrix4d &b) { - double *floatsA = a.data(); - double *floatsB = b.data(); - - for (unsigned int ii=0;ii<16;ii++) - if (floatsA[ii] != floatsB[ii]) - return false; - - return true; + return !memcmp(a.data(), b.data(), 16 * sizeof(Matrix4d::Scalar)); } WorkGroup::~WorkGroup() @@ -48,10 +42,11 @@ WorkGroup::~WorkGroup() } } -RenderTargetContainer::RenderTargetContainer(RenderTargetRef renderTarget) -: renderTarget(renderTarget), modified(true) +RenderTargetContainer::RenderTargetContainer(RenderTargetRef renderTarget) : + renderTarget(renderTarget), + modified(true) { - + } bool WorkGroup::addDrawable(DrawableRef drawable) @@ -300,6 +295,51 @@ void SceneRenderer::defaultTargetInit(RenderTarget *) void SceneRenderer::presentRender() { } +int SceneRenderer::retainZoomSlot(double minZoom, double maxHeight, double maxZoom, double minHeight) +{ + const int slot = scene ? scene->retainZoomSlot() : -1; + if (slot >= 0) + { + zoomSlotMap.insert(std::make_pair(slot, ZoomSlotInfo{ + .minZoom = minZoom, + .maxZoom = maxZoom, + .minHeight = minHeight, + .maxHeight = maxHeight, + })); + } + return slot; +} + +void SceneRenderer::updateZoomSlots() +{ + // Compute dynamic zoom slots + if (theView && scene) + { + const auto h = theView->heightAboveSurface(); + for (const auto &kvp : zoomSlotMap) + { + scene->setZoomSlotValue(kvp.first, (float)kvp.second.zoom(h)); + } + } +} + +void SceneRenderer::releaseZoomSlot(int slot) +{ + if (scene) + { + zoomSlotMap.erase(slot); + scene->releaseZoomSlot(slot); + } +} + +double SceneRenderer::ZoomSlotInfo::zoom(double height) const +{ + const auto dH = log(maxHeight) - log(minHeight); + const auto nH = log(std::max(height,1e-8)) - log(minHeight); + const auto z = minZoom + (maxZoom - minZoom) * (1.0 - ((dH != 0) ? nH/dH : 0)); + return std::max(0.0, z); +} + Point2f SceneRenderer::getFramebufferSize() const { return Point2f(framebufferWidth,framebufferHeight); diff --git a/common/WhirlyGlobeLib/src/VectorManager.cpp b/common/WhirlyGlobeLib/src/VectorManager.cpp index 5c2c9a1db5..22ab4e1a2d 100644 --- a/common/WhirlyGlobeLib/src/VectorManager.cpp +++ b/common/WhirlyGlobeLib/src/VectorManager.cpp @@ -156,8 +156,9 @@ class VectorDrawableBuilder // We're done with it, toss it to the scene if (drawable) flush(); - - drawable = sceneRender->makeBasicDrawableBuilder(vecBuilderName); + + const auto &name = vecInfo->drawableName.empty() ? vecBuilderName : vecInfo->drawableName; + drawable = sceneRender->makeBasicDrawableBuilder(name); drawMbr.reset(); drawable->setType(primType); vecInfo->setupBasicDrawable(drawable); diff --git a/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp b/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp index 523e8a1c78..fd1e8919ef 100644 --- a/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorDrawableBuilder.cpp @@ -100,12 +100,6 @@ void WideVectorDrawableBuilder::setLineOffset(float inOffset) lineOffsetSet = true; } -void WideVectorDrawableBuilder::setTexRepeat(float inTexRepeat) - { texRepeat = inTexRepeat; } - -void WideVectorDrawableBuilder::setEdgeSize(float inEdgeSize) - { edgeSize = inEdgeSize; } - unsigned int WideVectorDrawableBuilder::addPoint(const Point3f &pt) { #ifdef WIDEVECDEBUG @@ -230,13 +224,13 @@ void WideVectorDrawableBuilder::addCenterLine(const Point3d ¢erPt, int prev,int next) { CenterPoint pt; - pt.center = Point3f(centerPt.x(),centerPt.y(),centerPt.z()); - pt.up = Point3f(up.x(),up.y(),up.z()); + pt.center = centerPt.cast(); + pt.up = up.cast(); pt.segLen = (float)len; - pt.totalLen = (centerline.empty() ? 0.0f : centerline.back().totalLen) + pt.segLen; + pt.totalLen = centerline.empty() ? 0.0f : (centerline.back().totalLen + centerline.back().segLen); pt.color = inColor; pt.maskIDs[0] = maskIDs.empty() ? 0 : (int)maskIDs[0]; - pt.maskIDs[1] = maskIDs.size() > 1 ? (int)maskIDs[1] : 0; + pt.maskIDs[1] = (maskIDs.size() > 1) ? (int)maskIDs[1] : 0; pt.prev = prev; pt.next = next; centerline.push_back(pt); diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index 3fe3de2b3d..1a0d7b9e24 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -41,6 +41,10 @@ WideVectorInfo::WideVectorInfo(const Dictionary &dict) subdivEps = (float)dict.getDouble(MaplySubdivEpsilon,subdivEps); texID = dict.getInt(MaplyVecTexture,EmptyIdentity); repeatSize = (float)dict.getDouble(MaplyWideVecTexRepeatLen,repeatSize); + texOffset = { + (float)dict.getDouble(MaplyWideVecTexOffsetX,0.0), + (float)dict.getDouble(MaplyWideVecTexOffsetY,0.0), + }; edgeSize = (float)dict.getDouble(MaplyWideVecEdgeFalloff,edgeSize); miterLimit = (float)dict.getDouble(MaplyWideVecMiterLimit,miterLimit); @@ -55,11 +59,23 @@ WideVectorInfo::WideVectorInfo(const Dictionary &dict) else if (!coordTypeStr.compare(MaplyWideVecCoordTypeScreen)) coordType = WideVecCoordScreen; - // Note: Not supporting this right now - //const std::string jointTypeStr = dict.getString(MaplyWideVecJoinType); - //_joinType = (WhirlyKit::WideVectorLineJoinType)[desc enumForKey:@"wideveclinejointype" values:@[@"miter",@"round",@"bevel"] default:WideVecMiterJoin]; - //const std::string capTypeStr = dict.getString(MaplyWideVecCapType); - //_capType = (WhirlyKit::WideVectorLineCapType)[desc enumForKey:@"wideveclinecaptype" values:@[@"butt",@"round",@"square"] default:WideVecButtCap]; + if (const auto entry = dict.getEntry(MaplyWideVecJoinType)) + { + const auto s = entry->getString(); + if (s == MaplyWideVecMiterJoin) joinType = WideVecMiterJoin; + else if (s == MaplyWideVecMiterClipJoin) joinType = WideVecMiterClipJoin; + else if (s == MaplyWideVecBevelJoin) joinType = WideVecBevelJoin; + else if (s == MaplyWideVecRoundJoin) joinType = WideVecRoundJoin; + else joinType = WideVecNoneJoin; + } + + if (const auto entry = dict.getEntry(MaplyWideVecLineCapType)) + { + const auto s = entry->getString(); + if (s == MaplyWideVecButtCap) capType = WideVecButtCap; + else if (s == MaplyWideVecSquareCap) capType = WideVecSquareCap; + else if (s == MaplyWideVecRoundCap) capType = WideVecRoundCap; + } if (const auto entry = dict.getEntry(MaplyVecWidth)) { @@ -593,7 +609,7 @@ class WideVectorBuilder } } break; - case WideVecRoundJoin: + default: break; } } @@ -664,6 +680,9 @@ class WideVectorBuilder //,centerAdj; }; +static const std::string defDrawableName = "Wide Vector"; +static const std::string defDrawableNamePerf = "Performance Wide Vector"; + // Used to build up drawables struct WideVectorDrawableConstructor { @@ -699,6 +718,13 @@ struct WideVectorDrawableConstructor } } + void setDrawableName(const char *name) { + setDrawableName(name ? std::string(name) : std::string()); + } + void setDrawableName(std::string n) { + drawableName = std::move(n); + } + // Build or return a suitable drawable (depending on the mode) WideVectorDrawableBuilderRef getDrawable(int ptCount,int triCount, int ptCountAllocate,int triCountAllocate, @@ -711,27 +737,31 @@ struct WideVectorDrawableConstructor { flush(); - auto wideDrawable = sceneRender->makeWideVectorDrawableBuilder("Wide Vector"); + const auto &name = drawableName.empty() ? defDrawableNamePerf : drawableName; + auto wideDrawable = sceneRender->makeWideVectorDrawableBuilder(name); wideDrawable->Init(ptCountAllocate,triCountAllocate,clineCount, vecInfo->implType, !scene->getCoordAdapter()->isFlat(), vecInfo); drawable = wideDrawable; wideDrawable->setTexRepeat(vecInfo->repeatSize); + wideDrawable->setTexOffset(vecInfo->texOffset); wideDrawable->setEdgeSize(vecInfo->edgeSize); wideDrawable->setLineWidth(vecInfo->width); wideDrawable->setLineOffset(vecInfo->offset); - if (vecInfo->widthExp) - wideDrawable->setWidthExpression(vecInfo->widthExp); - if (vecInfo->opacityExp) - wideDrawable->setOpacityExpression(vecInfo->opacityExp); - if (vecInfo->colorExp) - wideDrawable->setColorExpression(vecInfo->colorExp); - if (vecInfo->offsetExp) - wideDrawable->setOffsetExpression(vecInfo->offsetExp); + wideDrawable->setLineJoin(vecInfo->joinType); + wideDrawable->setLineCap(vecInfo->capType); + wideDrawable->setMiterLimit(vecInfo->miterLimit); + wideDrawable->setWidthExpression(vecInfo->widthExp); + wideDrawable->setOpacityExpression(vecInfo->opacityExp); + wideDrawable->setColorExpression(vecInfo->colorExp); + wideDrawable->setOffsetExpression(vecInfo->offsetExp); + maskEntries.resize(numMaskIDs); for (unsigned int ii=0;iiaddAttribute(BDIntType, a_maskNameIDs[ii], sceneRender->getSlotForNameID(a_maskNameIDs[ii]), ptCount); + } drawable->setColor(vecInfo->color); if (doColors) @@ -741,7 +771,10 @@ struct WideVectorDrawableConstructor int baseTexId = 0; if (vecInfo->texID != EmptyIdentity) + { drawable->setTexId(baseTexId++, vecInfo->texID); + } + if (centerValid) { Eigen::Affine3d trans(Eigen::Translation3d(dispCenter.x(),dispCenter.y(),dispCenter.z())); @@ -751,8 +784,8 @@ struct WideVectorDrawableConstructor } } else { // Basic mode builds up a lot more geometry - int ptGuess = std::min(std::max(ptCount,0),(int)MaxDrawablePoints); - int triGuess = std::min(std::max(triCount,0),(int)MaxDrawableTriangles); + const int ptGuess = std::min(std::max(ptCount,0),(int)MaxDrawablePoints); + const int triGuess = std::min(std::max(triCount,0),(int)MaxDrawableTriangles); if (!drawable || (drawable->getNumPoints()+ptGuess > MaxDrawablePoints) || @@ -761,9 +794,10 @@ struct WideVectorDrawableConstructor flush(); // NSLog(@"Pts = %d, tris = %d",ptGuess,triGuess); - int ptAlloc = std::min(std::max(ptCountAllocate,0),(int)MaxDrawablePoints); - int triAlloc = std::min(std::max(triCountAllocate,0),(int)MaxDrawableTriangles); - WideVectorDrawableBuilderRef wideDrawable = sceneRender->makeWideVectorDrawableBuilder("Wide Vector"); + const int ptAlloc = std::min(std::max(ptCountAllocate,0),(int)MaxDrawablePoints); + const int triAlloc = std::min(std::max(triCountAllocate,0),(int)MaxDrawableTriangles); + const auto &name = drawableName.empty() ? defDrawableName : drawableName; + WideVectorDrawableBuilderRef wideDrawable = sceneRender->makeWideVectorDrawableBuilder(name); wideDrawable->Init(ptAlloc,triAlloc,0, vecInfo->implType, !scene->getCoordAdapter()->isFlat(), @@ -841,30 +875,43 @@ struct WideVectorDrawableConstructor // 8 points and 6 triangles. // Many of the points can't be shared because the end caps // will be handled differently by the fragment shader - - // End cap: vertices [0,3], polygon 0 - drawable->addInstancePoint(Point3f(0,0,0),0,0); - drawable->addInstancePoint(Point3f(0,0,0),1,0); - drawable->addInstancePoint(Point3f(0,0,0),2,0); - drawable->addInstancePoint(Point3f(0,0,0),3,0); - drawable->addTriangle(BasicDrawable::Triangle(0,3,1)); - drawable->addTriangle(BasicDrawable::Triangle(0,2,3)); + + // Caps are needed for miter becasue it can turn into a bevel. + const bool emitCaps = (drawable->getLineJoin() != WideVectorLineJoinType::WideVecNoneJoin); + + int base = 0; + int pt = 0; + if (emitCaps) + { + base = 4; + // End cap: vertices [0,3], polygon 0 + drawable->addInstancePoint({0,0,0},0,0); + drawable->addInstancePoint({0,0,0},1,0); + drawable->addInstancePoint({0,0,0},2,0); + drawable->addInstancePoint({0,0,0},3,0); + drawable->addTriangle(BasicDrawable::Triangle(0,3,1)); + drawable->addTriangle(BasicDrawable::Triangle(0,2,3)); + } // Middle segment: vertices [4,7], polygon 1 - drawable->addInstancePoint(Point3f(0,0,0),4,1); - drawable->addInstancePoint(Point3f(0,0,0),5,1); - drawable->addInstancePoint(Point3f(0,0,0),6,1); - drawable->addInstancePoint(Point3f(0,0,0),7,1); - drawable->addTriangle(BasicDrawable::Triangle(4,7,5)); - drawable->addTriangle(BasicDrawable::Triangle(4,6,7)); - - // End cap: vertices [8,11], polygon 2 - drawable->addInstancePoint(Point3f(0,0,0),8,2); - drawable->addInstancePoint(Point3f(0,0,0),9,2); - drawable->addInstancePoint(Point3f(0,0,0),10,2); - drawable->addInstancePoint(Point3f(0,0,0),11,2); - drawable->addTriangle(BasicDrawable::Triangle(8,11,9)); - drawable->addTriangle(BasicDrawable::Triangle(8,10,11)); + drawable->addInstancePoint({0,0,0},4,1); + drawable->addInstancePoint({0,0,0},5,1); + drawable->addInstancePoint({0,0,0},6,1); + drawable->addInstancePoint({0,0,0},7,1); + drawable->addTriangle(BasicDrawable::Triangle(base+0,base+3,base+1)); + drawable->addTriangle(BasicDrawable::Triangle(base+0,base+2,base+3)); + + if (emitCaps) + { + base += 4; + // End cap: vertices [8,11], polygon 2 + drawable->addInstancePoint({0,0,0},8,2); + drawable->addInstancePoint({0,0,0},9,2); + drawable->addInstancePoint({0,0,0},10,2); + drawable->addInstancePoint({0,0,0},11,2); + drawable->addTriangle(BasicDrawable::Triangle(base+0,base+3,base+1)); + drawable->addTriangle(BasicDrawable::Triangle(base+0,base+2,base+3)); + } } // Run through the points, adding centerline instances @@ -1054,6 +1101,7 @@ struct WideVectorDrawableConstructor const WideVectorInfo *vecInfo; WideVectorDrawableBuilderRef drawable = nullptr; std::vector drawables; + std::string drawableName; }; void WideVectorSceneRep::enableContents(bool enable,ChangeSet &changes) @@ -1125,6 +1173,7 @@ SimpleIdentity WideVectorManager::addVectors(const std::vector & builder.setCenter(localCenter,centerDisp); builder.setColor(vecInfo.color); + builder.setDrawableName(vecInfo.drawableName); VectorRing tempLoop; for (const auto &shape : shapes) diff --git a/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift index b6d896bb30..d87cf326dc 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/AirwayTestCase.swift @@ -48,7 +48,7 @@ class AirwayTestCase: MaplyTestCase { let buildPointMarkers = true let buildPointLabels = false - let buildAirways = false + let buildAirways = true let buildAirspaces = true let buildLineLabels = false let buildCenterLabels = false diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h index 20e87cca7f..27ff60a7de 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.h @@ -37,6 +37,4 @@ - (void)overlap:(MaplyBaseViewController *)viewC; -- (void)exprs:(MaplyBaseViewController *)viewC withLoader:(MaplyQuadLoaderBase*)loader perf:(bool)perf; - @end diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm index 380173fde9..69ad71947a 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.mm @@ -330,54 +330,4 @@ - (void)overlap:(MaplyBaseViewController *)viewC { } } -- (void) exprs:(MaplyBaseViewController *)viewC withLoader:(MaplyQuadLoaderBase*)loader perf:(bool)perf { - - const MaplyCoordinate coords[] = { - MaplyCoordinateMakeWithDegrees(-100, 60 + (perf?0:2)), - MaplyCoordinateMakeWithDegrees(-110, 61 + (perf?0:2)), - MaplyCoordinateMakeWithDegrees(-120, 62 + (perf?0:2)), - }; - - MaplyVectorObject *vecObj = [[MaplyVectorObject alloc] initWithLineString:&coords[0] - numCoords:sizeof(coords)/sizeof(coords[0]) - attributes:nil]; - [vecObj subdivideToGlobe:0.0001]; - - NSMutableArray *objs = [NSMutableArray array]; - [objs addObject:vecObj]; - - NSDictionary *desc = @{ - kMaplyColor: [UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:1.0], - kMaplyEnable: @YES, - kMaplyDrawPriority: @(kMaplyVectorDrawPriorityDefault + 2), - }; - - // Note that for GeographyClass, this loader only does zoom levels 0-6 - const int slot = [loader getZoomSlot]; - - UIColor *c1 = [UIColor colorWithRed:1.0 green:0.0 blue:1.0 alpha:0.8]; - UIColor *c2 = [UIColor colorWithRed:0.0 green:0.0 blue:1.0 alpha:0.8]; - NSDictionary *wideDesc = [desc dictionaryByMergingWith:@{ - kMaplyDrawPriority: @(kMaplyVectorDrawPriorityDefault + 1), - kMaplyWideVecEdgeFalloff: @(1), - kMaplyZoomSlot: @(slot), - kMaplyVecWidth: @{@"stops":@[@[@2,@1],@[@6,@20]]}, - kMaplyWideVecOffset: @{@"stops":@[@[@2,@-20],@[@6,@20]]}, - kMaplyOpacity: @{@"stops":@[@[@2,@0.2],@[@6,@0.9]]}, - kMaplyColor: @{@"stops":@[@[@2,c1],@[@6,c2]]}, - kMaplyShader: perf ? kMaplyShaderWideVectorPerformance : kMaplyShaderWideVectorExp, - kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, - }]; - - NSMutableArray *cos = [NSMutableArray new]; - if (MaplyComponentObject *co = [viewC addVectors:objs desc:desc mode:MaplyThreadCurrent]) - { - [cos addObject:co]; - } - if (MaplyComponentObject *co = [viewC addWideVectors:objs desc:wideDesc mode:MaplyThreadCurrent]) - { - [cos addObject:co]; - } -} - @end diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index ef276d1ccf..09de49d3b2 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -14,37 +14,43 @@ class WideVectorsTestCase : WideVectorsTestCaseBase super.init(name: "Wide Vectors", supporting: [.map, .globe]) } - private func joins(_ vc: MaplyBaseViewController, join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject] { - let lat = Float(30.0) + (perf ? 2.0 : 0.0) + (subdiv ? 4.0 : 0.0) + (close ? 8.0 : 0.0) - let lon = Float(-140.0) + Float(join) * 3.0 + private func joins(_ vc: MaplyBaseViewController, + bound: MaplyBoundingBox, + join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject?] { + + let vsep = 2.5; + let lat = Float(30.0 + (perf ? 4*vsep : 0.0) + (subdiv ? 2*vsep : 0.0) + (close ? vsep : 0.0)) + let lon = Float(-140.0) + Float(join) * 3.5 var coords = [ MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), - MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + Float(joinN) / 100.0), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.5 * Float(joinN) / Float(joinSteps)), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + -0.5 * Float(joinN) / Float(joinSteps)), MaplyCoordinateMakeWithDegrees(lon + 2.0, lat), - MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + MaplyCoordinateMakeWithDegrees(lon + (close ? 0.0 : 2.0), lat), ] - let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count - (close ? 0 : 1))) + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + + if !isVisible(vecObj.boundingBox(), ext: bound) { + return [] + } if (subdiv) { - if vc is WhirlyGlobeViewController { - vecObj.subdivide(toGlobeGreatCircle: 0.0001) - } else { - vecObj.subdivide(toFlatGreatCircle: 0.0001) - } + self.subdiv(vc, vecObj, 0.0001) } let desc = [ - kMaplyVecWidth: 20.0, - kMaplyColor: UIColor.red.withAlphaComponent(0.5), + kMaplyVecWidth: 40.0, + kMaplyColor: perf ? UIColor.red.withAlphaComponent(0.35) : UIColor.blue.withAlphaComponent(0.35), kMaplyEnable: false, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, - kMaplyWideVecJoinType: joinAttr(join) ?? NSNull() + kMaplyWideVecJoinType: joinAttr(join) ?? NSNull(), + kMaplyDrawableName: String(format: "WideVec-%@%@%@%@", + joinAttr(join) ?? "", perf ? "-perf" : "", + subdiv ? "-subdiv" : "", close ? "-closed" : "") ] as [AnyHashable: Any] - let co = vc.addWideVectors([vecObj], desc: desc, mode: .current) - let lblDesc = [ kMaplyTextColor: UIColor.magenta, kMaplyEnable: false, @@ -53,21 +59,51 @@ class WideVectorsTestCase : WideVectorsTestCaseBase ] as [AnyHashable: Any] let lbl = MaplyScreenLabel() lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) - lbl.text = String(format: "%@ p=%d s=%d", joinAttr(join) ?? "", perf, subdiv) - let lco = vc.addScreenLabels([lbl], desc: lblDesc, mode: .current) + lbl.text = String(format: "%@%@%@%@", + joinAttr(join) ?? "", perf ? "\nperf" : "", + subdiv ? "\nsubdiv" : "", close ? "\nclosed" : "") - return [co, lco].compactMap { $0 } + return [ + vc.addWideVectors([vecObj], desc: desc, mode: .current), + vc.addScreenLabels([lbl], desc: lblDesc, mode: .current) + ] } private func joinAttr(_ n: Int) -> String? { switch (n) { - case 0: return kMaplyWideVecBevelJoin; - case 1: return kMaplyWideVecMiterJoin; + case 0: return kMaplyWideVecMiterJoin; + case 1: return kMaplyWideVecMiterClipJoin; + case 2: return kMaplyWideVecRoundJoin; + case 3: return kMaplyWideVecBevelJoin; + case 4: return kMaplyWideVecNoneJoin; default: return nil } } - private func texs(_ vc: MaplyBaseViewController, perf: Bool) -> [MaplyComponentObject] { + private func joins(_ vc: MaplyBaseViewController, + bound: MaplyBoundingBox) -> [MaplyComponentObject?] { + + let yn = [ true, false ] + let objs = (0..<5).flatMap { join in + yn.flatMap { perf in + yn.flatMap { close in + yn.flatMap { subdiv in + joins(vc, bound: bound, join: join, perf: perf, close: close, subdiv: subdiv) + } + } + } + } + + joinN += joinD + if (joinN > joinSteps || joinN < -joinSteps) { + joinD = -joinD + joinN += joinD + } + + return objs + } + + private func initTex(_ vc: MaplyBaseViewController) { if dashTex == nil { let b = MaplyLinearTextureBuilder() b.setPattern([1, 1]) @@ -79,94 +115,259 @@ class WideVectorsTestCase : WideVectorsTestCaseBase dashTex = vc.addTexture(img, desc: desc, mode: .current) } } + } + + private func texs(_ vc: MaplyBaseViewController, + bound: MaplyBoundingBox, + slot: Int32, perf: Bool) -> [MaplyComponentObject?] { + initTex(vc); - let lat = Float(30.0) + (perf ? 2.0 : 0.0) - let lon = Float(-150.0) + // Note vary in lon rather than lat so that they are projected identically. + let lat = Float(30.0) + let lon = Float(-150.0) + (perf ? 3.0 : 0.0) var coords = [ MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.0), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 0.5), MaplyCoordinateMakeWithDegrees(lon + 2.0, lat), MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), ] let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) - if vc is WhirlyGlobeViewController { - vecObj.subdivide(toGlobeGreatCircle: 0.0001) - } else { - vecObj.subdivide(toFlatGreatCircle: 0.0001) + if !isVisible(vecObj.boundingBox(), ext: bound) { + return [] } - let desc = [ - kMaplyVecWidth: 20.0, - kMaplyColor: UIColor.red.withAlphaComponent(0.5), + subdiv(vc, vecObj, 0.0001) + + let wideDesc = [ + kMaplyZoomSlot: slot, + kMaplyVecWidth: perf ? ["stops":[[5,3],[12,50]]] : 50, + kMaplyColor: ["stops":[[0,UIColor.blue.withAlphaComponent(0.75)],[6,UIColor.red.withAlphaComponent(0.75)]]], kMaplyEnable: true, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, - kMaplyWideVecJoinType: kMaplyWideVecBevelJoin, - kMaplyVecTexture: dashTex ?? NSNull() + kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, + kMaplyVecTexture: dashTex ?? NSNull(), + kMaplyWideVecTexRepeatLen: 64, + kMaplyWideVecOffset: 0, + kMaplyWideVecTexOffsetX: 0.0, + kMaplyWideVecTexOffsetY: 0.1 * Double(texY), + kMaplyTexWrapX: true, + kMaplyTexWrapY: true, + ] as [AnyHashable: Any] + + let lblDesc = [ + kMaplyTextColor: UIColor.magenta, + kMaplyEnable: false, + kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, ] as [AnyHashable: Any] + let lbl = MaplyScreenLabel() + lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) + lbl.text = String(format: "tex perf=%d", perf) - let co = vc.addWideVectors([vecObj], desc: desc, mode: .current) + texY += 1 - return [co].compactMap { $0 } + return [ + vc.addWideVectors([vecObj], desc: wideDesc, mode: .current), + vc.addScreenLabels([lbl], desc: lblDesc, mode: .current), + ] } - private func joins(_ vc: MaplyBaseViewController, add: Bool = true) { - let oldObjs = joinObjs - joinObjs.removeAll() - - if (add) { - let yn = [ true, false ] - (0..<2).forEach { join in - yn.forEach { perf in - yn.forEach { close in - yn.forEach { subdiv in - joinObjs.append(contentsOf: joins(vc, join: join, perf: perf, close: close, subdiv: subdiv)) - } - } - } - } - vc.enable(joinObjs, mode: .current) + private func offset(_ vc: MaplyBaseViewController, slot: Int32, perf: Bool) -> [MaplyComponentObject?] { + initTex(vc); + + // Note vary in lon rather than lat so that they are projected identically. + let lat = Float(32.0) + let lon = Float(-150.0) + (perf ? 3.0 : 0.0) + var coords = [ + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.0), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 0.5), + MaplyCoordinateMakeWithDegrees(lon + 2.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + + subdiv(vc, vecObj, 0.0001) + + // Baseline with no offset + let wideDesc = [ + kMaplyZoomSlot: slot, + kMaplyVecWidth: perf ? ["stops":[[5,3],[15,60]]] : 50, + kMaplyColor: UIColor.red.withAlphaComponent(0.2), + kMaplyEnable: true, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, + kMaplyVecTexture: dashTex ?? NSNull(), + kMaplyWideVecTexRepeatLen: 64, + kMaplyWideVecOffset: 0, + ] as [AnyHashable: Any] + + // Offset line + let wideDescOffs = wideDesc.merging([ + kMaplyColor: UIColor.blue.withAlphaComponent(0.6), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 2, + kMaplyWideVecOffset: perf ? ["stops":[[8,0],[10,-70],[12,70]]] : 5, + ], uniquingKeysWith: { (a,b) in b }) + + // Centerline + let desc = [ + kMaplyColor: UIColor.green.withAlphaComponent(0.5), + kMaplyEnable: true, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 3, + ] as [AnyHashable: Any] + + let lblDesc = [ + kMaplyTextColor: UIColor.magenta, + kMaplyEnable: true, + kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, + ] as [AnyHashable: Any] + let lbl = MaplyScreenLabel() + lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) + lbl.text = String(format: "offset perf=%d", perf) + lbl.layoutImportance = MAXFLOAT + + return [ + vc.addWideVectors([vecObj], desc: wideDesc, mode: .current), + vc.addWideVectors([vecObj], desc: wideDescOffs, mode: .current), + vc.addVectors([vecObj], desc: desc, mode: .current), + vc.addScreenLabels([lbl], desc: lblDesc, mode: .current), + ] + } + + private func exprs(_ vc: MaplyBaseViewController, slot: Int32, perf: Bool) -> [MaplyComponentObject?] { + var coords = [ + MaplyCoordinateMakeWithDegrees(-130 + (perf ? 0 : 30), 60), + MaplyCoordinateMakeWithDegrees(-140 + (perf ? 0 : 30), 61), + MaplyCoordinateMakeWithDegrees(-150 + (perf ? 0 : 30), 62), + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + subdiv(vc, vecObj, 0.0001) + + let desc = [ + kMaplyColor: UIColor.red, + kMaplyEnable: true, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 2, + ] as [AnyHashable: Any]; + + let c1 = UIColor.magenta.withAlphaComponent(0.8) + let c2 = UIColor.blue.withAlphaComponent(0.8) + let wideDesc = [ + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, + kMaplyWideVecEdgeFalloff: 1, + kMaplyZoomSlot: slot, + kMaplyVecWidth: perf ? ["stops":[[2,2],[12,20]]] : 20, + kMaplyWideVecOffset: perf ? ["stops":[[2,-20],[6,20]]] : 20, + kMaplyOpacity: ["stops":[[2,0.2],[12,0.9]]], + kMaplyColor: ["stops":[[2,c1],[12,c2]]], + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + ] as [AnyHashable: Any] + + return [ + vc.addVectors([vecObj], desc: desc, mode: .current), + vc.addWideVectors([vecObj], desc: wideDesc, mode: .current) + ] + } + + private func isVisible(_ box: MaplyBoundingBox, ext: MaplyBoundingBox) -> Bool { + return (ext.ll.x == ext.ur.x) || MaplyBoundingBoxesOverlap(box, ext) + } + + private func curBound(_ vc: MaplyBaseViewController) -> MaplyBoundingBox { + if let gv = (vc as? WhirlyGlobeViewController) { + return gv.getCurrentExtents() + } else if let mv = (vc as? MaplyViewController) { + return mv.getCurrentExtents() } - vc.remove(oldObjs, mode: .current) + return kMaplyNullBoundingBox; + } - joinN += joinD - if (joinN > 100 || joinN < -100) { - joinD = -joinD - joinN += joinD + private func isVisible(_ vc: MaplyBaseViewController, _ box: MaplyBoundingBox) -> Bool { + return isVisible(box, ext: curBound(vc)) + } + + private func subdiv(_ vc: MaplyBaseViewController, _ obj: MaplyVectorObject, _ e: Float) { + if vc is WhirlyGlobeViewController { + obj.subdivide(toGlobeGreatCircle: e) + } else { + obj.subdivide(toFlatGreatCircle: e) } } + private func addBox(_ vc: MaplyBaseViewController, _ box: MaplyBoundingBox) -> [MaplyComponentObject?] { + var coords: [MaplyCoordinate] = [ + box.ll, + MaplyCoordinateMake(box.ur.x, box.ll.y), + box.ur, + MaplyCoordinateMake(box.ll.x, box.ur.y), + box.ll, + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + subdiv(vc, vecObj, 0.01) + + let desc = [ + kMaplyColor: UIColor.red.withAlphaComponent(0.5), + kMaplyEnable: false, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, + ] as [AnyHashable: Any]; + + return [ vc.addVectors([vecObj], desc: desc, mode: .current) ] + } + + private func timerTick(_ vc: MaplyBaseViewController) { + let oldObjs = timerObjs + timerObjs.removeAll() + + let curBound = curBound(vc) + + timerObjs.append(contentsOf: joins(vc, bound: curBound).compactMap { $0 }) + + if let slot = zoomSlot { + timerObjs.append(contentsOf: [true, false].flatMap { + texs(vc, bound: curBound, slot: slot, perf: $0) + }.compactMap { $0 }) + } + vc.enable(timerObjs, mode: .current) + vc.remove(oldObjs, mode: .current) + } + private func wideLineTest(_ vc: MaplyBaseViewController) { - addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); - addGeoJson("moving-lawn.geojson", viewC: vc); - addGeoJson("spiral.geojson", viewC: vc); - addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); - addGeoJson("track.geojson", viewC: vc); - //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); - - addGeoJson("USA.geojson", viewC:vc); - - //addGeoJson("testJson.json", viewC:vc); - //addGeoJson("straight.geojson", viewC:vc); - //addGeoJson("uturn.geojson", viewC:vc); - - overlap(vc); - vecColors(vc); - objs.append(contentsOf: texs(vc, perf: false)) - objs.append(contentsOf: texs(vc, perf: true)) - - // Dynamic properties require a zoom slot, which may not be set up yet - baseCase.getLoader()?.addPostInitBlock { [weak self] in - guard let self = self, let loader = self.baseCase.getLoader() else { return } - self.exprs(vc, withLoader: loader, perf: false) - self.exprs(vc, withLoader: loader, perf: true) + if zoomSlot == nil { + zoomSlot = baseViewController?.retainZoomSlotMinZoom(0, maxHeight: 2, maxZoom: 20, minHeight: 0.001); } - joinTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in - if let self = self { - self.joins(vc) +// addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); +// addGeoJson("moving-lawn.geojson", viewC: vc); +// addGeoJson("spiral.geojson", viewC: vc); +// addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); +// addGeoJson("track.geojson", viewC: vc); +// //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); +// addGeoJson("USA.geojson", viewC:vc); +// //addGeoJson("testJson.json", viewC:vc); +// //addGeoJson("straight.geojson", viewC:vc); +// //addGeoJson("uturn.geojson", viewC:vc); +// +// overlap(vc); +// vecColors(vc); + + if let slot = zoomSlot { + self.objs.append(contentsOf: [true, false].flatMap { + offset(vc, slot: slot, perf: $0) + + exprs(vc, slot: slot, perf: $0) + }.compactMap { $0 }) + } + + joinTimer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { [weak self] _ in + if let vc = self?.baseViewController { + self?.timerTick(vc) } } } @@ -174,40 +375,51 @@ class WideVectorsTestCase : WideVectorsTestCaseBase override func setUpWithGlobe(_ vc: WhirlyGlobeViewController) { baseCase.setUpWithGlobe(vc) wideLineTest(vc) - loadShapeFile(vc) + //loadShapeFile(vc) vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-100.0, 40.0), height: 1.0, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-148.0, 32.0), height: 0.03, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 39.0), height: 0.25, heading: 0.0, time: 0.1) //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } override func setUpWithMap(_ vc: MaplyViewController) { baseCase.setUpWithMap(vc) wideLineTest(vc) - loadShapeFile(vc) + //loadShapeFile(vc) vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-100.0, 40.0), height: 1.0, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-148.0, 32.0), height: 0.03, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 39.0), height: 0.25, heading: 0.0, time: 0.1) //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } override func stop() { joinTimer?.invalidate() if let vc = baseViewController { - joins(vc, add: false); - - vc.remove(objs, mode: .current) + vc.remove(objs + timerObjs, mode: .current) objs.removeAll() + timerObjs.removeAll() if let tex = dashTex { vc.remove(tex, mode: .current) dashTex = nil } + + if let slot = zoomSlot { + vc.releaseZoomSlotIndex(slot) + zoomSlot = nil + } } baseCase.stop() } + private var zoomSlot: Int32? private var dashTex: MaplyTexture? private var objs = [MaplyComponentObject]() private var joinTimer: Timer? - private var joinObjs = [MaplyComponentObject]() - private var joinN = 0 + private var timerObjs = [MaplyComponentObject]() + private var texY = 0 + private var joinN = 15 private var joinD = 1 + private let joinSteps = 30 private let baseCase = GeographyClassTestCase() } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h index bdaf6b8cf1..f2e3a6fe18 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h @@ -243,29 +243,30 @@ extern NSString * const _Nonnull kMaplyWideVecImplPerf; /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty extern NSString * const _Nonnull kMaplyWideVecJoinType; -/// Widened vectors are joined with miters +/// Widened vectors are joined with miters (fall back on bevel) extern NSString * const _Nonnull kMaplyWideVecMiterJoin; -// Note: Not yet implemented +/// Widened vectors are joined with miters (clip on exceeding miter-limit) +extern NSString * const _Nonnull kMaplyWideVecMiterClipJoin; /// Widened vectors are joined with a curve -//extern NSString * const _Nonnull kMaplyWideVecRoundJoin @"round" +extern NSString * const _Nonnull kMaplyWideVecRoundJoin; /// Widened vectors are joined with a bevel extern NSString * const _Nonnull kMaplyWideVecBevelJoin; +/// None +extern NSString * const _Nonnull kMaplyWideVecNoneJoin; /// Number of pixels to use in blending the edges of the wide vectors extern NSString * const _Nonnull kMaplyWideVecEdgeFalloff; /// For wide vectors we can control the ends /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty -//extern NSString * const _Nonnull kMaplyWideVecLineCapType @"wideveclinecaptype" - -// Note: These are not currently implemented +extern NSString * const _Nonnull kMaplyWideVecLineCapType; /// Widened vector ends are flush -//extern NSString * const _Nonnull kMaplyWideVecButtCap; +extern NSString * const _Nonnull kMaplyWideVecButtCap; /// Widened vector ends are round (e.g. hot dog roads) -//extern NSString * const _Nonnull kMaplyWideVecRoundCap; +extern NSString * const _Nonnull kMaplyWideVecRoundCap; /// Widened vector ends are extended a bit and then flush -//extern NSString * const _Nonnull kMaplyWideVecSquareCap; +extern NSString * const _Nonnull kMaplyWideVecSquareCap; /// Miter joins will turn to bevel joins past this number of degrees extern NSString * const _Nonnull kMaplyWideVecMiterLimit; @@ -274,6 +275,10 @@ extern NSString * const _Nonnull kMaplyWideVecMiterLimit; /// It's real world coordinates for kMaplyWideVecCoordTypeReal and pixel size for kMaplyWideVecCoordTypeScreen extern NSString * const _Nonnull kMaplyWideVecTexRepeatLen; +/// Initial texture coordinates +extern NSString * const _Nonnull kMaplyWideVecTexOffsetX; +extern NSString * const _Nonnull kMaplyWideVecTexOffsetY; + /// Offset to left (negative) or right (positive) of the centerline extern NSString * const _Nonnull kMaplyWideVecOffset; @@ -297,6 +302,9 @@ extern NSString * const _Nonnull kMaplySubdivGrid; /// Used to turn off selection in vectors extern NSString * const _Nonnull kMaplySelectable; +/// Attach a name to the generated drawable(s) for debugging purposes +extern NSString * const _Nonnull kMaplyDrawableName; + /// These are used for stickers /// Sampling size along one dimension diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h index 77e5ef3420..40f74504fb 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyBaseViewController.h @@ -1579,4 +1579,13 @@ typedef void (__strong ^InitCompletionBlock)(void); */ - (void)addPostInitBlock:(_Nonnull InitCompletionBlock)block; +/// Set up a zoom slot that doesn't depend on a loader +- (int)retainZoomSlotMinZoom:(double)minZoom + maxHeight:(double)maxHeight + maxZoom:(double)maxZoom + minHeight:(double)minHeight; + +/// Release a zoom slot previously retained +- (void)releaseZoomSlotIndex:(int)index; + @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h index ce54303a8b..e99f7d8695 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/control/MaplyRenderController.h @@ -392,7 +392,7 @@ typedef NS_ENUM(NSInteger, MaplyRenderType) { |:--|:---|:----------| |kMaplyColor|UIColor|Color we'll use for the features.| |kMaplyVecWidth|NSNumber|If the geometry is not filled, this is the width of the lines.| - |kMaplyWideVecCoordType|NSNumber|Vectors can be widened in real coordinates (kMaplyWideVecCoordTypeReal) or screen coordinates (kMaplyWideVecCoordTypeScreen). In the latter case they stay the same size now matter how you zoom.| + |kMaplyWideVecCoordType|NSNumber|Vectors can be widened in real coordinates (kMaplyWideVecCoordTypeReal) or screen coordinates (kMaplyWideVecCoordTypeScreen). In the latter case they stay the same size now matter how you zoom. |kMaplyWideVecJoinType|NSNumber|When lines meet in a join there are several options for representing them. These include kMaplyWideVecMiterJoin, which is a simple miter join and kMaplyWideVecBevelJoin which is a more complicated bevel. See http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty for how these look.| |kMaplyWideVecMiterLimit|NSNumber|When using miter joins you can trigger them at a certain threshold.| |kMaplyWideVecTexRepeatLen|NSNumber|This is the repeat size for a texture applied along the widened line. For kMaplyWideVecCoordTypeScreen this is pixels.| @@ -870,6 +870,15 @@ typedef NS_ENUM(NSInteger, MaplyRenderType) { ofUUIDs:(NSArray *__nonnull)uuids mode:(MaplyThreadMode)threadMode; +/// Set up a zoom slot that doesn't depend on a loader +- (int)retainZoomSlotMinZoom:(double)minZoom + maxHeight:(double)maxHeight + maxZoom:(double)maxZoom + minHeight:(double)minHeight; + +/// Release a zoom slot previously retained +- (void)releaseZoomSlotIndex:(int)index; + /** Pass a uniform block through to a shader. Only for Metal. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm index 2384d4b654..d4138ecd3d 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm @@ -1705,4 +1705,24 @@ - (void)addPostInitBlock:(_Nonnull InitCompletionBlock)block } } +- (int)retainZoomSlotMinZoom:(double)minZoom + maxHeight:(double)maxHeight + maxZoom:(double)maxZoom + minHeight:(double)minHeight +{ + if (const auto render = renderControl ? renderControl->sceneRenderer : nullptr) + { + return render->retainZoomSlot(minZoom, maxHeight, maxZoom, minHeight); + } + return -1; +} + +- (void)releaseZoomSlotIndex:(int)index +{ + if (const auto render = renderControl ? renderControl->sceneRenderer : nullptr) + { + render->releaseZoomSlot(index); + } +} + @end diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm index 0c977cf7a4..97d0e85a08 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyRenderController.mm @@ -828,6 +828,22 @@ - (void)setRepresentation:(NSString * _Nullable)repName } } +- (int)retainZoomSlotMinZoom:(double)minZoom + maxHeight:(double)maxHeight + maxZoom:(double)maxZoom + minHeight:(double)minHeight +{ + return sceneRenderer ? sceneRenderer->retainZoomSlot(minZoom, maxHeight, maxZoom, minHeight) : -1; +} + +- (void)releaseZoomSlotIndex:(int)index +{ + if (sceneRenderer) + { + sceneRenderer->releaseZoomSlot(index); + } +} + - (void)setUniformBlock:(NSData *__nonnull)uniBlock buffer:(int)bufferID forObjects:(NSArray *__nonnull)compObjs mode:(MaplyThreadMode)threadMode { if (auto wr = WorkRegion(interactLayer)) { diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm index 6621a0be66..9711c2548e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm @@ -137,8 +137,8 @@ NSString* const kMaplyTextLineSpacing = MaplyTextLineHeight; /// If outline is being used, we can control the stroke size NSString* const kMaplyTextOutlineColor = MaplyTextOutlineColor; -NSString* const kMaplyTexSizeX = @"texsizex"; -NSString* const kMaplyTexSizeY = @"texsizey"; +WKDefineConst(TexSizeX) +WKDefineConst(TexSizeY) NSString* const kMaplyTextJustify = MaplyTextJustify; NSString* const kMaplyTextJustifyRight = MaplyTextJustifyRight; NSString* const kMaplyTextJustifyLeft = MaplyTextJustifyLeft; @@ -204,31 +204,32 @@ /// For wide vectors we can control the line joins /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty -NSString* const kMaplyWideVecJoinType = MaplyWideVecJoinType; +WKDefineConst(WideVecJoinType) /// Widened vectors are joined with miters -NSString* const kMaplyWideVecMiterJoin = MaplyWideVecMiterJoin; +WKDefineConst(WideVecMiterJoin) +WKDefineConst(WideVecMiterClipJoin) // Note: Not yet implemented /// Widened vectors are joined with a curve -//NSString* const kMaplyWideVecRoundJoin @"round" +WKDefineConst(WideVecRoundJoin) /// Widened vectors are joined with a bevel -NSString* const kMaplyWideVecBevelJoin = MaplyWideVecBevelJoin; +WKDefineConst(WideVecBevelJoin) +/// No joins (fastest) +WKDefineConst(WideVecNoneJoin) /// Number of pixels to use in blending the edges of the wide vectors NSString* const kMaplyWideVecEdgeFalloff = MaplyWideVecEdgeFalloff; /// For wide vectors we can control the ends /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty -//NSString* const kMaplyWideVecLineCapType @"wideveclinecaptype" - -// Note: These are not currently implemented +WKDefineConst(WideVecLineCapType) /// Widened vector ends are flush -//NSString* const kMaplyWideVecButtCap @"butt" +WKDefineConst(WideVecButtCap) /// Widened vector ends are round (e.g. hot dog roads) -//NSString* const kMaplyWideVecRoundCap @"round" +WKDefineConst(WideVecRoundCap) /// Widened vector ends are extended a bit and then flush -//NSString* const kMaplyWideVecSquareCap @"square" +WKDefineConst(WideVecSquareCap) /// Miter joins will turn to bevel joins past this number of degrees NSString* const kMaplyWideVecMiterLimit = MaplyWideVecMiterLimit; @@ -237,6 +238,10 @@ /// It's real world coordinates for kMaplyWideVecCoordTypeReal and pixel size for kMaplyWideVecCoordTypeScreen NSString* const kMaplyWideVecTexRepeatLen = MaplyWideVecTexRepeatLen; +/// Initial texture coordinates +WKDefineConst(WideVecTexOffsetX) +WKDefineConst(WideVecTexOffsetY) + /// Controls the wide vector implementation. Basic implementation by default. WKDefineConst(WideVecImpl) WKDefineConst(WideVecImplDefault) @@ -257,13 +262,16 @@ /// Subdivide the vector edges along a great circle with ellipsoidal math NSString* const kMaplySubdivGreatCirclePrecise = MaplySubdivGreatCirclePrecise; /// Subdivide into a fixed number of segmenets -NSString* const kMaplySubdivStatic = @"static"; +WKDefineConst(SubdivStatic) /// Subdivide the vectors edges along lat/lon NSString* const kMaplySubdivSimple = MaplySubdivSimple; /// Clip features along a grid of the given size NSString* const kMaplySubdivGrid = MaplySubdivGrid; /// Used to turn off selection in vectors -NSString* const kMaplySelectable = @"selectable"; +WKDefineConst(Selectable) + +/// Attach a name to the generated drawable(s) for debugging purposes +WKDefineConst(DrawableName); /// These are used for stickers @@ -313,9 +321,9 @@ /// These are used for shapes /// Samples (x) to use when converting shape to polygons -NSString* const kMaplyShapeSampleX = @"shapesamplex"; +WKDefineConst(ShapeSampleX) /// Samples (y) to use when converting shape to polygons -NSString* const kMaplyShapeSampleY = @"shapesampley"; +WKDefineConst(ShapeSampleY) /// If set to true, we'll tessellate a shape using the opposite vertex ordering NSString* const kMaplyShapeInsideOut = MaplyShapeInsideOut; /// Center for the shape geometry @@ -332,15 +340,16 @@ const float kMaplyPointSizeDefault = 4.0; /// These are used by the texture -NSString* const kMaplyTexFormat = @"texformat"; -NSString* const kMaplyTexMinFilter = @"texminfilter"; -NSString* const kMaplyTexMagFilter = @"texmagfilter"; -NSString* const kMaplyMinFilterNearest = @"texfilternearest"; -NSString* const kMaplyMinFilterLinear = @"texfilterlinear"; -NSString* const kMaplyTexAtlas = @"texatlas"; -NSString* const kMaplyTexWrapX = @"texwrapx"; -NSString* const kMaplyTexWrapY = @"texwrapy"; -NSString* const kMaplyTexMipmap = @"texmipmap"; +WKDefineConst(TexFormat) +WKDefineConst(TexMinFilter) +WKDefineConst(TexMagFilter) +WKDefineConst(MinFilterNearest) +WKDefineConst(MinFilterLinear) +WKDefineConst(TexAtlas) +WKDefineConst(TexWrapX) +WKDefineConst(TexWrapY) +WKDefineConst(TexMipmap) + /// These are the various shader programs we set up by default NSString* const kMaplyShaderDefaultTri = @"Default Triangle;lighting=yes"; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm index 1293563050..a629330059 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/WhirlyGlobeViewController.mm @@ -1955,29 +1955,43 @@ - (MaplyBoundingBox)getCurrentExtents - (bool) getCurrentExtents:(MaplyBoundingBox *)bbox { - CGRect frame = self.view.frame; - - CGPoint pt = CGPointMake(0,frame.size.height); - - bool resp = [self geoPointFromScreen:pt geoCoord:&(bbox->ll)]; - - if (!resp) + if (!bbox) { - // Left lower point is outside the globe return false; } - - pt = CGPointMake(frame.size.width,0); - - resp = [self geoPointFromScreen:pt geoCoord:&(bbox->ur)]; - if (!resp) + + const auto &frame = self.view.frame.size; + + // Try the corner points. Note that this doesn't account for rotation. + if ([self geoPointFromScreen:CGPointMake(0,frame.height) geoCoord:&(bbox->ll)] && + [self geoPointFromScreen:CGPointMake(frame.width,0) geoCoord:&(bbox->ur)]) { - // Right upper point is outside the globe - return false; + return true; } - + + // One or both are off the globe, try the center + MaplyCoordinate center; + if ([self geoPointFromScreen:CGPointMake(frame.width/2,frame.height/2) geoCoord:¢er]) + { + // Assume we can see 90 degrees in every direction. + bbox->ll.y = std::max(-M_PI_2, center.y - M_PI_2); + bbox->ur.y = std::min(M_PI_2, center.y + M_PI_2); + + // If we're anywhere but right at the equator, we can see the whole span of longitudes. + if (std::fabs(center.y) < M_PI / 180) + { + bbox->ll.x = fmod(center.x - M_PI_2 + M_2_PI, M_2_PI); + bbox->ur.x = fmod(center.x + M_PI_2, M_2_PI); + } + else + { + bbox->ll.x = -M_PI; + bbox->ur.x = M_PI; + } + return true; + } + return true; - } static const float LonAng = 2*M_PI/5.0; diff --git a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h index a9d4f4d817..5604db3a34 100644 --- a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h +++ b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h @@ -93,6 +93,24 @@ typedef enum { WKSVertexBillboardOffsetAttribute = 8 } WKSVertexBillboardAttributes; +// Line Joins +// These are assumed to match WideVectorLineJoinType +typedef enum { + WKSVertexLineJoinMiter = 0, + WKSVertexLineJoinMiterClip = 1, + WKSVertexLineJoinRound = 2, + WKSVertexLineJoinBevel = 3, + WKSVertexLineJoinNone = 4, +} WKSVertexLineJoinType; + +// Line Caps +// These are assumed to match WideVectorLineCapType +typedef enum { + WKSVertexLineCapButt = 0, + WKSVertexLineCapRound = 1, + WKSVertexLineCapSquare = 2, +} WKSVertexLineCapType; + // Maximum number of textures we currently support #define WKSTextureMax 8 // Textures passed into the shader start here @@ -228,11 +246,15 @@ struct Lighting { // Instructions to the wide vector shaders, usually per-drawable struct UniformWideVec { - float w2; // Width / 2.0 in screen space - float offset; // Offset from center in screen space - float edge; // Edge falloff control - float texRepeat; // Texture scaling specific to wide vectors - bool hasExp; // Look for a UniformWideVecExp structure for color, opacity, and width + float w2; // Width / 2.0 in screen space + float offset; // Offset from center in screen space + float edge; // Edge falloff control + float texRepeat; // Texture scaling specific to wide vectors + simd::float2 texOffset; // Texture offset. + float miterLimit; // Miter join limit, multiples of width + WKSVertexLineJoinType join; // Line joins + WKSVertexLineCapType cap; // Line endcaps + bool hasExp; // Look for a UniformWideVecExp structure for color, opacity, and width }; // For variable width (and color, etc) lines we'll @@ -412,14 +434,20 @@ struct VertexTriWideVecB // Wide vector vertex passed to fragment shader (new version) struct ProjVertexTriWideVecPerf { - float4 position [[invariant]] [[position]]; + float4 position [[invariant]] [[position]]; // transformed to NDC + float2 screenPos; // un-transformed vertex position + float2 centerPos; // un-transformed circle center + float2 midDir; // Turn direction float4 color; float2 texCoord; float w2; float edge; uint2 maskIDs; - float a, b, c, d; - float2 offset; + uint whichVert, whichPoly; + bool roundJoin; + + float dp; + float a,b,c,d; }; // Input vertex data for Screen Space shaders diff --git a/ios/library/WhirlyGlobeLib/src/MTLView.mm b/ios/library/WhirlyGlobeLib/src/MTLView.mm index a1eca62aac..651d5bef98 100644 --- a/ios/library/WhirlyGlobeLib/src/MTLView.mm +++ b/ios/library/WhirlyGlobeLib/src/MTLView.mm @@ -115,6 +115,8 @@ - (void)draw renderMTL->getView()->animate(); if (renderMTL->hasChanges()) { + renderMTL->updateZoomSlots(); + MTLRenderPassDescriptor *renderPassDesc = self.currentRenderPassDescriptor; if (!renderPassDesc) return; diff --git a/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm b/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm index 26ec6dff37..bce668d85f 100644 --- a/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/SceneRendererMTL.mm @@ -201,7 +201,7 @@ return true; } - + void SceneRendererMTL::setupUniformBuffer(RendererFrameInfoMTL *frameInfo,id bltEncode,CoordSystemDisplayAdapter *coordAdapter) { SceneRendererMTL *sceneRender = (SceneRendererMTL *)frameInfo->sceneRenderer; diff --git a/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm b/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm index 2d4feb02bf..3b729e9150 100644 --- a/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm @@ -77,17 +77,20 @@ // Uniforms for regular wide vectors WhirlyKitShader::UniformWideVec uniWV; memset(&uniWV,0,sizeof(uniWV)); - uniWV.w2 = lineWidth/2.0f; - uniWV.offset = lineOffset; - uniWV.edge = edgeSize; - uniWV.texRepeat = texRepeat; - uniWV.hasExp = widthExp || offsetExp || colorExp || opacityExp; - - BasicDrawable::UniformBlock uniBlock; - uniBlock.blockData = std::make_shared([[NSData alloc] initWithBytes:&uniWV length:sizeof(uniWV)]); - uniBlock.bufferID = WhirlyKitShader::WKSUniformWideVecEntry; - - return uniBlock; + CopyIntoMtlFloat2(uniWV.texOffset, texOffset); + uniWV.w2 = lineWidth/2.0f; + uniWV.offset = lineOffset; + uniWV.edge = edgeSize; + uniWV.texRepeat = texRepeat; + uniWV.hasExp = widthExp || offsetExp || colorExp || opacityExp; + uniWV.join = (WhirlyKitShader::WKSVertexLineJoinType)joinType; // assume enums are numerically equivalent + uniWV.cap = (WhirlyKitShader::WKSVertexLineCapType)capType; + uniWV.miterLimit = miterLimit; + + return { + WhirlyKitShader::WKSUniformWideVecEntry, + std::make_shared([[NSData alloc] initWithBytes:&uniWV length:sizeof(uniWV)]), + }; } BasicDrawable::UniformBlock WideVectorDrawableBuilderMTL::wideVecExpUniBlock() @@ -105,11 +108,10 @@ if (colorExp) ColorExpressionToMtl(colorExp,wideVecExp.colorExp); - BasicDrawable::UniformBlock uniBlock; - uniBlock.blockData = std::make_shared([[NSData alloc] initWithBytes:&wideVecExp length:sizeof(wideVecExp)]); - uniBlock.bufferID = WhirlyKitShader::WKSUniformWideVecEntryExp; - - return uniBlock; + return { + WhirlyKitShader::WKSUniformWideVecEntryExp, + std::make_shared([[NSData alloc] initWithBytes:&wideVecExp length:sizeof(wideVecExp)]), + }; } BasicDrawableRef WideVectorDrawableBuilderMTL::getBasicDrawable() diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 747c798dc5..2c60366768 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -799,7 +799,7 @@ fragment float4 fragmentTri_wideVec( constant TriWideArgBufferFrag & fragArgs [[buffer(WKSFragmentArgBuffer)]], constant WideVecTextures & texArgs [[buffer(WKSFragTextureArgBuffer)]]) { - int numTextures = TexturesBase(texArgs.texPresent); + const int numTextures = TexturesBase(texArgs.texPresent); // Dot/dash pattern float4 patternColor(1.0,1.0,1.0,1.0); @@ -834,7 +834,8 @@ fragment float4 fragmentTri_wideVec( struct IntersectInfo { bool valid; float2 interPt; - float c, d2; + float dist2; + float c; float ta,tb; }; @@ -867,8 +868,8 @@ IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, return { .valid = true, .interPt = inter, - .d2 = distance_squared(p1, inter), - .c = wedge(p2 - p1, n0 - n1) / denom, + .dist2 = distance_squared(p1, inter), + .c = wedge(p2 - p1, p1 - p0), .ta = 0.0, .tb = 0.0, }; @@ -883,9 +884,15 @@ struct TriWideArgBufferC { // Used to track what info we have about a center point struct CenterInfo { + /// Screen coordinates of the line segment endpoint float2 screenPos; + /// Vector of the line segment (un-normalized) float2 dir; + /// Length of the segment squared + float len2; + /// Normalized direction of the segment float2 nDir; + /// Normalized plane normal, perpendicular to the segment float2 norm; }; @@ -900,6 +907,13 @@ float2 screenPos(constant Uniforms &u, float3 viewPos) { return s.xy / s.w; } +constant constexpr float wideVecMinTurnThreshold = 1e-5; +constant constexpr float wideVecMaxTurnThreshold = 0.99999998476; // sin(89.99 deg) +constant constexpr int polyStartCap = 0; +constant constexpr int polyBody = 1; +constant constexpr int polyEndCap = 2; +constant constexpr float4 discardPt(0,0,-1e6,NAN); + // Performance version of wide vector shader vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( VertexTriWideVecB vert [[stage_in]], @@ -910,7 +924,10 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( constant VertexTriWideVecInstance *wideVecInsts [[ buffer(WKSVertModelInstanceArgBuffer) ]], constant RegularTextures & texArgs [[buffer(WKSVertTextureArgBuffer)]]) { - ProjVertexTriWideVecPerf outVert = { .position = float4(0.0,0.0,-1000.0,1.0) }; + ProjVertexTriWideVecPerf outVert = { + .position = discardPt, + .roundJoin = false, + }; // Vertex index within the instance, 0-11 // Odd indexes are on the left, evens are on the right. @@ -918,6 +935,29 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Polygon index within the segment. 0=Start cap, 1=body, 2=end cap const int whichPoly = vert.index & 0xffff; + outVert.whichPoly = whichPoly; + outVert.whichVert = whichVert; + + const bool isLeft = (whichVert & 1); + const bool isEnd = (whichVert > 5); + + const float zoom = ZoomFromSlot(uniforms, vertArgs.uniDrawState.zoomSlot); + + // Pull out the width and possibly calculate one + float w2 = vertArgs.wideVec.w2; + if (vertArgs.wideVec.hasExp) { + w2 = ExpCalculateFloat(vertArgs.wideVecExp.widthExp, zoom, 2.0*w2)/2.0; + } + + // w2 includes edge-blend, strokeWidth does not + const float strokeWidth = 2 * w2; + if (w2 > 0.0) { + w2 = w2 + vertArgs.wideVec.edge; + } + + // Disable joins for narrow lines + auto joinType = (w2 >= 1) ? vertArgs.wideVec.join : WKSVertexLineJoinNone; + // Find the various instances representing center points. // We need one behind and one ahead of us. // previous segment @@ -927,7 +967,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( bool instValid[4] = { false, true, false, false }; VertexTriWideVecInstance inst[4] = { {}, wideVecInsts[instanceID], {}, {} }; - if (inst[1].prev != -1) { + if (inst[1].prev != -1 && joinType != WKSVertexLineJoinNone) { inst[0] = wideVecInsts[inst[1].prev]; instValid[0] = true; } @@ -935,138 +975,139 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( inst[2] = wideVecInsts[inst[1].next]; instValid[2] = true; - if (inst[2].next != -1) { + if (inst[2].next != -1 && joinType != WKSVertexLineJoinNone) { inst[3] = wideVecInsts[inst[2].next]; instValid[3] = true; } } else { + // We need at least this and next return outVert; } - outVert.maskIDs[0] = inst[1].mask0; - outVert.maskIDs[1] = inst[1].mask1; - - bool isValid = true; - - // Figure out position on the screen for every center point + // Figure out position on the screen for each center point. + // centers[1] represents the segment leading to the current point. + // centers[2] represents the segment leading from the current point. + // centers[X] = vector from centers[X-1] to centers[X] CenterInfo centers[4]; for (unsigned int ii=0;ii<4;ii++) { - if (instValid[ii]) { - const float3 centerPos = viewPos(vertArgs.uniDrawState.singleMat, inst[ii].center); - centers[ii].screenPos = screenPos(uniforms, centerPos); - - // Make sure the object is facing the user (only for the globe) - if (uniforms.globeMode && ii == 1) { - float4 pt = uniforms.mvMatrix * float4(centerPos,1.0); - pt /= pt.w; - - if (pt.z > 0.0) { - isValid = false; - } else { - const float4 testNorm = uniforms.mvNormalMatrix * float4(centerPos,0.0); - if (dot(-pt.xyz, testNorm.xyz) <= 0.0) { - isValid = false; - } + if (!instValid[ii]) { + continue; + } + const float3 centerPos = viewPos(vertArgs.uniDrawState.singleMat, inst[ii].center); + centers[ii].screenPos = screenPos(uniforms, centerPos); + + // Make sure the object is facing the user (only for the globe) + if (uniforms.globeMode && ii == 1) { + float4 pt = uniforms.mvMatrix * float4(centerPos,1.0); + pt /= pt.w; + + if (pt.z > 0.0) { + return outVert; + } else { + const float4 testNorm = uniforms.mvNormalMatrix * float4(centerPos,0.0); + if (dot(-pt.xyz, testNorm.xyz) <= 0.0) { + return outVert; } } } } - if (!isValid) { - return outVert; - } - - // Size of pixels const float2 screenScale(2.0/uniforms.frameSize.x,2.0/uniforms.frameSize.y); // ~(0.001,0.001) - //const float avgScreenScale = 0.5/(uniforms.frameSize.x + uniforms.frameSize.y); - const float pixScale = min(uniforms.screenSizeInDisplayCoords.x,uniforms.screenSizeInDisplayCoords.y) / min(uniforms.frameSize.x,uniforms.frameSize.y); - const float texScale = 1 / pixScale / vertArgs.wideVec.texRepeat; // texture coords / display coords = ~1000 - - // (1.0/2 (uniforms.frameSize.x + uniforms.frameSize.y) - const float zoom = ZoomFromSlot(uniforms, vertArgs.uniDrawState.zoomSlot); - - float2 texOffset(0, 0); // todo: uniforms? - //float texPos = ((vert.texInfo.z - vert.texInfo.y) * t0 + vert.texInfo.y + vert.texInfo.w * realWidth2) * texScale; - //outVert.texCoord = texOffset + float2((whichVert & 1) ? 1 : 0, texScale * inst[interPt].len); - -// outVert.screenScale = screenScale; -// outVert.frameSize = uniforms.frameSize; // (1536,2048) -// outVert.screenSize = uniforms.screenSizeInDisplayCoords; // ~(0.035, 0.05) + const float texRepeatY = vertArgs.wideVec.texRepeat; + const float texScale = 1 / pixScale / texRepeatY; // texture coords / display coords = ~1000 + // Calculate directions and normals for (unsigned int ii=1;ii<4;ii++) { if (instValid[ii-1]) { centers[ii].dir = centers[ii].screenPos - centers[ii-1].screenPos; + centers[ii].len2 = length_squared(centers[ii].dir); centers[ii].nDir = normalize(centers[ii].dir); - centers[ii].norm = normalize(float2(-centers[ii].dir.y,centers[ii].dir.x)); + centers[ii].norm = float2(-centers[ii].nDir.y,centers[ii].nDir.x); } } // Textures are based on un-projected coords, we'll need to know how that relates to projected // ones in order to adjust texture coordinates based on screen-based intersections. - const float projScale = length(centers[1].dir) / inst[1].segLen; + const float projScale = length(centers[2].dir) / inst[1].segLen; - // Pull out the width and possibly calculate one - float w2 = vertArgs.wideVec.w2; + // Pull out the center line offset, or calculate one + float centerLine = vertArgs.wideVec.offset; if (vertArgs.wideVec.hasExp) { - w2 = ExpCalculateFloat(vertArgs.wideVecExp.widthExp, zoom, 2.0*w2)/2.0; - } - if (w2 > 0.0) { - w2 = w2 + vertArgs.wideVec.edge; + centerLine = ExpCalculateFloat(vertArgs.wideVecExp.offsetExp, zoom, centerLine); } - const float realWidth2 = w2 * pixScale; - - // Pull out the center line offset, or calculate one - float centerLine = 0.0; // vertArgs.wideVec.offset; -// if (vertArgs.wideVec.hasExp) -// centerLine = ExpCalculateFloat(vertArgs.wideVecExp.offsetExp, zoom, centerLine); - const float realCenterLine = centerLine * pixScale; // Intersect on the left or right depending - const float interDir = (whichVert & 1) ? 1 : -1; - - // Turn off the end caps for the moment - switch (whichPoly) { - case 0: - case 2: - isValid = false; - } + const float interSgn = (whichVert & 1) ? 1 : -1; // Do the offset intersection - bool iPtsValid = false; - const int interPt = (whichVert == 6 || whichVert == 7) ? 1 : 0; - float2 iPts; - IntersectInfo interInfo; + bool intersectValid = false; + bool turningLeft = false; + const int interIdx = isEnd ? 1 : 0; + float2 interPt, realInterPt; + float dotProd, theta, miterLength; // If we're on the far end of the body segment, we need this and the next two segments. // Otherwise we need the previous, this, and the next segment. - if (instValid[interPt] && instValid[interPt+1] && instValid[interPt+2]) { - const float dotProd = dot(centers[interPt+1].nDir, centers[interPt+2].nDir); - const float limit = 0.99999998476; // cos(0.01 deg) - if (dotProd > -limit && dotProd < limit) { - // Acute angles tend to break things -// angleBetween = acos(dotProd); -// if (angleBetween < 4.0 / 180.0 * M_PI_F) { -// iPtsValid = false; -// } - - // Intersect the left or right normals - const float2 nudge = w2 * interDir * screenScale; - interInfo = intersectWideLines(centers[interPt].screenPos, - centers[interPt+1].screenPos, - centers[interPt+2].screenPos, - nudge * centers[interPt+1].norm, - nudge * centers[interPt+2].norm); - - // If the intersection is too far away, we'll drop it - const float nearDist = 2 * 1.42 * w2 * max(screenScale.x,screenScale.y); - if (interInfo.valid && interInfo.d2 <= nearDist*nearDist) { - iPtsValid = true; - iPts = interInfo.interPt; + if (instValid[interIdx] && instValid[interIdx+1] && instValid[interIdx+2]) { + + // Don't even bother computing intersections for very acute angles or very small turns + dotProd = dot(centers[interIdx+1].nDir, centers[interIdx+2].nDir); + if (-wideVecMaxTurnThreshold < dotProd && + dotProd < wideVecMaxTurnThreshold && + abs(dotProd - 1.0) >= wideVecMinTurnThreshold) { + + theta = acos(dotProd); + + // "If the miter length divided by the stroke width exceeds the miterlimit then: + // miter: the join is converted to a bevel + // miter-clip: the miter is clipped at half the miter length from the intersection" + if (joinType == WKSVertexLineJoinMiter || joinType == WKSVertexLineJoinMiterClip) { + miterLength = abs(1 / sin(theta / 2)); + if (miterLength > vertArgs.wideVec.miterLimit) { + if (joinType == WKSVertexLineJoinMiter) { + joinType = WKSVertexLineJoinBevel; + } else if (joinType == WKSVertexLineJoinMiterClip) { + miterLength = vertArgs.wideVec.miterLimit; + } + } + } + + // Intersect the left or right sides of prev-this and this-next, plus offset + thread const CenterInfo &prev = centers[interIdx+0]; + thread const CenterInfo &cur = centers[interIdx+1]; + thread const CenterInfo &next = centers[interIdx+2]; + const float2 edgeDist = screenScale * (interSgn * w2 + centerLine); + const IntersectInfo interInfo = intersectWideLines(prev.screenPos, cur.screenPos, next.screenPos, + edgeDist * cur.norm, edgeDist * next.norm); + + if (interInfo.valid) { + turningLeft = (interInfo.c < 0); + realInterPt = interPt = interInfo.interPt; + + // Limit the distance to the smaller of half way back along the previous segment + // or half way forward along the next one to keep consecutive segments from colliding. + // + // For up to four times that distance, adjust the intersection point back along its + // length to that limit, effectively narrowing the line instead of just breaking down. + // todo: too clever by half... maybe make this opt-in? + const float maxDist2 = min(cur.len2, next.len2); + if (interInfo.dist2 <= maxDist2 / 4) { + intersectValid = true; + } else if (interInfo.dist2 <= maxDist2 * 4) { + interPt = cur.screenPos + normalize(interPt - cur.screenPos) * sqrt(maxDist2) / 2; + intersectValid = true; + } } } } + // Endcaps not used for miter case, discard them. + if (joinType == WKSVertexLineJoinMiter && + (whichPoly == polyStartCap || whichPoly == polyEndCap)) { + return outVert; + } + // Note: We're putting a color in the instance, but then it's hard to change // So we'll pull the color out of the basic drawable float4 color = vert.color; @@ -1078,35 +1119,223 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.color = color * calculateFade(uniforms,vertArgs.uniDrawState); outVert.w2 = w2; outVert.edge = vertArgs.wideVec.edge; + outVert.maskIDs[0] = inst[1].mask0; + outVert.maskIDs[1] = inst[1].mask1; - if (isValid) { - // Work out the corner position by extending the normal - const int basePt = (whichVert == 6 || whichVert == 7) ? 2 : 1; - const float2 offset = centers[2].norm * interDir * screenScale * (w2 + centerLine + vertArgs.wideVec.edge); - const float2 corner = centers[basePt].screenPos + offset; + // Work out the corner positions by extending the normals + const int centerIdx = isEnd ? 2 : 1; + const float2 center = centers[centerIdx].screenPos; + const float2 offsetPt = center + centerLine * screenScale; + const float2 realEdge = (interSgn * w2 + centerLine) * screenScale; + const float2 corner = center + centers[2].norm * realEdge; + const bool insideEdge = (isLeft == turningLeft); + + // Current corner is the default result for all points. + float2 pos = corner; + + // Texture position is based on cumulative distance along the line. + // Note that `inst[2].totalLen` wraps to zero at the end, and we don't want that. + // Texture coords are used for edge blending, so we need to set them up even if there are no textures. + float texY = inst[1].totalLen + (isEnd ? inst[1].segLen : 0); + float texX = isLeft ? -1 : 1; + + if (joinType == WKSVertexLineJoinNone || !intersectValid) { + // Trivial case, just use the corner + outVert.position = float4(pos, 0, 1); + outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); + return outVert; + } - // Use the intersect point instead of the corner - outVert.position = float4(iPtsValid ? iPts : corner, 0, 1); + // Since there is one, use the intersect point by default + pos = interPt; + + bool discardTri = false; + + // We'll need the corner on the opposite side for several things. + const float2 realOtherEdge = (-interSgn * w2 + centerLine) * screenScale; + const float2 otherCorner = center + centers[2].norm * realOtherEdge; + + // For a bevel, use the intersect point for the inside of the turn, but not the outside. + // Round piggypacks on bevel. + if (joinType == WKSVertexLineJoinBevel || joinType == WKSVertexLineJoinRound) { + switch (whichVert) { + // Start cap, 0-3-1, 0-2-3 + case 2: discardTri = true; // not using triangle #2, fall through + case 0: pos = turningLeft ? corner : interPt; break; + case 1: + if (turningLeft) { + // Opposite corner on the previous segment + const float2 prevOtherCorner = center + centers[1].norm * realOtherEdge; + // Use the point halfway between the outside corner and the one on the opposite side. + pos = otherCorner + (prevOtherCorner - otherCorner) / 2; + // We're placing the vertex on the "wrong" side, so fix the texture X. + texX = -texX; + } else { + // Same corner on the previous segment + const float2 prevCorner = center + centers[1].norm * realEdge; + pos = corner + (prevCorner - corner) / 2; + } + break; + case 3: pos = turningLeft ? interPt : corner; break; + // Body segment, 4-7-5, 4-6-7 + // Merge inside corners to avoid overlap, use default outside corner. + case 4: case 5: case 6: case 7: pos = insideEdge ? interPt : corner; break; + // End cap, 8-11-9, 8-10-11 + case 10: discardTri = true; // Not using triangle #2, fall through + case 8: pos = turningLeft ? corner : interPt; break; + case 9: pos = turningLeft ? interPt : corner; break; + case 11: + if (turningLeft) { + // Opposite corner on the next segment + const float2 nextOtherCorner = center + centers[3].norm * realOtherEdge; + // Use the point halfway between the outside corner and the one on the opposite side. + pos = otherCorner + (nextOtherCorner - otherCorner) / 2; + // We're placing the vertex on the "wrong" side, so fix the texture X. + texX = -texX; + } else { + // Same corner on the next segment + const float2 nextCorner = center + centers[3].norm * realEdge; + pos = corner + (nextCorner - corner) / 2; + } + break; + } - // Default texture position is based on cumulative distance along the line - float texY = inst[interPt+1].totalLen; + // For the round case, extend the center of the bevel out into a "tip," which will be + // turned into a round extension by the fragment shader. This isn't exactly right, but + // I think we'd need more geometry to do better. + if (joinType == WKSVertexLineJoinRound && + (whichPoly == polyStartCap || whichPoly == polyEndCap)) { + outVert.roundJoin = true; + outVert.centerPos = offsetPt / screenScale; + outVert.screenPos = pos / screenScale; + + // Direction bisecting the turn toward the outside (right for a left turn) + outVert.midDir = normalize(isEnd ? (centers[2].nDir - centers[3].nDir) : + (centers[1].nDir - centers[2].nDir)); + + if (whichVert == 1 || whichVert == 11) { + // Extend the corner far enough to cover the necessary round-ness. + // This should probably be related to the turn angle, we're just fudging it. + const float extend = 2 * w2; + pos += outVert.midDir * extend * screenScale; + outVert.screenPos = pos / screenScale; + } + } + } else if (joinType == WKSVertexLineJoinMiterClip) { + // Direction of intersect point (bisecting the segment directions) + const float2 interDir = normalize(realInterPt / screenScale - center / screenScale) * (turningLeft ? -1 : 1) * interSgn; + + // Length of center extenstion from segment endpoint to miter cap. + const float midExt = miterLength / 2 * strokeWidth + vertArgs.wideVec.edge; + // Distance from segment endpoint to intersect point (what would be the miter extension) + const float interDist = length(realInterPt / screenScale - center / screenScale); + // Distance between corners + const float cornerDist = length(corner / screenScale - otherCorner / screenScale); + // Scale the miter edge from the corner distance down to zero at the intersect point + // todo: This isn't right, the edges should stay parallel up to the clip point. + const float miterCapExt = cornerDist / 2 * abs(cos(theta)) * clamp(midExt / interDist, 0.0, 1.0); + + switch (whichVert) { + // Start cap, 0-3-1, 0-2-3 + case 0: + if (turningLeft) { + // Extend segment endpoint outward along the intersection angle by the miter length + pos = center + interDir * midExt * screenScale; + texX = texX * 0.9; // todo: how to handle tex on miter extensions? + } else { + pos = otherCorner; + texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + } + break; + case 1: + if (turningLeft) { + pos = interPt; + } else { + pos = center + (center - interPt); + texX = -texX; + } + break; + case 2: + if (turningLeft) { + pos = center + interDir * midExt * screenScale + + float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + } else { + pos = center + interDir * midExt * screenScale + + -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + texX = -texX; + } + break; + case 3: + if (turningLeft) { + pos = otherCorner; + texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + } else { + // Extend segment endpoint away from the intersect point by the miter length + pos = center + interDir * midExt * screenScale; + texX = texX * 0.9; // todo: how to handle tex on miter extensions? + } + break; + // Body segment, 4-7-5, 4-6-7 + // Merge inside corners to avoid overlap, use default outside corner. + case 4: case 5: case 6: case 7: pos = insideEdge ? interPt : corner; break; + // End cap, 8-11-9, 8-10-11 + case 8: + if (turningLeft) { + pos = corner; + texX = texX * 0.9; // todo: how to handle tex on miter extensions? + } else { + pos = otherCorner; + texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + } + break; + case 9: + if (turningLeft) { + pos = interPt; + } else { + pos = center + interDir * midExt * screenScale + + float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + } + break; + case 10: + if (turningLeft) { + pos = center + interDir * midExt * screenScale + + -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + } else { + pos = center + (interPt - center); + //texX = -texX; + } + break; + case 11: + if (turningLeft) { + pos = center + interDir * midExt * screenScale; + texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + } else { + // Extend segment endpoint away from the intersect point by the miter length + pos = center + interDir * midExt * screenScale; + texX = texX * 0.9; // todo: how to handle tex on miter extensions? + } + break; + } + } - if (iPtsValid) { - // Apply the fraction of the offset along the current segment to the texture coordinate. - texY += dot(corner - iPts, centers[1].nDir) / projScale; + // Add the difference betweent the intersection point and the original corner, + // accounting for the textures being based on un-projected coordinates. + texY += dot(interPt - corner, centers[2].nDir) / projScale; - outVert.offset = offset; - outVert.a += dot(corner - iPts, centers[1].nDir); - outVert.b += dot(corner - iPts, centers[1].nDir) / projScale; - outVert.c += dot(corner - iPts, centers[1].nDir) / projScale * texScale; - } + outVert.position = float4(pos, discardTri ? -1e6 : 0, discardTri ? NAN : 1); + // Opposite values because we're showing back faces. + outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); - outVert.texCoord.x = texOffset.x + ((whichVert & 1) ? 0 : 1); - outVert.texCoord.y = texOffset.y + texY * texScale; - } return outVert; } +constant constexpr auto defaultWideTexFiltering = +#if defined(__HAVE_BICUBIC_FILTERING__) + filter::bicubic; +#else + filter::linear; +#endif + // Fragment shader that takes the back of the globe into account fragment float4 fragmentTri_wideVecPerf( ProjVertexTriWideVecPerf vert [[stage_in]], @@ -1114,29 +1343,38 @@ fragment float4 fragmentTri_wideVecPerf( constant TriWideArgBufferFrag & fragArgs [[buffer(WKSFragmentArgBuffer)]], constant WideVecTextures & texArgs [[buffer(WKSFragTextureArgBuffer)]]) { - if (texArgs.texPresent & (1< 0 || vert.maskIDs[1] > 0) { - // Pull the maskID from the input texture - constexpr sampler sampler2d(coord::normalized, filter::linear); - float2 loc(vert.position.x/uniforms.frameSize.x,vert.position.y/uniforms.frameSize.y); - unsigned int maskID = texArgs.maskTex.sample(sampler2d, loc).r; - if (vert.maskIDs[0] == maskID || vert.maskIDs[1] == maskID) - discard_fragment(); + if (texArgs.texPresent & (1< 0 || vert.maskIDs[1] > 0)) { + // Pull the maskID from the input texture + constexpr sampler sampler2d(coord::normalized, filter::nearest); + const float2 loc = vert.position.xy / uniforms.frameSize; + unsigned int maskID = texArgs.maskTex.sample(sampler2d, loc).r; + if (vert.maskIDs[0] == maskID || vert.maskIDs[1] == maskID) { + discard_fragment(); } } - + + // If there's a texture, apply its alpha channel to get dash patterns, or whatever. const int numTextures = TexturesBase(texArgs.texPresent); float patternAlpha = 1.0; if (numTextures > 0) { - constexpr sampler sampler2d(coord::normalized, address::repeat, filter::bicubic); + const auto filt = defaultWideTexFiltering; // todo: pull this from the args + constexpr sampler sampler2d(coord::normalized, address::repeat, filt); // Just pulling the alpha at the moment // If we use the rest, we get interpolation down to zero, which isn't quite what we want here patternAlpha = texArgs.tex[0].sample(sampler2d, vert.texCoord).a; } + // Reduce alpha of the "tip" for round joins to get a round look. + float roundAlpha = 1.0; + if (vert.roundJoin && dot(vert.screenPos - vert.centerPos, vert.midDir) > 0) { + const float r = length_squared(vert.screenPos - vert.centerPos) / vert.w2 / vert.w2; + roundAlpha = clamp((r > 0.95) ? (1 - r) * 20 : 1.0, 0.0, 1.0); + } + + // Reduce alpha along the edges to get smooth blending. const float edgeAlpha = (vert.edge > 0) ? clamp((1 - abs(vert.texCoord.x)) * vert.w2 / vert.edge, 0.0, 1.0) : 1.0; - return vert.color * float4(1,1,1,edgeAlpha * patternAlpha); + return vert.color * float4(1,1,1,edgeAlpha * patternAlpha * roundAlpha); } From 07acf1e82a91498b45a96ee34ae375bd13fb21e5 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 4 Apr 2022 15:31:08 -0700 Subject: [PATCH 66/78] Fix vertex ordering so that everything is CCW. Fix some incorrect texture coordinates. --- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 91 +++++++++---------- 1 file changed, 42 insertions(+), 49 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 2c60366768..d96914d80e 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1128,7 +1128,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( const float2 offsetPt = center + centerLine * screenScale; const float2 realEdge = (interSgn * w2 + centerLine) * screenScale; const float2 corner = center + centers[2].norm * realEdge; - const bool insideEdge = (isLeft == turningLeft); + const float turnSgn = turningLeft ? -1 : 1; + const bool isInsideEdge = (isLeft == turningLeft); // Current corner is the default result for all points. float2 pos = corner; @@ -1179,7 +1180,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( case 3: pos = turningLeft ? interPt : corner; break; // Body segment, 4-7-5, 4-6-7 // Merge inside corners to avoid overlap, use default outside corner. - case 4: case 5: case 6: case 7: pos = insideEdge ? interPt : corner; break; + case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; // End cap, 8-11-9, 8-10-11 case 10: discardTri = true; // Not using triangle #2, fall through case 8: pos = turningLeft ? corner : interPt; break; @@ -1202,7 +1203,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // For the round case, extend the center of the bevel out into a "tip," which will be // turned into a round extension by the fragment shader. This isn't exactly right, but - // I think we'd need more geometry to do better. + // I think we need more geometry to do better. + // todo: fix texture Y-coords if (joinType == WKSVertexLineJoinRound && (whichPoly == polyStartCap || whichPoly == polyEndCap)) { outVert.roundJoin = true; @@ -1223,96 +1225,87 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } } else if (joinType == WKSVertexLineJoinMiterClip) { // Direction of intersect point (bisecting the segment directions) - const float2 interDir = normalize(realInterPt / screenScale - center / screenScale) * (turningLeft ? -1 : 1) * interSgn; + const float2 interDir = normalize(realInterPt / screenScale - center / screenScale) * turnSgn * interSgn; + const float2 interNorm = float2(-interDir.y,interDir.x); - // Length of center extenstion from segment endpoint to miter cap. + // "the miter is clipped by a line perpendicular to the line bisecting + // the angle between the two path segments at a distance of half the + // value of miter length from the intersection of the two path segments." const float midExt = miterLength / 2 * strokeWidth + vertArgs.wideVec.edge; - // Distance from segment endpoint to intersect point (what would be the miter extension) - const float interDist = length(realInterPt / screenScale - center / screenScale); - // Distance between corners - const float cornerDist = length(corner / screenScale - otherCorner / screenScale); - // Scale the miter edge from the corner distance down to zero at the intersect point - // todo: This isn't right, the edges should stay parallel up to the clip point. - const float miterCapExt = cornerDist / 2 * abs(cos(theta)) * clamp(midExt / interDist, 0.0, 1.0); + // todo: This isn't quite right, the edges should stay parallel up to the clip point. + const float miterCapExt = w2 * abs(cos(theta)); + // todo: fix texture Y-coord switch (whichVert) { // Start cap, 0-3-1, 0-2-3 case 0: - if (turningLeft) { - // Extend segment endpoint outward along the intersection angle by the miter length - pos = center + interDir * midExt * screenScale; - texX = texX * 0.9; // todo: how to handle tex on miter extensions? - } else { - pos = otherCorner; - texX = -texX * 0.9; // todo: how to handle tex on miter extensions? - } + // Out to the miter cap, then perpendicular. + pos = center + interDir * midExt * screenScale - + turnSgn * interNorm * miterCapExt * screenScale; + texX *= -turnSgn; break; case 1: if (turningLeft) { - pos = interPt; - } else { - pos = center + (center - interPt); + // Extend segment endpoint outward along the intersection angle by the miter length + pos = center + interDir * midExt * screenScale; texX = -texX; + } else { + pos = corner; } break; case 2: if (turningLeft) { - pos = center + interDir * midExt * screenScale + - float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + pos = corner; } else { - pos = center + interDir * midExt * screenScale + - -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + // Extend segment endpoint outward along the intersection angle by the miter length + pos = center + interDir * midExt * screenScale; texX = -texX; } break; case 3: if (turningLeft) { - pos = otherCorner; - texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + pos = interPt; } else { - // Extend segment endpoint away from the intersect point by the miter length - pos = center + interDir * midExt * screenScale; - texX = texX * 0.9; // todo: how to handle tex on miter extensions? + pos = center + (center - interPt); + texX = -texX; } break; // Body segment, 4-7-5, 4-6-7 // Merge inside corners to avoid overlap, use default outside corner. - case 4: case 5: case 6: case 7: pos = insideEdge ? interPt : corner; break; + case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; // End cap, 8-11-9, 8-10-11 case 8: if (turningLeft) { - pos = corner; - texX = texX * 0.9; // todo: how to handle tex on miter extensions? + pos = center + interDir * midExt * screenScale + + -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; } else { - pos = otherCorner; - texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + pos = center + (interPt - center); + //texX = -texX; } break; case 9: if (turningLeft) { - pos = interPt; + pos = otherCorner; + texX = -texX; } else { - pos = center + interDir * midExt * screenScale + - float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + pos = corner; } break; case 10: if (turningLeft) { - pos = center + interDir * midExt * screenScale + - -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + pos = center + interDir * midExt * screenScale; } else { - pos = center + (interPt - center); - //texX = -texX; + // Extend segment endpoint away from the intersect point by the miter length + pos = center + interDir * midExt * screenScale; + texX = -texX; } break; case 11: if (turningLeft) { - pos = center + interDir * midExt * screenScale; - texX = -texX * 0.9; // todo: how to handle tex on miter extensions? + pos = interPt; } else { - // Extend segment endpoint away from the intersect point by the miter length - pos = center + interDir * midExt * screenScale; - texX = texX * 0.9; // todo: how to handle tex on miter extensions? + pos = center + interDir * midExt * screenScale + + float2(-interDir.y,interDir.x) * miterCapExt * screenScale; } break; } From 9857022eaecf7f806b3b9aedaf0142de863985e3 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Mon, 4 Apr 2022 16:36:01 -0700 Subject: [PATCH 67/78] Add caps and cap tests. Make line intersection clipping adjustment optional. Allow stylesheet maps to use performance wide vectors. --- .../include/MapboxVectorStyleSetC.h | 3 +- .../include/MaplyVectorStyleC.h | 3 + .../WhirlyGlobeLib/include/SharedAttributes.h | 8 + .../include/WideVectorDrawableBuilder.h | 4 + .../include/WideVectorManager.h | 14 +- .../src/MapboxVectorStyleLine.cpp | 3 +- .../src/MapboxVectorStyleSetC.cpp | 5 + .../WhirlyGlobeLib/src/WideVectorManager.cpp | 9 +- .../testCases/MapTilerTestCase.swift | 1 + .../AutoTester/testCases/MapboxTestCase.swift | 9 + .../testCases/WideVectorsTestCase.swift | 186 ++++++--- .../include/MaplySharedAttributes.h | 6 + .../include/vector_styles/MaplyVectorStyle.h | 3 + .../src/control/MaplySharedAttributes.mm | 7 + .../src/vector_tiles/MaplyVectorStyle.mm | 10 + .../include/DefaultShadersMTL.h | 8 +- .../src/WideVectorDrawableBuilderMTL.mm | 17 +- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 379 ++++++++++-------- 18 files changed, 438 insertions(+), 237 deletions(-) diff --git a/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h b/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h index 9edd33b38f..b006d371b4 100644 --- a/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h +++ b/common/WhirlyGlobeLib/include/MapboxVectorStyleSetC.h @@ -395,7 +395,8 @@ class MapboxVectorStyleSetImpl : public VectorStyleDelegateImpl SimpleIdentity vectorArealProgramID; SimpleIdentity vectorLinearProgramID; SimpleIdentity wideVectorProgramID; - + SimpleIdentity wideVectorPerfProgramID; + int zoomSlot; long long currentID; }; diff --git a/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h b/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h index f2464001bc..d5250f1887 100644 --- a/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h +++ b/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h @@ -89,6 +89,9 @@ struct VectorStyleSettingsImpl /// Use widened vectors (which do anti-aliasing and such) bool useWideVectors = false; + // Use GPU-based wide vector implementation + bool perfWideVec = false; + /// If set, we'll make all the features selectable. If not, we won't. bool selectable = false; diff --git a/common/WhirlyGlobeLib/include/SharedAttributes.h b/common/WhirlyGlobeLib/include/SharedAttributes.h index 948f7bb3de..2879f06a6e 100644 --- a/common/WhirlyGlobeLib/include/SharedAttributes.h +++ b/common/WhirlyGlobeLib/include/SharedAttributes.h @@ -265,6 +265,14 @@ /// No joins (fastest) #define MaplyWideVecNoneJoin WKString("none") +/// Determine how wide vectors behave when the ideal geometry is impossible +#define MaplyWideVecFallbackMode WKString("widevecfallback") +/// When the line intersection is out of range, clip it to the range and use it. +#define MaplyWideVecFallbackClip WKString("clip") +/// When the line intersection is out of range, discard it and don't join the like segments. +#define MaplyWideVecFallbackNone WKString("none") +#define MaplyWideVecFallbackDefault MaplyWideVecFallbackNone + /// Number of pixels to use in blending the edges of the wide vectors #define MaplyWideVecEdgeFalloff WKString("edgefalloff") diff --git a/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h b/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h index 91aa1ec96d..0653794cff 100644 --- a/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h +++ b/common/WhirlyGlobeLib/include/WideVectorDrawableBuilder.h @@ -134,6 +134,9 @@ class WideVectorDrawableBuilder /// Miter join limit as a multiple of width void setMiterLimit(float limit) { miterLimit = limit; } + /// Set geometry fallback mode + void setFallbackMode(WideVectorFallbackMode mode) { fallbackMode = mode; } + /// Line cap type void setLineCap(WideVectorLineCapType type) { capType = type; } @@ -221,6 +224,7 @@ class WideVectorDrawableBuilder int inst_index = -1; WideVectorLineJoinType joinType = WideVecBevelJoin; WideVectorLineCapType capType = WideVecSquareCap; + WideVectorFallbackMode fallbackMode = WideVecFallbackNone; float miterLimit = 2.0; std::string name; Scene *scene; diff --git a/common/WhirlyGlobeLib/include/WideVectorManager.h b/common/WhirlyGlobeLib/include/WideVectorManager.h index 06a972b59b..7e9155c45b 100644 --- a/common/WhirlyGlobeLib/include/WideVectorManager.h +++ b/common/WhirlyGlobeLib/include/WideVectorManager.h @@ -38,7 +38,7 @@ class VectorInfo; typedef enum {WideVecCoordReal,WideVecCoordScreen} WideVectorCoordsType; /// How the lines are joined. See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty -typedef enum { +typedef enum WideVectorLineJoinType_t { WideVecMiterJoin, WideVecMiterClipJoin, WideVecRoundJoin, @@ -46,8 +46,17 @@ typedef enum { WideVecNoneJoin, } WideVectorLineJoinType; +typedef enum WideVectorFallbackMode_t { + WideVecFallbackNone, // Just give up + WideVecFallbackClip, // Clip the intersection and continue +} WideVectorFallbackMode; + /// How the lines begin and end. See: http://www.w3.org/TR/SVG/painting.html#StrokeLinecapProperty -typedef enum {WideVecButtCap,WideVecRoundCap,WideVecSquareCap} WideVectorLineCapType; +typedef enum WideVectorLineCapType_t { + WideVecButtCap, + WideVecRoundCap, + WideVecSquareCap +} WideVectorLineCapType; /// Performance vs basic wide vector implementation typedef enum {WideVecImplBasic,WideVecImplPerf} WideVecImplType; @@ -78,6 +87,7 @@ class WideVectorInfo : public BaseInfo WideVectorCoordsType coordType = WideVecCoordScreen; WideVectorLineJoinType joinType = WideVecMiterJoin; + WideVectorFallbackMode fallbackMode = WideVecFallbackNone; WideVectorLineCapType capType = WideVecButtCap; SimpleIdentity texID = EmptyIdentity; diff --git a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp index a3d0381100..e008fba46c 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp @@ -223,7 +223,6 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, WideVectorInfo vecInfo; vecInfo.hasExp = true; vecInfo.coordType = WideVecCoordScreen; - vecInfo.programID = styleSet->wideVectorProgramID; vecInfo.fadeIn = fade; vecInfo.fadeOut = fade; vecInfo.zoomSlot = styleSet->zoomSlot; @@ -235,6 +234,8 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, vecInfo.colorExp = paint.color->expression(); vecInfo.opacityExp = paint.opacity->expression(); vecInfo.drawPriority = drawPriority + tileInfo->ident.level * std::max(0, styleSet->tileStyleSettings->drawPriorityPerLevel)+2; + vecInfo.implType = styleSet->tileStyleSettings->perfWideVec ? WideVecImplPerf : WideVecImplBasic; + vecInfo.programID = styleSet->tileStyleSettings->perfWideVec ? styleSet->wideVectorPerfProgramID : styleSet->wideVectorProgramID; // TODO: Switch to stencils // vecInfo.drawOrder = tileInfo->tileNumber(); diff --git a/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp b/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp index 23507d52ab..86cf60ffe6 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorStyleSetC.cpp @@ -486,6 +486,11 @@ MapboxVectorStyleSetImpl::MapboxVectorStyleSetImpl(Scene *inScene, prog = scene->findProgramByName(MaplyDefaultWideVectorShader); if (prog) wideVectorProgramID = prog->getId(); + + if (const auto prog = scene->findProgramByName(MaplyWideVectorPerformanceShader)) + { + wideVectorPerfProgramID = prog->getId(); + } } bool MapboxVectorStyleSetImpl::parse(PlatformThreadInfo *inst,const DictionaryRef &styleDict) diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index 1a0d7b9e24..fb54b04716 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -69,6 +69,13 @@ WideVectorInfo::WideVectorInfo(const Dictionary &dict) else joinType = WideVecNoneJoin; } + if (const auto entry = dict.getEntry(MaplyWideVecFallbackMode)) + { + const auto s = entry->getString(); + if (s == MaplyWideVecFallbackClip) fallbackMode = WideVecFallbackClip; + else fallbackMode = WideVecFallbackNone; + } + if (const auto entry = dict.getEntry(MaplyWideVecLineCapType)) { const auto s = entry->getString(); @@ -752,6 +759,7 @@ struct WideVectorDrawableConstructor wideDrawable->setLineJoin(vecInfo->joinType); wideDrawable->setLineCap(vecInfo->capType); wideDrawable->setMiterLimit(vecInfo->miterLimit); + wideDrawable->setFallbackMode(vecInfo->fallbackMode); wideDrawable->setWidthExpression(vecInfo->widthExp); wideDrawable->setOpacityExpression(vecInfo->opacityExp); wideDrawable->setColorExpression(vecInfo->colorExp); @@ -880,7 +888,6 @@ struct WideVectorDrawableConstructor const bool emitCaps = (drawable->getLineJoin() != WideVectorLineJoinType::WideVecNoneJoin); int base = 0; - int pt = 0; if (emitCaps) { base = 4; diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift index 33df81ef0a..776d355819 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift @@ -132,6 +132,7 @@ class MapTilerTestCase: MaplyTestCase { func setup(_ map: MapboxKindaMap) { map.styleSettings.textScale = 1.1 + map.styleSettings.usePerfWideVectors = true } var legendVisibile = false diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift index c361cda0ac..3120a9441c 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift @@ -89,6 +89,8 @@ class MapboxTestCase: MaplyTestCase { return url } mapboxMap.styleSettings.textScale = 1.2 // Note: Why does this work better than 2.0? + mapboxMap.styleSettings.useWideVectors = true + mapboxMap.styleSettings.usePerfWideVectors = true; mapboxMap.backgroundAllPolys = false // Render all the polygons into an image for the globe mapboxMap.start() mapboxMap.cacheDir = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask)[0].appendingPathComponent(name) @@ -105,7 +107,14 @@ class MapboxTestCase: MaplyTestCase { mapVC.performanceOutput = true startMap(styles[MapboxStyle], viewC: mapVC, round: true) + + var h = Float(0.1) + timer = Timer.scheduledTimer(withTimeInterval: 12.0, repeats: true) { _ in + mapVC.animate(toPosition:MaplyCoordinateMakeWithDegrees(-122.4797218, 45.4143198), height: h, heading: 0.0, time: 0.0) + h /= 2 + } } + var timer: Timer? } diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 09de49d3b2..9a748242d6 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -14,8 +14,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase super.init(name: "Wide Vectors", supporting: [.map, .globe]) } - private func joins(_ vc: MaplyBaseViewController, - bound: MaplyBoundingBox, + private func joins(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject?] { let vsep = 2.5; @@ -40,11 +39,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } let desc = [ - kMaplyVecWidth: 40.0, + kMaplyZoomSlot: slot, + kMaplyVecWidth: perf ? ["stops":[[2,5],[12,80]]] : 40, kMaplyColor: perf ? UIColor.red.withAlphaComponent(0.35) : UIColor.blue.withAlphaComponent(0.35), kMaplyEnable: false, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + kMaplyWideVecFallbackMode: kMaplyWideVecFallbackClip, kMaplyWideVecJoinType: joinAttr(join) ?? NSNull(), kMaplyDrawableName: String(format: "WideVec-%@%@%@%@", joinAttr(join) ?? "", perf ? "-perf" : "", @@ -69,26 +70,92 @@ class WideVectorsTestCase : WideVectorsTestCaseBase ] } - private func joinAttr(_ n: Int) -> String? { - switch (n) { - case 0: return kMaplyWideVecMiterJoin; - case 1: return kMaplyWideVecMiterClipJoin; - case 2: return kMaplyWideVecRoundJoin; - case 3: return kMaplyWideVecBevelJoin; - case 4: return kMaplyWideVecNoneJoin; - default: return nil + private func joins(_ vc: MaplyBaseViewController, slot: Int, + bound: MaplyBoundingBox) -> [MaplyComponentObject?] { + + let yn = [ true, false ] + let objs = (0..<5).flatMap { join in + yn.flatMap { perf in + yn.flatMap { close in + yn.flatMap { subdiv in + joins(vc, bound: bound, slot: slot, join: join, perf: perf, close: close, subdiv: subdiv) + } + } + } + } + + joinN += joinD + if (joinN > joinSteps || joinN < -joinSteps) { + joinD = -joinD + joinN += joinD } + + return objs } - private func joins(_ vc: MaplyBaseViewController, - bound: MaplyBoundingBox) -> [MaplyComponentObject?] { + private func caps(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, + cap: Int, perf: Bool, close: Bool) -> [MaplyComponentObject?] { + + let vsep = 2.5; + let lat = Float(15.0 + (perf ? 2*vsep : 0.0) + (close ? vsep : 0.0)) + let lon = Float(-140.0) + Float(cap) * 3.5 + var coords = [ + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.5 * Float(joinN) / Float(joinSteps)), + MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + -0.5 * Float(joinN) / Float(joinSteps)), + MaplyCoordinateMakeWithDegrees(lon + 2.0, lat), + MaplyCoordinateMakeWithDegrees(lon + (close ? 0.0 : 2.0), lat), + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + + if !isVisible(vecObj.boundingBox(), ext: bound) { + return [] + } + + let desc = [ + kMaplyZoomSlot: slot, + kMaplyVecWidth: perf ? ["stops":[[2,5],[12,80]]] : 40, + kMaplyColor: perf ? UIColor.red.withAlphaComponent(0.35) : UIColor.blue.withAlphaComponent(0.35), + kMaplyEnable: false, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + kMaplyWideVecJoinType: kMaplyWideVecBevelJoin, + kMaplyWideVecLineCapType: capAttr(cap) ?? NSNull(), + kMaplyVecTexture: dashTex ?? NSNull(), + kMaplyWideVecTexRepeatLen: 64, + kMaplyDrawableName: String(format: "WideVec-%@%@%@", + capAttr(cap) ?? "", perf ? "-perf" : "", + close ? "-closed" : "") + ] as [AnyHashable: Any] + + let lblDesc = [ + kMaplyTextColor: UIColor.magenta, + kMaplyEnable: false, + kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, + ] as [AnyHashable: Any] + let lbl = MaplyScreenLabel() + lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) + lbl.text = String(format: "%@%@%@", + capAttr(cap) ?? "", perf ? "\nperf" : "", + close ? "\nclosed" : "") + + return [ + vc.addWideVectors([vecObj], desc: desc, mode: .current), + vc.addScreenLabels([lbl], desc: lblDesc, mode: .current) + ] + } + + private func caps(_ vc: MaplyBaseViewController, slot: Int, + bound: MaplyBoundingBox) -> [MaplyComponentObject?] { let yn = [ true, false ] - let objs = (0..<5).flatMap { join in + let objs = (0..<3).flatMap { cap in yn.flatMap { perf in yn.flatMap { close in yn.flatMap { subdiv in - joins(vc, bound: bound, join: join, perf: perf, close: close, subdiv: subdiv) + caps(vc, bound: bound, slot: slot, cap: cap, perf: perf, close: close) } } } @@ -103,6 +170,33 @@ class WideVectorsTestCase : WideVectorsTestCaseBase return objs } + private func joinAttr(_ n: Int) -> String? { + switch (n) { + case 0: return kMaplyWideVecMiterJoin; + case 1: return kMaplyWideVecMiterClipJoin; + case 2: return kMaplyWideVecRoundJoin; + case 3: return kMaplyWideVecBevelJoin; + case 4: return kMaplyWideVecNoneJoin; + default: return nil + } + } + + private func capAttr(_ n: Int) -> String? { + switch (n) { + case 0: return kMaplyWideVecButtCap; + case 1: return kMaplyWideVecRoundCap; + case 2: return kMaplyWideVecSquareCap; + default: return nil + } + } + + private func initSlot() { + if zoomSlot == nil, + let slot = baseViewController?.retainZoomSlotMinZoom(0, maxHeight: 2, maxZoom: 20, minHeight: 0.001) { + zoomSlot = Int(exactly: slot) + } + } + private func initTex(_ vc: MaplyBaseViewController) { if dashTex == nil { let b = MaplyLinearTextureBuilder() @@ -119,7 +213,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private func texs(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, - slot: Int32, perf: Bool) -> [MaplyComponentObject?] { + slot: Int, perf: Bool) -> [MaplyComponentObject?] { initTex(vc); // Note vary in lon rather than lat so that they are projected identically. @@ -154,6 +248,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyWideVecOffset: 0, kMaplyWideVecTexOffsetX: 0.0, kMaplyWideVecTexOffsetY: 0.1 * Double(texY), + kMaplyDrawableName: "WideVec-Tex", kMaplyTexWrapX: true, kMaplyTexWrapY: true, ] as [AnyHashable: Any] @@ -176,7 +271,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase ] } - private func offset(_ vc: MaplyBaseViewController, slot: Int32, perf: Bool) -> [MaplyComponentObject?] { + private func offset(_ vc: MaplyBaseViewController, slot: Int, perf: Bool) -> [MaplyComponentObject?] { initTex(vc); // Note vary in lon rather than lat so that they are projected identically. @@ -202,10 +297,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyEnable: true, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, - kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, kMaplyVecTexture: dashTex ?? NSNull(), kMaplyWideVecTexRepeatLen: 64, kMaplyWideVecOffset: 0, + kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, + kMaplyWideVecMiterLimit: 4, + kMaplyWideVecFallbackMode: kMaplyWideVecFallbackClip, + kMaplyDrawableName: "WideVec-Offset", ] as [AnyHashable: Any] // Offset line @@ -241,7 +339,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase ] } - private func exprs(_ vc: MaplyBaseViewController, slot: Int32, perf: Bool) -> [MaplyComponentObject?] { + private func exprs(_ vc: MaplyBaseViewController, slot: Int, perf: Bool) -> [MaplyComponentObject?] { var coords = [ MaplyCoordinateMakeWithDegrees(-130 + (perf ? 0 : 30), 60), MaplyCoordinateMakeWithDegrees(-140 + (perf ? 0 : 30), 61), @@ -327,8 +425,10 @@ class WideVectorsTestCase : WideVectorsTestCaseBase timerObjs.removeAll() let curBound = curBound(vc) + let slot = zoomSlot ?? -1 - timerObjs.append(contentsOf: joins(vc, bound: curBound).compactMap { $0 }) + timerObjs.append(contentsOf: joins(vc, slot: slot, bound: curBound).compactMap { $0 }) + timerObjs.append(contentsOf: caps(vc, slot: slot, bound: curBound).compactMap { $0 }) if let slot = zoomSlot { timerObjs.append(contentsOf: [true, false].flatMap { @@ -340,23 +440,21 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } private func wideLineTest(_ vc: MaplyBaseViewController) { - if zoomSlot == nil { - zoomSlot = baseViewController?.retainZoomSlotMinZoom(0, maxHeight: 2, maxZoom: 20, minHeight: 0.001); - } - -// addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); -// addGeoJson("moving-lawn.geojson", viewC: vc); -// addGeoJson("spiral.geojson", viewC: vc); -// addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); -// addGeoJson("track.geojson", viewC: vc); -// //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); -// addGeoJson("USA.geojson", viewC:vc); -// //addGeoJson("testJson.json", viewC:vc); -// //addGeoJson("straight.geojson", viewC:vc); -// //addGeoJson("uturn.geojson", viewC:vc); -// -// overlap(vc); -// vecColors(vc); + initSlot() + + addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); + addGeoJson("moving-lawn.geojson", viewC: vc); + addGeoJson("spiral.geojson", viewC: vc); + addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); + addGeoJson("track.geojson", viewC: vc); + //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); + addGeoJson("USA.geojson", viewC:vc); + //addGeoJson("testJson.json", viewC:vc); + //addGeoJson("straight.geojson", viewC:vc); + //addGeoJson("uturn.geojson", viewC:vc); + + overlap(vc); + vecColors(vc); if let slot = zoomSlot { self.objs.append(contentsOf: [true, false].flatMap { @@ -376,19 +474,15 @@ class WideVectorsTestCase : WideVectorsTestCaseBase baseCase.setUpWithGlobe(vc) wideLineTest(vc) //loadShapeFile(vc) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-100.0, 40.0), height: 1.0, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-148.0, 32.0), height: 0.03, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 39.0), height: 0.25, heading: 0.0, time: 0.1) - //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 39.0), height: 0.25, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } override func setUpWithMap(_ vc: MaplyViewController) { baseCase.setUpWithMap(vc) wideLineTest(vc) //loadShapeFile(vc) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-100.0, 40.0), height: 1.0, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-148.0, 32.0), height: 0.03, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 39.0), height: 0.25, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 20.0), height: 0.25, heading: 0.0, time: 0.1) //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } @@ -405,14 +499,14 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } if let slot = zoomSlot { - vc.releaseZoomSlotIndex(slot) + vc.releaseZoomSlotIndex(Int32(slot)) zoomSlot = nil } } baseCase.stop() } - private var zoomSlot: Int32? + private var zoomSlot: Int? private var dashTex: MaplyTexture? private var objs = [MaplyComponentObject]() private var joinTimer: Timer? diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h index f2e3a6fe18..2b5faf9ac8 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h @@ -254,6 +254,12 @@ extern NSString * const _Nonnull kMaplyWideVecBevelJoin; /// None extern NSString * const _Nonnull kMaplyWideVecNoneJoin; +/// Determine how wide vectors behave when the ideal geometry is impossible +extern NSString * const _Nonnull kMaplyWideVecFallbackMode; +extern NSString * const _Nonnull kMaplyWideVecFallbackDefault; +extern NSString * const _Nonnull kMaplyWideVecFallbackClip; +extern NSString * const _Nonnull kMaplyWideVecFallbackNone; + /// Number of pixels to use in blending the edges of the wide vectors extern NSString * const _Nonnull kMaplyWideVecEdgeFalloff; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h index e8aa866a93..e50dab54d7 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/vector_styles/MaplyVectorStyle.h @@ -73,6 +73,9 @@ /// Use widened vectors (which do anti-aliasing and such) @property (nonatomic) bool useWideVectors; +/// Use GPU-based wide vector implementation +@property (nonatomic) bool usePerfWideVectors; + /// Where we're using old vectors (e.g. not wide) scale them by this amount @property (nonatomic) float oldVecWidthScale; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm index 9711c2548e..3ccb4f3995 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm @@ -217,6 +217,13 @@ /// No joins (fastest) WKDefineConst(WideVecNoneJoin) +/// Determine how wide vectors behave when the ideal geometry is impossible +WKDefineConst(WideVecFallbackMode) +WKDefineConst(WideVecFallbackDefault) +WKDefineConst(WideVecFallbackClip) +WKDefineConst(WideVecFallbackNone) + + /// Number of pixels to use in blending the edges of the wide vectors NSString* const kMaplyWideVecEdgeFalloff = MaplyWideVecEdgeFalloff; diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm index 5a3073f717..fa2093f620 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/vector_tiles/MaplyVectorStyle.mm @@ -199,6 +199,16 @@ - (bool)useWideVectors return impl->useWideVectors; } +- (void)setUsePerfWideVectors:(bool)use +{ + impl->perfWideVec = use; +} + +- (bool)usePerfWideVectors +{ + return impl->perfWideVec; +} + - (void)setOldVecWidthScale:(float)oldVecWidthScale { impl->oldVecWidthScale = oldVecWidthScale; diff --git a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h index 5604db3a34..532dd62c30 100644 --- a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h +++ b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h @@ -255,6 +255,8 @@ struct UniformWideVec { WKSVertexLineJoinType join; // Line joins WKSVertexLineCapType cap; // Line endcaps bool hasExp; // Look for a UniformWideVecExp structure for color, opacity, and width + float interClipLimit; // Allow clipping of out-of-bounds intersection points + // Value is the multiple of distance-squared that is allowed. }; // For variable width (and color, etc) lines we'll @@ -443,11 +445,9 @@ struct ProjVertexTriWideVecPerf { float w2; float edge; uint2 maskIDs; - uint whichVert, whichPoly; bool roundJoin; - - float dp; - float a,b,c,d; + + //uint whichVert; // helpful for debugging }; // Input vertex data for Screen Space shaders diff --git a/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm b/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm index 3b729e9150..0768a71593 100644 --- a/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm +++ b/ios/library/WhirlyGlobeLib/src/WideVectorDrawableBuilderMTL.mm @@ -78,14 +78,15 @@ WhirlyKitShader::UniformWideVec uniWV; memset(&uniWV,0,sizeof(uniWV)); CopyIntoMtlFloat2(uniWV.texOffset, texOffset); - uniWV.w2 = lineWidth/2.0f; - uniWV.offset = lineOffset; - uniWV.edge = edgeSize; - uniWV.texRepeat = texRepeat; - uniWV.hasExp = widthExp || offsetExp || colorExp || opacityExp; - uniWV.join = (WhirlyKitShader::WKSVertexLineJoinType)joinType; // assume enums are numerically equivalent - uniWV.cap = (WhirlyKitShader::WKSVertexLineCapType)capType; - uniWV.miterLimit = miterLimit; + uniWV.w2 = lineWidth/2.0f; + uniWV.offset = lineOffset; + uniWV.edge = edgeSize; + uniWV.texRepeat = texRepeat; + uniWV.hasExp = widthExp || offsetExp || colorExp || opacityExp; + uniWV.join = (WhirlyKitShader::WKSVertexLineJoinType)joinType; // assume enums are numerically equivalent + uniWV.cap = (WhirlyKitShader::WKSVertexLineCapType)capType; + uniWV.miterLimit = miterLimit; + uniWV.interClipLimit = (fallbackMode == WideVecFallbackClip) ? 4.0f : 0.0f; return { WhirlyKitShader::WKSUniformWideVecEntry, diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index d96914d80e..d27db15366 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -909,9 +909,9 @@ float2 screenPos(constant Uniforms &u, float3 viewPos) { constant constexpr float wideVecMinTurnThreshold = 1e-5; constant constexpr float wideVecMaxTurnThreshold = 0.99999998476; // sin(89.99 deg) -constant constexpr int polyStartCap = 0; -constant constexpr int polyBody = 1; -constant constexpr int polyEndCap = 2; +constant constexpr int WideVecPolyStartGeom = 0; +constant constexpr int WideVecPolyBodyGeom = 1; +constant constexpr int WideVecPolyEndGeom = 2; constant constexpr float4 discardPt(0,0,-1e6,NAN); // Performance version of wide vector shader @@ -934,13 +934,14 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( const int whichVert = (vert.index >> 16) & 0xffff; // Polygon index within the segment. 0=Start cap, 1=body, 2=end cap const int whichPoly = vert.index & 0xffff; - - outVert.whichPoly = whichPoly; - outVert.whichVert = whichVert; - + // Are we on the left edge, or the right? const bool isLeft = (whichVert & 1); + // Are we on the starting end of the segment or the end? const bool isEnd = (whichVert > 5); + // Track vertex for debugging + //outVert.whichVert = whichVert; + const float zoom = ZoomFromSlot(uniforms, vertArgs.uniDrawState.zoomSlot); // Pull out the width and possibly calculate one @@ -984,6 +985,15 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( return outVert; } + const auto capType = vertArgs.wideVec.cap; + const auto isStartCap = (whichPoly == WideVecPolyStartGeom && !instValid[0]); + const auto isEndCap = (whichPoly == WideVecPolyEndGeom && !instValid[3]); + + // Butt is the default cap style, the line ends at the point. + if ((isStartCap || isEndCap) && capType == WhirlyKitShader::WKSVertexLineCapButt) { + return outVert; + } + // Figure out position on the screen for each center point. // centers[1] represents the segment leading to the current point. // centers[2] represents the segment leading from the current point. @@ -1059,6 +1069,11 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( theta = acos(dotProd); + // todo: miter-clip doesn't work right at small angles + if (joinType == WKSVertexLineJoinMiterClip && abs(dotProd - 1.0) < 0.1) { + joinType = WKSVertexLineJoinMiter; + } + // "If the miter length divided by the stroke width exceeds the miterlimit then: // miter: the join is converted to a bevel // miter-clip: the miter is clipped at half the miter length from the intersection" @@ -1094,7 +1109,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( const float maxDist2 = min(cur.len2, next.len2); if (interInfo.dist2 <= maxDist2 / 4) { intersectValid = true; - } else if (interInfo.dist2 <= maxDist2 * 4) { + } else if (vertArgs.wideVec.interClipLimit > 0 && interInfo.dist2 <= maxDist2 * vertArgs.wideVec.interClipLimit) { interPt = cur.screenPos + normalize(interPt - cur.screenPos) * sqrt(maxDist2) / 2; intersectValid = true; } @@ -1103,8 +1118,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } // Endcaps not used for miter case, discard them. - if (joinType == WKSVertexLineJoinMiter && - (whichPoly == polyStartCap || whichPoly == polyEndCap)) { + if (joinType == WKSVertexLineJoinMiter && whichPoly != WideVecPolyBodyGeom && !isStartCap && !isEndCap) { return outVert; } @@ -1140,181 +1154,198 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( float texY = inst[1].totalLen + (isEnd ? inst[1].segLen : 0); float texX = isLeft ? -1 : 1; - if (joinType == WKSVertexLineJoinNone || !intersectValid) { - // Trivial case, just use the corner - outVert.position = float4(pos, 0, 1); - outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); - return outVert; - } - - // Since there is one, use the intersect point by default - pos = interPt; - bool discardTri = false; - // We'll need the corner on the opposite side for several things. - const float2 realOtherEdge = (-interSgn * w2 + centerLine) * screenScale; - const float2 otherCorner = center + centers[2].norm * realOtherEdge; - - // For a bevel, use the intersect point for the inside of the turn, but not the outside. - // Round piggypacks on bevel. - if (joinType == WKSVertexLineJoinBevel || joinType == WKSVertexLineJoinRound) { - switch (whichVert) { - // Start cap, 0-3-1, 0-2-3 - case 2: discardTri = true; // not using triangle #2, fall through - case 0: pos = turningLeft ? corner : interPt; break; - case 1: - if (turningLeft) { - // Opposite corner on the previous segment - const float2 prevOtherCorner = center + centers[1].norm * realOtherEdge; - // Use the point halfway between the outside corner and the one on the opposite side. - pos = otherCorner + (prevOtherCorner - otherCorner) / 2; - // We're placing the vertex on the "wrong" side, so fix the texture X. - texX = -texX; - } else { - // Same corner on the previous segment - const float2 prevCorner = center + centers[1].norm * realEdge; - pos = corner + (prevCorner - corner) / 2; - } - break; - case 3: pos = turningLeft ? interPt : corner; break; - // Body segment, 4-7-5, 4-6-7 - // Merge inside corners to avoid overlap, use default outside corner. - case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; - // End cap, 8-11-9, 8-10-11 - case 10: discardTri = true; // Not using triangle #2, fall through - case 8: pos = turningLeft ? corner : interPt; break; - case 9: pos = turningLeft ? interPt : corner; break; - case 11: - if (turningLeft) { - // Opposite corner on the next segment - const float2 nextOtherCorner = center + centers[3].norm * realOtherEdge; - // Use the point halfway between the outside corner and the one on the opposite side. - pos = otherCorner + (nextOtherCorner - otherCorner) / 2; - // We're placing the vertex on the "wrong" side, so fix the texture X. - texX = -texX; - } else { - // Same corner on the next segment - const float2 nextCorner = center + centers[3].norm * realEdge; - pos = corner + (nextCorner - corner) / 2; - } - break; + if (isStartCap || isEndCap) { + // Square extends beyond the point by half a width. + // Round uses the same geometry but rounds it off with the fragment shader. + if (capType == WhirlyKitShader::WKSVertexLineCapSquare || + capType == WhirlyKitShader::WKSVertexLineCapRound) { + switch (whichVert) { + case 0: case 1: case 8: case 9: pos = corner; break; + case 2: case 3: case 10: case 11: + pos = corner + centers[2].nDir * w2 * screenScale * (isEnd ? 1 : -1); + texY += length(w2 * screenScale) / projScale * (isEnd ? 1 : -1); + break; + } } - - // For the round case, extend the center of the bevel out into a "tip," which will be - // turned into a round extension by the fragment shader. This isn't exactly right, but - // I think we need more geometry to do better. - // todo: fix texture Y-coords - if (joinType == WKSVertexLineJoinRound && - (whichPoly == polyStartCap || whichPoly == polyEndCap)) { + if (capType == WhirlyKitShader::WKSVertexLineCapRound) { outVert.roundJoin = true; outVert.centerPos = offsetPt / screenScale; outVert.screenPos = pos / screenScale; - - // Direction bisecting the turn toward the outside (right for a left turn) - outVert.midDir = normalize(isEnd ? (centers[2].nDir - centers[3].nDir) : - (centers[1].nDir - centers[2].nDir)); - - if (whichVert == 1 || whichVert == 11) { - // Extend the corner far enough to cover the necessary round-ness. - // This should probably be related to the turn angle, we're just fudging it. - const float extend = 2 * w2; - pos += outVert.midDir * extend * screenScale; - outVert.screenPos = pos / screenScale; - } + outVert.midDir = centers[2].nDir * (isEnd ? 1 : -1); } - } else if (joinType == WKSVertexLineJoinMiterClip) { - // Direction of intersect point (bisecting the segment directions) - const float2 interDir = normalize(realInterPt / screenScale - center / screenScale) * turnSgn * interSgn; - const float2 interNorm = float2(-interDir.y,interDir.x); - - // "the miter is clipped by a line perpendicular to the line bisecting - // the angle between the two path segments at a distance of half the - // value of miter length from the intersection of the two path segments." - const float midExt = miterLength / 2 * strokeWidth + vertArgs.wideVec.edge; - // todo: This isn't quite right, the edges should stay parallel up to the clip point. - const float miterCapExt = w2 * abs(cos(theta)); - - // todo: fix texture Y-coord - switch (whichVert) { - // Start cap, 0-3-1, 0-2-3 - case 0: - // Out to the miter cap, then perpendicular. - pos = center + interDir * midExt * screenScale - - turnSgn * interNorm * miterCapExt * screenScale; - texX *= -turnSgn; - break; - case 1: - if (turningLeft) { - // Extend segment endpoint outward along the intersection angle by the miter length - pos = center + interDir * midExt * screenScale; - texX = -texX; - } else { - pos = corner; - } - break; - case 2: - if (turningLeft) { - pos = corner; - } else { - // Extend segment endpoint outward along the intersection angle by the miter length - pos = center + interDir * midExt * screenScale; - texX = -texX; - } - break; - case 3: - if (turningLeft) { - pos = interPt; - } else { - pos = center + (center - interPt); - texX = -texX; - } - break; - // Body segment, 4-7-5, 4-6-7 - // Merge inside corners to avoid overlap, use default outside corner. - case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; - // End cap, 8-11-9, 8-10-11 - case 8: - if (turningLeft) { - pos = center + interDir * midExt * screenScale + - -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; - } else { - pos = center + (interPt - center); - //texX = -texX; - } - break; - case 9: - if (turningLeft) { - pos = otherCorner; - texX = -texX; - } else { - pos = corner; - } - break; - case 10: - if (turningLeft) { - pos = center + interDir * midExt * screenScale; - } else { - // Extend segment endpoint away from the intersect point by the miter length - pos = center + interDir * midExt * screenScale; - texX = -texX; - } - break; - case 11: - if (turningLeft) { - pos = interPt; - } else { - pos = center + interDir * midExt * screenScale + - float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + } else { + if (joinType == WKSVertexLineJoinNone || !intersectValid) { + // Trivial case, just use the corner + outVert.position = float4(pos, 0, 1); + outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); + return outVert; + } + + // Since there is one, use the intersect point by default + pos = interPt; + + // We'll need the corner on the opposite side for several things. + const float2 realOtherEdge = (-interSgn * w2 + centerLine) * screenScale; + const float2 otherCorner = center + centers[2].norm * realOtherEdge; + + // Miter is mostly handled above by using the intersect points instead of corners. + if (joinType == WKSVertexLineJoinMiter) { + // Add the difference between the intersection point and the original corner, + // accounting for the textures being based on un-projected coordinates. + texY += dot(interPt - corner, centers[2].nDir) / projScale; + } + // For a bevel, use the intersect point for the inside of the turn, but not the outside. + // Round piggypacks on bevel. + else if (joinType == WKSVertexLineJoinBevel || joinType == WKSVertexLineJoinRound) { + switch (whichVert) { + // Start cap, 0-3-1, 0-2-3 + case 2: discardTri = true; // not using triangle #2, fall through + case 0: pos = turningLeft ? corner : interPt; break; + case 1: + if (turningLeft) { + // Opposite corner on the previous segment + const float2 prevOtherCorner = center + centers[1].norm * realOtherEdge; + // Use the point halfway between the outside corner and the one on the opposite side. + pos = otherCorner + (prevOtherCorner - otherCorner) / 2; + // We're placing the vertex on the "wrong" side, so fix the texture X. + texX = -texX; + } else { + // Same corner on the previous segment + const float2 prevCorner = center + centers[1].norm * realEdge; + pos = corner + (prevCorner - corner) / 2; + } + break; + case 3: pos = turningLeft ? interPt : corner; break; + // Body segment, 4-7-5, 4-6-7 + // Merge inside corners to avoid overlap, use default outside corner. + case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; + // End cap, 8-11-9, 8-10-11 + case 10: discardTri = true; // Not using triangle #2, fall through + case 8: pos = turningLeft ? corner : interPt; break; + case 9: pos = turningLeft ? interPt : corner; break; + case 11: + if (turningLeft) { + // Opposite corner on the next segment + const float2 nextOtherCorner = center + centers[3].norm * realOtherEdge; + // Use the point halfway between the outside corner and the one on the opposite side. + pos = otherCorner + (nextOtherCorner - otherCorner) / 2; + // We're placing the vertex on the "wrong" side, so fix the texture X. + texX = -texX; + } else { + // Same corner on the next segment + const float2 nextCorner = center + centers[3].norm * realEdge; + pos = corner + (nextCorner - corner) / 2; + } + break; + } + + // For the round case, extend the center of the bevel out into a "tip," which will be + // turned into a round extension by the fragment shader. This isn't exactly right, but + // I think we need more geometry to do better. + // todo: fix texture Y-coords + if (joinType == WKSVertexLineJoinRound && whichPoly != WideVecPolyBodyGeom) { + outVert.roundJoin = true; + outVert.centerPos = offsetPt / screenScale; + outVert.screenPos = pos / screenScale; + + // Direction bisecting the turn toward the outside (right for a left turn) + outVert.midDir = normalize(isEnd ? (centers[2].nDir - centers[3].nDir) : + (centers[1].nDir - centers[2].nDir)); + + if (whichVert == 1 || whichVert == 11) { + // Extend the corner far enough to cover the necessary round-ness. + // This should probably be related to the turn angle, we're just fudging it. + const float extend = 2 * w2; + pos += outVert.midDir * extend * screenScale; + outVert.screenPos = pos / screenScale; } - break; + } + } else if (joinType == WKSVertexLineJoinMiterClip) { + // Direction of intersect point (bisecting the segment directions) + const float2 interDir = normalize(realInterPt / screenScale - center / screenScale) * turnSgn * interSgn; + const float2 interNorm = float2(-interDir.y,interDir.x); + + // "the miter is clipped by a line perpendicular to the line bisecting + // the angle between the two path segments at a distance of half the + // value of miter length from the intersection of the two path segments." + const float midExt = miterLength / 2 * strokeWidth + vertArgs.wideVec.edge; + // todo: This isn't quite right, the edges should stay parallel up to the clip point. + const float miterCapExt = w2 * abs(cos(theta)); + + // todo: fix texture Y-coord + switch (whichVert) { + // Start cap, 0-3-1, 0-2-3 + case 0: + // Out to the miter cap, then perpendicular. + pos = center + interDir * midExt * screenScale - + turnSgn * interNorm * miterCapExt * screenScale; + texX *= -turnSgn; + break; + case 1: + if (turningLeft) { + // Extend segment endpoint outward along the intersection angle by the miter length + pos = center + interDir * midExt * screenScale; + texX = -texX; + } else { + pos = corner; + } + break; + case 2: + if (turningLeft) { + pos = corner; + } else { + // Extend segment endpoint outward along the intersection angle by the miter length + pos = center + interDir * midExt * screenScale; + texX = -texX; + } + break; + case 3: + if (turningLeft) { + pos = interPt; + } else { + pos = center + (center - interPt); + texX = -texX; + } + break; + // Body segment, 4-7-5, 4-6-7 + // Merge inside corners to avoid overlap, use default outside corner. + case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; + // End cap, 8-11-9, 8-10-11 + case 8: + if (turningLeft) { + pos = center + interDir * midExt * screenScale + + -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + } else { + pos = center + (interPt - center); + } + break; + case 9: + pos = turningLeft ? otherCorner : corner; + texX *= turnSgn; + break; + case 10: + if (turningLeft) { + pos = center + interDir * midExt * screenScale; + } else { + // Extend segment endpoint away from the intersect point by the miter length + pos = center + interDir * midExt * screenScale; + texX = -texX; + } + break; + case 11: + if (turningLeft) { + pos = interPt; + } else { + pos = center + interDir * midExt * screenScale + + float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + } + break; + } } } - // Add the difference betweent the intersection point and the original corner, - // accounting for the textures being based on un-projected coordinates. - texY += dot(interPt - corner, centers[2].nDir) / projScale; - outVert.position = float4(pos, discardTri ? -1e6 : 0, discardTri ? NAN : 1); // Opposite values because we're showing back faces. outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); From d8152b2671dc02c6a4a5fc0591da840c2a49c759 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 5 Apr 2022 10:23:54 -0700 Subject: [PATCH 68/78] Fix endcap vertex ordering --- ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index d27db15366..2b400de934 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1162,8 +1162,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (capType == WhirlyKitShader::WKSVertexLineCapSquare || capType == WhirlyKitShader::WKSVertexLineCapRound) { switch (whichVert) { - case 0: case 1: case 8: case 9: pos = corner; break; - case 2: case 3: case 10: case 11: + case 2: case 3: case 8: case 9: pos = corner; break; + case 0: case 1: case 10: case 11: pos = corner + centers[2].nDir * w2 * screenScale * (isEnd ? 1 : -1); texY += length(w2 * screenScale) / projScale * (isEnd ? 1 : -1); break; From 2d32b120b2bc949a066bcec0e744e9648e79e7e7 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 5 Apr 2022 12:20:36 -0700 Subject: [PATCH 69/78] Fix some minor issues caused by anisotropy in the screen scale being applied multiple times --- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 2b400de934..8575a53508 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -834,7 +834,6 @@ fragment float4 fragmentTri_wideVec( struct IntersectInfo { bool valid; float2 interPt; - float dist2; float c; float ta,tb; }; @@ -868,7 +867,6 @@ IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, return { .valid = true, .interPt = inter, - .dist2 = distance_squared(p1, inter), .c = wedge(p2 - p1, p1 - p0), .ta = 0.0, .tb = 0.0, @@ -886,10 +884,8 @@ struct TriWideArgBufferC { struct CenterInfo { /// Screen coordinates of the line segment endpoint float2 screenPos; - /// Vector of the line segment (un-normalized) - float2 dir; - /// Length of the segment squared - float len2; + /// Length of the segment (in screen coordinates) + float len; /// Normalized direction of the segment float2 nDir; /// Normalized plane normal, perpendicular to the segment @@ -1028,19 +1024,20 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( const float texRepeatY = vertArgs.wideVec.texRepeat; const float texScale = 1 / pixScale / texRepeatY; // texture coords / display coords = ~1000 - // Calculate directions and normals + // Calculate directions and normals. Done in isotropic coords to + // avoid skewing everything when later multiplying by `screenScale`. for (unsigned int ii=1;ii<4;ii++) { if (instValid[ii-1]) { - centers[ii].dir = centers[ii].screenPos - centers[ii-1].screenPos; - centers[ii].len2 = length_squared(centers[ii].dir); - centers[ii].nDir = normalize(centers[ii].dir); - centers[ii].norm = float2(-centers[ii].nDir.y,centers[ii].nDir.x); + const float2 scaledDir = (centers[ii].screenPos - centers[ii-1].screenPos) / screenScale; + centers[ii].len = length(scaledDir); + centers[ii].nDir = normalize(scaledDir); + centers[ii].norm = float2(-centers[ii].nDir.y, centers[ii].nDir.x); } } // Textures are based on un-projected coords, we'll need to know how that relates to projected // ones in order to adjust texture coordinates based on screen-based intersections. - const float projScale = length(centers[2].dir) / inst[1].segLen; + const float projScale = centers[2].len / inst[1].segLen; // Pull out the center line offset, or calculate one float centerLine = vertArgs.wideVec.offset; @@ -1100,17 +1097,20 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( turningLeft = (interInfo.c < 0); realInterPt = interPt = interInfo.interPt; + const float2 interVec = (interPt - cur.screenPos) / screenScale; + const float interDist = length(interVec); + // Limit the distance to the smaller of half way back along the previous segment // or half way forward along the next one to keep consecutive segments from colliding. // // For up to four times that distance, adjust the intersection point back along its // length to that limit, effectively narrowing the line instead of just breaking down. // todo: too clever by half... maybe make this opt-in? - const float maxDist2 = min(cur.len2, next.len2); - if (interInfo.dist2 <= maxDist2 / 4) { + const float maxDist = min(cur.len, next.len) / 2; + if (interDist <= maxDist) { intersectValid = true; - } else if (vertArgs.wideVec.interClipLimit > 0 && interInfo.dist2 <= maxDist2 * vertArgs.wideVec.interClipLimit) { - interPt = cur.screenPos + normalize(interPt - cur.screenPos) * sqrt(maxDist2) / 2; + } else if (vertArgs.wideVec.interClipLimit > 0 && interDist <= maxDist * vertArgs.wideVec.interClipLimit) { + interPt = cur.screenPos + normalize(interVec) * maxDist * screenScale; intersectValid = true; } } @@ -1165,7 +1165,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( case 2: case 3: case 8: case 9: pos = corner; break; case 0: case 1: case 10: case 11: pos = corner + centers[2].nDir * w2 * screenScale * (isEnd ? 1 : -1); - texY += length(w2 * screenScale) / projScale * (isEnd ? 1 : -1); + texY += w2 / projScale * (isEnd ? 1 : -1); break; } } @@ -1194,7 +1194,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (joinType == WKSVertexLineJoinMiter) { // Add the difference between the intersection point and the original corner, // accounting for the textures being based on un-projected coordinates. - texY += dot(interPt - corner, centers[2].nDir) / projScale; + texY += dot(interPt / screenScale - corner / screenScale, centers[2].nDir) / projScale; } // For a bevel, use the intersect point for the inside of the turn, but not the outside. // Round piggypacks on bevel. From 61d4032b87c87183afd01486e63bf23bcb60f312 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 5 Apr 2022 12:49:57 -0700 Subject: [PATCH 70/78] Refactor intersection, re-locate the centerline intersect point when offsets are in use. --- .../testCases/WideVectorsTestCase.swift | 15 +++-- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 57 ++++++++++++------- 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 9a748242d6..9de0a94b62 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -271,11 +271,15 @@ class WideVectorsTestCase : WideVectorsTestCaseBase ] } - private func offset(_ vc: MaplyBaseViewController, slot: Int, perf: Bool) -> [MaplyComponentObject?] { + private func offset(_ vc: MaplyBaseViewController, slot: Int, perf: Bool, fudge: Bool) -> [MaplyComponentObject?] { initTex(vc); + if (fudge && !perf) { + return [] + } + // Note vary in lon rather than lat so that they are projected identically. - let lat = Float(32.0) + let lat = Float(32.0) + (fudge ? 2.0 : 0.0) let lon = Float(-150.0) + (perf ? 3.0 : 0.0) var coords = [ MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), @@ -302,7 +306,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyWideVecOffset: 0, kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, kMaplyWideVecMiterLimit: 4, - kMaplyWideVecFallbackMode: kMaplyWideVecFallbackClip, + kMaplyWideVecFallbackMode: fudge ? kMaplyWideVecFallbackClip : kMaplyWideVecFallbackNone, kMaplyDrawableName: "WideVec-Offset", ] as [AnyHashable: Any] @@ -310,7 +314,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let wideDescOffs = wideDesc.merging([ kMaplyColor: UIColor.blue.withAlphaComponent(0.6), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 2, - kMaplyWideVecOffset: perf ? ["stops":[[8,0],[10,-70],[12,70]]] : 5, + kMaplyWideVecOffset: perf ? ["stops":[[8,0],[10,-70],[12,70]]] : 20, ], uniquingKeysWith: { (a,b) in b }) // Centerline @@ -458,7 +462,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase if let slot = zoomSlot { self.objs.append(contentsOf: [true, false].flatMap { - offset(vc, slot: slot, perf: $0) + + offset(vc, slot: slot, perf: $0, fudge: false) + + offset(vc, slot: slot, perf: $0, fudge: true) + exprs(vc, slot: slot, perf: $0) }.compactMap { $0 }) } diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 8575a53508..43ad3225ee 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -844,14 +844,11 @@ float wedge(float2 a, float2 b) { return a.x * b.y - a.y * b.x; } -// Intersect two offset lines -IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, - float2 n0,float2 n1) +// Intersect two lines +IntersectInfo intersectLines(float2 a0, float2 a1, float2 b0, float2 b1) { - const float2 lineA[] = { p0 + n0, p1 + n0 }; - const float2 lineB[] = { p1 + n1, p2 + n1 }; - const float2 dA = lineA[0] - lineA[1]; - const float2 dB = lineB[0] - lineB[1]; + const float2 dA = a0 - a1; + const float2 dB = b0 - b1; // Solve the system of equations formed by equating the lines to get their common point. const float denom = wedge(dA, dB); @@ -860,19 +857,25 @@ IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, return { .valid = false }; } - const float tA = (lineA[0].x * lineA[1].y - lineA[0].y * lineA[1].x); - const float tB = (lineB[0].x * lineB[1].y - lineB[0].y * lineB[1].x); + const float tA = (a0.x * a1.y - a0.y * a1.x); + const float tB = (b0.x * b1.y - b0.y * b1.x); const float2 inter = float2((tA * dB.x - dA.x * tB), (tA * dB.y - dA.y * tB)) / denom; return { .valid = true, .interPt = inter, - .c = wedge(p2 - p1, p1 - p0), .ta = 0.0, .tb = 0.0, }; } +// Intersect two offset lines +IntersectInfo intersectWideLines(float2 p0,float2 p1,float2 p2, + float2 n0,float2 n1) +{ + return intersectLines(p0 + n0, p1 + n0, p1 + n1, p2 + n1); +} + struct TriWideArgBufferC { UniformDrawStateA uniDrawState [[ id(WKSUniformDrawStateEntry) ]]; UniformWideVec wideVec [[ id(WKSUniformWideVecEntry) ]]; @@ -1052,6 +1055,9 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( bool intersectValid = false; bool turningLeft = false; const int interIdx = isEnd ? 1 : 0; + float2 center = centers[interIdx + 1].screenPos; // Current centerline endpoint (may move with offsets) + //const float2 realCenter = center; + float2 offsetPt = center + centerLine * screenScale; float2 interPt, realInterPt; float dotProd, theta, miterLength; // If we're on the far end of the body segment, we need this and the next two segments. @@ -1090,14 +1096,30 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( thread const CenterInfo &cur = centers[interIdx+1]; thread const CenterInfo &next = centers[interIdx+2]; const float2 edgeDist = screenScale * (interSgn * w2 + centerLine); - const IntersectInfo interInfo = intersectWideLines(prev.screenPos, cur.screenPos, next.screenPos, - edgeDist * cur.norm, edgeDist * next.norm); - + const float2 n0 = edgeDist * cur.norm; + const float2 n1 = edgeDist * next.norm; + const IntersectInfo interInfo = intersectLines(prev.screenPos + n0, cur.screenPos + n0, + cur.screenPos + n1, next.screenPos + n1); if (interInfo.valid) { - turningLeft = (interInfo.c < 0); + const float c = wedge(next.screenPos - cur.screenPos, cur.screenPos - prev.screenPos); + turningLeft = (c < 0); realInterPt = interPt = interInfo.interPt; - const float2 interVec = (interPt - cur.screenPos) / screenScale; + // If we're using offsets, we also need to know the point where the offset lines + // intersect, as the distance to the original intersection point isn't helpful. + // todo: this doesn't make sense for small angles, but what's the actual threshold? + if (abs(dotProd - 1) > 0.1) { + const float2 cn0 = cur.norm * centerLine * screenScale; + const float2 cn1 = next.norm * centerLine * screenScale; + const IntersectInfo i2 = intersectLines(prev.screenPos + cn0, cur.screenPos + cn0, + cur.screenPos + cn1, next.screenPos + cn1); + if (i2.valid) { + center = i2.interPt; + offsetPt = center; + } + } + + const float2 interVec = (interPt - center) / screenScale; const float interDist = length(interVec); // Limit the distance to the smaller of half way back along the previous segment @@ -1110,7 +1132,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (interDist <= maxDist) { intersectValid = true; } else if (vertArgs.wideVec.interClipLimit > 0 && interDist <= maxDist * vertArgs.wideVec.interClipLimit) { - interPt = cur.screenPos + normalize(interVec) * maxDist * screenScale; + interPt = center + normalize(interVec) * maxDist * screenScale; intersectValid = true; } } @@ -1137,9 +1159,6 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.maskIDs[1] = inst[1].mask1; // Work out the corner positions by extending the normals - const int centerIdx = isEnd ? 2 : 1; - const float2 center = centers[centerIdx].screenPos; - const float2 offsetPt = center + centerLine * screenScale; const float2 realEdge = (interSgn * w2 + centerLine) * screenScale; const float2 corner = center + centers[2].norm * realEdge; const float turnSgn = turningLeft ? -1 : 1; From 8834beef57165de7b45fdbfa480e41cc49cd5e6d Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Tue, 5 Apr 2022 16:44:12 -0700 Subject: [PATCH 71/78] Use intersect for miter-clip edges instead of trying for an analytical solution --- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 54 +++++++++++-------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 43ad3225ee..d7175ee97d 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1213,7 +1213,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (joinType == WKSVertexLineJoinMiter) { // Add the difference between the intersection point and the original corner, // accounting for the textures being based on un-projected coordinates. - texY += dot(interPt / screenScale - corner / screenScale, centers[2].nDir) / projScale; + texY += dot((interPt - corner) / screenScale, centers[2].nDir) / projScale; } // For a bevel, use the intersect point for the inside of the turn, but not the outside. // Round piggypacks on bevel. @@ -1270,8 +1270,9 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.screenPos = pos / screenScale; // Direction bisecting the turn toward the outside (right for a left turn) - outVert.midDir = normalize(isEnd ? (centers[2].nDir - centers[3].nDir) : - (centers[1].nDir - centers[2].nDir)); + const float2 mid = isEnd ? (centers[2].nDir - centers[3].nDir) : + (centers[1].nDir - centers[2].nDir); + outVert.midDir = normalize(mid / screenScale); if (whichVert == 1 || whichVert == 11) { // Extend the corner far enough to cover the necessary round-ness. @@ -1290,18 +1291,20 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // the angle between the two path segments at a distance of half the // value of miter length from the intersection of the two path segments." const float midExt = miterLength / 2 * strokeWidth + vertArgs.wideVec.edge; - // todo: This isn't quite right, the edges should stay parallel up to the clip point. - const float miterCapExt = w2 * abs(cos(theta)); // todo: fix texture Y-coord switch (whichVert) { // Start cap, 0-3-1, 0-2-3 - case 0: - // Out to the miter cap, then perpendicular. - pos = center + interDir * midExt * screenScale - - turnSgn * interNorm * miterCapExt * screenScale; + case 0: { + // Intersect the perpendicular to the angle bisector (the miter clip edge) with the line edge + pos = center + interDir * midExt * screenScale; + const float2 c = turningLeft ? corner : otherCorner; + const auto inter = intersectLines(pos, pos + interNorm * screenScale, c, c + centers[2].nDir * screenScale); + pos = inter.interPt; + discardTri |= !inter.valid; texX *= -turnSgn; break; + } case 1: if (turningLeft) { // Extend segment endpoint outward along the intersection angle by the miter length @@ -1324,6 +1327,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (turningLeft) { pos = interPt; } else { + // The other intersect point pos = center + (center - interPt); texX = -texX; } @@ -1332,24 +1336,31 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Merge inside corners to avoid overlap, use default outside corner. case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; // End cap, 8-11-9, 8-10-11 - case 8: + case 8: { + // Intersect the perpendicular to the angle bisector (the miter clip edge) with the line edge + pos = center + interDir * midExt * screenScale; + const float2 c = turningLeft ? corner : otherCorner; + const auto inter = intersectLines(pos, pos+interNorm*screenScale, c, c+centers[2].nDir*screenScale); + pos = inter.interPt; + discardTri |= !inter.valid; + texX = -turnSgn; + break; + } + case 9: if (turningLeft) { - pos = center + interDir * midExt * screenScale + - -float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + pos = otherCorner; + texX = -texX; } else { - pos = center + (interPt - center); + // Extend the turn bisector to the miter clip edge + pos = center + interDir * midExt * screenScale; } break; - case 9: - pos = turningLeft ? otherCorner : corner; - texX *= turnSgn; - break; case 10: if (turningLeft) { + // Extend the turn bisector to the miter clip edge pos = center + interDir * midExt * screenScale; } else { - // Extend segment endpoint away from the intersect point by the miter length - pos = center + interDir * midExt * screenScale; + pos = otherCorner; texX = -texX; } break; @@ -1357,8 +1368,9 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (turningLeft) { pos = interPt; } else { - pos = center + interDir * midExt * screenScale + - float2(-interDir.y,interDir.x) * miterCapExt * screenScale; + // The other intersect point + pos = center + (center - interPt); + texX = -texX; } break; } From a790b2edcd8314564a94164684912a69bc6ad073 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 6 Apr 2022 09:17:30 -0700 Subject: [PATCH 72/78] Simplify miter-clip, combine similar cases. --- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 159 ++++++------------ 1 file changed, 48 insertions(+), 111 deletions(-) diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index d7175ee97d..25a9688f02 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1181,7 +1181,9 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (capType == WhirlyKitShader::WKSVertexLineCapSquare || capType == WhirlyKitShader::WKSVertexLineCapRound) { switch (whichVert) { - case 2: case 3: case 8: case 9: pos = corner; break; + case 2: case 3: case 8: case 9: + pos = corner; + break; case 0: case 1: case 10: case 11: pos = corner + centers[2].nDir * w2 * screenScale * (isEnd ? 1 : -1); texY += w2 / projScale * (isEnd ? 1 : -1); @@ -1220,44 +1222,24 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( else if (joinType == WKSVertexLineJoinBevel || joinType == WKSVertexLineJoinRound) { switch (whichVert) { // Start cap, 0-3-1, 0-2-3 - case 2: discardTri = true; // not using triangle #2, fall through - case 0: pos = turningLeft ? corner : interPt; break; - case 1: - if (turningLeft) { - // Opposite corner on the previous segment - const float2 prevOtherCorner = center + centers[1].norm * realOtherEdge; - // Use the point halfway between the outside corner and the one on the opposite side. - pos = otherCorner + (prevOtherCorner - otherCorner) / 2; - // We're placing the vertex on the "wrong" side, so fix the texture X. - texX = -texX; - } else { - // Same corner on the previous segment - const float2 prevCorner = center + centers[1].norm * realEdge; - pos = corner + (prevCorner - corner) / 2; - } + case 2: case 10: + discardTri = true; // Not using triangle #2 break; - case 3: pos = turningLeft ? interPt : corner; break; - // Body segment, 4-7-5, 4-6-7 // Merge inside corners to avoid overlap, use default outside corner. - case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; - // End cap, 8-11-9, 8-10-11 - case 10: discardTri = true; // Not using triangle #2, fall through - case 8: pos = turningLeft ? corner : interPt; break; - case 9: pos = turningLeft ? interPt : corner; break; - case 11: - if (turningLeft) { - // Opposite corner on the next segment - const float2 nextOtherCorner = center + centers[3].norm * realOtherEdge; - // Use the point halfway between the outside corner and the one on the opposite side. - pos = otherCorner + (nextOtherCorner - otherCorner) / 2; - // We're placing the vertex on the "wrong" side, so fix the texture X. - texX = -texX; - } else { - // Same corner on the next segment - const float2 nextCorner = center + centers[3].norm * realEdge; - pos = corner + (nextCorner - corner) / 2; - } + case 0: case 3: case 8: case 9: + case 4: case 5: case 6: case 7: + pos = isInsideEdge ? interPt : corner; + break; + case 1: case 11: { + // Use the point halfway between the outside corner and the one on the opposite side. + const float2 n = centers[(whichVert == 1) ? 1 : 3].norm; + const float2 c = turningLeft ? otherCorner : corner; + const float2 e = turningLeft ? realOtherEdge : realEdge; + pos = (center + c + n * e) / 2; + // We're placing the vertex on the "wrong" side, so fix the texture X. + texX *= turnSgn; break; + } } // For the round case, extend the center of the bevel out into a "tip," which will be @@ -1268,7 +1250,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.roundJoin = true; outVert.centerPos = offsetPt / screenScale; outVert.screenPos = pos / screenScale; - + // Direction bisecting the turn toward the outside (right for a left turn) const float2 mid = isEnd ? (centers[2].nDir - centers[3].nDir) : (centers[1].nDir - centers[2].nDir); @@ -1284,96 +1266,51 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } } else if (joinType == WKSVertexLineJoinMiterClip) { // Direction of intersect point (bisecting the segment directions) - const float2 interDir = normalize(realInterPt / screenScale - center / screenScale) * turnSgn * interSgn; - const float2 interNorm = float2(-interDir.y,interDir.x); - + const float2 interDir = normalize((realInterPt - center) / screenScale) * turnSgn * interSgn; + // And the perpendicular + const float2 interNorm = float2(-interDir.y, interDir.x); + // Distance from centerline intersect and edge intersect + const float interDist = length((realInterPt - center) / screenScale); // "the miter is clipped by a line perpendicular to the line bisecting // the angle between the two path segments at a distance of half the // value of miter length from the intersection of the two path segments." const float midExt = miterLength / 2 * strokeWidth + vertArgs.wideVec.edge; - // todo: fix texture Y-coord switch (whichVert) { // Start cap, 0-3-1, 0-2-3 - case 0: { - // Intersect the perpendicular to the angle bisector (the miter clip edge) with the line edge - pos = center + interDir * midExt * screenScale; - const float2 c = turningLeft ? corner : otherCorner; - const auto inter = intersectLines(pos, pos + interNorm * screenScale, c, c + centers[2].nDir * screenScale); - pos = inter.interPt; - discardTri |= !inter.valid; - texX *= -turnSgn; + case 0: case 8: { + // half width of the clipped miter cap + const float miterEdgeW2 = (interDist - midExt) * tan(M_PI_2_F - theta / 2); + // Out to the miter cap, then perpendicular to the line edge. + pos = center + screenScale * (interDir * midExt - + interNorm * miterEdgeW2 * turnSgn * (whichVert ? -1 : 1)); break; } - case 1: - if (turningLeft) { - // Extend segment endpoint outward along the intersection angle by the miter length - pos = center + interDir * midExt * screenScale; - texX = -texX; - } else { - pos = corner; - } + case 1: case 10: + // Extend the turn bisector to the miter clip edge + pos = turningLeft ? (center + interDir * midExt * screenScale) : ((whichVert == 1) ? corner : otherCorner); break; - case 2: - if (turningLeft) { - pos = corner; - } else { - // Extend segment endpoint outward along the intersection angle by the miter length - pos = center + interDir * midExt * screenScale; - texX = -texX; - } + case 2: case 9: + // Extend segment endpoint outward along the intersection angle by the miter length + pos = turningLeft ? ((whichVert == 2) ? corner : otherCorner) : (center + interDir * midExt * screenScale); break; - case 3: - if (turningLeft) { - pos = interPt; - } else { - // The other intersect point - pos = center + (center - interPt); - texX = -texX; - } + case 3: case 11: + // The edge intersect, or the one on the other side + pos = turningLeft ? interPt : (center + (center - interPt)); break; // Body segment, 4-7-5, 4-6-7 // Merge inside corners to avoid overlap, use default outside corner. - case 4: case 5: case 6: case 7: pos = isInsideEdge ? interPt : corner; break; - // End cap, 8-11-9, 8-10-11 - case 8: { - // Intersect the perpendicular to the angle bisector (the miter clip edge) with the line edge - pos = center + interDir * midExt * screenScale; - const float2 c = turningLeft ? corner : otherCorner; - const auto inter = intersectLines(pos, pos+interNorm*screenScale, c, c+centers[2].nDir*screenScale); - pos = inter.interPt; - discardTri |= !inter.valid; - texX = -turnSgn; - break; - } - case 9: - if (turningLeft) { - pos = otherCorner; - texX = -texX; - } else { - // Extend the turn bisector to the miter clip edge - pos = center + interDir * midExt * screenScale; - } - break; - case 10: - if (turningLeft) { - // Extend the turn bisector to the miter clip edge - pos = center + interDir * midExt * screenScale; - } else { - pos = otherCorner; - texX = -texX; - } - break; - case 11: - if (turningLeft) { - pos = interPt; - } else { - // The other intersect point - pos = center + (center - interPt); - texX = -texX; - } + case 4: case 5: case 6: case 7: + pos = isInsideEdge ? interPt : corner; break; } + + // Fix texture X-coords for vertices that were placed opposite the usual even/odd side. + // todo: fix texture Y-coord + switch (whichVert) { + case 1: case 9: texX = -texX; // fall through + case 0: case 2: case 3: case 8: case 10: case 11: texX *= -turnSgn; + } } } From 1e98339ed6e9f9eddb87eb533dcfad51c8841d81 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 6 Apr 2022 11:20:26 -0700 Subject: [PATCH 73/78] Add line width and edge blend test. --- .../testCases/WideVectorsTestCase.swift | 107 +++++++++++++++--- 1 file changed, 90 insertions(+), 17 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 9de0a94b62..69d9ec1d8c 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -14,6 +14,54 @@ class WideVectorsTestCase : WideVectorsTestCaseBase super.init(name: "Wide Vectors", supporting: [.map, .globe]) } + private func widths(_ vc: MaplyBaseViewController, perf: Bool) -> [MaplyComponentObject?] { + initTex(vc) + + return (0..<6).flatMap { j -> [MaplyComponentObject] in + (0..<50).flatMap { i -> [MaplyComponentObject] in + let vsep = Float(0.1) + let hsep = Float(3.0) + let lat = Float(60.0) + vsep * Float(i) + let lon = Float(140.0) + (perf ? hsep * 1.1 : 0) + (Float(j) * hsep * 2.2) + var coords = [ + MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), + MaplyCoordinateMakeWithDegrees(lon + hsep, lat), + ] + + let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) + subdiv(vc, vecObj, 0.0001) + + let w = Float(i) / 3 + let e = Float(j) / 2 + + let desc = [ + kMaplyVecWidth: w, + kMaplyWideVecEdgeFalloff: e, + kMaplyColor: UIColor.red.withAlphaComponent(0.8), + kMaplyEnable: true, + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, + kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, + kMaplyDrawableName: String(format: "WideVec-width%d%@", i, perf ? "-perf" : "") + ] as [AnyHashable: Any] + + let lblDesc = [ + kMaplyTextColor: UIColor.magenta, + kMaplyEnable: true, + kMaplyFont: UIFont.systemFont(ofSize: 8.0), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, + ] as [AnyHashable: Any] + let lbl = MaplyScreenLabel() + lbl.loc = MaplyCoordinateMakeWithDegrees(lon, lat + vsep / 3) + lbl.text = String(format: "%.2f/%.2f%@", w, e, perf ? " P" : " L") + + return [ + vc.addWideVectors([vecObj], desc: desc, mode: .current), + vc.addScreenLabels([lbl], desc: lblDesc, mode: .current) + ].compactMap { $0 } + } + } + } + private func joins(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject?] { @@ -39,10 +87,16 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } let desc = [ + kMaplyEnable: false, + kMaplyColor: UIColor.green.withAlphaComponent(0.5), + kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 2, + ] as [AnyHashable: Any] + let wideDesc = [ + kMaplyEnable: false, kMaplyZoomSlot: slot, kMaplyVecWidth: perf ? ["stops":[[2,5],[12,80]]] : 40, kMaplyColor: perf ? UIColor.red.withAlphaComponent(0.35) : UIColor.blue.withAlphaComponent(0.35), - kMaplyEnable: false, + kMaplyWideVecOffset: 0, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, kMaplyWideVecFallbackMode: kMaplyWideVecFallbackClip, @@ -65,7 +119,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase subdiv ? "\nsubdiv" : "", close ? "\nclosed" : "") return [ - vc.addWideVectors([vecObj], desc: desc, mode: .current), + vc.addVectors([vecObj], desc: desc, mode: .current), + vc.addWideVectors([vecObj], desc: wideDesc, mode: .current), vc.addScreenLabels([lbl], desc: lblDesc, mode: .current) ] } @@ -431,13 +486,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let curBound = curBound(vc) let slot = zoomSlot ?? -1 - timerObjs.append(contentsOf: joins(vc, slot: slot, bound: curBound).compactMap { $0 }) - timerObjs.append(contentsOf: caps(vc, slot: slot, bound: curBound).compactMap { $0 }) + add(to: &timerObjs, joins(vc, slot: slot, bound: curBound)) + add(to: &timerObjs, caps(vc, slot: slot, bound: curBound)) if let slot = zoomSlot { - timerObjs.append(contentsOf: [true, false].flatMap { + add(to: &timerObjs, [true, false].flatMap { texs(vc, bound: curBound, slot: slot, perf: $0) - }.compactMap { $0 }) + }) } vc.enable(timerObjs, mode: .current) vc.remove(oldObjs, mode: .current) @@ -460,33 +515,44 @@ class WideVectorsTestCase : WideVectorsTestCaseBase overlap(vc); vecColors(vc); + add(to: &objs, [true, false].flatMap { + widths(vc, perf: $0) + }) + if let slot = zoomSlot { - self.objs.append(contentsOf: [true, false].flatMap { + add(to: &self.objs, [true, false].flatMap { offset(vc, slot: slot, perf: $0, fudge: false) + offset(vc, slot: slot, perf: $0, fudge: true) + exprs(vc, slot: slot, perf: $0) - }.compactMap { $0 }) + }) } - joinTimer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { [weak self] _ in - if let vc = self?.baseViewController { - self?.timerTick(vc) + DispatchQueue.main.async { + self.joinTimer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: true) { [weak self] _ in + if let vc = self?.baseViewController { + self?.timerTick(vc) + } } } } override func setUpWithGlobe(_ vc: WhirlyGlobeViewController) { baseCase.setUpWithGlobe(vc) - wideLineTest(vc) - //loadShapeFile(vc) - //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 39.0), height: 0.25, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + DispatchQueue.global(qos: .background).async { + self.wideLineTest(vc) + self.loadShapeFile(vc) + } + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-135.0, 42.0), height: 0.05, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-170.0, 70.0), height: 0.25, heading: 0.0, time: 0.1) + //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } override func setUpWithMap(_ vc: MaplyViewController) { baseCase.setUpWithMap(vc) - wideLineTest(vc) - //loadShapeFile(vc) + DispatchQueue.global(qos: .background).async { + self.wideLineTest(vc) + self.loadShapeFile(vc) + } vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 20.0), height: 0.25, heading: 0.0, time: 0.1) //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } @@ -511,6 +577,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase baseCase.stop() } + private func add(to a: inout [MaplyComponentObject], _ items: [MaplyComponentObject]) { + a.append(contentsOf: items) + } + private func add(to a: inout [MaplyComponentObject], _ items: [MaplyComponentObject?]) { + a.append(contentsOf: items.compactMap { $0 }) + } + private var zoomSlot: Int? private var dashTex: MaplyTexture? private var objs = [MaplyComponentObject]() From 03ac2f4df8b1d48dcf422e02f9706c6a759aeb94 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Wed, 6 Apr 2022 15:38:14 -0700 Subject: [PATCH 74/78] Fix bugs in segment intersect adjustment --- .../testCases/MapTilerTestCase.swift | 1 + .../testCases/WideVectorsTestCase.swift | 46 ++++++------ .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 75 ++++++++++--------- 3 files changed, 64 insertions(+), 58 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift index 776d355819..37c1dfd462 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift @@ -132,6 +132,7 @@ class MapTilerTestCase: MaplyTestCase { func setup(_ map: MapboxKindaMap) { map.styleSettings.textScale = 1.1 + map.styleSettings.useWideVectors = true; map.styleSettings.usePerfWideVectors = true } diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 69d9ec1d8c..46c7f68b01 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -362,7 +362,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, kMaplyWideVecMiterLimit: 4, kMaplyWideVecFallbackMode: fudge ? kMaplyWideVecFallbackClip : kMaplyWideVecFallbackNone, - kMaplyDrawableName: "WideVec-Offset", + kMaplyDrawableName: "WideVec-Offset-Baseline", ] as [AnyHashable: Any] // Offset line @@ -370,6 +370,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyColor: UIColor.blue.withAlphaComponent(0.6), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 2, kMaplyWideVecOffset: perf ? ["stops":[[8,0],[10,-70],[12,70]]] : 20, + kMaplyDrawableName: String(format: "WideVec-Offset-%@%@", perf ? "-perf" : "", fudge ? "-clip" : ""), ], uniquingKeysWith: { (a,b) in b }) // Centerline @@ -387,7 +388,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase ] as [AnyHashable: Any] let lbl = MaplyScreenLabel() lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) - lbl.text = String(format: "offset perf=%d", perf) + lbl.text = String(format: "offset%@%@", perf ? "-perf" : "", fudge ? "-clip" : "") lbl.layoutImportance = MAXFLOAT return [ @@ -501,24 +502,9 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private func wideLineTest(_ vc: MaplyBaseViewController) { initSlot() - addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); - addGeoJson("moving-lawn.geojson", viewC: vc); - addGeoJson("spiral.geojson", viewC: vc); - addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); - addGeoJson("track.geojson", viewC: vc); - //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); - addGeoJson("USA.geojson", viewC:vc); - //addGeoJson("testJson.json", viewC:vc); - //addGeoJson("straight.geojson", viewC:vc); - //addGeoJson("uturn.geojson", viewC:vc); - overlap(vc); vecColors(vc); - add(to: &objs, [true, false].flatMap { - widths(vc, perf: $0) - }) - if let slot = zoomSlot { add(to: &self.objs, [true, false].flatMap { offset(vc, slot: slot, perf: $0, fudge: false) + @@ -534,27 +520,39 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } } } + + addGeoJson("sawtooth.geojson", dashPattern: nil, width: 50.0, edge: 20.0, simple: false, viewC: vc); + addGeoJson("moving-lawn.geojson", viewC: vc); + addGeoJson("spiral.geojson", viewC: vc); + addGeoJson("square.geojson", dashPattern: [2, 2], width: 10.0, viewC: vc); + addGeoJson("track.geojson", viewC: vc); + //addGeoJson("uturn2.geojson", dashPattern:[16, 16], width:40, viewC:vc); + addGeoJson("USA.geojson", viewC:vc); + //addGeoJson("testJson.json", viewC:vc); + //addGeoJson("straight.geojson", viewC:vc); + //addGeoJson("uturn.geojson", viewC:vc); + + add(to: &objs, [true, false].flatMap { + widths(vc, perf: $0) + }) + + loadShapeFile(vc) } override func setUpWithGlobe(_ vc: WhirlyGlobeViewController) { baseCase.setUpWithGlobe(vc) DispatchQueue.global(qos: .background).async { self.wideLineTest(vc) - self.loadShapeFile(vc) } - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-135.0, 42.0), height: 0.05, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-170.0, 70.0), height: 0.25, heading: 0.0, time: 0.1) - //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } override func setUpWithMap(_ vc: MaplyViewController) { baseCase.setUpWithMap(vc) DispatchQueue.global(qos: .background).async { self.wideLineTest(vc) - self.loadShapeFile(vc) } - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-133.0, 20.0), height: 0.25, heading: 0.0, time: 0.1) - //vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) } override func stop() { diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 25a9688f02..876a063575 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1037,7 +1037,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( centers[ii].norm = float2(-centers[ii].nDir.y, centers[ii].nDir.x); } } - + // Textures are based on un-projected coords, we'll need to know how that relates to projected // ones in order to adjust texture coordinates based on screen-based intersections. const float projScale = centers[2].len / inst[1].segLen; @@ -1056,10 +1056,10 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( bool turningLeft = false; const int interIdx = isEnd ? 1 : 0; float2 center = centers[interIdx + 1].screenPos; // Current centerline endpoint (may move with offsets) - //const float2 realCenter = center; float2 offsetPt = center + centerLine * screenScale; - float2 interPt, realInterPt; - float dotProd, theta, miterLength; + float2 interPt(0, 0), realInterPt(0, 0); + float dotProd = 0, theta = 0, miterLength = 0; + // If we're on the far end of the body segment, we need this and the next two segments. // Otherwise we need the previous, this, and the next segment. if (instValid[interIdx] && instValid[interIdx+1] && instValid[interIdx+2]) { @@ -1068,12 +1068,13 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( dotProd = dot(centers[interIdx+1].nDir, centers[interIdx+2].nDir); if (-wideVecMaxTurnThreshold < dotProd && dotProd < wideVecMaxTurnThreshold && - abs(dotProd - 1.0) >= wideVecMinTurnThreshold) { + abs(abs(dotProd) - 1) >= wideVecMinTurnThreshold) { + // Turn angle, both vectors are normalized theta = acos(dotProd); // todo: miter-clip doesn't work right at small angles - if (joinType == WKSVertexLineJoinMiterClip && abs(dotProd - 1.0) < 0.1) { + if (joinType == WKSVertexLineJoinMiterClip && abs(abs(dotProd) - 1) < 0.01) { joinType = WKSVertexLineJoinMiter; } @@ -1105,34 +1106,38 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( turningLeft = (c < 0); realInterPt = interPt = interInfo.interPt; + // Limit the distance to the smaller of half way back along the previous segment + // or half way forward along the next one to keep consecutive segments from colliding. + const float maxAdjDist = min(cur.len, next.len) / 2; + // If we're using offsets, we also need to know the point where the offset lines // intersect, as the distance to the original intersection point isn't helpful. // todo: this doesn't make sense for small angles, but what's the actual threshold? - if (abs(dotProd - 1) > 0.1) { + if (centerLine != 0 && abs(abs(dotProd) - 1) > 0.05) { const float2 cn0 = cur.norm * centerLine * screenScale; const float2 cn1 = next.norm * centerLine * screenScale; const IntersectInfo i2 = intersectLines(prev.screenPos + cn0, cur.screenPos + cn0, cur.screenPos + cn1, next.screenPos + cn1); - if (i2.valid) { + if (i2.valid && length_squared((i2.interPt - offsetPt)/screenScale) < maxAdjDist*maxAdjDist) { + // todo: center and offset normally aren't the same, this will cause trouble + // later on but seting `center=offsetPt-centerLine` doesn't work either... center = i2.interPt; - offsetPt = center; + offsetPt = i2.interPt; } } const float2 interVec = (interPt - center) / screenScale; - const float interDist = length(interVec); - - // Limit the distance to the smaller of half way back along the previous segment - // or half way forward along the next one to keep consecutive segments from colliding. - // - // For up to four times that distance, adjust the intersection point back along its - // length to that limit, effectively narrowing the line instead of just breaking down. - // todo: too clever by half... maybe make this opt-in? - const float maxDist = min(cur.len, next.len) / 2; - if (interDist <= maxDist) { + const float interDist2 = length_squared(interVec); + const float maxClipDist2 = (maxAdjDist * vertArgs.wideVec.interClipLimit) * + (maxAdjDist * vertArgs.wideVec.interClipLimit); + + // Limit intersection distance. + // For up to a multiple of that, adjust the intersection point back along its + // length to that limit, effectively narrowing the line instead of just giving up. + if (interDist2 <= maxAdjDist*maxAdjDist) { intersectValid = true; - } else if (vertArgs.wideVec.interClipLimit > 0 && interDist <= maxDist * vertArgs.wideVec.interClipLimit) { - interPt = center + normalize(interVec) * maxDist * screenScale; + } else if (vertArgs.wideVec.interClipLimit > 0 && interDist2 <= maxClipDist2) { + interPt = center + normalize(interVec) * sqrt(interDist2) * screenScale; intersectValid = true; } } @@ -1166,7 +1171,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Current corner is the default result for all points. float2 pos = corner; - + // Texture position is based on cumulative distance along the line. // Note that `inst[2].totalLen` wraps to zero at the end, and we don't want that. // Texture coords are used for edge blending, so we need to set them up even if there are no textures. @@ -1181,9 +1186,6 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (capType == WhirlyKitShader::WKSVertexLineCapSquare || capType == WhirlyKitShader::WKSVertexLineCapRound) { switch (whichVert) { - case 2: case 3: case 8: case 9: - pos = corner; - break; case 0: case 1: case 10: case 11: pos = corner + centers[2].nDir * w2 * screenScale * (isEnd ? 1 : -1); texY += w2 / projScale * (isEnd ? 1 : -1); @@ -1246,7 +1248,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // turned into a round extension by the fragment shader. This isn't exactly right, but // I think we need more geometry to do better. // todo: fix texture Y-coords - if (joinType == WKSVertexLineJoinRound && whichPoly != WideVecPolyBodyGeom) { + if (joinType == WKSVertexLineJoinRound && whichPoly != WideVecPolyBodyGeom && !discardTri) { outVert.roundJoin = true; outVert.centerPos = offsetPt / screenScale; outVert.screenPos = pos / screenScale; @@ -1279,20 +1281,23 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( switch (whichVert) { // Start cap, 0-3-1, 0-2-3 case 0: case 8: { - // half width of the clipped miter cap - const float miterEdgeW2 = (interDist - midExt) * tan(M_PI_2_F - theta / 2); // Out to the miter cap, then perpendicular to the line edge. + // The half-width of the clipped miter cap is the tangent of half the interior + // turn angle times the amount the original intersection extends beyond the cap. + const float miterEdgeW2 = (interDist - midExt) * tan(M_PI_2_F - theta / 2); pos = center + screenScale * (interDir * midExt - interNorm * miterEdgeW2 * turnSgn * (whichVert ? -1 : 1)); break; } case 1: case 10: // Extend the turn bisector to the miter clip edge - pos = turningLeft ? (center + interDir * midExt * screenScale) : ((whichVert == 1) ? corner : otherCorner); + pos = turningLeft ? (center + interDir * midExt * screenScale) : + ((whichVert == 1) ? corner : otherCorner); break; case 2: case 9: // Extend segment endpoint outward along the intersection angle by the miter length - pos = turningLeft ? ((whichVert == 2) ? corner : otherCorner) : (center + interDir * midExt * screenScale); + pos = turningLeft ? ((whichVert == 2) ? corner : otherCorner) : + (center + interDir * midExt * screenScale); break; case 3: case 11: // The edge intersect, or the one on the other side @@ -1306,7 +1311,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } // Fix texture X-coords for vertices that were placed opposite the usual even/odd side. - // todo: fix texture Y-coord + // todo: fix texture Y-coords around the join. Might have to pre-compute for that. switch (whichVert) { case 1: case 9: texX = -texX; // fall through case 0: case 2: case 3: case 8: case 10: case 11: texX *= -turnSgn; @@ -1314,9 +1319,11 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } } - outVert.position = float4(pos, discardTri ? -1e6 : 0, discardTri ? NAN : 1); - // Opposite values because we're showing back faces. - outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); + if (!discardTri) { + outVert.position = float4(pos, 0, 1); + // Opposite values because we're showing back faces. + outVert.texCoord = -vertArgs.wideVec.texOffset + float2(texX, texY * texScale); + } return outVert; } From 80b6c9138f70a7a8cba340737030b81ac1fc2b31 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 7 Apr 2022 08:59:37 -0700 Subject: [PATCH 75/78] Tweak wide vector and MapTiler test cases for comparisons --- .../testCases/MapTilerTestCase.swift | 27 ++++++++++++++++--- .../AutoTester/testCases/MapboxTestCase.swift | 2 +- .../testCases/WideVectorsTestCase.swift | 14 ++++++++-- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift index 37c1dfd462..1f3d6fdbd7 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapTilerTestCase.swift @@ -38,6 +38,7 @@ class MapTilerTestCase: MaplyTestCase { var styles = [(name: String, sheet: String, bg: Bool)]() var mapTilerStyle = 2 var light = true + var perf = true var mapboxMap : MapboxKindaMap? = nil func startMap(_ style: (name: String, sheet: String, bg: Bool), viewC: MaplyBaseViewController) { @@ -59,7 +60,18 @@ class MapTilerTestCase: MaplyTestCase { return } } + print("Starting map with \(style.name) - w/\(light ?"":"o") light") + let msg = "Map: \(style.name)\n\(perf ? "Performance" : "Legacy") wide vectors\nWith\(light ? "" : "out") lighting" + let alert = UIAlertController(title: "Loading", message: msg, preferredStyle: .alert) + alert.addAction(UIAlertAction(title: "Ok", style: .cancel, handler: { _ in + alert.dismiss(animated: true, completion: nil) + })) + baseViewController?.present(alert, animated: true, completion: nil) + Timer.scheduledTimer(withTimeInterval: 3.0, repeats: false) { _ in + alert.dismiss(animated: true) + } + startMap(url!, bg: style.bg, viewC: viewC) } @@ -133,7 +145,7 @@ class MapTilerTestCase: MaplyTestCase { func setup(_ map: MapboxKindaMap) { map.styleSettings.textScale = 1.1 map.styleSettings.useWideVectors = true; - map.styleSettings.usePerfWideVectors = true + map.styleSettings.usePerfWideVectors = perf } var legendVisibile = false @@ -219,9 +231,16 @@ class MapTilerTestCase: MaplyTestCase { mapboxMap?.stop() mapboxMap = nil - mapTilerStyle = (mapTilerStyle + 1) % styles.count - if (mapTilerStyle == 0) { - light = !light + // Cycle performance vectors, lighting, then map type + if (perf) { + perf = false + } else if (light) { + light = false; + perf = true + } else { + mapTilerStyle = (mapTilerStyle + 1) % styles.count + perf = true + light = true } if let vc = baseViewController { startMap(styles[mapTilerStyle], viewC: vc) diff --git a/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift index 3120a9441c..05735a6b06 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/MapboxTestCase.swift @@ -14,7 +14,7 @@ class MapboxTestCase: MaplyTestCase { override init() { super.init() - self.name = "Mapbox Variations" + self.name = "Mapbox Hybrid Map" self.implementations = [.map,.globe] } diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 46c7f68b01..1b43e4c030 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -18,7 +18,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase initTex(vc) return (0..<6).flatMap { j -> [MaplyComponentObject] in - (0..<50).flatMap { i -> [MaplyComponentObject] in + (0..<20).flatMap { i -> [MaplyComponentObject] in let vsep = Float(0.1) let hsep = Float(3.0) let lat = Float(60.0) + vsep * Float(i) @@ -31,7 +31,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let vecObj = MaplyVectorObject(lineString: &coords, numCoords: Int32(coords.count)) subdiv(vc, vecObj, 0.0001) - let w = Float(i) / 3 + let w = Float(i) / 4 let e = Float(j) / 2 let desc = [ @@ -65,6 +65,11 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private func joins(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject?] { + // Legacy doesn't support these, don't bother with them + if (!perf && [1,2,4].contains(join)) { + return [] + } + let vsep = 2.5; let lat = Float(30.0 + (perf ? 4*vsep : 0.0) + (subdiv ? 2*vsep : 0.0) + (close ? vsep : 0.0)) let lon = Float(-140.0) + Float(join) * 3.5 @@ -151,6 +156,11 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private func caps(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, cap: Int, perf: Bool, close: Bool) -> [MaplyComponentObject?] { + // Legacy doesn't support these, don't bother with them + if (!perf) { + return [] + } + let vsep = 2.5; let lat = Float(15.0 + (perf ? 2*vsep : 0.0) + (close ? vsep : 0.0)) let lon = Float(-140.0) + Float(cap) * 3.5 From 35063c0b751b6ff2898d00f0b52863e9c95beb3f Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Thu, 7 Apr 2022 16:50:37 -0700 Subject: [PATCH 76/78] Fix some problems caused by not updating the segment base point with offsets, incorrect angle in miter length calculation. --- .../WhirlyGlobeLib/include/SharedAttributes.h | 7 +- .../testCases/WideVectorsTestCase.swift | 65 +++++++++++-------- .../include/MaplySharedAttributes.h | 10 +-- .../include/helpers/GeographicLib_ObjC.h | 1 + .../src/helpers/GeographicLib.mm | 8 +++ .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 55 ++++++++-------- 6 files changed, 84 insertions(+), 62 deletions(-) diff --git a/common/WhirlyGlobeLib/include/SharedAttributes.h b/common/WhirlyGlobeLib/include/SharedAttributes.h index 2879f06a6e..2a9376c966 100644 --- a/common/WhirlyGlobeLib/include/SharedAttributes.h +++ b/common/WhirlyGlobeLib/include/SharedAttributes.h @@ -255,14 +255,15 @@ /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty #define MaplyWideVecJoinType WKString("wideveclinejointype") -/// Widened vectors are joined with miters +/// Widened vectors are joined with miters. Miters exceeding the miter limit are converted into bevels. #define MaplyWideVecMiterJoin WKString("miter") +/// Widened vectors are joined with miters. Miters exceeding the miter limit are clipped. #define MaplyWideVecMiterClipJoin WKString("miter-clip") -/// Widened vectors are joined with a curve +/// Widened vectors are joined with a circular arc #define MaplyWideVecRoundJoin WKString("round") /// Widened vectors are joined with a bevel #define MaplyWideVecBevelJoin WKString("bevel") -/// No joins (fastest) +/// No joins. Also disables endcaps. #define MaplyWideVecNoneJoin WKString("none") /// Determine how wide vectors behave when the ideal geometry is impossible diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index 1b43e4c030..bc6af0389d 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -91,6 +91,14 @@ class WideVectorsTestCase : WideVectorsTestCaseBase self.subdiv(vc, vecObj, 0.0001) } + let props = [ + joinAttr(join) ?? "", + perf ? "perf" : "", + subdiv ? "subdiv" : "", + close ? "closed" : "", + joinClip ? "clip" : "", + ] + let desc = [ kMaplyEnable: false, kMaplyColor: UIColor.green.withAlphaComponent(0.5), @@ -99,29 +107,25 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let wideDesc = [ kMaplyEnable: false, kMaplyZoomSlot: slot, - kMaplyVecWidth: perf ? ["stops":[[2,5],[12,80]]] : 40, + kMaplyVecWidth: perf ? ["stops":[[2,5],[12,80]]] : 20, kMaplyColor: perf ? UIColor.red.withAlphaComponent(0.35) : UIColor.blue.withAlphaComponent(0.35), - kMaplyWideVecOffset: 0, + kMaplyWideVecOffset: perf ? ["stops":[[12,0],[13,-50],[14,50],[15,0]]] : 0, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, - kMaplyWideVecFallbackMode: kMaplyWideVecFallbackClip, + kMaplyWideVecFallbackMode: joinClip ? kMaplyWideVecFallbackClip : kMaplyWideVecFallbackNone, kMaplyWideVecJoinType: joinAttr(join) ?? NSNull(), - kMaplyDrawableName: String(format: "WideVec-%@%@%@%@", - joinAttr(join) ?? "", perf ? "-perf" : "", - subdiv ? "-subdiv" : "", close ? "-closed" : "") + kMaplyDrawableName: "WideVec-" + props.joined(separator: "-"), ] as [AnyHashable: Any] let lblDesc = [ kMaplyTextColor: UIColor.magenta, kMaplyEnable: false, - kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyFont: UIFont.systemFont(ofSize: 8.0), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, ] as [AnyHashable: Any] let lbl = MaplyScreenLabel() lbl.loc = MaplyCoordinateMakeWithDegrees(lon - 0.2, lat - 0.2) - lbl.text = String(format: "%@%@%@%@", - joinAttr(join) ?? "", perf ? "\nperf" : "", - subdiv ? "\nsubdiv" : "", close ? "\nclosed" : "") + lbl.text = props.joined(separator: "\n") return [ vc.addVectors([vecObj], desc: desc, mode: .current), @@ -143,20 +147,24 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } } } + return objs + } + private func step() { joinN += joinD + if (joinN < -joinSteps) { + joinClip = !joinClip + } if (joinN > joinSteps || joinN < -joinSteps) { joinD = -joinD joinN += joinD } - - return objs } private func caps(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, cap: Int, perf: Bool, close: Bool) -> [MaplyComponentObject?] { - // Legacy doesn't support these, don't bother with them + // Legacy doesn't support these, don't bother showing them if (!perf) { return [] } @@ -186,9 +194,11 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, kMaplyWideVecJoinType: kMaplyWideVecBevelJoin, + kMaplyWideVecFallbackMode: kMaplyWideVecFallbackClip, kMaplyWideVecLineCapType: capAttr(cap) ?? NSNull(), + kMaplyWideVecOffset: perf ? ["stops":[[12,0],[13,-50],[14,50],[15,0]]] : 0, kMaplyVecTexture: dashTex ?? NSNull(), - kMaplyWideVecTexRepeatLen: 64, + kMaplyWideVecTexRepeatLen: close ? 50 : length(coords, close: false) / 15000, kMaplyDrawableName: String(format: "WideVec-%@%@%@", capAttr(cap) ?? "", perf ? "-perf" : "", close ? "-closed" : "") @@ -197,7 +207,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let lblDesc = [ kMaplyTextColor: UIColor.magenta, kMaplyEnable: false, - kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyFont: UIFont.systemFont(ofSize: 8.0), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, ] as [AnyHashable: Any] let lbl = MaplyScreenLabel() @@ -226,15 +236,14 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } } - joinN += joinD - if (joinN > joinSteps || joinN < -joinSteps) { - joinD = -joinD - joinN += joinD - } - return objs } + private func length(_ pts: [MaplyCoordinate], close: Bool) -> Double { + zip(close ? pts : pts.dropLast(), pts.dropFirst() + (close ? [pts.first!] : [])) + .reduce(0.0) { (dist: Double, p) in dist + GeoLibDistanceF(p.0, p.1) } + } + private func joinAttr(_ n: Int) -> String? { switch (n) { case 0: return kMaplyWideVecMiterJoin; @@ -321,7 +330,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let lblDesc = [ kMaplyTextColor: UIColor.magenta, kMaplyEnable: false, - kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyFont: UIFont.systemFont(ofSize: 8.0), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, ] as [AnyHashable: Any] let lbl = MaplyScreenLabel() @@ -379,8 +388,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let wideDescOffs = wideDesc.merging([ kMaplyColor: UIColor.blue.withAlphaComponent(0.6), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 2, - kMaplyWideVecOffset: perf ? ["stops":[[8,0],[10,-70],[12,70]]] : 20, - kMaplyDrawableName: String(format: "WideVec-Offset-%@%@", perf ? "-perf" : "", fudge ? "-clip" : ""), + kMaplyWideVecOffset: perf ? ["stops":[[8,0],[10,-70],[12,70]]] : 40, + kMaplyDrawableName: String(format: "WideVec-Offset%@%@", perf ? "-perf" : "", fudge ? "-clip" : ""), ], uniquingKeysWith: { (a,b) in b }) // Centerline @@ -393,7 +402,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let lblDesc = [ kMaplyTextColor: UIColor.magenta, kMaplyEnable: true, - kMaplyFont: UIFont.systemFont(ofSize: 10.0), + kMaplyFont: UIFont.systemFont(ofSize: 8.0), kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault, ] as [AnyHashable: Any] let lbl = MaplyScreenLabel() @@ -507,6 +516,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } vc.enable(timerObjs, mode: .current) vc.remove(oldObjs, mode: .current) + + step() } private func wideLineTest(_ vc: MaplyBaseViewController) { @@ -545,7 +556,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase add(to: &objs, [true, false].flatMap { widths(vc, perf: $0) }) - + loadShapeFile(vc) } @@ -555,6 +566,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase self.wideLineTest(vc) } vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-150.0, 32.0), height: 0.1, heading: 0.0, time: 0.1) } override func setUpWithMap(_ vc: MaplyViewController) { @@ -600,6 +612,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private var texY = 0 private var joinN = 15 private var joinD = 1 + private var joinClip = true private let joinSteps = 30 private let baseCase = GeographyClassTestCase() } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h index 2b5faf9ac8..a7eadeddd9 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h @@ -243,21 +243,23 @@ extern NSString * const _Nonnull kMaplyWideVecImplPerf; /// See: http://www.w3.org/TR/SVG/painting.html#StrokeLinejoinProperty extern NSString * const _Nonnull kMaplyWideVecJoinType; -/// Widened vectors are joined with miters (fall back on bevel) +/// Widened vectors are joined with miters. Miters exceeding the miter limit are converted into bevels. extern NSString * const _Nonnull kMaplyWideVecMiterJoin; -/// Widened vectors are joined with miters (clip on exceeding miter-limit) +/// Widened vectors are joined with miters. Miters exceeding the miter limit are clipped. extern NSString * const _Nonnull kMaplyWideVecMiterClipJoin; -/// Widened vectors are joined with a curve +/// Widened vectors are joined with a circular arc extern NSString * const _Nonnull kMaplyWideVecRoundJoin; /// Widened vectors are joined with a bevel extern NSString * const _Nonnull kMaplyWideVecBevelJoin; -/// None +/// No joins. Also disables endcaps. extern NSString * const _Nonnull kMaplyWideVecNoneJoin; /// Determine how wide vectors behave when the ideal geometry is impossible extern NSString * const _Nonnull kMaplyWideVecFallbackMode; extern NSString * const _Nonnull kMaplyWideVecFallbackDefault; +/// When the line intersection is out of range, clip it to the range and use it. extern NSString * const _Nonnull kMaplyWideVecFallbackClip; +/// When the line intersection is out of range, discard it and don't join the like segments. extern NSString * const _Nonnull kMaplyWideVecFallbackNone; /// Number of pixels to use in blending the edges of the wide vectors diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h index 22bd915d2a..c4de3e7a83 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/helpers/GeographicLib_ObjC.h @@ -53,6 +53,7 @@ bool MaplyCoordinateDInPolygon(MaplyCoordinateD p, const MaplyCoordinate polygon bool MaplyCoordinateInPolygonD(MaplyCoordinate p, const MaplyCoordinateD polygon[], unsigned count); bool MaplyCoordinateDInPolygonD(MaplyCoordinateD p, const MaplyCoordinateD polygon[], unsigned count); +double GeoLibDistanceF(MaplyCoordinate startPt, MaplyCoordinate endPt); double GeoLibDistanceD(MaplyCoordinateD startPt, MaplyCoordinateD endPt); // Test for a segment intersecting a polygon. diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm index 2666e5df95..6d724460ec 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/helpers/GeographicLib.mm @@ -149,6 +149,14 @@ bool GeoLibLineDIntersectsPolygonD(MaplyCoordinateD startPt, MaplyCoordinateD en return false; } +double GeoLibDistanceF(MaplyCoordinate startPt, MaplyCoordinate endPt) +{ + double s12 = 0.0; + wgs84Geodesic().Inverse(WhirlyKit::RadToDeg(startPt.y), WhirlyKit::RadToDeg(startPt.x), + WhirlyKit::RadToDeg(endPt.y), WhirlyKit::RadToDeg(endPt.x), s12); + return s12; +} + double GeoLibDistanceD(MaplyCoordinateD startPt, MaplyCoordinateD endPt) { double s12 = 0.0; diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 876a063575..7e131a3573 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1055,8 +1055,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( bool intersectValid = false; bool turningLeft = false; const int interIdx = isEnd ? 1 : 0; - float2 center = centers[interIdx + 1].screenPos; // Current centerline endpoint (may move with offsets) - float2 offsetPt = center + centerLine * screenScale; + float2 offsetCenter = centers[interIdx + 1].screenPos + centers[2].norm * centerLine * screenScale; float2 interPt(0, 0), realInterPt(0, 0); float dotProd = 0, theta = 0, miterLength = 0; @@ -1070,8 +1069,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( dotProd < wideVecMaxTurnThreshold && abs(abs(dotProd) - 1) >= wideVecMinTurnThreshold) { - // Turn angle, both vectors are normalized - theta = acos(dotProd); + // Interior turn angle, both vectors are normalized. + theta = M_PI_F - acos(dotProd); // todo: miter-clip doesn't work right at small angles if (joinType == WKSVertexLineJoinMiterClip && abs(abs(dotProd) - 1) < 0.01) { @@ -1113,20 +1112,17 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // If we're using offsets, we also need to know the point where the offset lines // intersect, as the distance to the original intersection point isn't helpful. // todo: this doesn't make sense for small angles, but what's the actual threshold? - if (centerLine != 0 && abs(abs(dotProd) - 1) > 0.05) { + if (centerLine != 0) { const float2 cn0 = cur.norm * centerLine * screenScale; const float2 cn1 = next.norm * centerLine * screenScale; const IntersectInfo i2 = intersectLines(prev.screenPos + cn0, cur.screenPos + cn0, cur.screenPos + cn1, next.screenPos + cn1); - if (i2.valid && length_squared((i2.interPt - offsetPt)/screenScale) < maxAdjDist*maxAdjDist) { - // todo: center and offset normally aren't the same, this will cause trouble - // later on but seting `center=offsetPt-centerLine` doesn't work either... - center = i2.interPt; - offsetPt = i2.interPt; + if (i2.valid && length_squared((i2.interPt - offsetCenter)/screenScale) < maxAdjDist*maxAdjDist) { + offsetCenter = i2.interPt; } } - const float2 interVec = (interPt - center) / screenScale; + const float2 interVec = (interPt - offsetCenter) / screenScale; const float interDist2 = length_squared(interVec); const float maxClipDist2 = (maxAdjDist * vertArgs.wideVec.interClipLimit) * (maxAdjDist * vertArgs.wideVec.interClipLimit); @@ -1137,7 +1133,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( if (interDist2 <= maxAdjDist*maxAdjDist) { intersectValid = true; } else if (vertArgs.wideVec.interClipLimit > 0 && interDist2 <= maxClipDist2) { - interPt = center + normalize(interVec) * sqrt(interDist2) * screenScale; + interPt = offsetCenter + normalize(interVec) * sqrt(interDist2) * screenScale; intersectValid = true; } } @@ -1164,8 +1160,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( outVert.maskIDs[1] = inst[1].mask1; // Work out the corner positions by extending the normals - const float2 realEdge = (interSgn * w2 + centerLine) * screenScale; - const float2 corner = center + centers[2].norm * realEdge; + const float2 realEdge = interSgn * w2 * screenScale; + const float2 corner = offsetCenter + centers[2].norm * realEdge; const float turnSgn = turningLeft ? -1 : 1; const bool isInsideEdge = (isLeft == turningLeft); @@ -1194,7 +1190,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } if (capType == WhirlyKitShader::WKSVertexLineCapRound) { outVert.roundJoin = true; - outVert.centerPos = offsetPt / screenScale; + outVert.centerPos = offsetCenter / screenScale; outVert.screenPos = pos / screenScale; outVert.midDir = centers[2].nDir * (isEnd ? 1 : -1); } @@ -1210,8 +1206,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( pos = interPt; // We'll need the corner on the opposite side for several things. - const float2 realOtherEdge = (-interSgn * w2 + centerLine) * screenScale; - const float2 otherCorner = center + centers[2].norm * realOtherEdge; + const float2 realOtherEdge = -interSgn * w2 * screenScale; + const float2 otherCorner = offsetCenter + centers[2].norm * realOtherEdge; // Miter is mostly handled above by using the intersect points instead of corners. if (joinType == WKSVertexLineJoinMiter) { @@ -1234,10 +1230,10 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( break; case 1: case 11: { // Use the point halfway between the outside corner and the one on the opposite side. - const float2 n = centers[(whichVert == 1) ? 1 : 3].norm; - const float2 c = turningLeft ? otherCorner : corner; - const float2 e = turningLeft ? realOtherEdge : realEdge; - pos = (center + c + n * e) / 2; + const float2 norm = centers[(whichVert == 1) ? 1 : 3].norm; + const float2 c = offsetCenter + centers[2].norm * realEdge * turnSgn; + const float2 e = turnSgn * interSgn * w2 * screenScale; + pos = (offsetCenter + c + norm * e) / 2; // We're placing the vertex on the "wrong" side, so fix the texture X. texX *= turnSgn; break; @@ -1250,7 +1246,7 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // todo: fix texture Y-coords if (joinType == WKSVertexLineJoinRound && whichPoly != WideVecPolyBodyGeom && !discardTri) { outVert.roundJoin = true; - outVert.centerPos = offsetPt / screenScale; + outVert.centerPos = offsetCenter / screenScale; outVert.screenPos = pos / screenScale; // Direction bisecting the turn toward the outside (right for a left turn) @@ -1268,11 +1264,12 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } } else if (joinType == WKSVertexLineJoinMiterClip) { // Direction of intersect point (bisecting the segment directions) - const float2 interDir = normalize((realInterPt - center) / screenScale) * turnSgn * interSgn; + const float2 interVec = (realInterPt - offsetCenter) / screenScale; + const float2 interDir = normalize(interVec) * turnSgn * interSgn; // And the perpendicular const float2 interNorm = float2(-interDir.y, interDir.x); // Distance from centerline intersect and edge intersect - const float interDist = length((realInterPt - center) / screenScale); + const float interDist = length(interVec); // "the miter is clipped by a line perpendicular to the line bisecting // the angle between the two path segments at a distance of half the // value of miter length from the intersection of the two path segments." @@ -1284,24 +1281,24 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Out to the miter cap, then perpendicular to the line edge. // The half-width of the clipped miter cap is the tangent of half the interior // turn angle times the amount the original intersection extends beyond the cap. - const float miterEdgeW2 = (interDist - midExt) * tan(M_PI_2_F - theta / 2); - pos = center + screenScale * (interDir * midExt - + const float miterEdgeW2 = (interDist - midExt) * tan(theta / 2); + pos = offsetCenter + screenScale * (interDir * midExt - interNorm * miterEdgeW2 * turnSgn * (whichVert ? -1 : 1)); break; } case 1: case 10: // Extend the turn bisector to the miter clip edge - pos = turningLeft ? (center + interDir * midExt * screenScale) : + pos = turningLeft ? (offsetCenter + interDir * midExt * screenScale) : ((whichVert == 1) ? corner : otherCorner); break; case 2: case 9: // Extend segment endpoint outward along the intersection angle by the miter length pos = turningLeft ? ((whichVert == 2) ? corner : otherCorner) : - (center + interDir * midExt * screenScale); + (offsetCenter + interDir * midExt * screenScale); break; case 3: case 11: // The edge intersect, or the one on the other side - pos = turningLeft ? interPt : (center + (center - interPt)); + pos = turningLeft ? interPt : (offsetCenter + (offsetCenter - interPt)); break; // Body segment, 4-7-5, 4-6-7 // Merge inside corners to avoid overlap, use default outside corner. From 131f19df1f40deb2c187ddbbe2d3c29e0a376c75 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 8 Apr 2022 09:44:11 -0700 Subject: [PATCH 77/78] Add "simple miter" join type which doesn't fall back to miter, and has simpler geometry. Apply joins from stylesheets. Add support for texture offset to legacy wide vectors. --- .../include/MapboxVectorStyleLine.h | 3 +- .../include/MaplyVectorStyleC.h | 2 +- .../WhirlyGlobeLib/include/SharedAttributes.h | 2 + .../include/WideVectorManager.h | 5 +- .../src/MapboxVectorStyleLine.cpp | 51 ++++++- .../WhirlyGlobeLib/src/WideVectorManager.cpp | 139 ++++++++---------- .../testCases/WideVectorsTestCase.swift | 58 ++++---- .../include/MaplySharedAttributes.h | 2 + .../src/control/MaplySharedAttributes.mm | 1 + .../include/DefaultShadersMTL.h | 11 +- .../WhirlyGlobeLib/src/wkDefaultShaders.metal | 11 +- 11 files changed, 157 insertions(+), 128 deletions(-) diff --git a/common/WhirlyGlobeLib/include/MapboxVectorStyleLine.h b/common/WhirlyGlobeLib/include/MapboxVectorStyleLine.h index 538052842d..9173e4eec0 100644 --- a/common/WhirlyGlobeLib/include/MapboxVectorStyleLine.h +++ b/common/WhirlyGlobeLib/include/MapboxVectorStyleLine.h @@ -36,9 +36,10 @@ struct MapboxVectorLineLayout bool parse(PlatformThreadInfo *inst,MapboxVectorStyleSetImpl *styleSet,const DictionaryRef &styleEntry); MapboxVectorLineCap cap = MBLineCapButt; - MapboxVectorLineJoin join = MBLineJoinBevel; + MapboxVectorLineJoin join = MBLineJoinMiter; double miterLimit = 0.0; double roundLimit = 0.0; + bool joinSet = false; }; /** diff --git a/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h b/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h index d5250f1887..ea8c250761 100644 --- a/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h +++ b/common/WhirlyGlobeLib/include/MaplyVectorStyleC.h @@ -89,7 +89,7 @@ struct VectorStyleSettingsImpl /// Use widened vectors (which do anti-aliasing and such) bool useWideVectors = false; - // Use GPU-based wide vector implementation + /// Use GPU-based wide vector implementation (iOS/Metal only) bool perfWideVec = false; /// If set, we'll make all the features selectable. If not, we won't. diff --git a/common/WhirlyGlobeLib/include/SharedAttributes.h b/common/WhirlyGlobeLib/include/SharedAttributes.h index 2a9376c966..f51ac2b62b 100644 --- a/common/WhirlyGlobeLib/include/SharedAttributes.h +++ b/common/WhirlyGlobeLib/include/SharedAttributes.h @@ -259,6 +259,8 @@ #define MaplyWideVecMiterJoin WKString("miter") /// Widened vectors are joined with miters. Miters exceeding the miter limit are clipped. #define MaplyWideVecMiterClipJoin WKString("miter-clip") +/// Widened vectors are joined with miters. Miters exceeding the miter limit are ignored. +#define MaplyWideVecMiterSimpleJoin WKString("miter-simple") /// Widened vectors are joined with a circular arc #define MaplyWideVecRoundJoin WKString("round") /// Widened vectors are joined with a bevel diff --git a/common/WhirlyGlobeLib/include/WideVectorManager.h b/common/WhirlyGlobeLib/include/WideVectorManager.h index 7e9155c45b..9c26bad142 100644 --- a/common/WhirlyGlobeLib/include/WideVectorManager.h +++ b/common/WhirlyGlobeLib/include/WideVectorManager.h @@ -1,5 +1,4 @@ -/* - * WideVectorManager.h +/* WideVectorManager.h * WhirlyGlobeLib * * Created by Steve Gifford on 4/29/14. @@ -15,7 +14,6 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ #import @@ -41,6 +39,7 @@ typedef enum {WideVecCoordReal,WideVecCoordScreen} WideVectorCoordsType; typedef enum WideVectorLineJoinType_t { WideVecMiterJoin, WideVecMiterClipJoin, + WideVecMiterSimpleJoin, WideVecRoundJoin, WideVecBevelJoin, WideVecNoneJoin, diff --git a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp index e008fba46c..97c72813f7 100644 --- a/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp +++ b/common/WhirlyGlobeLib/src/MapboxVectorStyleLine.cpp @@ -27,8 +27,15 @@ static const char * const joinVals[] = {"bevel","round","miter",nullptr}; bool MapboxVectorLineLayout::parse(PlatformThreadInfo *,MapboxVectorStyleSetImpl *, const DictionaryRef &styleEntry) { + if (const auto entry = styleEntry ? styleEntry->getEntry("line-join") : nullptr) + { + const auto joinVal = MapboxVectorStyleSetImpl::enumValue(entry,joinVals, -1); + if (joinVal >= 0) { + join = (MapboxVectorLineJoin)joinVal; + joinSet = true; + } + } cap = styleEntry ? (MapboxVectorLineCap)MapboxVectorStyleSetImpl::enumValue(styleEntry->getEntry("line-cap"),lineCapVals,(int)MBLineCapButt) : MBLineCapButt; - join = styleEntry ? (MapboxVectorLineJoin)MapboxVectorStyleSetImpl::enumValue(styleEntry->getEntry("line-join"),joinVals,(int)MBLineJoinMiter) : MBLineJoinMiter; miterLimit = MapboxVectorStyleSetImpl::doubleValue("line-miter-limit", styleEntry, 2.0); roundLimit = MapboxVectorStyleSetImpl::doubleValue("line-round-limit", styleEntry, 1.0); @@ -135,6 +142,28 @@ MapboxVectorStyleLayer& MapboxVectorLayerLine::copy(const MapboxVectorStyleLayer static const std::string colorStr = "color"; // NOLINT(cert-err58-cpp) constructor can throw +static WideVectorLineJoinType convertJoin(MapboxVectorLineJoin join) +{ + switch (join) + { + default: + case MBLineJoinMiter: return WideVecMiterJoin; + case MBLineJoinBevel: return WideVecBevelJoin; + case MBLineJoinRound: return WideVecRoundJoin; + } +} + +static WideVectorLineCapType convertCap(MapboxVectorLineCap cap) +{ + switch (cap) + { + default: + case MBLineCapButt: return WideVecButtCap; + case MBLineCapRound: return WideVecRoundCap; + case MBLineCapSquare: return WideVecSquareCap; + } +} + void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, const std::vector &inVecObjs, const VectorTileDataRef &tileInfo, @@ -221,7 +250,6 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, } WideVectorInfo vecInfo; - vecInfo.hasExp = true; vecInfo.coordType = WideVecCoordScreen; vecInfo.fadeIn = fade; vecInfo.fadeOut = fade; @@ -229,16 +257,33 @@ void MapboxVectorLayerLine::buildObjects(PlatformThreadInfo *inst, vecInfo.color = *color; vecInfo.width = (float)width; vecInfo.offset = (float)-offset; + vecInfo.joinType = layout.joinSet ? convertJoin(layout.join) : WideVecMiterSimpleJoin; + vecInfo.capType = convertCap(layout.cap); vecInfo.widthExp = paint.width->expression(); vecInfo.offsetExp = paint.offset->expression(); vecInfo.colorExp = paint.color->expression(); vecInfo.opacityExp = paint.opacity->expression(); + vecInfo.hasExp = vecInfo.widthExp || vecInfo.offsetExp || vecInfo.colorExp || vecInfo.opacityExp; vecInfo.drawPriority = drawPriority + tileInfo->ident.level * std::max(0, styleSet->tileStyleSettings->drawPriorityPerLevel)+2; vecInfo.implType = styleSet->tileStyleSettings->perfWideVec ? WideVecImplPerf : WideVecImplBasic; vecInfo.programID = styleSet->tileStyleSettings->perfWideVec ? styleSet->wideVectorPerfProgramID : styleSet->wideVectorProgramID; // TODO: Switch to stencils // vecInfo.drawOrder = tileInfo->tileNumber(); - + + // Legacy wide vectors have limited join support + if (!styleSet->tileStyleSettings->perfWideVec) + { + switch (vecInfo.joinType) + { + case WideVecMiterClipJoin: + case WideVecMiterSimpleJoin: + case WideVecRoundJoin: + case WideVecNoneJoin: + vecInfo.joinType = WideVecMiterJoin; + default: break; + } + } + if (minzoom != 0 || maxzoom < 1000) { vecInfo.minZoomVis = minzoom; diff --git a/common/WhirlyGlobeLib/src/WideVectorManager.cpp b/common/WhirlyGlobeLib/src/WideVectorManager.cpp index fb54b04716..00afbfaae4 100644 --- a/common/WhirlyGlobeLib/src/WideVectorManager.cpp +++ b/common/WhirlyGlobeLib/src/WideVectorManager.cpp @@ -62,11 +62,12 @@ WideVectorInfo::WideVectorInfo(const Dictionary &dict) if (const auto entry = dict.getEntry(MaplyWideVecJoinType)) { const auto s = entry->getString(); - if (s == MaplyWideVecMiterJoin) joinType = WideVecMiterJoin; - else if (s == MaplyWideVecMiterClipJoin) joinType = WideVecMiterClipJoin; - else if (s == MaplyWideVecBevelJoin) joinType = WideVecBevelJoin; - else if (s == MaplyWideVecRoundJoin) joinType = WideVecRoundJoin; - else joinType = WideVecNoneJoin; + if (s == MaplyWideVecMiterJoin) joinType = WideVecMiterJoin; + else if (s == MaplyWideVecMiterClipJoin) joinType = WideVecMiterClipJoin; + else if (s == MaplyWideVecMiterSimpleJoin) joinType = WideVecMiterSimpleJoin; + else if (s == MaplyWideVecBevelJoin) joinType = WideVecBevelJoin; + else if (s == MaplyWideVecRoundJoin) joinType = WideVecRoundJoin; + else joinType = WideVecNoneJoin; } if (const auto entry = dict.getEntry(MaplyWideVecFallbackMode)) @@ -158,9 +159,8 @@ std::string WideVectorInfo::toString() const // Turn this on for smaller texture lengths //#define TEXTURE_RESET 1 -class WideVectorBuilder +struct WideVectorBuilder { -public: WideVectorBuilder(const WideVectorInfo *vecInfo, Point3d localCenter, Point3d dispCenter, @@ -169,119 +169,100 @@ class WideVectorBuilder bool makeTurns, CoordSystemDisplayAdapter *coordAdapter) : vecInfo(vecInfo), - angleCutoff(DegToRad(30.0)), - texOffset(0.0), - edgePointsValid(false), coordAdapter(coordAdapter), localCenter(std::move(localCenter)), dispCenter(std::move(dispCenter)), makeDistinctTurn(makeTurns), maskIDs(std::move(maskIDs)), - color(RGBAColor::white()) + color(inColor) { - color = inColor; + texOffset = -vecInfo->texOffset.y() / vecInfo->repeatSize; } // Two widened lines that intersect in a point. // Width/2 is the input - class InterPoint + struct InterPoint { - public: - InterPoint() : - c(0.0), - texX(0.0), - texYmin(0.0), - texYmax(0.0), - texOffset(0.0), - offset(0.0,0.0), - centerlineDir(1.0) - { } + InterPoint() = default; // Construct with a single line - InterPoint(const Point3d &p0,const Point3d &p1,const Point3d &n0,double inTexX,double inTexYmin,double inTexYmax,double inTexOffset) + InterPoint(const Point3d &p0,const Point3d &p1,const Point3d &n0, + double inTexX,double inTexYmin,double inTexYmax,double inTexOffset) : + n(n0), + dir(p1 - p0), + org(p0), + dest(p1), + texX(inTexX), + texYmin(inTexYmin), + texYmax(inTexYmax), + texOffset(inTexOffset) { - c = 0; - dir = p1 - p0; - n = n0; - org = p0; - dest = p1; - centerlineDir = 1.0; - offset = Point2d(0.0,0.0); - texX = inTexX; - texYmin = inTexYmin; - texYmax = inTexYmax; - texOffset = inTexOffset; } - + // Pass in the half width to calculate the intersection point - Point3d calcInterPt(double centerOffset,double w2) + Point3d calcInterPt(double centerOffset,double w2) const { - double t0 = c * (centerOffset + w2); - Point3d iPt = dir * t0 + - dir * w2 * offset.y() + - n * (centerOffset + w2) + - n * offset.x() + - org; - - return iPt; + const double t0 = c * (centerOffset + w2); + return dir * t0 + + dir * w2 * offset.y() + + n * (centerOffset + w2) + + n * offset.x() + + org; } - InterPoint flipped() { + InterPoint flipped() const { InterPoint newPt = *this; newPt.n *= -1; - return newPt; } // Same point, but offset along the centerline - InterPoint nudgeAlongCenter(double nudge) { + InterPoint nudgeAlongCenter(double nudge) const { InterPoint newPt = *this; newPt.offset.y() += nudge; - return newPt; } // Same point, but offset along the normal - InterPoint nudgeAlongNormal(double nudge) { + InterPoint nudgeAlongNormal(double nudge) const { InterPoint newPt = *this; newPt.offset.x() += nudge; - return newPt; } // Set the texture X coordinate, but otherwise just copy - InterPoint withTexX(double newTexX) { + InterPoint withTexX(double newTexX) const { InterPoint newPt = *this; newPt.texX = newTexX; - return newPt; } // Set the tex min/max accordingly, but otherwise just copy - InterPoint withTexY(double newMinTexY,double newMaxTexY) { + InterPoint withTexY(double newMinTexY,double newMaxTexY) const { InterPoint newPt = *this; newPt.texYmin = newMinTexY; newPt.texYmax = newMaxTexY; - return newPt; } // Set the tex offset, but otherwise just copy - InterPoint withTexOffset(double newTexOffset) { + InterPoint withTexOffset(double newTexOffset) const { InterPoint newPt = *this; newPt.texOffset = newTexOffset; - return newPt; } - double c; - Point3d dir; - Point3d n; - Point3d org,dest; - Point2d offset; - double centerlineDir; - double texX; - double texYmin,texYmax,texOffset; + double c = 0.0; + Point3d dir = { 0.0, 0.0, 0.0 }; + Point3d n = { 0.0, 0.0, 0.0 }; + Point3d org = { 0.0, 0.0, 0.0 }; + Point3d dest = { 0.0, 0.0, 0.0 }; + Point2d offset = { 0.0, 0.0 }; + double centerlineDir = 1.0; + double texX = 0.0; + double texYmin = 0.0; + double texYmax = 0.0; + double texOffset = 0.0; }; // Intersect the wide lines, but return an equation to calculate the point @@ -640,7 +621,8 @@ class WideVectorBuilder // Add a point to the widened linear we're building - void addPoint(const Point3d &inPt,const Point3d &up,const WideVectorDrawableBuilderRef &drawable,bool closed,bool buildSegment,bool buildJunction) + void addPoint(const Point3d &inPt,const Point3d &up,const WideVectorDrawableBuilderRef &drawable, + bool closed,bool buildSegment,bool buildJunction) { // Compare with the last point, if it's the same, toss it if (!pts.empty() && pts.back() == inPt && !closed) @@ -669,22 +651,20 @@ class WideVectorBuilder } const WideVectorInfo *vecInfo; - CoordSystemDisplayAdapter *coordAdapter; - RGBAColor color; + const CoordSystemDisplayAdapter *coordAdapter = nullptr; + const RGBAColor color = RGBAColor::white(); std::vector maskEntries; std::vector maskIDs; - Point3d localCenter,dispCenter; - double angleCutoff; - bool makeDistinctTurn; - - double texOffset; - + const double angleCutoff = DegToRad(30.0); + bool makeDistinctTurn = false; + bool edgePointsValid = false; + double texOffset = 0.0; + Point3d localCenter; + Point3d dispCenter; Point3dVector pts; Point3d lastUp; - - bool edgePointsValid; - InterPoint e0,e1; - //,centerAdj; + InterPoint e0; + InterPoint e1; }; static const std::string defDrawableName = "Wide Vector"; @@ -885,7 +865,8 @@ struct WideVectorDrawableConstructor // will be handled differently by the fragment shader // Caps are needed for miter becasue it can turn into a bevel. - const bool emitCaps = (drawable->getLineJoin() != WideVectorLineJoinType::WideVecNoneJoin); + const bool emitCaps = (drawable->getLineJoin() != WideVectorLineJoinType::WideVecNoneJoin && + drawable->getLineJoin() != WideVectorLineJoinType::WideVecMiterSimpleJoin); int base = 0; if (emitCaps) diff --git a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift index bc6af0389d..b1350117ea 100644 --- a/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift +++ b/ios/apps/AutoTester/AutoTester/testCases/WideVectorsTestCase.swift @@ -63,7 +63,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } private func joins(_ vc: MaplyBaseViewController, bound: MaplyBoundingBox, slot: Int, - join: Int, perf: Bool, close: Bool, subdiv: Bool) -> [MaplyComponentObject?] { + join: Int, perf: Bool, close: Bool) -> [MaplyComponentObject?] { // Legacy doesn't support these, don't bother with them if (!perf && [1,2,4].contains(join)) { @@ -71,8 +71,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } let vsep = 2.5; - let lat = Float(30.0 + (perf ? 4*vsep : 0.0) + (subdiv ? 2*vsep : 0.0) + (close ? vsep : 0.0)) - let lon = Float(-140.0) + Float(join) * 3.5 + let lat = Float(30.0 + (perf ? 2*vsep : 0.0) + (close ? vsep : 0.0)) + let lon = Float(-145.0) + Float(join) * 3.0 var coords = [ MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.5 * Float(joinN) / Float(joinSteps)), @@ -87,14 +87,11 @@ class WideVectorsTestCase : WideVectorsTestCaseBase return [] } - if (subdiv) { - self.subdiv(vc, vecObj, 0.0001) - } + self.subdiv(vc, vecObj, 0.0001) let props = [ joinAttr(join) ?? "", perf ? "perf" : "", - subdiv ? "subdiv" : "", close ? "closed" : "", joinClip ? "clip" : "", ] @@ -108,12 +105,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyEnable: false, kMaplyZoomSlot: slot, kMaplyVecWidth: perf ? ["stops":[[2,5],[12,80]]] : 20, - kMaplyColor: perf ? UIColor.red.withAlphaComponent(0.35) : UIColor.blue.withAlphaComponent(0.35), + kMaplyColor: (perf ? (joinClip ? UIColor.magenta : UIColor.red) : UIColor.blue).withAlphaComponent(0.35), kMaplyWideVecOffset: perf ? ["stops":[[12,0],[13,-50],[14,50],[15,0]]] : 0, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, kMaplyWideVecFallbackMode: joinClip ? kMaplyWideVecFallbackClip : kMaplyWideVecFallbackNone, kMaplyWideVecJoinType: joinAttr(join) ?? NSNull(), + kMaplyWideVecMiterLimit: 1.0, kMaplyDrawableName: "WideVec-" + props.joined(separator: "-"), ] as [AnyHashable: Any] @@ -136,18 +134,13 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private func joins(_ vc: MaplyBaseViewController, slot: Int, bound: MaplyBoundingBox) -> [MaplyComponentObject?] { - - let yn = [ true, false ] - let objs = (0..<5).flatMap { join in - yn.flatMap { perf in - yn.flatMap { close in - yn.flatMap { subdiv in - joins(vc, bound: bound, slot: slot, join: join, perf: perf, close: close, subdiv: subdiv) - } + (0..<6).flatMap { join in + [ true, false ].flatMap { perf in + [ true, false ].flatMap { close in + joins(vc, bound: bound, slot: slot, join: join, perf: perf, close: close) } } } - return objs } private func step() { @@ -248,9 +241,10 @@ class WideVectorsTestCase : WideVectorsTestCaseBase switch (n) { case 0: return kMaplyWideVecMiterJoin; case 1: return kMaplyWideVecMiterClipJoin; - case 2: return kMaplyWideVecRoundJoin; - case 3: return kMaplyWideVecBevelJoin; - case 4: return kMaplyWideVecNoneJoin; + case 2: return kMaplyWideVecMiterSimpleJoin; + case 3: return kMaplyWideVecRoundJoin; + case 4: return kMaplyWideVecBevelJoin; + case 5: return kMaplyWideVecNoneJoin; default: return nil } } @@ -292,7 +286,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase // Note vary in lon rather than lat so that they are projected identically. let lat = Float(30.0) - let lon = Float(-150.0) + (perf ? 3.0 : 0.0) + let lon = Float(-160.0) + (perf ? 3.0 : 0.0) var coords = [ MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.0), @@ -311,17 +305,20 @@ class WideVectorsTestCase : WideVectorsTestCaseBase let wideDesc = [ kMaplyZoomSlot: slot, - kMaplyVecWidth: perf ? ["stops":[[5,3],[12,50]]] : 50, - kMaplyColor: ["stops":[[0,UIColor.blue.withAlphaComponent(0.75)],[6,UIColor.red.withAlphaComponent(0.75)]]], + kMaplyVecWidth: perf ? ["stops":[[5,3],[12,50]]] : 20, + kMaplyColor: perf ? ["stops":[[3,UIColor.blue.withAlphaComponent(0.75)], + [8,UIColor.red.withAlphaComponent(0.75)]]] : + UIColor.red.withAlphaComponent(0.75), kMaplyEnable: true, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, kMaplyWideVecImpl: perf ? kMaplyWideVecImplPerf : kMaplyWideVecImplDefault, kMaplyWideVecJoinType: kMaplyWideVecMiterJoin, + kMaplyWideVecMiterLimit: 5.0, kMaplyVecTexture: dashTex ?? NSNull(), kMaplyWideVecTexRepeatLen: 64, kMaplyWideVecOffset: 0, kMaplyWideVecTexOffsetX: 0.0, - kMaplyWideVecTexOffsetY: 0.1 * Double(texY), + kMaplyWideVecTexOffsetY: 0.1 * Double(texY) / (perf ? 1 : 10), // todo: why is this needed? kMaplyDrawableName: "WideVec-Tex", kMaplyTexWrapX: true, kMaplyTexWrapY: true, @@ -353,8 +350,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase } // Note vary in lon rather than lat so that they are projected identically. - let lat = Float(32.0) + (fudge ? 2.0 : 0.0) - let lon = Float(-150.0) + (perf ? 3.0 : 0.0) + let lat = Float(35.0) + (fudge ? 2.0 : 0.0) + let lon = Float(-160.0) + (perf ? 5.0 : 0.0) var coords = [ MaplyCoordinateMakeWithDegrees(lon + 0.0, lat), MaplyCoordinateMakeWithDegrees(lon + 1.0, lat + 1.0), @@ -370,7 +367,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase // Baseline with no offset let wideDesc = [ kMaplyZoomSlot: slot, - kMaplyVecWidth: perf ? ["stops":[[5,3],[15,60]]] : 50, + kMaplyVecWidth: perf ? ["stops":[[5,3],[15,60]]] : 20, kMaplyColor: UIColor.red.withAlphaComponent(0.2), kMaplyEnable: true, kMaplyDrawPriority: kMaplyVectorDrawPriorityDefault + 1, @@ -392,6 +389,8 @@ class WideVectorsTestCase : WideVectorsTestCaseBase kMaplyDrawableName: String(format: "WideVec-Offset%@%@", perf ? "-perf" : "", fudge ? "-clip" : ""), ], uniquingKeysWith: { (a,b) in b }) + let wideDescOffs2 = wideDescOffs.merging([kMaplyWideVecOffset: -40], uniquingKeysWith: { (a,b) in b }) + // Centerline let desc = [ kMaplyColor: UIColor.green.withAlphaComponent(0.5), @@ -413,6 +412,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase return [ vc.addWideVectors([vecObj], desc: wideDesc, mode: .current), vc.addWideVectors([vecObj], desc: wideDescOffs, mode: .current), + vc.addWideVectors(perf ? [] : [vecObj], desc: wideDescOffs2, mode: .current), vc.addVectors([vecObj], desc: desc, mode: .current), vc.addScreenLabels([lbl], desc: lblDesc, mode: .current), ] @@ -566,7 +566,7 @@ class WideVectorsTestCase : WideVectorsTestCaseBase self.wideLineTest(vc) } vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-122.4192, 37.7793), height: 0.01, heading: 0.0, time: 0.1) - vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-150.0, 32.0), height: 0.1, heading: 0.0, time: 0.1) + vc.animate(toPosition: MaplyCoordinateMakeWithDegrees(-140.0, 42.0), height: 0.2, heading: 0.0, time: 0.1) } override func setUpWithMap(_ vc: MaplyViewController) { @@ -613,6 +613,6 @@ class WideVectorsTestCase : WideVectorsTestCaseBase private var joinN = 15 private var joinD = 1 private var joinClip = true - private let joinSteps = 30 + private let joinSteps = 20 private let baseCase = GeographyClassTestCase() } diff --git a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h index a7eadeddd9..9ba7d26491 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h +++ b/ios/library/WhirlyGlobe-MaplyComponent/include/MaplySharedAttributes.h @@ -247,6 +247,8 @@ extern NSString * const _Nonnull kMaplyWideVecJoinType; extern NSString * const _Nonnull kMaplyWideVecMiterJoin; /// Widened vectors are joined with miters. Miters exceeding the miter limit are clipped. extern NSString * const _Nonnull kMaplyWideVecMiterClipJoin; +/// Widened vectors are joined with miters. Miters exceeding the miter limit are ignored. +extern NSString * const _Nonnull kMaplyWideVecMiterSimpleJoin; /// Widened vectors are joined with a circular arc extern NSString * const _Nonnull kMaplyWideVecRoundJoin; /// Widened vectors are joined with a bevel diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm index 3ccb4f3995..1973e1300e 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplySharedAttributes.mm @@ -209,6 +209,7 @@ /// Widened vectors are joined with miters WKDefineConst(WideVecMiterJoin) WKDefineConst(WideVecMiterClipJoin) +WKDefineConst(WideVecMiterSimpleJoin) // Note: Not yet implemented /// Widened vectors are joined with a curve WKDefineConst(WideVecRoundJoin) diff --git a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h index 532dd62c30..0e3f82c2b8 100644 --- a/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h +++ b/ios/library/WhirlyGlobeLib/include/DefaultShadersMTL.h @@ -96,11 +96,12 @@ typedef enum { // Line Joins // These are assumed to match WideVectorLineJoinType typedef enum { - WKSVertexLineJoinMiter = 0, - WKSVertexLineJoinMiterClip = 1, - WKSVertexLineJoinRound = 2, - WKSVertexLineJoinBevel = 3, - WKSVertexLineJoinNone = 4, + WKSVertexLineJoinMiter = 0, + WKSVertexLineJoinMiterClip = 1, + WKSVertexLineJoinMiterSimple = 2, + WKSVertexLineJoinRound = 3, + WKSVertexLineJoinBevel = 4, + WKSVertexLineJoinNone = 5, } WKSVertexLineJoinType; // Line Caps diff --git a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal index 7e131a3573..9ce7c364f2 100644 --- a/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal +++ b/ios/library/WhirlyGlobeLib/src/wkDefaultShaders.metal @@ -1072,11 +1072,6 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( // Interior turn angle, both vectors are normalized. theta = M_PI_F - acos(dotProd); - // todo: miter-clip doesn't work right at small angles - if (joinType == WKSVertexLineJoinMiterClip && abs(abs(dotProd) - 1) < 0.01) { - joinType = WKSVertexLineJoinMiter; - } - // "If the miter length divided by the stroke width exceeds the miterlimit then: // miter: the join is converted to a bevel // miter-clip: the miter is clipped at half the miter length from the intersection" @@ -1141,7 +1136,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( } // Endcaps not used for miter case, discard them. - if (joinType == WKSVertexLineJoinMiter && whichPoly != WideVecPolyBodyGeom && !isStartCap && !isEndCap) { + if ((joinType == WKSVertexLineJoinMiter || joinType == WKSVertexLineJoinMiterSimple) && + whichPoly != WideVecPolyBodyGeom && !isStartCap && !isEndCap) { return outVert; } @@ -1210,7 +1206,8 @@ vertex ProjVertexTriWideVecPerf vertexTri_wideVecPerf( const float2 otherCorner = offsetCenter + centers[2].norm * realOtherEdge; // Miter is mostly handled above by using the intersect points instead of corners. - if (joinType == WKSVertexLineJoinMiter) { + if (joinType == WKSVertexLineJoinMiter || + joinType == WKSVertexLineJoinMiterSimple) { // Add the difference between the intersection point and the original corner, // accounting for the textures being based on un-projected coordinates. texY += dot((interPt - corner) / screenScale, centers[2].nDir) / projScale; From bab1fdfe379745f50d11cc3b88c86c8b1da92ce3 Mon Sep 17 00:00:00 2001 From: Tim Sylvester Date: Fri, 8 Apr 2022 12:05:01 -0700 Subject: [PATCH 78/78] Bump versions to 3.5. --- README.md | 4 ++-- .../src/main/java/com/mousebird/maply/BaseController.java | 2 +- .../src/control/MaplyBaseViewController.mm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b7627a7f35..18bc0a44f8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![WhirlyGlobe-Maply](/common/images/banner.jpg) [![Apache v2](https://img.shields.io/badge/License-Apache%202-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) -[![Release 3.4](https://img.shields.io/badge/Release-3.4-blue.svg)](https://github.com/mousebird-consulting-inc/WhirlyGlobe/releases) +[![Release 3.5](https://img.shields.io/badge/Release-3.5-blue.svg)](https://github.com/mousebird-consulting-inc/WhirlyGlobe/releases) ![Platform iOS+Android](https://img.shields.io/badge/Platform-%20iOS%20%7c%20Android-blue.svg) [![Open Issues](https://img.shields.io/github/issues/mousebird-consulting-inc/WhirlyGlobe.svg?color=blue)](https://github.com/mousebird-consulting-inc/WhirlyGlobe/issues) [![Closed Issues](https://img.shields.io/github/issues-closed/mousebird-consulting-inc/WhirlyGlobe.svg?color=blue)](https://github.com/mousebird-consulting-inc/WhirlyGlobe/issues?q=is%3Aissue+is%3Aclosed) @@ -51,7 +51,7 @@ Want more detail? Go read the [Tutorials](http://mousebird-consulting-inc.github Breaking Changes --- -If you're upgrading from 3.4, you will need to make some adjustments due to the switch to xcframework and modular headers: +If you're upgrading from 3.3, you will need to make some adjustments due to the switch to xcframework and modular headers: - When embedding the framework as is done in AutoTester, Swift no longer automatically imports the module because it doesn't match the project name. You will need an additional `import WhirlyGlobe` at the top of Swift files using the API. - If you're including header files from Obj-C++ code, you'll need to use the modular include style, `#import `, and using quoted includes will produce a compile error. diff --git a/android/library/maply/src/main/java/com/mousebird/maply/BaseController.java b/android/library/maply/src/main/java/com/mousebird/maply/BaseController.java index bd24cc79dc..acec7d4735 100644 --- a/android/library/maply/src/main/java/com/mousebird/maply/BaseController.java +++ b/android/library/maply/src/main/java/com/mousebird/maply/BaseController.java @@ -538,7 +538,7 @@ private void startAnalytics() String bundleVersion = pInfo.versionName; String osversion = "Android " + Build.VERSION.RELEASE; String model = Build.MANUFACTURER + " " + Build.MODEL; - String wgMaplyVersion = "3.4"; + String wgMaplyVersion = "3.5"; String json = String.format( "{ \"userid\":\"%s\", \"bundleid\":\"%s\", \"bundlename\":\"%s\", \"bundlebuild\":\"%s\", \"bundleversion\":\"%s\", \"osversion\":\"%s\", \"model\":\"%s\", \"wgmaplyversion\":\"%s\" }", userID, bundleID, bundleName, bundleBuild, bundleVersion, osversion, model, wgMaplyVersion); diff --git a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm index d4138ecd3d..9067f086ce 100644 --- a/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm +++ b/ios/library/WhirlyGlobe-MaplyComponent/src/control/MaplyBaseViewController.mm @@ -246,7 +246,7 @@ - (void)sendAnalytics:(NSString *)serverName NSString *build = infoDict[@"CFBundleVersion"]; NSString *bundleVersion = infoDict[@"CFBundleShortVersionString"]; // WGMaply version - NSString *wgmaplyVersion = @"3.4"; + NSString *wgmaplyVersion = @"3.5"; // OS version NSOperatingSystemVersion osversionID = [[NSProcessInfo processInfo] operatingSystemVersion]; NSString *osversion = [NSString stringWithFormat:@"%d.%d.%d",(int)osversionID.majorVersion,(int)osversionID.minorVersion,(int) osversionID.patchVersion];