@vcmap/ui 5.0.0-rc.29 → 5.0.0-rc.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/buildHelpers.js +4 -3
- package/config/base.config.json +5 -4
- package/config/dev.config.json +8 -0
- package/config/graphFeatureInfo.config.json +1 -1
- package/config/projects.config.json +2 -2
- package/dist/assets/cesium/ThirdParty/Workers/basis_transcoder.js +1 -1
- package/dist/assets/cesium/Workers/chunk-227AJNOA.js +59 -0
- package/dist/assets/cesium/Workers/chunk-2R5O53JW.js +157 -0
- package/dist/assets/cesium/Workers/chunk-34YUDLRP.js +781 -0
- package/dist/assets/cesium/Workers/chunk-3W63OHNJ.js +100 -0
- package/dist/assets/cesium/Workers/chunk-4MFFIWUA.js +163 -0
- package/dist/assets/cesium/Workers/chunk-66QLLS45.js +218 -0
- package/dist/assets/cesium/Workers/chunk-6BTKZDRG.js +77 -0
- package/dist/assets/cesium/Workers/chunk-A4JVFBQ3.js +101 -0
- package/dist/assets/cesium/Workers/chunk-ABADGKYE.js +58 -0
- package/dist/assets/cesium/Workers/chunk-AFFLIKOH.js +353 -0
- package/dist/assets/cesium/Workers/chunk-AHKEZ2OE.js +629 -0
- package/dist/assets/cesium/Workers/chunk-C3SXRKRW.js +476 -0
- package/dist/assets/cesium/Workers/chunk-CCFQRR6D.js +55 -0
- package/dist/assets/cesium/Workers/chunk-CHHNOC2C.js +1860 -0
- package/dist/assets/cesium/Workers/chunk-CTELOFLA.js +196 -0
- package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +3273 -0
- package/dist/assets/cesium/Workers/chunk-EW2GWJYB.js +44 -0
- package/dist/assets/cesium/Workers/chunk-GLZBE3ML.js +421 -0
- package/dist/assets/cesium/Workers/chunk-HARLBUOL.js +236 -0
- package/dist/assets/cesium/Workers/chunk-HQF437NJ.js +117 -0
- package/dist/assets/cesium/Workers/chunk-IPA4EACJ.js +368 -0
- package/dist/assets/cesium/Workers/chunk-J3JY6I2C.js +1009 -0
- package/dist/assets/cesium/Workers/chunk-JB2LWGH4.js +390 -0
- package/dist/assets/cesium/Workers/chunk-JS3AW5BK.js +634 -0
- package/dist/assets/cesium/Workers/chunk-K36FEYS7.js +452 -0
- package/dist/assets/cesium/Workers/chunk-KD4Y7CZL.js +400 -0
- package/dist/assets/cesium/Workers/chunk-KTJSNCK4.js +842 -0
- package/dist/assets/cesium/Workers/chunk-LLUNNUJV.js +258 -0
- package/dist/assets/cesium/Workers/{package.js → chunk-MPAZH4BF.js} +13 -2
- package/dist/assets/cesium/Workers/chunk-MYZB7C4T.js +1258 -0
- package/dist/assets/cesium/Workers/chunk-N3JIFFX2.js +501 -0
- package/dist/assets/cesium/Workers/chunk-O5AMBQ36.js +430 -0
- package/dist/assets/cesium/Workers/chunk-OAVNIRB4.js +124 -0
- package/dist/assets/cesium/Workers/chunk-OYFCF4PL.js +171 -0
- package/dist/assets/cesium/Workers/chunk-OZJDGN5F.js +1477 -0
- package/dist/assets/cesium/Workers/chunk-PCJWUS4M.js +2041 -0
- package/dist/assets/cesium/Workers/chunk-PFQBCKBM.js +8644 -0
- package/dist/assets/cesium/Workers/chunk-QIKODV5G.js +305 -0
- package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +73 -0
- package/dist/assets/cesium/Workers/chunk-QMEMZIJI.js +138 -0
- package/dist/assets/cesium/Workers/chunk-QT3MPEMI.js +102 -0
- package/dist/assets/cesium/Workers/chunk-RP2A7BR5.js +289 -0
- package/dist/assets/cesium/Workers/chunk-RW6LU2CJ.js +138 -0
- package/dist/assets/cesium/Workers/chunk-TFC6TZ3S.js +757 -0
- package/dist/assets/cesium/Workers/chunk-V3NGATMV.js +693 -0
- package/dist/assets/cesium/Workers/chunk-VLGOATD6.js +1075 -0
- package/dist/assets/cesium/Workers/chunk-WXTV4ATB.js +39 -0
- package/dist/assets/cesium/Workers/chunk-X4SU25DT.js +302 -0
- package/dist/assets/cesium/Workers/chunk-XTY7B2N6.js +2716 -0
- package/dist/assets/cesium/Workers/chunk-XY7MGBKC.js +513 -0
- package/dist/assets/cesium/Workers/chunk-Z24VKNDO.js +834 -0
- package/dist/assets/cesium/Workers/chunk-ZA25DG4Y.js +684 -0
- package/dist/assets/cesium/Workers/chunk-ZFOBYDGF.js +73 -0
- package/dist/assets/cesium/Workers/combineGeometry.js +65 -15
- package/dist/assets/cesium/Workers/createBoxGeometry.js +55 -10
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +231 -310
- package/dist/assets/cesium/Workers/createCircleGeometry.js +185 -202
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +141 -155
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +477 -557
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +218 -230
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1162 -1307
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +533 -569
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +57 -10
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +224 -258
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +68 -12
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +61 -12
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +56 -10
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +58 -13
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +55 -10
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +226 -243
- package/dist/assets/cesium/Workers/createGeometry.js +143 -48
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1484 -2011
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +216 -243
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +121 -113
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1041 -1327
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +516 -657
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +471 -547
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +352 -384
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +271 -295
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1128 -1331
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +445 -500
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +381 -440
- package/dist/assets/cesium/Workers/createSphereGeometry.js +112 -118
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +112 -121
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +32 -127
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +462 -505
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +377 -436
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +110 -77
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +369 -391
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +252 -244
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +543 -615
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2244 -2677
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +682 -926
- package/dist/assets/cesium/Workers/createWallGeometry.js +459 -593
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +324 -419
- package/dist/assets/cesium/Workers/decodeDraco.js +327 -347
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2530 -3567
- package/dist/assets/cesium/Workers/decodeI3S.js +765 -970
- package/dist/assets/cesium/Workers/transcodeKTX2.js +3353 -1464
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +3 -4
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +748 -953
- package/dist/assets/{cesium.16590b.js → cesium.77d0f7.js} +8915 -13165
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.74da2a.js → core.720589.js} +3421 -3365
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-dd539204.js +1 -0
- package/dist/assets/{ol.50a512.js → ol.e48649.js} +4 -4
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.d3054c.css → ui.50452a.css} +2 -2
- package/dist/assets/{ui.d3054c.js → ui.50452a.js} +5312 -4776
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.946bd8.js → vuetify.f0a769.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +27 -23
- package/index.html +23 -22
- package/index.js +6 -0
- package/package.json +5 -5
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +37 -1
- package/plugins/@vcmap-show-case/form-inputs-example/index.js +3 -0
- package/plugins/@vcmap-show-case/form-inputs-example/validation.js +11 -0
- package/plugins/@vcmap-show-case/plugin-editors/PluginEditors.vue +119 -0
- package/plugins/@vcmap-show-case/plugin-editors/index.js +41 -0
- package/plugins/@vcmap-show-case/plugin-editors/package.json +5 -0
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ProjectSelectorComponent.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/config.json +2 -2
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/package.json +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/package.json +1 -1
- package/plugins/@vcmap-show-case/style-input-example/styleExample.vue +0 -1
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/ThemeChangerComponent.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/config.json +2 -2
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/index.js +40 -0
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +5 -0
- package/plugins/@vcmap-show-case/vector-properties-example/vectorPropertiesExample.vue +128 -0
- package/plugins/package.json +6 -2
- package/src/application/VcsAttributions.vue +27 -20
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +290 -0
- package/src/components/form-inputs-controls/VcsSlider.vue +1 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +9 -3
- package/src/components/icons/2DAreaIcon.vue +2 -17
- package/src/components/icons/2DDistanceIcon.vue +0 -3
- package/src/components/icons/3DAreaIcon.vue +2 -17
- package/src/components/icons/3DDistanceIcon.vue +0 -3
- package/src/components/icons/3DHeightIcon.vue +0 -3
- package/src/components/icons/AngleIcon.vue +0 -1
- package/src/components/icons/AssociationsIcon.vue +1 -3
- package/src/components/icons/AxisIcon.vue +0 -4
- package/src/components/icons/BoundingBoxIcon.vue +1 -4
- package/src/components/icons/CheckboxIcon.vue +0 -2
- package/src/components/icons/CheckboxIndeterminateIcon.vue +1 -5
- package/src/components/icons/CircleIcon.vue +1 -6
- package/src/components/icons/ClippingHorizontalIcon.vue +0 -1
- package/src/components/icons/ClippingIcon.vue +0 -1
- package/src/components/icons/ClippingVerticalIcon.vue +0 -1
- package/src/components/icons/ColorPickerIcon.vue +0 -1
- package/src/components/icons/ColorSwatchIcon.vue +0 -2
- package/src/components/icons/CommentIcon.vue +0 -1
- package/src/components/icons/CompassIcon.vue +0 -2
- package/src/components/icons/ComponentsIcon.vue +0 -1
- package/src/components/icons/ConeIcon.vue +1 -4
- package/src/components/icons/DimensionsHouseIcon.vue +0 -2
- package/src/components/icons/EditIcon.vue +0 -1
- package/src/components/icons/EditVerticesIcon.vue +0 -4
- package/src/components/icons/ElevationProfileIcon.vue +1 -13
- package/src/components/icons/ExportAreaIcon.vue +0 -1
- package/src/components/icons/ExportFlightIcon.vue +0 -1
- package/src/components/icons/ExportIcon.vue +12 -8
- package/src/components/icons/ExternalLinkIcon.vue +0 -2
- package/src/components/icons/FastForwardIcon.vue +0 -1
- package/src/components/icons/FilterIcon.vue +0 -1
- package/src/components/icons/GlobeNatureIcon.vue +0 -3
- package/src/components/icons/GroundIcon.vue +0 -1
- package/src/components/icons/HealthCareIndustriesIcon.vue +1 -11
- package/src/components/icons/HideIcon.vue +0 -1
- package/src/components/icons/HomePointIcon.vue +0 -1
- package/src/components/icons/HospitalsIcon.vue +1 -20
- package/src/components/icons/HouseIcon.vue +3 -13
- package/src/components/icons/ImportIcon.vue +6 -14
- package/src/components/icons/InfoIcon.vue +0 -2
- package/src/components/icons/KebabIcon.vue +1 -9
- package/src/components/icons/LabelIcon.vue +0 -2
- package/src/components/icons/LayersIcon.vue +1 -9
- package/src/components/icons/LegendIcon.vue +0 -1
- package/src/components/icons/LineIcon.vue +0 -2
- package/src/components/icons/LinkIcon.vue +0 -1
- package/src/components/icons/LogoutIcon.vue +0 -1
- package/src/components/icons/MapIcon.vue +0 -2
- package/src/components/icons/MenuIcon.vue +1 -5
- package/src/components/icons/MinusIcon.vue +0 -2
- package/src/components/icons/ObjectSelectIcon.vue +0 -2
- package/src/components/icons/ObliqueViewIcon.vue +0 -1
- package/src/components/icons/PdfIcon.vue +0 -1
- package/src/components/icons/PedestrianIcon.vue +0 -1
- package/src/components/icons/PenIcon.vue +0 -1
- package/src/components/icons/PlayCircleIcon.vue +1 -8
- package/src/components/icons/PlusIcon.vue +0 -2
- package/src/components/icons/PoiIcon.vue +0 -1
- package/src/components/icons/PointIcon.vue +2 -6
- package/src/components/icons/PointSelectIcon.vue +0 -1
- package/src/components/icons/PresentationModeIcon.vue +0 -1
- package/src/components/icons/ProgressIcon.vue +1 -1
- package/src/components/icons/QueryIcon.vue +0 -1
- package/src/components/icons/RectangleIcon.vue +1 -6
- package/src/components/icons/ReturnIcon.vue +0 -1
- package/src/components/icons/RewindIcon.vue +0 -1
- package/src/components/icons/RotateLeftIcon.vue +0 -1
- package/src/components/icons/RotateRightIcon.vue +0 -1
- package/src/components/icons/ScreenshotIcon.vue +1 -6
- package/src/components/icons/SearchIcon.vue +0 -1
- package/src/components/icons/ShadowIcon.vue +0 -2
- package/src/components/icons/ShapesIcon.vue +1 -4
- package/src/components/icons/ShareIcon.vue +0 -1
- package/src/components/icons/SimpleCircleFilledIcon.vue +0 -1
- package/src/components/icons/SimpleCircleHalfFilledIcon.vue +0 -1
- package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -7
- package/src/components/icons/SkipPreviousIcon.vue +1 -6
- package/src/components/icons/SplitViewIcon.vue +0 -1
- package/src/components/icons/TextStyleIcon.vue +0 -3
- package/src/components/icons/ThreeDimensionsIcon.vue +0 -1
- package/src/components/icons/ToolsIcon.vue +0 -1
- package/src/components/icons/TouchIcon.vue +0 -1
- package/src/components/icons/TriangleIcon.vue +0 -3
- package/src/components/icons/TwoDimensionsIcon.vue +0 -2
- package/src/components/icons/UploadIcon.vue +0 -1
- package/src/components/icons/UserProfileIcon.vue +0 -1
- package/src/components/icons/UserShareIcon.vue +0 -1
- package/src/components/icons/ViewpointFlightIcon.vue +0 -1
- package/src/components/icons/ViewpointIcon.vue +0 -1
- package/src/components/icons/Viewshed360Icon.vue +0 -1
- package/src/components/icons/ViewshedConeIcon.vue +0 -1
- package/src/components/icons/ViewshedIcon.vue +0 -1
- package/src/components/icons/WalkingIcon.vue +0 -1
- package/src/components/icons/WallIcon.vue +1 -4
- package/src/components/icons/WandIcon.vue +22 -70
- package/src/components/lists/VcsList.vue +18 -12
- package/src/components/plugins/AbstractConfigEditor.vue +84 -0
- package/src/components/style/VcsImageSelector.vue +6 -5
- package/src/components/style/VcsTextSelector.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +1 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +780 -0
- package/src/components/vector-properties/composables.js +93 -0
- package/src/contentTree/contentTreeCollection.js +30 -9
- package/src/i18n/de.js +41 -7
- package/src/i18n/en.js +39 -5
- package/src/i18n/i18nCollection.js +19 -65
- package/src/manager/buttonManager.js +4 -0
- package/src/manager/collectionManager/collectionComponent.js +1 -1
- package/src/manager/contextMenu/contextMenuManager.js +2 -0
- package/src/pluginHelper.js +57 -17
- package/src/vcsUiApp.js +25 -30
- package/src/vuePlugins/i18n.js +0 -8
- package/dist/assets/cesium/ThirdParty/Workers/draco_decoder_nodejs.js +0 -117
- package/dist/assets/cesium/Workers/ArcType-2d9abbbc.js +0 -37
- package/dist/assets/cesium/Workers/AttributeCompression-f9f6c717.js +0 -716
- package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-4140c51f.js +0 -258
- package/dist/assets/cesium/Workers/BoundingRectangle-c714b156.js +0 -369
- package/dist/assets/cesium/Workers/BoxGeometry-6f3da43d.js +0 -884
- package/dist/assets/cesium/Workers/Check-6ede7e26.js +0 -290
- package/dist/assets/cesium/Workers/Color-8a565ff2.js +0 -2262
- package/dist/assets/cesium/Workers/ComponentDatatype-cf1fa08e.js +0 -341
- package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4b4d4096.js +0 -132
- package/dist/assets/cesium/Workers/CorridorGeometryLibrary-7b94502b.js +0 -498
- package/dist/assets/cesium/Workers/CylinderGeometry-ca070b87.js +0 -467
- package/dist/assets/cesium/Workers/CylinderGeometryLibrary-7bf291b4.js +0 -63
- package/dist/assets/cesium/Workers/EllipseGeometry-122e51fa.js +0 -1304
- package/dist/assets/cesium/Workers/EllipseGeometryLibrary-4d326efc.js +0 -366
- package/dist/assets/cesium/Workers/EllipseOutlineGeometry-16cc2bd7.js +0 -443
- package/dist/assets/cesium/Workers/EllipsoidGeodesic-5b3623dc.js +0 -520
- package/dist/assets/cesium/Workers/EllipsoidGeometry-cb148ca2.js +0 -637
- package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-0fa10c79.js +0 -454
- package/dist/assets/cesium/Workers/EllipsoidRhumbLine-ef872433.js +0 -741
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-6dd1b7af.js +0 -373
- package/dist/assets/cesium/Workers/EncodedCartesian3-57415c8a.js +0 -171
- package/dist/assets/cesium/Workers/FrustumGeometry-ee73037c.js +0 -2540
- package/dist/assets/cesium/Workers/GeometryAttribute-ff5b4fb1.js +0 -619
- package/dist/assets/cesium/Workers/GeometryAttributes-ad136444.js +0 -91
- package/dist/assets/cesium/Workers/GeometryInstance-34d9e21e.js +0 -121
- package/dist/assets/cesium/Workers/GeometryOffsetAttribute-9ad0019c.js +0 -16
- package/dist/assets/cesium/Workers/GeometryPipeline-1f8fbf05.js +0 -3690
- package/dist/assets/cesium/Workers/IndexDatatype-2643aa47.js +0 -200
- package/dist/assets/cesium/Workers/IntersectionTests-70d39ba9.js +0 -1836
- package/dist/assets/cesium/Workers/Math-0a2ac845.js +0 -1340
- package/dist/assets/cesium/Workers/Matrix2-e1298525.js +0 -7086
- package/dist/assets/cesium/Workers/Matrix3-41c58dde.js +0 -4283
- package/dist/assets/cesium/Workers/OrientedBoundingBox-159cf1d6.js +0 -1259
- package/dist/assets/cesium/Workers/Plane-4c3d403b.js +0 -309
- package/dist/assets/cesium/Workers/PolygonGeometryLibrary-076a5d25.js +0 -1074
- package/dist/assets/cesium/Workers/PolygonPipeline-b9f2810a.js +0 -1344
- package/dist/assets/cesium/Workers/PolylinePipeline-639192e0.js +0 -573
- package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-b73549fb.js +0 -781
- package/dist/assets/cesium/Workers/PrimitivePipeline-10ede1b6.js +0 -966
- package/dist/assets/cesium/Workers/RectangleGeometryLibrary-c35a7356.js +0 -280
- package/dist/assets/cesium/Workers/RuntimeError-ef395448.js +0 -68
- package/dist/assets/cesium/Workers/TerrainEncoding-668d242f.js +0 -1227
- package/dist/assets/cesium/Workers/Transforms-a2a85221.js +0 -14712
- package/dist/assets/cesium/Workers/VertexFormat-030f11ff.js +0 -312
- package/dist/assets/cesium/Workers/WallGeometryLibrary-1938bf0d.js +0 -211
- package/dist/assets/cesium/Workers/WebGLConstants-0b1ce7ba.js +0 -620
- package/dist/assets/cesium/Workers/WebMercatorProjection-13ed1a6e.js +0 -151
- package/dist/assets/cesium/Workers/arrayRemoveDuplicates-d2061e85.js +0 -129
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +0 -1363
- package/dist/assets/cesium/Workers/combine-d9581036.js +0 -82
- package/dist/assets/cesium/Workers/defaultValue-fe22d8c0.js +0 -51
- package/dist/assets/index-cb070eff.js +0 -1
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -76
- package/plugins/@vcmap/create-link/index.js +0 -95
- package/plugins/@vcmap/create-link/package.json +0 -6
- package/plugins/@vcmap/search-nominatim/LICENSE.md +0 -13
- package/plugins/@vcmap/search-nominatim/README.md +0 -3
- package/plugins/@vcmap/search-nominatim/config.json +0 -3
- package/plugins/@vcmap/search-nominatim/index.js +0 -29
- package/plugins/@vcmap/search-nominatim/nominatim.js +0 -175
- package/plugins/@vcmap/search-nominatim/package.json +0 -9
- /package/dist/assets/{vue.30740e.js → vue.5d696e.js} +0 -0
- /package/dist/assets/{vuetify.946bd8.css → vuetify.f0a769.css} +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ModulesListComponent.vue +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/de.json +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/en.json +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/index.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/SimpleGraphComponent.vue +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/index.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/simpleGraphView.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/index.js +0 -0
@@ -1,1227 +0,0 @@
|
|
1
|
-
define(['exports', './Transforms-a2a85221', './Matrix3-41c58dde', './Check-6ede7e26', './defaultValue-fe22d8c0', './Matrix2-e1298525', './AttributeCompression-f9f6c717', './ComponentDatatype-cf1fa08e', './Math-0a2ac845'], (function (exports, Transforms, Matrix3, Check, defaultValue, Matrix2, AttributeCompression, ComponentDatatype, Math$1) { 'use strict';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Determine whether or not other objects are visible or hidden behind the visible horizon defined by
|
5
|
-
* an {@link Ellipsoid} and a camera position. The ellipsoid is assumed to be located at the
|
6
|
-
* origin of the coordinate system. This class uses the algorithm described in the
|
7
|
-
* {@link https://cesium.com/blog/2013/04/25/Horizon-culling/|Horizon Culling} blog post.
|
8
|
-
*
|
9
|
-
* @alias EllipsoidalOccluder
|
10
|
-
*
|
11
|
-
* @param {Ellipsoid} ellipsoid The ellipsoid to use as an occluder.
|
12
|
-
* @param {Cartesian3} [cameraPosition] The coordinate of the viewer/camera. If this parameter is not
|
13
|
-
* specified, {@link EllipsoidalOccluder#cameraPosition} must be called before
|
14
|
-
* testing visibility.
|
15
|
-
*
|
16
|
-
* @constructor
|
17
|
-
*
|
18
|
-
* @example
|
19
|
-
* // Construct an ellipsoidal occluder with radii 1.0, 1.1, and 0.9.
|
20
|
-
* const cameraPosition = new Cesium.Cartesian3(5.0, 6.0, 7.0);
|
21
|
-
* const occluderEllipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
|
22
|
-
* const occluder = new Cesium.EllipsoidalOccluder(occluderEllipsoid, cameraPosition);
|
23
|
-
*
|
24
|
-
* @private
|
25
|
-
*/
|
26
|
-
function EllipsoidalOccluder(ellipsoid, cameraPosition) {
|
27
|
-
//>>includeStart('debug', pragmas.debug);
|
28
|
-
Check.Check.typeOf.object("ellipsoid", ellipsoid);
|
29
|
-
//>>includeEnd('debug');
|
30
|
-
|
31
|
-
this._ellipsoid = ellipsoid;
|
32
|
-
this._cameraPosition = new Matrix3.Cartesian3();
|
33
|
-
this._cameraPositionInScaledSpace = new Matrix3.Cartesian3();
|
34
|
-
this._distanceToLimbInScaledSpaceSquared = 0.0;
|
35
|
-
|
36
|
-
// cameraPosition fills in the above values
|
37
|
-
if (defaultValue.defined(cameraPosition)) {
|
38
|
-
this.cameraPosition = cameraPosition;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
Object.defineProperties(EllipsoidalOccluder.prototype, {
|
43
|
-
/**
|
44
|
-
* Gets the occluding ellipsoid.
|
45
|
-
* @memberof EllipsoidalOccluder.prototype
|
46
|
-
* @type {Ellipsoid}
|
47
|
-
*/
|
48
|
-
ellipsoid: {
|
49
|
-
get: function () {
|
50
|
-
return this._ellipsoid;
|
51
|
-
},
|
52
|
-
},
|
53
|
-
/**
|
54
|
-
* Gets or sets the position of the camera.
|
55
|
-
* @memberof EllipsoidalOccluder.prototype
|
56
|
-
* @type {Cartesian3}
|
57
|
-
*/
|
58
|
-
cameraPosition: {
|
59
|
-
get: function () {
|
60
|
-
return this._cameraPosition;
|
61
|
-
},
|
62
|
-
set: function (cameraPosition) {
|
63
|
-
// See https://cesium.com/blog/2013/04/25/Horizon-culling/
|
64
|
-
const ellipsoid = this._ellipsoid;
|
65
|
-
const cv = ellipsoid.transformPositionToScaledSpace(
|
66
|
-
cameraPosition,
|
67
|
-
this._cameraPositionInScaledSpace
|
68
|
-
);
|
69
|
-
const vhMagnitudeSquared = Matrix3.Cartesian3.magnitudeSquared(cv) - 1.0;
|
70
|
-
|
71
|
-
Matrix3.Cartesian3.clone(cameraPosition, this._cameraPosition);
|
72
|
-
this._cameraPositionInScaledSpace = cv;
|
73
|
-
this._distanceToLimbInScaledSpaceSquared = vhMagnitudeSquared;
|
74
|
-
},
|
75
|
-
},
|
76
|
-
});
|
77
|
-
|
78
|
-
const scratchCartesian = new Matrix3.Cartesian3();
|
79
|
-
|
80
|
-
/**
|
81
|
-
* Determines whether or not a point, the <code>occludee</code>, is hidden from view by the occluder.
|
82
|
-
*
|
83
|
-
* @param {Cartesian3} occludee The point to test for visibility.
|
84
|
-
* @returns {boolean} <code>true</code> if the occludee is visible; otherwise <code>false</code>.
|
85
|
-
*
|
86
|
-
* @example
|
87
|
-
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
|
88
|
-
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
|
89
|
-
* const occluder = new Cesium.EllipsoidalOccluder(ellipsoid, cameraPosition);
|
90
|
-
* const point = new Cesium.Cartesian3(0, -3, -3);
|
91
|
-
* occluder.isPointVisible(point); //returns true
|
92
|
-
*/
|
93
|
-
EllipsoidalOccluder.prototype.isPointVisible = function (occludee) {
|
94
|
-
const ellipsoid = this._ellipsoid;
|
95
|
-
const occludeeScaledSpacePosition = ellipsoid.transformPositionToScaledSpace(
|
96
|
-
occludee,
|
97
|
-
scratchCartesian
|
98
|
-
);
|
99
|
-
return isScaledSpacePointVisible(
|
100
|
-
occludeeScaledSpacePosition,
|
101
|
-
this._cameraPositionInScaledSpace,
|
102
|
-
this._distanceToLimbInScaledSpaceSquared
|
103
|
-
);
|
104
|
-
};
|
105
|
-
|
106
|
-
/**
|
107
|
-
* Determines whether or not a point expressed in the ellipsoid scaled space, is hidden from view by the
|
108
|
-
* occluder. To transform a Cartesian X, Y, Z position in the coordinate system aligned with the ellipsoid
|
109
|
-
* into the scaled space, call {@link Ellipsoid#transformPositionToScaledSpace}.
|
110
|
-
*
|
111
|
-
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space.
|
112
|
-
* @returns {boolean} <code>true</code> if the occludee is visible; otherwise <code>false</code>.
|
113
|
-
*
|
114
|
-
* @example
|
115
|
-
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
|
116
|
-
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
|
117
|
-
* const occluder = new Cesium.EllipsoidalOccluder(ellipsoid, cameraPosition);
|
118
|
-
* const point = new Cesium.Cartesian3(0, -3, -3);
|
119
|
-
* const scaledSpacePoint = ellipsoid.transformPositionToScaledSpace(point);
|
120
|
-
* occluder.isScaledSpacePointVisible(scaledSpacePoint); //returns true
|
121
|
-
*/
|
122
|
-
EllipsoidalOccluder.prototype.isScaledSpacePointVisible = function (
|
123
|
-
occludeeScaledSpacePosition
|
124
|
-
) {
|
125
|
-
return isScaledSpacePointVisible(
|
126
|
-
occludeeScaledSpacePosition,
|
127
|
-
this._cameraPositionInScaledSpace,
|
128
|
-
this._distanceToLimbInScaledSpaceSquared
|
129
|
-
);
|
130
|
-
};
|
131
|
-
|
132
|
-
const scratchCameraPositionInScaledSpaceShrunk = new Matrix3.Cartesian3();
|
133
|
-
|
134
|
-
/**
|
135
|
-
* Similar to {@link EllipsoidalOccluder#isScaledSpacePointVisible} except tests against an
|
136
|
-
* ellipsoid that has been shrunk by the minimum height when the minimum height is below
|
137
|
-
* the ellipsoid. This is intended to be used with points generated by
|
138
|
-
* {@link EllipsoidalOccluder#computeHorizonCullingPointPossiblyUnderEllipsoid} or
|
139
|
-
* {@link EllipsoidalOccluder#computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid}.
|
140
|
-
*
|
141
|
-
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space of the possibly-shrunk ellipsoid.
|
142
|
-
* @returns {boolean} <code>true</code> if the occludee is visible; otherwise <code>false</code>.
|
143
|
-
*/
|
144
|
-
EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid = function (
|
145
|
-
occludeeScaledSpacePosition,
|
146
|
-
minimumHeight
|
147
|
-
) {
|
148
|
-
const ellipsoid = this._ellipsoid;
|
149
|
-
let vhMagnitudeSquared;
|
150
|
-
let cv;
|
151
|
-
|
152
|
-
if (
|
153
|
-
defaultValue.defined(minimumHeight) &&
|
154
|
-
minimumHeight < 0.0 &&
|
155
|
-
ellipsoid.minimumRadius > -minimumHeight
|
156
|
-
) {
|
157
|
-
// This code is similar to the cameraPosition setter, but unrolled for performance because it will be called a lot.
|
158
|
-
cv = scratchCameraPositionInScaledSpaceShrunk;
|
159
|
-
cv.x = this._cameraPosition.x / (ellipsoid.radii.x + minimumHeight);
|
160
|
-
cv.y = this._cameraPosition.y / (ellipsoid.radii.y + minimumHeight);
|
161
|
-
cv.z = this._cameraPosition.z / (ellipsoid.radii.z + minimumHeight);
|
162
|
-
vhMagnitudeSquared = cv.x * cv.x + cv.y * cv.y + cv.z * cv.z - 1.0;
|
163
|
-
} else {
|
164
|
-
cv = this._cameraPositionInScaledSpace;
|
165
|
-
vhMagnitudeSquared = this._distanceToLimbInScaledSpaceSquared;
|
166
|
-
}
|
167
|
-
|
168
|
-
return isScaledSpacePointVisible(
|
169
|
-
occludeeScaledSpacePosition,
|
170
|
-
cv,
|
171
|
-
vhMagnitudeSquared
|
172
|
-
);
|
173
|
-
};
|
174
|
-
|
175
|
-
/**
|
176
|
-
* Computes a point that can be used for horizon culling from a list of positions. If the point is below
|
177
|
-
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
|
178
|
-
* is expressed in the ellipsoid-scaled space and is suitable for use with
|
179
|
-
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
|
180
|
-
*
|
181
|
-
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
|
182
|
-
* A reasonable direction to use is the direction from the center of the ellipsoid to
|
183
|
-
* the center of the bounding sphere computed from the positions. The direction need not
|
184
|
-
* be normalized.
|
185
|
-
* @param {Cartesian3[]} positions The positions from which to compute the horizon culling point. The positions
|
186
|
-
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
|
187
|
-
* ellipsoid's axes.
|
188
|
-
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
|
189
|
-
* @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.
|
190
|
-
*/
|
191
|
-
EllipsoidalOccluder.prototype.computeHorizonCullingPoint = function (
|
192
|
-
directionToPoint,
|
193
|
-
positions,
|
194
|
-
result
|
195
|
-
) {
|
196
|
-
return computeHorizonCullingPointFromPositions(
|
197
|
-
this._ellipsoid,
|
198
|
-
directionToPoint,
|
199
|
-
positions,
|
200
|
-
result
|
201
|
-
);
|
202
|
-
};
|
203
|
-
|
204
|
-
const scratchEllipsoidShrunk = Matrix3.Ellipsoid.clone(Matrix3.Ellipsoid.UNIT_SPHERE);
|
205
|
-
|
206
|
-
/**
|
207
|
-
* Similar to {@link EllipsoidalOccluder#computeHorizonCullingPoint} except computes the culling
|
208
|
-
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
|
209
|
-
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
|
210
|
-
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
|
211
|
-
*
|
212
|
-
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
|
213
|
-
* A reasonable direction to use is the direction from the center of the ellipsoid to
|
214
|
-
* the center of the bounding sphere computed from the positions. The direction need not
|
215
|
-
* be normalized.
|
216
|
-
* @param {Cartesian3[]} positions The positions from which to compute the horizon culling point. The positions
|
217
|
-
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
|
218
|
-
* ellipsoid's axes.
|
219
|
-
* @param {number} [minimumHeight] The minimum height of all positions. If this value is undefined, all positions are assumed to be above the ellipsoid.
|
220
|
-
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
|
221
|
-
* @returns {Cartesian3} The computed horizon culling point, expressed in the possibly-shrunk ellipsoid-scaled space.
|
222
|
-
*/
|
223
|
-
EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid = function (
|
224
|
-
directionToPoint,
|
225
|
-
positions,
|
226
|
-
minimumHeight,
|
227
|
-
result
|
228
|
-
) {
|
229
|
-
const possiblyShrunkEllipsoid = getPossiblyShrunkEllipsoid(
|
230
|
-
this._ellipsoid,
|
231
|
-
minimumHeight,
|
232
|
-
scratchEllipsoidShrunk
|
233
|
-
);
|
234
|
-
return computeHorizonCullingPointFromPositions(
|
235
|
-
possiblyShrunkEllipsoid,
|
236
|
-
directionToPoint,
|
237
|
-
positions,
|
238
|
-
result
|
239
|
-
);
|
240
|
-
};
|
241
|
-
/**
|
242
|
-
* Computes a point that can be used for horizon culling from a list of positions. If the point is below
|
243
|
-
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
|
244
|
-
* is expressed in the ellipsoid-scaled space and is suitable for use with
|
245
|
-
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
|
246
|
-
*
|
247
|
-
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
|
248
|
-
* A reasonable direction to use is the direction from the center of the ellipsoid to
|
249
|
-
* the center of the bounding sphere computed from the positions. The direction need not
|
250
|
-
* be normalized.
|
251
|
-
* @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
|
252
|
-
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
|
253
|
-
* ellipsoid's axes.
|
254
|
-
* @param {number} [stride=3]
|
255
|
-
* @param {Cartesian3} [center=Cartesian3.ZERO]
|
256
|
-
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
|
257
|
-
* @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.
|
258
|
-
*/
|
259
|
-
EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function (
|
260
|
-
directionToPoint,
|
261
|
-
vertices,
|
262
|
-
stride,
|
263
|
-
center,
|
264
|
-
result
|
265
|
-
) {
|
266
|
-
return computeHorizonCullingPointFromVertices(
|
267
|
-
this._ellipsoid,
|
268
|
-
directionToPoint,
|
269
|
-
vertices,
|
270
|
-
stride,
|
271
|
-
center,
|
272
|
-
result
|
273
|
-
);
|
274
|
-
};
|
275
|
-
|
276
|
-
/**
|
277
|
-
* Similar to {@link EllipsoidalOccluder#computeHorizonCullingPointFromVertices} except computes the culling
|
278
|
-
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
|
279
|
-
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
|
280
|
-
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
|
281
|
-
*
|
282
|
-
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
|
283
|
-
* A reasonable direction to use is the direction from the center of the ellipsoid to
|
284
|
-
* the center of the bounding sphere computed from the positions. The direction need not
|
285
|
-
* be normalized.
|
286
|
-
* @param {number[]} vertices The vertices from which to compute the horizon culling point. The positions
|
287
|
-
* must be expressed in a reference frame centered at the ellipsoid and aligned with the
|
288
|
-
* ellipsoid's axes.
|
289
|
-
* @param {number} [stride=3]
|
290
|
-
* @param {Cartesian3} [center=Cartesian3.ZERO]
|
291
|
-
* @param {number} [minimumHeight] The minimum height of all vertices. If this value is undefined, all vertices are assumed to be above the ellipsoid.
|
292
|
-
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
|
293
|
-
* @returns {Cartesian3} The computed horizon culling point, expressed in the possibly-shrunk ellipsoid-scaled space.
|
294
|
-
*/
|
295
|
-
EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid = function (
|
296
|
-
directionToPoint,
|
297
|
-
vertices,
|
298
|
-
stride,
|
299
|
-
center,
|
300
|
-
minimumHeight,
|
301
|
-
result
|
302
|
-
) {
|
303
|
-
const possiblyShrunkEllipsoid = getPossiblyShrunkEllipsoid(
|
304
|
-
this._ellipsoid,
|
305
|
-
minimumHeight,
|
306
|
-
scratchEllipsoidShrunk
|
307
|
-
);
|
308
|
-
return computeHorizonCullingPointFromVertices(
|
309
|
-
possiblyShrunkEllipsoid,
|
310
|
-
directionToPoint,
|
311
|
-
vertices,
|
312
|
-
stride,
|
313
|
-
center,
|
314
|
-
result
|
315
|
-
);
|
316
|
-
};
|
317
|
-
|
318
|
-
const subsampleScratch = [];
|
319
|
-
|
320
|
-
/**
|
321
|
-
* Computes a point that can be used for horizon culling of a rectangle. If the point is below
|
322
|
-
* the horizon, the ellipsoid-conforming rectangle is guaranteed to be below the horizon as well.
|
323
|
-
* The returned point is expressed in the ellipsoid-scaled space and is suitable for use with
|
324
|
-
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
|
325
|
-
*
|
326
|
-
* @param {Rectangle} rectangle The rectangle for which to compute the horizon culling point.
|
327
|
-
* @param {Ellipsoid} ellipsoid The ellipsoid on which the rectangle is defined. This may be different from
|
328
|
-
* the ellipsoid used by this instance for occlusion testing.
|
329
|
-
* @param {Cartesian3} [result] The instance on which to store the result instead of allocating a new instance.
|
330
|
-
* @returns {Cartesian3} The computed horizon culling point, expressed in the ellipsoid-scaled space.
|
331
|
-
*/
|
332
|
-
EllipsoidalOccluder.prototype.computeHorizonCullingPointFromRectangle = function (
|
333
|
-
rectangle,
|
334
|
-
ellipsoid,
|
335
|
-
result
|
336
|
-
) {
|
337
|
-
//>>includeStart('debug', pragmas.debug);
|
338
|
-
Check.Check.typeOf.object("rectangle", rectangle);
|
339
|
-
//>>includeEnd('debug');
|
340
|
-
|
341
|
-
const positions = Matrix2.Rectangle.subsample(
|
342
|
-
rectangle,
|
343
|
-
ellipsoid,
|
344
|
-
0.0,
|
345
|
-
subsampleScratch
|
346
|
-
);
|
347
|
-
const bs = Transforms.BoundingSphere.fromPoints(positions);
|
348
|
-
|
349
|
-
// If the bounding sphere center is too close to the center of the occluder, it doesn't make
|
350
|
-
// sense to try to horizon cull it.
|
351
|
-
if (Matrix3.Cartesian3.magnitude(bs.center) < 0.1 * ellipsoid.minimumRadius) {
|
352
|
-
return undefined;
|
353
|
-
}
|
354
|
-
|
355
|
-
return this.computeHorizonCullingPoint(bs.center, positions, result);
|
356
|
-
};
|
357
|
-
|
358
|
-
const scratchEllipsoidShrunkRadii = new Matrix3.Cartesian3();
|
359
|
-
|
360
|
-
function getPossiblyShrunkEllipsoid(ellipsoid, minimumHeight, result) {
|
361
|
-
if (
|
362
|
-
defaultValue.defined(minimumHeight) &&
|
363
|
-
minimumHeight < 0.0 &&
|
364
|
-
ellipsoid.minimumRadius > -minimumHeight
|
365
|
-
) {
|
366
|
-
const ellipsoidShrunkRadii = Matrix3.Cartesian3.fromElements(
|
367
|
-
ellipsoid.radii.x + minimumHeight,
|
368
|
-
ellipsoid.radii.y + minimumHeight,
|
369
|
-
ellipsoid.radii.z + minimumHeight,
|
370
|
-
scratchEllipsoidShrunkRadii
|
371
|
-
);
|
372
|
-
ellipsoid = Matrix3.Ellipsoid.fromCartesian3(ellipsoidShrunkRadii, result);
|
373
|
-
}
|
374
|
-
return ellipsoid;
|
375
|
-
}
|
376
|
-
|
377
|
-
function computeHorizonCullingPointFromPositions(
|
378
|
-
ellipsoid,
|
379
|
-
directionToPoint,
|
380
|
-
positions,
|
381
|
-
result
|
382
|
-
) {
|
383
|
-
//>>includeStart('debug', pragmas.debug);
|
384
|
-
Check.Check.typeOf.object("directionToPoint", directionToPoint);
|
385
|
-
Check.Check.defined("positions", positions);
|
386
|
-
//>>includeEnd('debug');
|
387
|
-
|
388
|
-
if (!defaultValue.defined(result)) {
|
389
|
-
result = new Matrix3.Cartesian3();
|
390
|
-
}
|
391
|
-
|
392
|
-
const scaledSpaceDirectionToPoint = computeScaledSpaceDirectionToPoint(
|
393
|
-
ellipsoid,
|
394
|
-
directionToPoint
|
395
|
-
);
|
396
|
-
let resultMagnitude = 0.0;
|
397
|
-
|
398
|
-
for (let i = 0, len = positions.length; i < len; ++i) {
|
399
|
-
const position = positions[i];
|
400
|
-
const candidateMagnitude = computeMagnitude(
|
401
|
-
ellipsoid,
|
402
|
-
position,
|
403
|
-
scaledSpaceDirectionToPoint
|
404
|
-
);
|
405
|
-
if (candidateMagnitude < 0.0) {
|
406
|
-
// all points should face the same direction, but this one doesn't, so return undefined
|
407
|
-
return undefined;
|
408
|
-
}
|
409
|
-
resultMagnitude = Math.max(resultMagnitude, candidateMagnitude);
|
410
|
-
}
|
411
|
-
|
412
|
-
return magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result);
|
413
|
-
}
|
414
|
-
|
415
|
-
const positionScratch = new Matrix3.Cartesian3();
|
416
|
-
|
417
|
-
function computeHorizonCullingPointFromVertices(
|
418
|
-
ellipsoid,
|
419
|
-
directionToPoint,
|
420
|
-
vertices,
|
421
|
-
stride,
|
422
|
-
center,
|
423
|
-
result
|
424
|
-
) {
|
425
|
-
//>>includeStart('debug', pragmas.debug);
|
426
|
-
Check.Check.typeOf.object("directionToPoint", directionToPoint);
|
427
|
-
Check.Check.defined("vertices", vertices);
|
428
|
-
Check.Check.typeOf.number("stride", stride);
|
429
|
-
//>>includeEnd('debug');
|
430
|
-
|
431
|
-
if (!defaultValue.defined(result)) {
|
432
|
-
result = new Matrix3.Cartesian3();
|
433
|
-
}
|
434
|
-
|
435
|
-
stride = defaultValue.defaultValue(stride, 3);
|
436
|
-
center = defaultValue.defaultValue(center, Matrix3.Cartesian3.ZERO);
|
437
|
-
const scaledSpaceDirectionToPoint = computeScaledSpaceDirectionToPoint(
|
438
|
-
ellipsoid,
|
439
|
-
directionToPoint
|
440
|
-
);
|
441
|
-
let resultMagnitude = 0.0;
|
442
|
-
|
443
|
-
for (let i = 0, len = vertices.length; i < len; i += stride) {
|
444
|
-
positionScratch.x = vertices[i] + center.x;
|
445
|
-
positionScratch.y = vertices[i + 1] + center.y;
|
446
|
-
positionScratch.z = vertices[i + 2] + center.z;
|
447
|
-
|
448
|
-
const candidateMagnitude = computeMagnitude(
|
449
|
-
ellipsoid,
|
450
|
-
positionScratch,
|
451
|
-
scaledSpaceDirectionToPoint
|
452
|
-
);
|
453
|
-
if (candidateMagnitude < 0.0) {
|
454
|
-
// all points should face the same direction, but this one doesn't, so return undefined
|
455
|
-
return undefined;
|
456
|
-
}
|
457
|
-
resultMagnitude = Math.max(resultMagnitude, candidateMagnitude);
|
458
|
-
}
|
459
|
-
|
460
|
-
return magnitudeToPoint(scaledSpaceDirectionToPoint, resultMagnitude, result);
|
461
|
-
}
|
462
|
-
|
463
|
-
function isScaledSpacePointVisible(
|
464
|
-
occludeeScaledSpacePosition,
|
465
|
-
cameraPositionInScaledSpace,
|
466
|
-
distanceToLimbInScaledSpaceSquared
|
467
|
-
) {
|
468
|
-
// See https://cesium.com/blog/2013/04/25/Horizon-culling/
|
469
|
-
const cv = cameraPositionInScaledSpace;
|
470
|
-
const vhMagnitudeSquared = distanceToLimbInScaledSpaceSquared;
|
471
|
-
const vt = Matrix3.Cartesian3.subtract(
|
472
|
-
occludeeScaledSpacePosition,
|
473
|
-
cv,
|
474
|
-
scratchCartesian
|
475
|
-
);
|
476
|
-
const vtDotVc = -Matrix3.Cartesian3.dot(vt, cv);
|
477
|
-
// If vhMagnitudeSquared < 0 then we are below the surface of the ellipsoid and
|
478
|
-
// in this case, set the culling plane to be on V.
|
479
|
-
const isOccluded =
|
480
|
-
vhMagnitudeSquared < 0
|
481
|
-
? vtDotVc > 0
|
482
|
-
: vtDotVc > vhMagnitudeSquared &&
|
483
|
-
(vtDotVc * vtDotVc) / Matrix3.Cartesian3.magnitudeSquared(vt) >
|
484
|
-
vhMagnitudeSquared;
|
485
|
-
return !isOccluded;
|
486
|
-
}
|
487
|
-
|
488
|
-
const scaledSpaceScratch = new Matrix3.Cartesian3();
|
489
|
-
const directionScratch = new Matrix3.Cartesian3();
|
490
|
-
|
491
|
-
function computeMagnitude(ellipsoid, position, scaledSpaceDirectionToPoint) {
|
492
|
-
const scaledSpacePosition = ellipsoid.transformPositionToScaledSpace(
|
493
|
-
position,
|
494
|
-
scaledSpaceScratch
|
495
|
-
);
|
496
|
-
let magnitudeSquared = Matrix3.Cartesian3.magnitudeSquared(scaledSpacePosition);
|
497
|
-
let magnitude = Math.sqrt(magnitudeSquared);
|
498
|
-
const direction = Matrix3.Cartesian3.divideByScalar(
|
499
|
-
scaledSpacePosition,
|
500
|
-
magnitude,
|
501
|
-
directionScratch
|
502
|
-
);
|
503
|
-
|
504
|
-
// For the purpose of this computation, points below the ellipsoid are consider to be on it instead.
|
505
|
-
magnitudeSquared = Math.max(1.0, magnitudeSquared);
|
506
|
-
magnitude = Math.max(1.0, magnitude);
|
507
|
-
|
508
|
-
const cosAlpha = Matrix3.Cartesian3.dot(direction, scaledSpaceDirectionToPoint);
|
509
|
-
const sinAlpha = Matrix3.Cartesian3.magnitude(
|
510
|
-
Matrix3.Cartesian3.cross(direction, scaledSpaceDirectionToPoint, direction)
|
511
|
-
);
|
512
|
-
const cosBeta = 1.0 / magnitude;
|
513
|
-
const sinBeta = Math.sqrt(magnitudeSquared - 1.0) * cosBeta;
|
514
|
-
|
515
|
-
return 1.0 / (cosAlpha * cosBeta - sinAlpha * sinBeta);
|
516
|
-
}
|
517
|
-
|
518
|
-
function magnitudeToPoint(
|
519
|
-
scaledSpaceDirectionToPoint,
|
520
|
-
resultMagnitude,
|
521
|
-
result
|
522
|
-
) {
|
523
|
-
// The horizon culling point is undefined if there were no positions from which to compute it,
|
524
|
-
// the directionToPoint is pointing opposite all of the positions, or if we computed NaN or infinity.
|
525
|
-
if (
|
526
|
-
resultMagnitude <= 0.0 ||
|
527
|
-
resultMagnitude === 1.0 / 0.0 ||
|
528
|
-
resultMagnitude !== resultMagnitude
|
529
|
-
) {
|
530
|
-
return undefined;
|
531
|
-
}
|
532
|
-
|
533
|
-
return Matrix3.Cartesian3.multiplyByScalar(
|
534
|
-
scaledSpaceDirectionToPoint,
|
535
|
-
resultMagnitude,
|
536
|
-
result
|
537
|
-
);
|
538
|
-
}
|
539
|
-
|
540
|
-
const directionToPointScratch = new Matrix3.Cartesian3();
|
541
|
-
|
542
|
-
function computeScaledSpaceDirectionToPoint(ellipsoid, directionToPoint) {
|
543
|
-
if (Matrix3.Cartesian3.equals(directionToPoint, Matrix3.Cartesian3.ZERO)) {
|
544
|
-
return directionToPoint;
|
545
|
-
}
|
546
|
-
|
547
|
-
ellipsoid.transformPositionToScaledSpace(
|
548
|
-
directionToPoint,
|
549
|
-
directionToPointScratch
|
550
|
-
);
|
551
|
-
return Matrix3.Cartesian3.normalize(directionToPointScratch, directionToPointScratch);
|
552
|
-
}
|
553
|
-
|
554
|
-
/**
|
555
|
-
* @private
|
556
|
-
*/
|
557
|
-
const TerrainExaggeration = {};
|
558
|
-
|
559
|
-
/**
|
560
|
-
* Scales a height relative to an offset.
|
561
|
-
*
|
562
|
-
* @param {number} height The height.
|
563
|
-
* @param {number} scale A scalar used to exaggerate the terrain. If the value is 1.0 there will be no effect.
|
564
|
-
* @param {number} relativeHeight The height relative to which terrain is exaggerated. If the value is 0.0 terrain will be exaggerated relative to the ellipsoid surface.
|
565
|
-
*/
|
566
|
-
TerrainExaggeration.getHeight = function (height, scale, relativeHeight) {
|
567
|
-
return (height - relativeHeight) * scale + relativeHeight;
|
568
|
-
};
|
569
|
-
|
570
|
-
const scratchCartographic = new Matrix3.Cartesian3();
|
571
|
-
|
572
|
-
/**
|
573
|
-
* Scales a position by exaggeration.
|
574
|
-
*/
|
575
|
-
TerrainExaggeration.getPosition = function (
|
576
|
-
position,
|
577
|
-
ellipsoid,
|
578
|
-
terrainExaggeration,
|
579
|
-
terrainExaggerationRelativeHeight,
|
580
|
-
result
|
581
|
-
) {
|
582
|
-
const cartographic = ellipsoid.cartesianToCartographic(
|
583
|
-
position,
|
584
|
-
scratchCartographic
|
585
|
-
);
|
586
|
-
const newHeight = TerrainExaggeration.getHeight(
|
587
|
-
cartographic.height,
|
588
|
-
terrainExaggeration,
|
589
|
-
terrainExaggerationRelativeHeight
|
590
|
-
);
|
591
|
-
return Matrix3.Cartesian3.fromRadians(
|
592
|
-
cartographic.longitude,
|
593
|
-
cartographic.latitude,
|
594
|
-
newHeight,
|
595
|
-
ellipsoid,
|
596
|
-
result
|
597
|
-
);
|
598
|
-
};
|
599
|
-
|
600
|
-
var TerrainExaggeration$1 = TerrainExaggeration;
|
601
|
-
|
602
|
-
/**
|
603
|
-
* This enumerated type is used to determine how the vertices of the terrain mesh are compressed.
|
604
|
-
*
|
605
|
-
* @enum {number}
|
606
|
-
*
|
607
|
-
* @private
|
608
|
-
*/
|
609
|
-
const TerrainQuantization = {
|
610
|
-
/**
|
611
|
-
* The vertices are not compressed.
|
612
|
-
*
|
613
|
-
* @type {number}
|
614
|
-
* @constant
|
615
|
-
*/
|
616
|
-
NONE: 0,
|
617
|
-
|
618
|
-
/**
|
619
|
-
* The vertices are compressed to 12 bits.
|
620
|
-
*
|
621
|
-
* @type {number}
|
622
|
-
* @constant
|
623
|
-
*/
|
624
|
-
BITS12: 1,
|
625
|
-
};
|
626
|
-
var TerrainQuantization$1 = Object.freeze(TerrainQuantization);
|
627
|
-
|
628
|
-
const cartesian3Scratch = new Matrix3.Cartesian3();
|
629
|
-
const cartesian3DimScratch = new Matrix3.Cartesian3();
|
630
|
-
const cartesian2Scratch = new Matrix2.Cartesian2();
|
631
|
-
const matrix4Scratch = new Matrix2.Matrix4();
|
632
|
-
const matrix4Scratch2 = new Matrix2.Matrix4();
|
633
|
-
|
634
|
-
const SHIFT_LEFT_12 = Math.pow(2.0, 12.0);
|
635
|
-
|
636
|
-
/**
|
637
|
-
* Data used to quantize and pack the terrain mesh. The position can be unpacked for picking and all attributes
|
638
|
-
* are unpacked in the vertex shader.
|
639
|
-
*
|
640
|
-
* @alias TerrainEncoding
|
641
|
-
* @constructor
|
642
|
-
*
|
643
|
-
* @param {Cartesian3} center The center point of the vertices.
|
644
|
-
* @param {AxisAlignedBoundingBox} axisAlignedBoundingBox The bounds of the tile in the east-north-up coordinates at the tiles center.
|
645
|
-
* @param {number} minimumHeight The minimum height.
|
646
|
-
* @param {number} maximumHeight The maximum height.
|
647
|
-
* @param {Matrix4} fromENU The east-north-up to fixed frame matrix at the center of the terrain mesh.
|
648
|
-
* @param {boolean} hasVertexNormals If the mesh has vertex normals.
|
649
|
-
* @param {boolean} [hasWebMercatorT=false] true if the terrain data includes a Web Mercator texture coordinate; otherwise, false.
|
650
|
-
* @param {boolean} [hasGeodeticSurfaceNormals=false] true if the terrain data includes geodetic surface normals; otherwise, false.
|
651
|
-
* @param {number} [exaggeration=1.0] A scalar used to exaggerate terrain.
|
652
|
-
* @param {number} [exaggerationRelativeHeight=0.0] The relative height from which terrain is exaggerated.
|
653
|
-
*
|
654
|
-
* @private
|
655
|
-
*/
|
656
|
-
function TerrainEncoding(
|
657
|
-
center,
|
658
|
-
axisAlignedBoundingBox,
|
659
|
-
minimumHeight,
|
660
|
-
maximumHeight,
|
661
|
-
fromENU,
|
662
|
-
hasVertexNormals,
|
663
|
-
hasWebMercatorT,
|
664
|
-
hasGeodeticSurfaceNormals,
|
665
|
-
exaggeration,
|
666
|
-
exaggerationRelativeHeight
|
667
|
-
) {
|
668
|
-
let quantization = TerrainQuantization$1.NONE;
|
669
|
-
let toENU;
|
670
|
-
let matrix;
|
671
|
-
|
672
|
-
if (
|
673
|
-
defaultValue.defined(axisAlignedBoundingBox) &&
|
674
|
-
defaultValue.defined(minimumHeight) &&
|
675
|
-
defaultValue.defined(maximumHeight) &&
|
676
|
-
defaultValue.defined(fromENU)
|
677
|
-
) {
|
678
|
-
const minimum = axisAlignedBoundingBox.minimum;
|
679
|
-
const maximum = axisAlignedBoundingBox.maximum;
|
680
|
-
|
681
|
-
const dimensions = Matrix3.Cartesian3.subtract(
|
682
|
-
maximum,
|
683
|
-
minimum,
|
684
|
-
cartesian3DimScratch
|
685
|
-
);
|
686
|
-
const hDim = maximumHeight - minimumHeight;
|
687
|
-
const maxDim = Math.max(Matrix3.Cartesian3.maximumComponent(dimensions), hDim);
|
688
|
-
|
689
|
-
if (maxDim < SHIFT_LEFT_12 - 1.0) {
|
690
|
-
quantization = TerrainQuantization$1.BITS12;
|
691
|
-
} else {
|
692
|
-
quantization = TerrainQuantization$1.NONE;
|
693
|
-
}
|
694
|
-
|
695
|
-
toENU = Matrix2.Matrix4.inverseTransformation(fromENU, new Matrix2.Matrix4());
|
696
|
-
|
697
|
-
const translation = Matrix3.Cartesian3.negate(minimum, cartesian3Scratch);
|
698
|
-
Matrix2.Matrix4.multiply(
|
699
|
-
Matrix2.Matrix4.fromTranslation(translation, matrix4Scratch),
|
700
|
-
toENU,
|
701
|
-
toENU
|
702
|
-
);
|
703
|
-
|
704
|
-
const scale = cartesian3Scratch;
|
705
|
-
scale.x = 1.0 / dimensions.x;
|
706
|
-
scale.y = 1.0 / dimensions.y;
|
707
|
-
scale.z = 1.0 / dimensions.z;
|
708
|
-
Matrix2.Matrix4.multiply(Matrix2.Matrix4.fromScale(scale, matrix4Scratch), toENU, toENU);
|
709
|
-
|
710
|
-
matrix = Matrix2.Matrix4.clone(fromENU);
|
711
|
-
Matrix2.Matrix4.setTranslation(matrix, Matrix3.Cartesian3.ZERO, matrix);
|
712
|
-
|
713
|
-
fromENU = Matrix2.Matrix4.clone(fromENU, new Matrix2.Matrix4());
|
714
|
-
|
715
|
-
const translationMatrix = Matrix2.Matrix4.fromTranslation(minimum, matrix4Scratch);
|
716
|
-
const scaleMatrix = Matrix2.Matrix4.fromScale(dimensions, matrix4Scratch2);
|
717
|
-
const st = Matrix2.Matrix4.multiply(translationMatrix, scaleMatrix, matrix4Scratch);
|
718
|
-
|
719
|
-
Matrix2.Matrix4.multiply(fromENU, st, fromENU);
|
720
|
-
Matrix2.Matrix4.multiply(matrix, st, matrix);
|
721
|
-
}
|
722
|
-
|
723
|
-
/**
|
724
|
-
* How the vertices of the mesh were compressed.
|
725
|
-
* @type {TerrainQuantization}
|
726
|
-
*/
|
727
|
-
this.quantization = quantization;
|
728
|
-
|
729
|
-
/**
|
730
|
-
* The minimum height of the tile including the skirts.
|
731
|
-
* @type {number}
|
732
|
-
*/
|
733
|
-
this.minimumHeight = minimumHeight;
|
734
|
-
|
735
|
-
/**
|
736
|
-
* The maximum height of the tile.
|
737
|
-
* @type {number}
|
738
|
-
*/
|
739
|
-
this.maximumHeight = maximumHeight;
|
740
|
-
|
741
|
-
/**
|
742
|
-
* The center of the tile.
|
743
|
-
* @type {Cartesian3}
|
744
|
-
*/
|
745
|
-
this.center = Matrix3.Cartesian3.clone(center);
|
746
|
-
|
747
|
-
/**
|
748
|
-
* A matrix that takes a vertex from the tile, transforms it to east-north-up at the center and scales
|
749
|
-
* it so each component is in the [0, 1] range.
|
750
|
-
* @type {Matrix4}
|
751
|
-
*/
|
752
|
-
this.toScaledENU = toENU;
|
753
|
-
|
754
|
-
/**
|
755
|
-
* A matrix that restores a vertex transformed with toScaledENU back to the earth fixed reference frame
|
756
|
-
* @type {Matrix4}
|
757
|
-
*/
|
758
|
-
this.fromScaledENU = fromENU;
|
759
|
-
|
760
|
-
/**
|
761
|
-
* The matrix used to decompress the terrain vertices in the shader for RTE rendering.
|
762
|
-
* @type {Matrix4}
|
763
|
-
*/
|
764
|
-
this.matrix = matrix;
|
765
|
-
|
766
|
-
/**
|
767
|
-
* The terrain mesh contains normals.
|
768
|
-
* @type {boolean}
|
769
|
-
*/
|
770
|
-
this.hasVertexNormals = hasVertexNormals;
|
771
|
-
|
772
|
-
/**
|
773
|
-
* The terrain mesh contains a vertical texture coordinate following the Web Mercator projection.
|
774
|
-
* @type {boolean}
|
775
|
-
*/
|
776
|
-
this.hasWebMercatorT = defaultValue.defaultValue(hasWebMercatorT, false);
|
777
|
-
|
778
|
-
/**
|
779
|
-
* The terrain mesh contains geodetic surface normals, used for terrain exaggeration.
|
780
|
-
* @type {boolean}
|
781
|
-
*/
|
782
|
-
this.hasGeodeticSurfaceNormals = defaultValue.defaultValue(
|
783
|
-
hasGeodeticSurfaceNormals,
|
784
|
-
false
|
785
|
-
);
|
786
|
-
|
787
|
-
/**
|
788
|
-
* A scalar used to exaggerate terrain.
|
789
|
-
* @type {number}
|
790
|
-
*/
|
791
|
-
this.exaggeration = defaultValue.defaultValue(exaggeration, 1.0);
|
792
|
-
|
793
|
-
/**
|
794
|
-
* The relative height from which terrain is exaggerated.
|
795
|
-
*/
|
796
|
-
this.exaggerationRelativeHeight = defaultValue.defaultValue(
|
797
|
-
exaggerationRelativeHeight,
|
798
|
-
0.0
|
799
|
-
);
|
800
|
-
|
801
|
-
/**
|
802
|
-
* The number of components in each vertex. This value can differ with different quantizations.
|
803
|
-
* @type {number}
|
804
|
-
*/
|
805
|
-
this.stride = 0;
|
806
|
-
|
807
|
-
this._offsetGeodeticSurfaceNormal = 0;
|
808
|
-
this._offsetVertexNormal = 0;
|
809
|
-
|
810
|
-
// Calculate the stride and offsets declared above
|
811
|
-
this._calculateStrideAndOffsets();
|
812
|
-
}
|
813
|
-
|
814
|
-
TerrainEncoding.prototype.encode = function (
|
815
|
-
vertexBuffer,
|
816
|
-
bufferIndex,
|
817
|
-
position,
|
818
|
-
uv,
|
819
|
-
height,
|
820
|
-
normalToPack,
|
821
|
-
webMercatorT,
|
822
|
-
geodeticSurfaceNormal
|
823
|
-
) {
|
824
|
-
const u = uv.x;
|
825
|
-
const v = uv.y;
|
826
|
-
|
827
|
-
if (this.quantization === TerrainQuantization$1.BITS12) {
|
828
|
-
position = Matrix2.Matrix4.multiplyByPoint(
|
829
|
-
this.toScaledENU,
|
830
|
-
position,
|
831
|
-
cartesian3Scratch
|
832
|
-
);
|
833
|
-
|
834
|
-
position.x = Math$1.CesiumMath.clamp(position.x, 0.0, 1.0);
|
835
|
-
position.y = Math$1.CesiumMath.clamp(position.y, 0.0, 1.0);
|
836
|
-
position.z = Math$1.CesiumMath.clamp(position.z, 0.0, 1.0);
|
837
|
-
|
838
|
-
const hDim = this.maximumHeight - this.minimumHeight;
|
839
|
-
const h = Math$1.CesiumMath.clamp((height - this.minimumHeight) / hDim, 0.0, 1.0);
|
840
|
-
|
841
|
-
Matrix2.Cartesian2.fromElements(position.x, position.y, cartesian2Scratch);
|
842
|
-
const compressed0 = AttributeCompression.AttributeCompression.compressTextureCoordinates(
|
843
|
-
cartesian2Scratch
|
844
|
-
);
|
845
|
-
|
846
|
-
Matrix2.Cartesian2.fromElements(position.z, h, cartesian2Scratch);
|
847
|
-
const compressed1 = AttributeCompression.AttributeCompression.compressTextureCoordinates(
|
848
|
-
cartesian2Scratch
|
849
|
-
);
|
850
|
-
|
851
|
-
Matrix2.Cartesian2.fromElements(u, v, cartesian2Scratch);
|
852
|
-
const compressed2 = AttributeCompression.AttributeCompression.compressTextureCoordinates(
|
853
|
-
cartesian2Scratch
|
854
|
-
);
|
855
|
-
|
856
|
-
vertexBuffer[bufferIndex++] = compressed0;
|
857
|
-
vertexBuffer[bufferIndex++] = compressed1;
|
858
|
-
vertexBuffer[bufferIndex++] = compressed2;
|
859
|
-
|
860
|
-
if (this.hasWebMercatorT) {
|
861
|
-
Matrix2.Cartesian2.fromElements(webMercatorT, 0.0, cartesian2Scratch);
|
862
|
-
const compressed3 = AttributeCompression.AttributeCompression.compressTextureCoordinates(
|
863
|
-
cartesian2Scratch
|
864
|
-
);
|
865
|
-
vertexBuffer[bufferIndex++] = compressed3;
|
866
|
-
}
|
867
|
-
} else {
|
868
|
-
Matrix3.Cartesian3.subtract(position, this.center, cartesian3Scratch);
|
869
|
-
|
870
|
-
vertexBuffer[bufferIndex++] = cartesian3Scratch.x;
|
871
|
-
vertexBuffer[bufferIndex++] = cartesian3Scratch.y;
|
872
|
-
vertexBuffer[bufferIndex++] = cartesian3Scratch.z;
|
873
|
-
vertexBuffer[bufferIndex++] = height;
|
874
|
-
vertexBuffer[bufferIndex++] = u;
|
875
|
-
vertexBuffer[bufferIndex++] = v;
|
876
|
-
|
877
|
-
if (this.hasWebMercatorT) {
|
878
|
-
vertexBuffer[bufferIndex++] = webMercatorT;
|
879
|
-
}
|
880
|
-
}
|
881
|
-
|
882
|
-
if (this.hasVertexNormals) {
|
883
|
-
vertexBuffer[bufferIndex++] = AttributeCompression.AttributeCompression.octPackFloat(
|
884
|
-
normalToPack
|
885
|
-
);
|
886
|
-
}
|
887
|
-
|
888
|
-
if (this.hasGeodeticSurfaceNormals) {
|
889
|
-
vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.x;
|
890
|
-
vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.y;
|
891
|
-
vertexBuffer[bufferIndex++] = geodeticSurfaceNormal.z;
|
892
|
-
}
|
893
|
-
|
894
|
-
return bufferIndex;
|
895
|
-
};
|
896
|
-
|
897
|
-
const scratchPosition = new Matrix3.Cartesian3();
|
898
|
-
const scratchGeodeticSurfaceNormal = new Matrix3.Cartesian3();
|
899
|
-
|
900
|
-
TerrainEncoding.prototype.addGeodeticSurfaceNormals = function (
|
901
|
-
oldBuffer,
|
902
|
-
newBuffer,
|
903
|
-
ellipsoid
|
904
|
-
) {
|
905
|
-
if (this.hasGeodeticSurfaceNormals) {
|
906
|
-
return;
|
907
|
-
}
|
908
|
-
|
909
|
-
const oldStride = this.stride;
|
910
|
-
const vertexCount = oldBuffer.length / oldStride;
|
911
|
-
this.hasGeodeticSurfaceNormals = true;
|
912
|
-
this._calculateStrideAndOffsets();
|
913
|
-
const newStride = this.stride;
|
914
|
-
|
915
|
-
for (let index = 0; index < vertexCount; index++) {
|
916
|
-
for (let offset = 0; offset < oldStride; offset++) {
|
917
|
-
const oldIndex = index * oldStride + offset;
|
918
|
-
const newIndex = index * newStride + offset;
|
919
|
-
newBuffer[newIndex] = oldBuffer[oldIndex];
|
920
|
-
}
|
921
|
-
const position = this.decodePosition(newBuffer, index, scratchPosition);
|
922
|
-
const geodeticSurfaceNormal = ellipsoid.geodeticSurfaceNormal(
|
923
|
-
position,
|
924
|
-
scratchGeodeticSurfaceNormal
|
925
|
-
);
|
926
|
-
|
927
|
-
const bufferIndex = index * newStride + this._offsetGeodeticSurfaceNormal;
|
928
|
-
newBuffer[bufferIndex] = geodeticSurfaceNormal.x;
|
929
|
-
newBuffer[bufferIndex + 1] = geodeticSurfaceNormal.y;
|
930
|
-
newBuffer[bufferIndex + 2] = geodeticSurfaceNormal.z;
|
931
|
-
}
|
932
|
-
};
|
933
|
-
|
934
|
-
TerrainEncoding.prototype.removeGeodeticSurfaceNormals = function (
|
935
|
-
oldBuffer,
|
936
|
-
newBuffer
|
937
|
-
) {
|
938
|
-
if (!this.hasGeodeticSurfaceNormals) {
|
939
|
-
return;
|
940
|
-
}
|
941
|
-
|
942
|
-
const oldStride = this.stride;
|
943
|
-
const vertexCount = oldBuffer.length / oldStride;
|
944
|
-
this.hasGeodeticSurfaceNormals = false;
|
945
|
-
this._calculateStrideAndOffsets();
|
946
|
-
const newStride = this.stride;
|
947
|
-
|
948
|
-
for (let index = 0; index < vertexCount; index++) {
|
949
|
-
for (let offset = 0; offset < newStride; offset++) {
|
950
|
-
const oldIndex = index * oldStride + offset;
|
951
|
-
const newIndex = index * newStride + offset;
|
952
|
-
newBuffer[newIndex] = oldBuffer[oldIndex];
|
953
|
-
}
|
954
|
-
}
|
955
|
-
};
|
956
|
-
|
957
|
-
TerrainEncoding.prototype.decodePosition = function (buffer, index, result) {
|
958
|
-
if (!defaultValue.defined(result)) {
|
959
|
-
result = new Matrix3.Cartesian3();
|
960
|
-
}
|
961
|
-
|
962
|
-
index *= this.stride;
|
963
|
-
|
964
|
-
if (this.quantization === TerrainQuantization$1.BITS12) {
|
965
|
-
const xy = AttributeCompression.AttributeCompression.decompressTextureCoordinates(
|
966
|
-
buffer[index],
|
967
|
-
cartesian2Scratch
|
968
|
-
);
|
969
|
-
result.x = xy.x;
|
970
|
-
result.y = xy.y;
|
971
|
-
|
972
|
-
const zh = AttributeCompression.AttributeCompression.decompressTextureCoordinates(
|
973
|
-
buffer[index + 1],
|
974
|
-
cartesian2Scratch
|
975
|
-
);
|
976
|
-
result.z = zh.x;
|
977
|
-
|
978
|
-
return Matrix2.Matrix4.multiplyByPoint(this.fromScaledENU, result, result);
|
979
|
-
}
|
980
|
-
|
981
|
-
result.x = buffer[index];
|
982
|
-
result.y = buffer[index + 1];
|
983
|
-
result.z = buffer[index + 2];
|
984
|
-
return Matrix3.Cartesian3.add(result, this.center, result);
|
985
|
-
};
|
986
|
-
|
987
|
-
TerrainEncoding.prototype.getExaggeratedPosition = function (
|
988
|
-
buffer,
|
989
|
-
index,
|
990
|
-
result
|
991
|
-
) {
|
992
|
-
result = this.decodePosition(buffer, index, result);
|
993
|
-
|
994
|
-
const exaggeration = this.exaggeration;
|
995
|
-
const exaggerationRelativeHeight = this.exaggerationRelativeHeight;
|
996
|
-
const hasExaggeration = exaggeration !== 1.0;
|
997
|
-
if (hasExaggeration && this.hasGeodeticSurfaceNormals) {
|
998
|
-
const geodeticSurfaceNormal = this.decodeGeodeticSurfaceNormal(
|
999
|
-
buffer,
|
1000
|
-
index,
|
1001
|
-
scratchGeodeticSurfaceNormal
|
1002
|
-
);
|
1003
|
-
const rawHeight = this.decodeHeight(buffer, index);
|
1004
|
-
const heightDifference =
|
1005
|
-
TerrainExaggeration$1.getHeight(
|
1006
|
-
rawHeight,
|
1007
|
-
exaggeration,
|
1008
|
-
exaggerationRelativeHeight
|
1009
|
-
) - rawHeight;
|
1010
|
-
|
1011
|
-
// some math is unrolled for better performance
|
1012
|
-
result.x += geodeticSurfaceNormal.x * heightDifference;
|
1013
|
-
result.y += geodeticSurfaceNormal.y * heightDifference;
|
1014
|
-
result.z += geodeticSurfaceNormal.z * heightDifference;
|
1015
|
-
}
|
1016
|
-
|
1017
|
-
return result;
|
1018
|
-
};
|
1019
|
-
|
1020
|
-
TerrainEncoding.prototype.decodeTextureCoordinates = function (
|
1021
|
-
buffer,
|
1022
|
-
index,
|
1023
|
-
result
|
1024
|
-
) {
|
1025
|
-
if (!defaultValue.defined(result)) {
|
1026
|
-
result = new Matrix2.Cartesian2();
|
1027
|
-
}
|
1028
|
-
|
1029
|
-
index *= this.stride;
|
1030
|
-
|
1031
|
-
if (this.quantization === TerrainQuantization$1.BITS12) {
|
1032
|
-
return AttributeCompression.AttributeCompression.decompressTextureCoordinates(
|
1033
|
-
buffer[index + 2],
|
1034
|
-
result
|
1035
|
-
);
|
1036
|
-
}
|
1037
|
-
|
1038
|
-
return Matrix2.Cartesian2.fromElements(buffer[index + 4], buffer[index + 5], result);
|
1039
|
-
};
|
1040
|
-
|
1041
|
-
TerrainEncoding.prototype.decodeHeight = function (buffer, index) {
|
1042
|
-
index *= this.stride;
|
1043
|
-
|
1044
|
-
if (this.quantization === TerrainQuantization$1.BITS12) {
|
1045
|
-
const zh = AttributeCompression.AttributeCompression.decompressTextureCoordinates(
|
1046
|
-
buffer[index + 1],
|
1047
|
-
cartesian2Scratch
|
1048
|
-
);
|
1049
|
-
return (
|
1050
|
-
zh.y * (this.maximumHeight - this.minimumHeight) + this.minimumHeight
|
1051
|
-
);
|
1052
|
-
}
|
1053
|
-
|
1054
|
-
return buffer[index + 3];
|
1055
|
-
};
|
1056
|
-
|
1057
|
-
TerrainEncoding.prototype.decodeWebMercatorT = function (buffer, index) {
|
1058
|
-
index *= this.stride;
|
1059
|
-
|
1060
|
-
if (this.quantization === TerrainQuantization$1.BITS12) {
|
1061
|
-
return AttributeCompression.AttributeCompression.decompressTextureCoordinates(
|
1062
|
-
buffer[index + 3],
|
1063
|
-
cartesian2Scratch
|
1064
|
-
).x;
|
1065
|
-
}
|
1066
|
-
|
1067
|
-
return buffer[index + 6];
|
1068
|
-
};
|
1069
|
-
|
1070
|
-
TerrainEncoding.prototype.getOctEncodedNormal = function (
|
1071
|
-
buffer,
|
1072
|
-
index,
|
1073
|
-
result
|
1074
|
-
) {
|
1075
|
-
index = index * this.stride + this._offsetVertexNormal;
|
1076
|
-
|
1077
|
-
const temp = buffer[index] / 256.0;
|
1078
|
-
const x = Math.floor(temp);
|
1079
|
-
const y = (temp - x) * 256.0;
|
1080
|
-
|
1081
|
-
return Matrix2.Cartesian2.fromElements(x, y, result);
|
1082
|
-
};
|
1083
|
-
|
1084
|
-
TerrainEncoding.prototype.decodeGeodeticSurfaceNormal = function (
|
1085
|
-
buffer,
|
1086
|
-
index,
|
1087
|
-
result
|
1088
|
-
) {
|
1089
|
-
index = index * this.stride + this._offsetGeodeticSurfaceNormal;
|
1090
|
-
|
1091
|
-
result.x = buffer[index];
|
1092
|
-
result.y = buffer[index + 1];
|
1093
|
-
result.z = buffer[index + 2];
|
1094
|
-
return result;
|
1095
|
-
};
|
1096
|
-
|
1097
|
-
TerrainEncoding.prototype._calculateStrideAndOffsets = function () {
|
1098
|
-
let vertexStride = 0;
|
1099
|
-
|
1100
|
-
switch (this.quantization) {
|
1101
|
-
case TerrainQuantization$1.BITS12:
|
1102
|
-
vertexStride += 3;
|
1103
|
-
break;
|
1104
|
-
default:
|
1105
|
-
vertexStride += 6;
|
1106
|
-
}
|
1107
|
-
if (this.hasWebMercatorT) {
|
1108
|
-
vertexStride += 1;
|
1109
|
-
}
|
1110
|
-
if (this.hasVertexNormals) {
|
1111
|
-
this._offsetVertexNormal = vertexStride;
|
1112
|
-
vertexStride += 1;
|
1113
|
-
}
|
1114
|
-
if (this.hasGeodeticSurfaceNormals) {
|
1115
|
-
this._offsetGeodeticSurfaceNormal = vertexStride;
|
1116
|
-
vertexStride += 3;
|
1117
|
-
}
|
1118
|
-
|
1119
|
-
this.stride = vertexStride;
|
1120
|
-
};
|
1121
|
-
|
1122
|
-
const attributesIndicesNone = {
|
1123
|
-
position3DAndHeight: 0,
|
1124
|
-
textureCoordAndEncodedNormals: 1,
|
1125
|
-
geodeticSurfaceNormal: 2,
|
1126
|
-
};
|
1127
|
-
const attributesIndicesBits12 = {
|
1128
|
-
compressed0: 0,
|
1129
|
-
compressed1: 1,
|
1130
|
-
geodeticSurfaceNormal: 2,
|
1131
|
-
};
|
1132
|
-
|
1133
|
-
TerrainEncoding.prototype.getAttributes = function (buffer) {
|
1134
|
-
const datatype = ComponentDatatype.ComponentDatatype.FLOAT;
|
1135
|
-
const sizeInBytes = ComponentDatatype.ComponentDatatype.getSizeInBytes(datatype);
|
1136
|
-
const strideInBytes = this.stride * sizeInBytes;
|
1137
|
-
let offsetInBytes = 0;
|
1138
|
-
|
1139
|
-
const attributes = [];
|
1140
|
-
function addAttribute(index, componentsPerAttribute) {
|
1141
|
-
attributes.push({
|
1142
|
-
index: index,
|
1143
|
-
vertexBuffer: buffer,
|
1144
|
-
componentDatatype: datatype,
|
1145
|
-
componentsPerAttribute: componentsPerAttribute,
|
1146
|
-
offsetInBytes: offsetInBytes,
|
1147
|
-
strideInBytes: strideInBytes,
|
1148
|
-
});
|
1149
|
-
offsetInBytes += componentsPerAttribute * sizeInBytes;
|
1150
|
-
}
|
1151
|
-
|
1152
|
-
if (this.quantization === TerrainQuantization$1.NONE) {
|
1153
|
-
addAttribute(attributesIndicesNone.position3DAndHeight, 4);
|
1154
|
-
|
1155
|
-
let componentsTexCoordAndNormals = 2;
|
1156
|
-
componentsTexCoordAndNormals += this.hasWebMercatorT ? 1 : 0;
|
1157
|
-
componentsTexCoordAndNormals += this.hasVertexNormals ? 1 : 0;
|
1158
|
-
addAttribute(
|
1159
|
-
attributesIndicesNone.textureCoordAndEncodedNormals,
|
1160
|
-
componentsTexCoordAndNormals
|
1161
|
-
);
|
1162
|
-
|
1163
|
-
if (this.hasGeodeticSurfaceNormals) {
|
1164
|
-
addAttribute(attributesIndicesNone.geodeticSurfaceNormal, 3);
|
1165
|
-
}
|
1166
|
-
} else {
|
1167
|
-
// When there is no webMercatorT or vertex normals, the attribute only needs 3 components: x/y, z/h, u/v.
|
1168
|
-
// WebMercatorT and vertex normals each take up one component, so if only one of them is present the first
|
1169
|
-
// attribute gets a 4th component. If both are present, we need an additional attribute that has 1 component.
|
1170
|
-
const usingAttribute0Component4 =
|
1171
|
-
this.hasWebMercatorT || this.hasVertexNormals;
|
1172
|
-
const usingAttribute1Component1 =
|
1173
|
-
this.hasWebMercatorT && this.hasVertexNormals;
|
1174
|
-
addAttribute(
|
1175
|
-
attributesIndicesBits12.compressed0,
|
1176
|
-
usingAttribute0Component4 ? 4 : 3
|
1177
|
-
);
|
1178
|
-
|
1179
|
-
if (usingAttribute1Component1) {
|
1180
|
-
addAttribute(attributesIndicesBits12.compressed1, 1);
|
1181
|
-
}
|
1182
|
-
|
1183
|
-
if (this.hasGeodeticSurfaceNormals) {
|
1184
|
-
addAttribute(attributesIndicesBits12.geodeticSurfaceNormal, 3);
|
1185
|
-
}
|
1186
|
-
}
|
1187
|
-
|
1188
|
-
return attributes;
|
1189
|
-
};
|
1190
|
-
|
1191
|
-
TerrainEncoding.prototype.getAttributeLocations = function () {
|
1192
|
-
if (this.quantization === TerrainQuantization$1.NONE) {
|
1193
|
-
return attributesIndicesNone;
|
1194
|
-
}
|
1195
|
-
return attributesIndicesBits12;
|
1196
|
-
};
|
1197
|
-
|
1198
|
-
TerrainEncoding.clone = function (encoding, result) {
|
1199
|
-
if (!defaultValue.defined(encoding)) {
|
1200
|
-
return undefined;
|
1201
|
-
}
|
1202
|
-
if (!defaultValue.defined(result)) {
|
1203
|
-
result = new TerrainEncoding();
|
1204
|
-
}
|
1205
|
-
|
1206
|
-
result.quantization = encoding.quantization;
|
1207
|
-
result.minimumHeight = encoding.minimumHeight;
|
1208
|
-
result.maximumHeight = encoding.maximumHeight;
|
1209
|
-
result.center = Matrix3.Cartesian3.clone(encoding.center);
|
1210
|
-
result.toScaledENU = Matrix2.Matrix4.clone(encoding.toScaledENU);
|
1211
|
-
result.fromScaledENU = Matrix2.Matrix4.clone(encoding.fromScaledENU);
|
1212
|
-
result.matrix = Matrix2.Matrix4.clone(encoding.matrix);
|
1213
|
-
result.hasVertexNormals = encoding.hasVertexNormals;
|
1214
|
-
result.hasWebMercatorT = encoding.hasWebMercatorT;
|
1215
|
-
result.hasGeodeticSurfaceNormals = encoding.hasGeodeticSurfaceNormals;
|
1216
|
-
result.exaggeration = encoding.exaggeration;
|
1217
|
-
result.exaggerationRelativeHeight = encoding.exaggerationRelativeHeight;
|
1218
|
-
|
1219
|
-
result._calculateStrideAndOffsets();
|
1220
|
-
|
1221
|
-
return result;
|
1222
|
-
};
|
1223
|
-
|
1224
|
-
exports.EllipsoidalOccluder = EllipsoidalOccluder;
|
1225
|
-
exports.TerrainEncoding = TerrainEncoding;
|
1226
|
-
|
1227
|
-
}));
|