@vcmap/ui 5.0.0-rc.30 → 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 +4 -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.eaf7cc.js → cesium.77d0f7.js} +8915 -13165
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.b16511.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.4bbf0f.js → ol.e48649.js} +4 -4
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.ab815e.css → ui.50452a.css} +1 -1
- package/dist/assets/{ui.ab815e.js → ui.50452a.js} +4270 -4355
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.ea3fa8.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/package.json +5 -5
- 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/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/vectorPropertiesExample.vue +20 -1
- package/plugins/package.json +6 -2
- package/src/application/VcsAttributions.vue +27 -20
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +22 -14
- package/src/components/form-inputs-controls/VcsSlider.vue +1 -0
- 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 +2 -2
- package/src/components/tables/VcsDataTable.vue +1 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +57 -14
- package/src/contentTree/contentTreeCollection.js +30 -9
- package/src/i18n/de.js +8 -5
- package/src/i18n/en.js +8 -5
- package/src/i18n/i18nCollection.js +19 -65
- package/src/manager/buttonManager.js +4 -0
- package/src/manager/contextMenu/contextMenuManager.js +2 -0
- package/src/pluginHelper.js +2 -2
- package/src/vcsUiApp.js +9 -4
- 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-c115e3a1.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/SearchNominatimEditor.vue +0 -90
- package/plugins/@vcmap/search-nominatim/config.json +0 -3
- package/plugins/@vcmap/search-nominatim/index.js +0 -66
- package/plugins/@vcmap/search-nominatim/nominatim.js +0 -175
- package/plugins/@vcmap/search-nominatim/package.json +0 -9
- /package/dist/assets/{vue.67e80f.js → vue.5d696e.js} +0 -0
- /package/dist/assets/{vuetify.ea3fa8.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,462 +1,484 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
4
|
+
* Version 1.109.3
|
5
|
+
*
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*
|
20
|
+
* Columbus View (Pat. Pend.)
|
21
|
+
*
|
22
|
+
* Portions licensed separately.
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
24
|
+
*/
|
25
|
+
|
26
|
+
import {
|
27
|
+
BoundingRectangle_default
|
28
|
+
} from "./chunk-66QLLS45.js";
|
29
|
+
import {
|
30
|
+
PolygonGeometryLibrary_default
|
31
|
+
} from "./chunk-KTJSNCK4.js";
|
32
|
+
import {
|
33
|
+
ArcType_default
|
34
|
+
} from "./chunk-CCFQRR6D.js";
|
35
|
+
import {
|
36
|
+
GeometryInstance_default
|
37
|
+
} from "./chunk-227AJNOA.js";
|
38
|
+
import {
|
39
|
+
GeometryPipeline_default
|
40
|
+
} from "./chunk-XTY7B2N6.js";
|
41
|
+
import "./chunk-O5AMBQ36.js";
|
42
|
+
import "./chunk-QT3MPEMI.js";
|
43
|
+
import {
|
44
|
+
EllipsoidGeodesic_default
|
45
|
+
} from "./chunk-AFFLIKOH.js";
|
46
|
+
import {
|
47
|
+
GeometryOffsetAttribute_default
|
48
|
+
} from "./chunk-MPAZH4BF.js";
|
49
|
+
import {
|
50
|
+
VertexFormat_default
|
51
|
+
} from "./chunk-QMEMZIJI.js";
|
52
|
+
import {
|
53
|
+
EllipsoidTangentPlane_default
|
54
|
+
} from "./chunk-RP2A7BR5.js";
|
55
|
+
import "./chunk-2R5O53JW.js";
|
56
|
+
import {
|
57
|
+
PolygonPipeline_default,
|
58
|
+
WindingOrder_default
|
59
|
+
} from "./chunk-J3JY6I2C.js";
|
60
|
+
import "./chunk-3W63OHNJ.js";
|
61
|
+
import "./chunk-K36FEYS7.js";
|
62
|
+
import "./chunk-MYZB7C4T.js";
|
63
|
+
import "./chunk-OYFCF4PL.js";
|
64
|
+
import {
|
65
|
+
IndexDatatype_default
|
66
|
+
} from "./chunk-RW6LU2CJ.js";
|
67
|
+
import "./chunk-EW2GWJYB.js";
|
68
|
+
import {
|
69
|
+
GeometryAttribute_default,
|
70
|
+
Geometry_default
|
71
|
+
} from "./chunk-X4SU25DT.js";
|
72
|
+
import {
|
73
|
+
BoundingSphere_default,
|
74
|
+
Quaternion_default
|
75
|
+
} from "./chunk-PFQBCKBM.js";
|
76
|
+
import "./chunk-QJ3DFBH3.js";
|
77
|
+
import {
|
78
|
+
Cartesian2_default,
|
79
|
+
Rectangle_default
|
80
|
+
} from "./chunk-DUHWWBQQ.js";
|
81
|
+
import {
|
82
|
+
ComponentDatatype_default
|
83
|
+
} from "./chunk-LLUNNUJV.js";
|
84
|
+
import {
|
85
|
+
Cartesian3_default,
|
86
|
+
Cartographic_default,
|
87
|
+
Ellipsoid_default,
|
88
|
+
Matrix3_default
|
89
|
+
} from "./chunk-PCJWUS4M.js";
|
90
|
+
import {
|
91
|
+
Math_default
|
92
|
+
} from "./chunk-N3JIFFX2.js";
|
93
|
+
import "./chunk-AHKEZ2OE.js";
|
94
|
+
import "./chunk-ABADGKYE.js";
|
95
|
+
import {
|
96
|
+
defaultValue_default
|
97
|
+
} from "./chunk-WXTV4ATB.js";
|
98
|
+
import {
|
99
|
+
Check_default,
|
100
|
+
DeveloperError_default
|
101
|
+
} from "./chunk-4MFFIWUA.js";
|
102
|
+
import {
|
103
|
+
defined_default
|
104
|
+
} from "./chunk-6BTKZDRG.js";
|
105
|
+
|
106
|
+
// packages/engine/Source/Core/PolygonGeometry.js
|
107
|
+
var scratchCarto1 = new Cartographic_default();
|
108
|
+
var scratchCarto2 = new Cartographic_default();
|
109
|
+
function adjustPosHeightsForNormal(position, p1, p2, ellipsoid) {
|
110
|
+
const carto1 = ellipsoid.cartesianToCartographic(position, scratchCarto1);
|
111
|
+
const height = carto1.height;
|
112
|
+
const p1Carto = ellipsoid.cartesianToCartographic(p1, scratchCarto2);
|
113
|
+
p1Carto.height = height;
|
114
|
+
ellipsoid.cartographicToCartesian(p1Carto, p1);
|
115
|
+
const p2Carto = ellipsoid.cartesianToCartographic(p2, scratchCarto2);
|
116
|
+
p2Carto.height = height - 100;
|
117
|
+
ellipsoid.cartographicToCartesian(p2Carto, p2);
|
118
|
+
}
|
119
|
+
var scratchBoundingRectangle = new BoundingRectangle_default();
|
120
|
+
var scratchPosition = new Cartesian3_default();
|
121
|
+
var scratchNormal = new Cartesian3_default();
|
122
|
+
var scratchTangent = new Cartesian3_default();
|
123
|
+
var scratchBitangent = new Cartesian3_default();
|
124
|
+
var p1Scratch = new Cartesian3_default();
|
125
|
+
var p2Scratch = new Cartesian3_default();
|
126
|
+
var scratchPerPosNormal = new Cartesian3_default();
|
127
|
+
var scratchPerPosTangent = new Cartesian3_default();
|
128
|
+
var scratchPerPosBitangent = new Cartesian3_default();
|
129
|
+
var appendTextureCoordinatesOrigin = new Cartesian2_default();
|
130
|
+
var appendTextureCoordinatesCartesian2 = new Cartesian2_default();
|
131
|
+
var appendTextureCoordinatesCartesian3 = new Cartesian3_default();
|
132
|
+
var appendTextureCoordinatesQuaternion = new Quaternion_default();
|
133
|
+
var appendTextureCoordinatesMatrix3 = new Matrix3_default();
|
134
|
+
var tangentMatrixScratch = new Matrix3_default();
|
135
|
+
function computeAttributes(options) {
|
136
|
+
const vertexFormat = options.vertexFormat;
|
137
|
+
const geometry = options.geometry;
|
138
|
+
const shadowVolume = options.shadowVolume;
|
139
|
+
const flatPositions = geometry.attributes.position.values;
|
140
|
+
const flatTexcoords = defined_default(geometry.attributes.st) ? geometry.attributes.st.values : void 0;
|
141
|
+
let length = flatPositions.length;
|
142
|
+
const wall = options.wall;
|
143
|
+
const top = options.top || wall;
|
144
|
+
const bottom = options.bottom || wall;
|
145
|
+
if (vertexFormat.st || vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent || shadowVolume) {
|
146
|
+
const boundingRectangle = options.boundingRectangle;
|
147
|
+
const tangentPlane = options.tangentPlane;
|
148
|
+
const ellipsoid = options.ellipsoid;
|
149
|
+
const stRotation = options.stRotation;
|
150
|
+
const perPositionHeight = options.perPositionHeight;
|
151
|
+
const origin = appendTextureCoordinatesOrigin;
|
152
|
+
origin.x = boundingRectangle.x;
|
153
|
+
origin.y = boundingRectangle.y;
|
154
|
+
const textureCoordinates = vertexFormat.st ? new Float32Array(2 * (length / 3)) : void 0;
|
155
|
+
let normals;
|
156
|
+
if (vertexFormat.normal) {
|
157
|
+
if (perPositionHeight && top && !wall) {
|
158
|
+
normals = geometry.attributes.normal.values;
|
113
159
|
} else {
|
114
|
-
|
115
|
-
tangentRotationMatrix = Matrix3.Matrix3.clone(
|
116
|
-
Matrix3.Matrix3.IDENTITY,
|
117
|
-
tangentRotationMatrix
|
118
|
-
);
|
160
|
+
normals = new Float32Array(length);
|
119
161
|
}
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
162
|
+
}
|
163
|
+
const tangents = vertexFormat.tangent ? new Float32Array(length) : void 0;
|
164
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(length) : void 0;
|
165
|
+
const extrudeNormals = shadowVolume ? new Float32Array(length) : void 0;
|
166
|
+
let textureCoordIndex = 0;
|
167
|
+
let attrIndex = 0;
|
168
|
+
let normal = scratchNormal;
|
169
|
+
let tangent = scratchTangent;
|
170
|
+
let bitangent = scratchBitangent;
|
171
|
+
let recomputeNormal = true;
|
172
|
+
let textureMatrix = appendTextureCoordinatesMatrix3;
|
173
|
+
let tangentRotationMatrix = tangentMatrixScratch;
|
174
|
+
if (stRotation !== 0) {
|
175
|
+
let rotation = Quaternion_default.fromAxisAngle(
|
176
|
+
tangentPlane._plane.normal,
|
177
|
+
stRotation,
|
178
|
+
appendTextureCoordinatesQuaternion
|
179
|
+
);
|
180
|
+
textureMatrix = Matrix3_default.fromQuaternion(rotation, textureMatrix);
|
181
|
+
rotation = Quaternion_default.fromAxisAngle(
|
182
|
+
tangentPlane._plane.normal,
|
183
|
+
-stRotation,
|
184
|
+
appendTextureCoordinatesQuaternion
|
185
|
+
);
|
186
|
+
tangentRotationMatrix = Matrix3_default.fromQuaternion(
|
187
|
+
rotation,
|
188
|
+
tangentRotationMatrix
|
189
|
+
);
|
190
|
+
} else {
|
191
|
+
textureMatrix = Matrix3_default.clone(Matrix3_default.IDENTITY, textureMatrix);
|
192
|
+
tangentRotationMatrix = Matrix3_default.clone(
|
193
|
+
Matrix3_default.IDENTITY,
|
194
|
+
tangentRotationMatrix
|
195
|
+
);
|
196
|
+
}
|
197
|
+
let bottomOffset = 0;
|
198
|
+
let bottomOffset2 = 0;
|
199
|
+
if (top && bottom) {
|
200
|
+
bottomOffset = length / 2;
|
201
|
+
bottomOffset2 = length / 3;
|
202
|
+
length /= 2;
|
203
|
+
}
|
204
|
+
for (let i = 0; i < length; i += 3) {
|
205
|
+
const position = Cartesian3_default.fromArray(
|
206
|
+
flatPositions,
|
207
|
+
i,
|
208
|
+
appendTextureCoordinatesCartesian3
|
209
|
+
);
|
210
|
+
if (vertexFormat.st) {
|
211
|
+
if (!defined_default(flatTexcoords)) {
|
212
|
+
let p = Matrix3_default.multiplyByVector(
|
213
|
+
textureMatrix,
|
214
|
+
position,
|
215
|
+
scratchPosition
|
216
|
+
);
|
217
|
+
p = ellipsoid.scaleToGeodeticSurface(p, p);
|
218
|
+
const st = tangentPlane.projectPointOntoPlane(
|
219
|
+
p,
|
220
|
+
appendTextureCoordinatesCartesian2
|
221
|
+
);
|
222
|
+
Cartesian2_default.subtract(st, origin, st);
|
223
|
+
const stx = Math_default.clamp(st.x / boundingRectangle.width, 0, 1);
|
224
|
+
const sty = Math_default.clamp(st.y / boundingRectangle.height, 0, 1);
|
225
|
+
if (bottom) {
|
226
|
+
textureCoordinates[textureCoordIndex + bottomOffset2] = stx;
|
227
|
+
textureCoordinates[textureCoordIndex + 1 + bottomOffset2] = sty;
|
228
|
+
}
|
229
|
+
if (top) {
|
230
|
+
textureCoordinates[textureCoordIndex] = stx;
|
231
|
+
textureCoordinates[textureCoordIndex + 1] = sty;
|
164
232
|
}
|
233
|
+
textureCoordIndex += 2;
|
165
234
|
}
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
const p2 = Matrix3.Cartesian3.fromArray(
|
182
|
-
flatPositions,
|
183
|
-
i + length,
|
184
|
-
p2Scratch
|
185
|
-
);
|
186
|
-
if (perPositionHeight) {
|
187
|
-
adjustPosHeightsForNormal(position, p1, p2, ellipsoid);
|
188
|
-
}
|
189
|
-
Matrix3.Cartesian3.subtract(p1, position, p1);
|
190
|
-
Matrix3.Cartesian3.subtract(p2, position, p2);
|
191
|
-
normal = Matrix3.Cartesian3.normalize(
|
192
|
-
Matrix3.Cartesian3.cross(p2, p1, normal),
|
193
|
-
normal
|
194
|
-
);
|
195
|
-
recomputeNormal = false;
|
196
|
-
}
|
197
|
-
|
198
|
-
if (Matrix3.Cartesian3.equalsEpsilon(p1, position, Math$1.CesiumMath.EPSILON10)) {
|
199
|
-
// if we've reached a corner
|
200
|
-
recomputeNormal = true;
|
235
|
+
}
|
236
|
+
if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent || shadowVolume) {
|
237
|
+
const attrIndex1 = attrIndex + 1;
|
238
|
+
const attrIndex2 = attrIndex + 2;
|
239
|
+
if (wall) {
|
240
|
+
if (i + 3 < length) {
|
241
|
+
const p1 = Cartesian3_default.fromArray(flatPositions, i + 3, p1Scratch);
|
242
|
+
if (recomputeNormal) {
|
243
|
+
const p2 = Cartesian3_default.fromArray(
|
244
|
+
flatPositions,
|
245
|
+
i + length,
|
246
|
+
p2Scratch
|
247
|
+
);
|
248
|
+
if (perPositionHeight) {
|
249
|
+
adjustPosHeightsForNormal(position, p1, p2, ellipsoid);
|
201
250
|
}
|
251
|
+
Cartesian3_default.subtract(p1, position, p1);
|
252
|
+
Cartesian3_default.subtract(p2, position, p2);
|
253
|
+
normal = Cartesian3_default.normalize(
|
254
|
+
Cartesian3_default.cross(p2, p1, normal),
|
255
|
+
normal
|
256
|
+
);
|
257
|
+
recomputeNormal = false;
|
202
258
|
}
|
203
|
-
|
204
|
-
|
205
|
-
bitangent = ellipsoid.geodeticSurfaceNormal(position, bitangent);
|
206
|
-
if (vertexFormat.tangent) {
|
207
|
-
tangent = Matrix3.Cartesian3.normalize(
|
208
|
-
Matrix3.Cartesian3.cross(bitangent, normal, tangent),
|
209
|
-
tangent
|
210
|
-
);
|
211
|
-
}
|
259
|
+
if (Cartesian3_default.equalsEpsilon(p1, position, Math_default.EPSILON10)) {
|
260
|
+
recomputeNormal = true;
|
212
261
|
}
|
213
|
-
}
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
262
|
+
}
|
263
|
+
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
264
|
+
bitangent = ellipsoid.geodeticSurfaceNormal(position, bitangent);
|
265
|
+
if (vertexFormat.tangent) {
|
266
|
+
tangent = Cartesian3_default.normalize(
|
267
|
+
Cartesian3_default.cross(bitangent, normal, tangent),
|
268
|
+
tangent
|
269
|
+
);
|
270
|
+
}
|
271
|
+
}
|
272
|
+
} else {
|
273
|
+
normal = ellipsoid.geodeticSurfaceNormal(position, normal);
|
274
|
+
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
275
|
+
if (perPositionHeight) {
|
276
|
+
scratchPerPosNormal = Cartesian3_default.fromArray(
|
277
|
+
normals,
|
278
|
+
attrIndex,
|
279
|
+
scratchPerPosNormal
|
280
|
+
);
|
281
|
+
scratchPerPosTangent = Cartesian3_default.cross(
|
282
|
+
Cartesian3_default.UNIT_Z,
|
283
|
+
scratchPerPosNormal,
|
284
|
+
scratchPerPosTangent
|
285
|
+
);
|
286
|
+
scratchPerPosTangent = Cartesian3_default.normalize(
|
287
|
+
Matrix3_default.multiplyByVector(
|
288
|
+
tangentRotationMatrix,
|
289
|
+
scratchPerPosTangent,
|
225
290
|
scratchPerPosTangent
|
226
|
-
)
|
227
|
-
scratchPerPosTangent
|
228
|
-
|
229
|
-
|
291
|
+
),
|
292
|
+
scratchPerPosTangent
|
293
|
+
);
|
294
|
+
if (vertexFormat.bitangent) {
|
295
|
+
scratchPerPosBitangent = Cartesian3_default.normalize(
|
296
|
+
Cartesian3_default.cross(
|
297
|
+
scratchPerPosNormal,
|
230
298
|
scratchPerPosTangent,
|
231
|
-
|
299
|
+
scratchPerPosBitangent
|
232
300
|
),
|
233
|
-
|
301
|
+
scratchPerPosBitangent
|
234
302
|
);
|
235
|
-
if (vertexFormat.bitangent) {
|
236
|
-
scratchPerPosBitangent = Matrix3.Cartesian3.normalize(
|
237
|
-
Matrix3.Cartesian3.cross(
|
238
|
-
scratchPerPosNormal,
|
239
|
-
scratchPerPosTangent,
|
240
|
-
scratchPerPosBitangent
|
241
|
-
),
|
242
|
-
scratchPerPosBitangent
|
243
|
-
);
|
244
|
-
}
|
245
303
|
}
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
304
|
+
}
|
305
|
+
tangent = Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent);
|
306
|
+
tangent = Cartesian3_default.normalize(
|
307
|
+
Matrix3_default.multiplyByVector(tangentRotationMatrix, tangent, tangent),
|
308
|
+
tangent
|
309
|
+
);
|
310
|
+
if (vertexFormat.bitangent) {
|
311
|
+
bitangent = Cartesian3_default.normalize(
|
312
|
+
Cartesian3_default.cross(normal, tangent, bitangent),
|
313
|
+
bitangent
|
251
314
|
);
|
252
|
-
if (vertexFormat.bitangent) {
|
253
|
-
bitangent = Matrix3.Cartesian3.normalize(
|
254
|
-
Matrix3.Cartesian3.cross(normal, tangent, bitangent),
|
255
|
-
bitangent
|
256
|
-
);
|
257
|
-
}
|
258
315
|
}
|
259
316
|
}
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
}
|
271
|
-
|
272
|
-
if ((top && !perPositionHeight) || wall) {
|
273
|
-
normals[attrIndex] = normal.x;
|
274
|
-
normals[attrIndex1] = normal.y;
|
275
|
-
normals[attrIndex2] = normal.z;
|
276
|
-
}
|
317
|
+
}
|
318
|
+
if (vertexFormat.normal) {
|
319
|
+
if (options.wall) {
|
320
|
+
normals[attrIndex + bottomOffset] = normal.x;
|
321
|
+
normals[attrIndex1 + bottomOffset] = normal.y;
|
322
|
+
normals[attrIndex2 + bottomOffset] = normal.z;
|
323
|
+
} else if (bottom) {
|
324
|
+
normals[attrIndex + bottomOffset] = -normal.x;
|
325
|
+
normals[attrIndex1 + bottomOffset] = -normal.y;
|
326
|
+
normals[attrIndex2 + bottomOffset] = -normal.z;
|
277
327
|
}
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
}
|
283
|
-
extrudeNormals[attrIndex + bottomOffset] = -normal.x;
|
284
|
-
extrudeNormals[attrIndex1 + bottomOffset] = -normal.y;
|
285
|
-
extrudeNormals[attrIndex2 + bottomOffset] = -normal.z;
|
328
|
+
if (top && !perPositionHeight || wall) {
|
329
|
+
normals[attrIndex] = normal.x;
|
330
|
+
normals[attrIndex1] = normal.y;
|
331
|
+
normals[attrIndex2] = normal.z;
|
286
332
|
}
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
tangents[attrIndex1 + bottomOffset] = tangent.y;
|
292
|
-
tangents[attrIndex2 + bottomOffset] = tangent.z;
|
293
|
-
} else if (bottom) {
|
294
|
-
tangents[attrIndex + bottomOffset] = -tangent.x;
|
295
|
-
tangents[attrIndex1 + bottomOffset] = -tangent.y;
|
296
|
-
tangents[attrIndex2 + bottomOffset] = -tangent.z;
|
297
|
-
}
|
298
|
-
|
299
|
-
if (top) {
|
300
|
-
if (perPositionHeight) {
|
301
|
-
tangents[attrIndex] = scratchPerPosTangent.x;
|
302
|
-
tangents[attrIndex1] = scratchPerPosTangent.y;
|
303
|
-
tangents[attrIndex2] = scratchPerPosTangent.z;
|
304
|
-
} else {
|
305
|
-
tangents[attrIndex] = tangent.x;
|
306
|
-
tangents[attrIndex1] = tangent.y;
|
307
|
-
tangents[attrIndex2] = tangent.z;
|
308
|
-
}
|
309
|
-
}
|
333
|
+
}
|
334
|
+
if (shadowVolume) {
|
335
|
+
if (wall) {
|
336
|
+
normal = ellipsoid.geodeticSurfaceNormal(position, normal);
|
310
337
|
}
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
338
|
+
extrudeNormals[attrIndex + bottomOffset] = -normal.x;
|
339
|
+
extrudeNormals[attrIndex1 + bottomOffset] = -normal.y;
|
340
|
+
extrudeNormals[attrIndex2 + bottomOffset] = -normal.z;
|
341
|
+
}
|
342
|
+
if (vertexFormat.tangent) {
|
343
|
+
if (options.wall) {
|
344
|
+
tangents[attrIndex + bottomOffset] = tangent.x;
|
345
|
+
tangents[attrIndex1 + bottomOffset] = tangent.y;
|
346
|
+
tangents[attrIndex2 + bottomOffset] = tangent.z;
|
347
|
+
} else if (bottom) {
|
348
|
+
tangents[attrIndex + bottomOffset] = -tangent.x;
|
349
|
+
tangents[attrIndex1 + bottomOffset] = -tangent.y;
|
350
|
+
tangents[attrIndex2 + bottomOffset] = -tangent.z;
|
351
|
+
}
|
352
|
+
if (top) {
|
353
|
+
if (perPositionHeight) {
|
354
|
+
tangents[attrIndex] = scratchPerPosTangent.x;
|
355
|
+
tangents[attrIndex1] = scratchPerPosTangent.y;
|
356
|
+
tangents[attrIndex2] = scratchPerPosTangent.z;
|
357
|
+
} else {
|
358
|
+
tangents[attrIndex] = tangent.x;
|
359
|
+
tangents[attrIndex1] = tangent.y;
|
360
|
+
tangents[attrIndex2] = tangent.z;
|
317
361
|
}
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
362
|
+
}
|
363
|
+
}
|
364
|
+
if (vertexFormat.bitangent) {
|
365
|
+
if (bottom) {
|
366
|
+
bitangents[attrIndex + bottomOffset] = bitangent.x;
|
367
|
+
bitangents[attrIndex1 + bottomOffset] = bitangent.y;
|
368
|
+
bitangents[attrIndex2 + bottomOffset] = bitangent.z;
|
369
|
+
}
|
370
|
+
if (top) {
|
371
|
+
if (perPositionHeight) {
|
372
|
+
bitangents[attrIndex] = scratchPerPosBitangent.x;
|
373
|
+
bitangents[attrIndex1] = scratchPerPosBitangent.y;
|
374
|
+
bitangents[attrIndex2] = scratchPerPosBitangent.z;
|
375
|
+
} else {
|
376
|
+
bitangents[attrIndex] = bitangent.x;
|
377
|
+
bitangents[attrIndex1] = bitangent.y;
|
378
|
+
bitangents[attrIndex2] = bitangent.z;
|
328
379
|
}
|
329
380
|
}
|
330
|
-
attrIndex += 3;
|
331
381
|
}
|
332
|
-
|
333
|
-
|
334
|
-
if (vertexFormat.st && !defaultValue.defined(flatTexcoords)) {
|
335
|
-
geometry.attributes.st = new GeometryAttribute.GeometryAttribute({
|
336
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
337
|
-
componentsPerAttribute: 2,
|
338
|
-
values: textureCoordinates,
|
339
|
-
});
|
340
|
-
}
|
341
|
-
|
342
|
-
if (vertexFormat.normal) {
|
343
|
-
geometry.attributes.normal = new GeometryAttribute.GeometryAttribute({
|
344
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
345
|
-
componentsPerAttribute: 3,
|
346
|
-
values: normals,
|
347
|
-
});
|
348
|
-
}
|
349
|
-
|
350
|
-
if (vertexFormat.tangent) {
|
351
|
-
geometry.attributes.tangent = new GeometryAttribute.GeometryAttribute({
|
352
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
353
|
-
componentsPerAttribute: 3,
|
354
|
-
values: tangents,
|
355
|
-
});
|
356
|
-
}
|
357
|
-
|
358
|
-
if (vertexFormat.bitangent) {
|
359
|
-
geometry.attributes.bitangent = new GeometryAttribute.GeometryAttribute({
|
360
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
361
|
-
componentsPerAttribute: 3,
|
362
|
-
values: bitangents,
|
363
|
-
});
|
364
|
-
}
|
365
|
-
|
366
|
-
if (shadowVolume) {
|
367
|
-
geometry.attributes.extrudeDirection = new GeometryAttribute.GeometryAttribute({
|
368
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
369
|
-
componentsPerAttribute: 3,
|
370
|
-
values: extrudeNormals,
|
371
|
-
});
|
382
|
+
attrIndex += 3;
|
372
383
|
}
|
373
384
|
}
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
if (options.offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.TOP) {
|
380
|
-
if ((top && bottom) || wall) {
|
381
|
-
offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
|
382
|
-
} else if (top) {
|
383
|
-
offsetAttribute = offsetAttribute.fill(1);
|
384
|
-
}
|
385
|
-
} else {
|
386
|
-
const offsetValue =
|
387
|
-
options.offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE ? 0 : 1;
|
388
|
-
offsetAttribute = offsetAttribute.fill(offsetValue);
|
389
|
-
}
|
390
|
-
|
391
|
-
geometry.attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
|
392
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
|
393
|
-
componentsPerAttribute: 1,
|
394
|
-
values: offsetAttribute,
|
385
|
+
if (vertexFormat.st && !defined_default(flatTexcoords)) {
|
386
|
+
geometry.attributes.st = new GeometryAttribute_default({
|
387
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
388
|
+
componentsPerAttribute: 2,
|
389
|
+
values: textureCoordinates
|
395
390
|
});
|
396
391
|
}
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
const idlCross = {
|
404
|
-
westOverIDL: 0.0,
|
405
|
-
eastOverIDL: 0.0,
|
406
|
-
};
|
407
|
-
let ellipsoidGeodesic = new EllipsoidGeodesic.EllipsoidGeodesic();
|
408
|
-
function computeRectangle(positions, ellipsoid, arcType, granularity, result) {
|
409
|
-
result = defaultValue.defaultValue(result, new Matrix2.Rectangle());
|
410
|
-
if (!defaultValue.defined(positions) || positions.length < 3) {
|
411
|
-
result.west = 0.0;
|
412
|
-
result.north = 0.0;
|
413
|
-
result.south = 0.0;
|
414
|
-
result.east = 0.0;
|
415
|
-
return result;
|
392
|
+
if (vertexFormat.normal) {
|
393
|
+
geometry.attributes.normal = new GeometryAttribute_default({
|
394
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
395
|
+
componentsPerAttribute: 3,
|
396
|
+
values: normals
|
397
|
+
});
|
416
398
|
}
|
417
|
-
|
418
|
-
|
419
|
-
|
399
|
+
if (vertexFormat.tangent) {
|
400
|
+
geometry.attributes.tangent = new GeometryAttribute_default({
|
401
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
402
|
+
componentsPerAttribute: 3,
|
403
|
+
values: tangents
|
404
|
+
});
|
420
405
|
}
|
421
|
-
|
422
|
-
|
423
|
-
|
406
|
+
if (vertexFormat.bitangent) {
|
407
|
+
geometry.attributes.bitangent = new GeometryAttribute_default({
|
408
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
409
|
+
componentsPerAttribute: 3,
|
410
|
+
values: bitangents
|
411
|
+
});
|
424
412
|
}
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
idlCross.westOverIDL = Number.POSITIVE_INFINITY;
|
432
|
-
idlCross.eastOverIDL = Number.NEGATIVE_INFINITY;
|
433
|
-
|
434
|
-
const inverseChordLength =
|
435
|
-
1.0 / Math$1.CesiumMath.chordLength(granularity, ellipsoid.maximumRadius);
|
436
|
-
const positionsLength = positions.length;
|
437
|
-
let endCartographic = ellipsoid.cartesianToCartographic(
|
438
|
-
positions[0],
|
439
|
-
endCartographicScratch
|
440
|
-
);
|
441
|
-
let startCartographic = startCartographicScratch;
|
442
|
-
let swap;
|
443
|
-
|
444
|
-
for (let i = 1; i < positionsLength; i++) {
|
445
|
-
swap = startCartographic;
|
446
|
-
startCartographic = endCartographic;
|
447
|
-
endCartographic = ellipsoid.cartesianToCartographic(positions[i], swap);
|
448
|
-
ellipsoidGeodesic.setEndPoints(startCartographic, endCartographic);
|
449
|
-
interpolateAndGrowRectangle(
|
450
|
-
ellipsoidGeodesic,
|
451
|
-
inverseChordLength,
|
452
|
-
result,
|
453
|
-
idlCross
|
454
|
-
);
|
413
|
+
if (shadowVolume) {
|
414
|
+
geometry.attributes.extrudeDirection = new GeometryAttribute_default({
|
415
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
416
|
+
componentsPerAttribute: 3,
|
417
|
+
values: extrudeNormals
|
418
|
+
});
|
455
419
|
}
|
456
|
-
|
420
|
+
}
|
421
|
+
if (options.extrude && defined_default(options.offsetAttribute)) {
|
422
|
+
const size = flatPositions.length / 3;
|
423
|
+
let offsetAttribute = new Uint8Array(size);
|
424
|
+
if (options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
|
425
|
+
if (top && bottom || wall) {
|
426
|
+
offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
|
427
|
+
} else if (top) {
|
428
|
+
offsetAttribute = offsetAttribute.fill(1);
|
429
|
+
}
|
430
|
+
} else {
|
431
|
+
const offsetValue = options.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
432
|
+
offsetAttribute = offsetAttribute.fill(offsetValue);
|
433
|
+
}
|
434
|
+
geometry.attributes.applyOffset = new GeometryAttribute_default({
|
435
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
436
|
+
componentsPerAttribute: 1,
|
437
|
+
values: offsetAttribute
|
438
|
+
});
|
439
|
+
}
|
440
|
+
return geometry;
|
441
|
+
}
|
442
|
+
var startCartographicScratch = new Cartographic_default();
|
443
|
+
var endCartographicScratch = new Cartographic_default();
|
444
|
+
var idlCross = {
|
445
|
+
westOverIDL: 0,
|
446
|
+
eastOverIDL: 0
|
447
|
+
};
|
448
|
+
var ellipsoidGeodesic = new EllipsoidGeodesic_default();
|
449
|
+
function computeRectangle(positions, ellipsoid, arcType, granularity, result) {
|
450
|
+
result = defaultValue_default(result, new Rectangle_default());
|
451
|
+
if (!defined_default(positions) || positions.length < 3) {
|
452
|
+
result.west = 0;
|
453
|
+
result.north = 0;
|
454
|
+
result.south = 0;
|
455
|
+
result.east = 0;
|
456
|
+
return result;
|
457
|
+
}
|
458
|
+
if (arcType === ArcType_default.RHUMB) {
|
459
|
+
return Rectangle_default.fromCartesianArray(positions, ellipsoid, result);
|
460
|
+
}
|
461
|
+
if (!ellipsoidGeodesic.ellipsoid.equals(ellipsoid)) {
|
462
|
+
ellipsoidGeodesic = new EllipsoidGeodesic_default(void 0, void 0, ellipsoid);
|
463
|
+
}
|
464
|
+
result.west = Number.POSITIVE_INFINITY;
|
465
|
+
result.east = Number.NEGATIVE_INFINITY;
|
466
|
+
result.south = Number.POSITIVE_INFINITY;
|
467
|
+
result.north = Number.NEGATIVE_INFINITY;
|
468
|
+
idlCross.westOverIDL = Number.POSITIVE_INFINITY;
|
469
|
+
idlCross.eastOverIDL = Number.NEGATIVE_INFINITY;
|
470
|
+
const inverseChordLength = 1 / Math_default.chordLength(granularity, ellipsoid.maximumRadius);
|
471
|
+
const positionsLength = positions.length;
|
472
|
+
let endCartographic = ellipsoid.cartesianToCartographic(
|
473
|
+
positions[0],
|
474
|
+
endCartographicScratch
|
475
|
+
);
|
476
|
+
let startCartographic = startCartographicScratch;
|
477
|
+
let swap;
|
478
|
+
for (let i = 1; i < positionsLength; i++) {
|
457
479
|
swap = startCartographic;
|
458
480
|
startCartographic = endCartographic;
|
459
|
-
endCartographic = ellipsoid.cartesianToCartographic(positions[
|
481
|
+
endCartographic = ellipsoid.cartesianToCartographic(positions[i], swap);
|
460
482
|
ellipsoidGeodesic.setEndPoints(startCartographic, endCartographic);
|
461
483
|
interpolateAndGrowRectangle(
|
462
484
|
ellipsoidGeodesic,
|
@@ -464,164 +486,155 @@ define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', '
|
|
464
486
|
result,
|
465
487
|
idlCross
|
466
488
|
);
|
467
|
-
|
468
|
-
if (result.east - result.west > idlCross.eastOverIDL - idlCross.westOverIDL) {
|
469
|
-
result.west = idlCross.westOverIDL;
|
470
|
-
result.east = idlCross.eastOverIDL;
|
471
|
-
|
472
|
-
if (result.east > Math$1.CesiumMath.PI) {
|
473
|
-
result.east = result.east - Math$1.CesiumMath.TWO_PI;
|
474
|
-
}
|
475
|
-
if (result.west > Math$1.CesiumMath.PI) {
|
476
|
-
result.west = result.west - Math$1.CesiumMath.TWO_PI;
|
477
|
-
}
|
478
|
-
}
|
479
|
-
|
480
|
-
return result;
|
481
489
|
}
|
482
|
-
|
483
|
-
|
484
|
-
|
490
|
+
swap = startCartographic;
|
491
|
+
startCartographic = endCartographic;
|
492
|
+
endCartographic = ellipsoid.cartesianToCartographic(positions[0], swap);
|
493
|
+
ellipsoidGeodesic.setEndPoints(startCartographic, endCartographic);
|
494
|
+
interpolateAndGrowRectangle(
|
485
495
|
ellipsoidGeodesic,
|
486
496
|
inverseChordLength,
|
487
497
|
result,
|
488
498
|
idlCross
|
489
|
-
)
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
499
|
+
);
|
500
|
+
if (result.east - result.west > idlCross.eastOverIDL - idlCross.westOverIDL) {
|
501
|
+
result.west = idlCross.westOverIDL;
|
502
|
+
result.east = idlCross.eastOverIDL;
|
503
|
+
if (result.east > Math_default.PI) {
|
504
|
+
result.east = result.east - Math_default.TWO_PI;
|
505
|
+
}
|
506
|
+
if (result.west > Math_default.PI) {
|
507
|
+
result.west = result.west - Math_default.TWO_PI;
|
508
|
+
}
|
509
|
+
}
|
510
|
+
return result;
|
511
|
+
}
|
512
|
+
var interpolatedCartographicScratch = new Cartographic_default();
|
513
|
+
function interpolateAndGrowRectangle(ellipsoidGeodesic2, inverseChordLength, result, idlCross2) {
|
514
|
+
const segmentLength = ellipsoidGeodesic2.surfaceDistance;
|
515
|
+
const numPoints = Math.ceil(segmentLength * inverseChordLength);
|
516
|
+
const subsegmentDistance = numPoints > 0 ? segmentLength / (numPoints - 1) : Number.POSITIVE_INFINITY;
|
517
|
+
let interpolationDistance = 0;
|
518
|
+
for (let i = 0; i < numPoints; i++) {
|
519
|
+
const interpolatedCartographic = ellipsoidGeodesic2.interpolateUsingSurfaceDistance(
|
520
|
+
interpolationDistance,
|
521
|
+
interpolatedCartographicScratch
|
522
|
+
);
|
523
|
+
interpolationDistance += subsegmentDistance;
|
524
|
+
const longitude = interpolatedCartographic.longitude;
|
525
|
+
const latitude = interpolatedCartographic.latitude;
|
526
|
+
result.west = Math.min(result.west, longitude);
|
527
|
+
result.east = Math.max(result.east, longitude);
|
528
|
+
result.south = Math.min(result.south, latitude);
|
529
|
+
result.north = Math.max(result.north, latitude);
|
530
|
+
const lonAdjusted = longitude >= 0 ? longitude : longitude + Math_default.TWO_PI;
|
531
|
+
idlCross2.westOverIDL = Math.min(idlCross2.westOverIDL, lonAdjusted);
|
532
|
+
idlCross2.eastOverIDL = Math.max(idlCross2.eastOverIDL, lonAdjusted);
|
533
|
+
}
|
534
|
+
}
|
535
|
+
var createGeometryFromPositionsExtrudedPositions = [];
|
536
|
+
function createGeometryFromPositionsExtruded(ellipsoid, polygon, textureCoordinates, granularity, hierarchy, perPositionHeight, closeTop, closeBottom, vertexFormat, arcType) {
|
537
|
+
const geos = {
|
538
|
+
walls: []
|
539
|
+
};
|
540
|
+
let i;
|
541
|
+
if (closeTop || closeBottom) {
|
542
|
+
const topGeo = PolygonGeometryLibrary_default.createGeometryFromPositions(
|
543
|
+
ellipsoid,
|
544
|
+
polygon,
|
545
|
+
textureCoordinates,
|
546
|
+
granularity,
|
547
|
+
perPositionHeight,
|
548
|
+
vertexFormat,
|
549
|
+
arcType
|
550
|
+
);
|
551
|
+
const edgePoints = topGeo.attributes.position.values;
|
552
|
+
const indices = topGeo.indices;
|
553
|
+
let numPositions;
|
554
|
+
let newIndices;
|
555
|
+
if (closeTop && closeBottom) {
|
556
|
+
const topBottomPositions = edgePoints.concat(edgePoints);
|
557
|
+
numPositions = topBottomPositions.length / 3;
|
558
|
+
newIndices = IndexDatatype_default.createTypedArray(
|
559
|
+
numPositions,
|
560
|
+
indices.length * 2
|
501
561
|
);
|
502
|
-
|
503
|
-
const
|
504
|
-
const
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
562
|
+
newIndices.set(indices);
|
563
|
+
const ilength = indices.length;
|
564
|
+
const length = numPositions / 2;
|
565
|
+
for (i = 0; i < ilength; i += 3) {
|
566
|
+
const i0 = newIndices[i] + length;
|
567
|
+
const i1 = newIndices[i + 1] + length;
|
568
|
+
const i2 = newIndices[i + 2] + length;
|
569
|
+
newIndices[i + ilength] = i2;
|
570
|
+
newIndices[i + 1 + ilength] = i1;
|
571
|
+
newIndices[i + 2 + ilength] = i0;
|
572
|
+
}
|
573
|
+
topGeo.attributes.position.values = topBottomPositions;
|
574
|
+
if (perPositionHeight && vertexFormat.normal) {
|
575
|
+
const normals = topGeo.attributes.normal.values;
|
576
|
+
topGeo.attributes.normal.values = new Float32Array(
|
577
|
+
topBottomPositions.length
|
578
|
+
);
|
579
|
+
topGeo.attributes.normal.values.set(normals);
|
580
|
+
}
|
581
|
+
if (vertexFormat.st && defined_default(textureCoordinates)) {
|
582
|
+
const texcoords = topGeo.attributes.st.values;
|
583
|
+
topGeo.attributes.st.values = new Float32Array(numPositions * 2);
|
584
|
+
topGeo.attributes.st.values = texcoords.concat(texcoords);
|
585
|
+
}
|
586
|
+
topGeo.indices = newIndices;
|
587
|
+
} else if (closeBottom) {
|
588
|
+
numPositions = edgePoints.length / 3;
|
589
|
+
newIndices = IndexDatatype_default.createTypedArray(numPositions, indices.length);
|
590
|
+
for (i = 0; i < indices.length; i += 3) {
|
591
|
+
newIndices[i] = indices[i + 2];
|
592
|
+
newIndices[i + 1] = indices[i + 1];
|
593
|
+
newIndices[i + 2] = indices[i];
|
594
|
+
}
|
595
|
+
topGeo.indices = newIndices;
|
515
596
|
}
|
597
|
+
geos.topAndBottom = new GeometryInstance_default({
|
598
|
+
geometry: topGeo
|
599
|
+
});
|
516
600
|
}
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
601
|
+
let outerRing = hierarchy.outerRing;
|
602
|
+
let tangentPlane = EllipsoidTangentPlane_default.fromPoints(outerRing, ellipsoid);
|
603
|
+
let positions2D = tangentPlane.projectPointsOntoPlane(
|
604
|
+
outerRing,
|
605
|
+
createGeometryFromPositionsExtrudedPositions
|
606
|
+
);
|
607
|
+
let windingOrder = PolygonPipeline_default.computeWindingOrder2D(positions2D);
|
608
|
+
if (windingOrder === WindingOrder_default.CLOCKWISE) {
|
609
|
+
outerRing = outerRing.slice().reverse();
|
610
|
+
}
|
611
|
+
let wallGeo = PolygonGeometryLibrary_default.computeWallGeometry(
|
612
|
+
outerRing,
|
523
613
|
textureCoordinates,
|
614
|
+
ellipsoid,
|
524
615
|
granularity,
|
525
|
-
hierarchy,
|
526
616
|
perPositionHeight,
|
527
|
-
closeTop,
|
528
|
-
closeBottom,
|
529
|
-
vertexFormat,
|
530
617
|
arcType
|
531
|
-
)
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
perPositionHeight,
|
544
|
-
vertexFormat,
|
545
|
-
arcType
|
546
|
-
);
|
547
|
-
|
548
|
-
const edgePoints = topGeo.attributes.position.values;
|
549
|
-
const indices = topGeo.indices;
|
550
|
-
let numPositions;
|
551
|
-
let newIndices;
|
552
|
-
|
553
|
-
if (closeTop && closeBottom) {
|
554
|
-
const topBottomPositions = edgePoints.concat(edgePoints);
|
555
|
-
|
556
|
-
numPositions = topBottomPositions.length / 3;
|
557
|
-
|
558
|
-
newIndices = IndexDatatype.IndexDatatype.createTypedArray(
|
559
|
-
numPositions,
|
560
|
-
indices.length * 2
|
561
|
-
);
|
562
|
-
newIndices.set(indices);
|
563
|
-
const ilength = indices.length;
|
564
|
-
|
565
|
-
const length = numPositions / 2;
|
566
|
-
|
567
|
-
for (i = 0; i < ilength; i += 3) {
|
568
|
-
const i0 = newIndices[i] + length;
|
569
|
-
const i1 = newIndices[i + 1] + length;
|
570
|
-
const i2 = newIndices[i + 2] + length;
|
571
|
-
|
572
|
-
newIndices[i + ilength] = i2;
|
573
|
-
newIndices[i + 1 + ilength] = i1;
|
574
|
-
newIndices[i + 2 + ilength] = i0;
|
575
|
-
}
|
576
|
-
|
577
|
-
topGeo.attributes.position.values = topBottomPositions;
|
578
|
-
if (perPositionHeight && vertexFormat.normal) {
|
579
|
-
const normals = topGeo.attributes.normal.values;
|
580
|
-
topGeo.attributes.normal.values = new Float32Array(
|
581
|
-
topBottomPositions.length
|
582
|
-
);
|
583
|
-
topGeo.attributes.normal.values.set(normals);
|
584
|
-
}
|
585
|
-
|
586
|
-
if (vertexFormat.st && defaultValue.defined(textureCoordinates)) {
|
587
|
-
const texcoords = topGeo.attributes.st.values;
|
588
|
-
topGeo.attributes.st.values = new Float32Array(numPositions * 2);
|
589
|
-
topGeo.attributes.st.values = texcoords.concat(texcoords);
|
590
|
-
}
|
591
|
-
|
592
|
-
topGeo.indices = newIndices;
|
593
|
-
} else if (closeBottom) {
|
594
|
-
numPositions = edgePoints.length / 3;
|
595
|
-
newIndices = IndexDatatype.IndexDatatype.createTypedArray(numPositions, indices.length);
|
596
|
-
|
597
|
-
for (i = 0; i < indices.length; i += 3) {
|
598
|
-
newIndices[i] = indices[i + 2];
|
599
|
-
newIndices[i + 1] = indices[i + 1];
|
600
|
-
newIndices[i + 2] = indices[i];
|
601
|
-
}
|
602
|
-
|
603
|
-
topGeo.indices = newIndices;
|
604
|
-
}
|
605
|
-
|
606
|
-
geos.topAndBottom = new GeometryInstance.GeometryInstance({
|
607
|
-
geometry: topGeo,
|
608
|
-
});
|
609
|
-
}
|
610
|
-
|
611
|
-
let outerRing = hierarchy.outerRing;
|
612
|
-
let tangentPlane = EllipsoidTangentPlane.EllipsoidTangentPlane.fromPoints(outerRing, ellipsoid);
|
613
|
-
let positions2D = tangentPlane.projectPointsOntoPlane(
|
614
|
-
outerRing,
|
618
|
+
);
|
619
|
+
geos.walls.push(
|
620
|
+
new GeometryInstance_default({
|
621
|
+
geometry: wallGeo
|
622
|
+
})
|
623
|
+
);
|
624
|
+
const holes = hierarchy.holes;
|
625
|
+
for (i = 0; i < holes.length; i++) {
|
626
|
+
let hole = holes[i];
|
627
|
+
tangentPlane = EllipsoidTangentPlane_default.fromPoints(hole, ellipsoid);
|
628
|
+
positions2D = tangentPlane.projectPointsOntoPlane(
|
629
|
+
hole,
|
615
630
|
createGeometryFromPositionsExtrudedPositions
|
616
631
|
);
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
outerRing = outerRing.slice().reverse();
|
632
|
+
windingOrder = PolygonPipeline_default.computeWindingOrder2D(positions2D);
|
633
|
+
if (windingOrder === WindingOrder_default.COUNTER_CLOCKWISE) {
|
634
|
+
hole = hole.slice().reverse();
|
621
635
|
}
|
622
|
-
|
623
|
-
|
624
|
-
outerRing,
|
636
|
+
wallGeo = PolygonGeometryLibrary_default.computeWallGeometry(
|
637
|
+
hole,
|
625
638
|
textureCoordinates,
|
626
639
|
ellipsoid,
|
627
640
|
granularity,
|
@@ -629,792 +642,493 @@ define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', '
|
|
629
642
|
arcType
|
630
643
|
);
|
631
644
|
geos.walls.push(
|
632
|
-
new
|
633
|
-
geometry: wallGeo
|
645
|
+
new GeometryInstance_default({
|
646
|
+
geometry: wallGeo
|
634
647
|
})
|
635
648
|
);
|
636
|
-
|
637
|
-
const holes = hierarchy.holes;
|
638
|
-
for (i = 0; i < holes.length; i++) {
|
639
|
-
let hole = holes[i];
|
640
|
-
|
641
|
-
tangentPlane = EllipsoidTangentPlane.EllipsoidTangentPlane.fromPoints(hole, ellipsoid);
|
642
|
-
positions2D = tangentPlane.projectPointsOntoPlane(
|
643
|
-
hole,
|
644
|
-
createGeometryFromPositionsExtrudedPositions
|
645
|
-
);
|
646
|
-
|
647
|
-
windingOrder = PolygonPipeline.PolygonPipeline.computeWindingOrder2D(positions2D);
|
648
|
-
if (windingOrder === PolygonPipeline.WindingOrder.COUNTER_CLOCKWISE) {
|
649
|
-
hole = hole.slice().reverse();
|
650
|
-
}
|
651
|
-
|
652
|
-
wallGeo = PolygonGeometryLibrary.PolygonGeometryLibrary.computeWallGeometry(
|
653
|
-
hole,
|
654
|
-
textureCoordinates,
|
655
|
-
ellipsoid,
|
656
|
-
granularity,
|
657
|
-
perPositionHeight,
|
658
|
-
arcType
|
659
|
-
);
|
660
|
-
geos.walls.push(
|
661
|
-
new GeometryInstance.GeometryInstance({
|
662
|
-
geometry: wallGeo,
|
663
|
-
})
|
664
|
-
);
|
665
|
-
}
|
666
|
-
|
667
|
-
return geos;
|
668
649
|
}
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
|
678
|
-
* @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
|
679
|
-
* @param {number} [options.extrudedHeight] The distance in meters between the polygon's extruded face and the ellipsoid surface.
|
680
|
-
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
681
|
-
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
682
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
|
683
|
-
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
684
|
-
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
|
685
|
-
* @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
|
686
|
-
* @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
|
687
|
-
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
|
688
|
-
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
|
689
|
-
*
|
690
|
-
* @see PolygonGeometry#createGeometry
|
691
|
-
* @see PolygonGeometry#fromPositions
|
692
|
-
*
|
693
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
|
694
|
-
*
|
695
|
-
* @example
|
696
|
-
* // 1. create a polygon from points
|
697
|
-
* const polygon = new Cesium.PolygonGeometry({
|
698
|
-
* polygonHierarchy : new Cesium.PolygonHierarchy(
|
699
|
-
* Cesium.Cartesian3.fromDegreesArray([
|
700
|
-
* -72.0, 40.0,
|
701
|
-
* -70.0, 35.0,
|
702
|
-
* -75.0, 30.0,
|
703
|
-
* -70.0, 30.0,
|
704
|
-
* -68.0, 40.0
|
705
|
-
* ])
|
706
|
-
* )
|
707
|
-
* });
|
708
|
-
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
|
709
|
-
*
|
710
|
-
* // 2. create a nested polygon with holes
|
711
|
-
* const polygonWithHole = new Cesium.PolygonGeometry({
|
712
|
-
* polygonHierarchy : new Cesium.PolygonHierarchy(
|
713
|
-
* Cesium.Cartesian3.fromDegreesArray([
|
714
|
-
* -109.0, 30.0,
|
715
|
-
* -95.0, 30.0,
|
716
|
-
* -95.0, 40.0,
|
717
|
-
* -109.0, 40.0
|
718
|
-
* ]),
|
719
|
-
* [new Cesium.PolygonHierarchy(
|
720
|
-
* Cesium.Cartesian3.fromDegreesArray([
|
721
|
-
* -107.0, 31.0,
|
722
|
-
* -107.0, 39.0,
|
723
|
-
* -97.0, 39.0,
|
724
|
-
* -97.0, 31.0
|
725
|
-
* ]),
|
726
|
-
* [new Cesium.PolygonHierarchy(
|
727
|
-
* Cesium.Cartesian3.fromDegreesArray([
|
728
|
-
* -105.0, 33.0,
|
729
|
-
* -99.0, 33.0,
|
730
|
-
* -99.0, 37.0,
|
731
|
-
* -105.0, 37.0
|
732
|
-
* ]),
|
733
|
-
* [new Cesium.PolygonHierarchy(
|
734
|
-
* Cesium.Cartesian3.fromDegreesArray([
|
735
|
-
* -103.0, 34.0,
|
736
|
-
* -101.0, 34.0,
|
737
|
-
* -101.0, 36.0,
|
738
|
-
* -103.0, 36.0
|
739
|
-
* ])
|
740
|
-
* )]
|
741
|
-
* )]
|
742
|
-
* )]
|
743
|
-
* )
|
744
|
-
* });
|
745
|
-
* const geometry = Cesium.PolygonGeometry.createGeometry(polygonWithHole);
|
746
|
-
*
|
747
|
-
* // 3. create extruded polygon
|
748
|
-
* const extrudedPolygon = new Cesium.PolygonGeometry({
|
749
|
-
* polygonHierarchy : new Cesium.PolygonHierarchy(
|
750
|
-
* Cesium.Cartesian3.fromDegreesArray([
|
751
|
-
* -72.0, 40.0,
|
752
|
-
* -70.0, 35.0,
|
753
|
-
* -75.0, 30.0,
|
754
|
-
* -70.0, 30.0,
|
755
|
-
* -68.0, 40.0
|
756
|
-
* ])
|
757
|
-
* ),
|
758
|
-
* extrudedHeight: 300000
|
759
|
-
* });
|
760
|
-
* const geometry = Cesium.PolygonGeometry.createGeometry(extrudedPolygon);
|
761
|
-
*/
|
762
|
-
function PolygonGeometry(options) {
|
763
|
-
//>>includeStart('debug', pragmas.debug);
|
764
|
-
Check.Check.typeOf.object("options", options);
|
765
|
-
Check.Check.typeOf.object("options.polygonHierarchy", options.polygonHierarchy);
|
766
|
-
if (
|
767
|
-
defaultValue.defined(options.perPositionHeight) &&
|
768
|
-
options.perPositionHeight &&
|
769
|
-
defaultValue.defined(options.height)
|
770
|
-
) {
|
771
|
-
throw new Check.DeveloperError(
|
772
|
-
"Cannot use both options.perPositionHeight and options.height"
|
773
|
-
);
|
774
|
-
}
|
775
|
-
if (
|
776
|
-
defaultValue.defined(options.arcType) &&
|
777
|
-
options.arcType !== ArcType.ArcType.GEODESIC &&
|
778
|
-
options.arcType !== ArcType.ArcType.RHUMB
|
779
|
-
) {
|
780
|
-
throw new Check.DeveloperError(
|
781
|
-
"Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB."
|
782
|
-
);
|
783
|
-
}
|
784
|
-
//>>includeEnd('debug');
|
785
|
-
|
786
|
-
const polygonHierarchy = options.polygonHierarchy;
|
787
|
-
const vertexFormat = defaultValue.defaultValue(options.vertexFormat, VertexFormat.VertexFormat.DEFAULT);
|
788
|
-
const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
|
789
|
-
const granularity = defaultValue.defaultValue(
|
790
|
-
options.granularity,
|
791
|
-
Math$1.CesiumMath.RADIANS_PER_DEGREE
|
650
|
+
return geos;
|
651
|
+
}
|
652
|
+
function PolygonGeometry(options) {
|
653
|
+
Check_default.typeOf.object("options", options);
|
654
|
+
Check_default.typeOf.object("options.polygonHierarchy", options.polygonHierarchy);
|
655
|
+
if (defined_default(options.perPositionHeight) && options.perPositionHeight && defined_default(options.height)) {
|
656
|
+
throw new DeveloperError_default(
|
657
|
+
"Cannot use both options.perPositionHeight and options.height"
|
792
658
|
);
|
793
|
-
const stRotation = defaultValue.defaultValue(options.stRotation, 0.0);
|
794
|
-
const textureCoordinates = options.textureCoordinates;
|
795
|
-
const perPositionHeight = defaultValue.defaultValue(options.perPositionHeight, false);
|
796
|
-
const perPositionHeightExtrude =
|
797
|
-
perPositionHeight && defaultValue.defined(options.extrudedHeight);
|
798
|
-
let height = defaultValue.defaultValue(options.height, 0.0);
|
799
|
-
let extrudedHeight = defaultValue.defaultValue(options.extrudedHeight, height);
|
800
|
-
|
801
|
-
if (!perPositionHeightExtrude) {
|
802
|
-
const h = Math.max(height, extrudedHeight);
|
803
|
-
extrudedHeight = Math.min(height, extrudedHeight);
|
804
|
-
height = h;
|
805
|
-
}
|
806
|
-
|
807
|
-
this._vertexFormat = VertexFormat.VertexFormat.clone(vertexFormat);
|
808
|
-
this._ellipsoid = Matrix3.Ellipsoid.clone(ellipsoid);
|
809
|
-
this._granularity = granularity;
|
810
|
-
this._stRotation = stRotation;
|
811
|
-
this._height = height;
|
812
|
-
this._extrudedHeight = extrudedHeight;
|
813
|
-
this._closeTop = defaultValue.defaultValue(options.closeTop, true);
|
814
|
-
this._closeBottom = defaultValue.defaultValue(options.closeBottom, true);
|
815
|
-
this._polygonHierarchy = polygonHierarchy;
|
816
|
-
this._perPositionHeight = perPositionHeight;
|
817
|
-
this._perPositionHeightExtrude = perPositionHeightExtrude;
|
818
|
-
this._shadowVolume = defaultValue.defaultValue(options.shadowVolume, false);
|
819
|
-
this._workerName = "createPolygonGeometry";
|
820
|
-
this._offsetAttribute = options.offsetAttribute;
|
821
|
-
this._arcType = defaultValue.defaultValue(options.arcType, ArcType.ArcType.GEODESIC);
|
822
|
-
|
823
|
-
this._rectangle = undefined;
|
824
|
-
this._textureCoordinateRotationPoints = undefined;
|
825
|
-
this._textureCoordinates = textureCoordinates;
|
826
|
-
|
827
|
-
/**
|
828
|
-
* The number of elements used to pack the object into an array.
|
829
|
-
* @type {number}
|
830
|
-
*/
|
831
|
-
this.packedLength =
|
832
|
-
PolygonGeometryLibrary.PolygonGeometryLibrary.computeHierarchyPackedLength(
|
833
|
-
polygonHierarchy,
|
834
|
-
Matrix3.Cartesian3
|
835
|
-
) +
|
836
|
-
Matrix3.Ellipsoid.packedLength +
|
837
|
-
VertexFormat.VertexFormat.packedLength +
|
838
|
-
(textureCoordinates
|
839
|
-
? PolygonGeometryLibrary.PolygonGeometryLibrary.computeHierarchyPackedLength(
|
840
|
-
textureCoordinates,
|
841
|
-
Matrix2.Cartesian2
|
842
|
-
)
|
843
|
-
: 1) +
|
844
|
-
12;
|
845
659
|
}
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
*
|
850
|
-
* @param {object} options Object with the following properties:
|
851
|
-
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
|
852
|
-
* @param {number} [options.height=0.0] The height of the polygon.
|
853
|
-
* @param {number} [options.extrudedHeight] The height of the polygon extrusion.
|
854
|
-
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
855
|
-
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
856
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
|
857
|
-
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
858
|
-
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
|
859
|
-
* @param {boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
|
860
|
-
* @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
|
861
|
-
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
|
862
|
-
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
|
863
|
-
* @returns {PolygonGeometry}
|
864
|
-
*
|
865
|
-
* @example
|
866
|
-
* // create a polygon from points
|
867
|
-
* const polygon = Cesium.PolygonGeometry.fromPositions({
|
868
|
-
* positions : Cesium.Cartesian3.fromDegreesArray([
|
869
|
-
* -72.0, 40.0,
|
870
|
-
* -70.0, 35.0,
|
871
|
-
* -75.0, 30.0,
|
872
|
-
* -70.0, 30.0,
|
873
|
-
* -68.0, 40.0
|
874
|
-
* ])
|
875
|
-
* });
|
876
|
-
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
|
877
|
-
*
|
878
|
-
* @see PolygonGeometry#createGeometry
|
879
|
-
*/
|
880
|
-
PolygonGeometry.fromPositions = function (options) {
|
881
|
-
options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
|
882
|
-
|
883
|
-
//>>includeStart('debug', pragmas.debug);
|
884
|
-
Check.Check.defined("options.positions", options.positions);
|
885
|
-
//>>includeEnd('debug');
|
886
|
-
|
887
|
-
const newOptions = {
|
888
|
-
polygonHierarchy: {
|
889
|
-
positions: options.positions,
|
890
|
-
},
|
891
|
-
height: options.height,
|
892
|
-
extrudedHeight: options.extrudedHeight,
|
893
|
-
vertexFormat: options.vertexFormat,
|
894
|
-
stRotation: options.stRotation,
|
895
|
-
ellipsoid: options.ellipsoid,
|
896
|
-
granularity: options.granularity,
|
897
|
-
perPositionHeight: options.perPositionHeight,
|
898
|
-
closeTop: options.closeTop,
|
899
|
-
closeBottom: options.closeBottom,
|
900
|
-
offsetAttribute: options.offsetAttribute,
|
901
|
-
arcType: options.arcType,
|
902
|
-
textureCoordinates: options.textureCoordinates,
|
903
|
-
};
|
904
|
-
return new PolygonGeometry(newOptions);
|
905
|
-
};
|
906
|
-
|
907
|
-
/**
|
908
|
-
* Stores the provided instance into the provided array.
|
909
|
-
*
|
910
|
-
* @param {PolygonGeometry} value The value to pack.
|
911
|
-
* @param {number[]} array The array to pack into.
|
912
|
-
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
|
913
|
-
*
|
914
|
-
* @returns {number[]} The array that was packed into
|
915
|
-
*/
|
916
|
-
PolygonGeometry.pack = function (value, array, startingIndex) {
|
917
|
-
//>>includeStart('debug', pragmas.debug);
|
918
|
-
Check.Check.typeOf.object("value", value);
|
919
|
-
Check.Check.defined("array", array);
|
920
|
-
//>>includeEnd('debug');
|
921
|
-
|
922
|
-
startingIndex = defaultValue.defaultValue(startingIndex, 0);
|
923
|
-
|
924
|
-
startingIndex = PolygonGeometryLibrary.PolygonGeometryLibrary.packPolygonHierarchy(
|
925
|
-
value._polygonHierarchy,
|
926
|
-
array,
|
927
|
-
startingIndex,
|
928
|
-
Matrix3.Cartesian3
|
660
|
+
if (defined_default(options.arcType) && options.arcType !== ArcType_default.GEODESIC && options.arcType !== ArcType_default.RHUMB) {
|
661
|
+
throw new DeveloperError_default(
|
662
|
+
"Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB."
|
929
663
|
);
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
664
|
+
}
|
665
|
+
const polygonHierarchy = options.polygonHierarchy;
|
666
|
+
const vertexFormat = defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT);
|
667
|
+
const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84);
|
668
|
+
const granularity = defaultValue_default(
|
669
|
+
options.granularity,
|
670
|
+
Math_default.RADIANS_PER_DEGREE
|
671
|
+
);
|
672
|
+
const stRotation = defaultValue_default(options.stRotation, 0);
|
673
|
+
const textureCoordinates = options.textureCoordinates;
|
674
|
+
const perPositionHeight = defaultValue_default(options.perPositionHeight, false);
|
675
|
+
const perPositionHeightExtrude = perPositionHeight && defined_default(options.extrudedHeight);
|
676
|
+
let height = defaultValue_default(options.height, 0);
|
677
|
+
let extrudedHeight = defaultValue_default(options.extrudedHeight, height);
|
678
|
+
if (!perPositionHeightExtrude) {
|
679
|
+
const h = Math.max(height, extrudedHeight);
|
680
|
+
extrudedHeight = Math.min(height, extrudedHeight);
|
681
|
+
height = h;
|
682
|
+
}
|
683
|
+
this._vertexFormat = VertexFormat_default.clone(vertexFormat);
|
684
|
+
this._ellipsoid = Ellipsoid_default.clone(ellipsoid);
|
685
|
+
this._granularity = granularity;
|
686
|
+
this._stRotation = stRotation;
|
687
|
+
this._height = height;
|
688
|
+
this._extrudedHeight = extrudedHeight;
|
689
|
+
this._closeTop = defaultValue_default(options.closeTop, true);
|
690
|
+
this._closeBottom = defaultValue_default(options.closeBottom, true);
|
691
|
+
this._polygonHierarchy = polygonHierarchy;
|
692
|
+
this._perPositionHeight = perPositionHeight;
|
693
|
+
this._perPositionHeightExtrude = perPositionHeightExtrude;
|
694
|
+
this._shadowVolume = defaultValue_default(options.shadowVolume, false);
|
695
|
+
this._workerName = "createPolygonGeometry";
|
696
|
+
this._offsetAttribute = options.offsetAttribute;
|
697
|
+
this._arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
|
698
|
+
this._rectangle = void 0;
|
699
|
+
this._textureCoordinateRotationPoints = void 0;
|
700
|
+
this._textureCoordinates = textureCoordinates;
|
701
|
+
this.packedLength = PolygonGeometryLibrary_default.computeHierarchyPackedLength(
|
702
|
+
polygonHierarchy,
|
703
|
+
Cartesian3_default
|
704
|
+
) + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + (textureCoordinates ? PolygonGeometryLibrary_default.computeHierarchyPackedLength(
|
705
|
+
textureCoordinates,
|
706
|
+
Cartesian2_default
|
707
|
+
) : 1) + 12;
|
708
|
+
}
|
709
|
+
PolygonGeometry.fromPositions = function(options) {
|
710
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
711
|
+
Check_default.defined("options.positions", options.positions);
|
712
|
+
const newOptions = {
|
713
|
+
polygonHierarchy: {
|
714
|
+
positions: options.positions
|
715
|
+
},
|
716
|
+
height: options.height,
|
717
|
+
extrudedHeight: options.extrudedHeight,
|
718
|
+
vertexFormat: options.vertexFormat,
|
719
|
+
stRotation: options.stRotation,
|
720
|
+
ellipsoid: options.ellipsoid,
|
721
|
+
granularity: options.granularity,
|
722
|
+
perPositionHeight: options.perPositionHeight,
|
723
|
+
closeTop: options.closeTop,
|
724
|
+
closeBottom: options.closeBottom,
|
725
|
+
offsetAttribute: options.offsetAttribute,
|
726
|
+
arcType: options.arcType,
|
727
|
+
textureCoordinates: options.textureCoordinates
|
968
728
|
};
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
729
|
+
return new PolygonGeometry(newOptions);
|
730
|
+
};
|
731
|
+
PolygonGeometry.pack = function(value, array, startingIndex) {
|
732
|
+
Check_default.typeOf.object("value", value);
|
733
|
+
Check_default.defined("array", array);
|
734
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
735
|
+
startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
|
736
|
+
value._polygonHierarchy,
|
737
|
+
array,
|
738
|
+
startingIndex,
|
739
|
+
Cartesian3_default
|
740
|
+
);
|
741
|
+
Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
|
742
|
+
startingIndex += Ellipsoid_default.packedLength;
|
743
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
744
|
+
startingIndex += VertexFormat_default.packedLength;
|
745
|
+
array[startingIndex++] = value._height;
|
746
|
+
array[startingIndex++] = value._extrudedHeight;
|
747
|
+
array[startingIndex++] = value._granularity;
|
748
|
+
array[startingIndex++] = value._stRotation;
|
749
|
+
array[startingIndex++] = value._perPositionHeightExtrude ? 1 : 0;
|
750
|
+
array[startingIndex++] = value._perPositionHeight ? 1 : 0;
|
751
|
+
array[startingIndex++] = value._closeTop ? 1 : 0;
|
752
|
+
array[startingIndex++] = value._closeBottom ? 1 : 0;
|
753
|
+
array[startingIndex++] = value._shadowVolume ? 1 : 0;
|
754
|
+
array[startingIndex++] = defaultValue_default(value._offsetAttribute, -1);
|
755
|
+
array[startingIndex++] = value._arcType;
|
756
|
+
if (defined_default(value._textureCoordinates)) {
|
757
|
+
startingIndex = PolygonGeometryLibrary_default.packPolygonHierarchy(
|
758
|
+
value._textureCoordinates,
|
985
759
|
array,
|
986
760
|
startingIndex,
|
987
|
-
|
761
|
+
Cartesian2_default
|
988
762
|
);
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
763
|
+
} else {
|
764
|
+
array[startingIndex++] = -1;
|
765
|
+
}
|
766
|
+
array[startingIndex++] = value.packedLength;
|
767
|
+
return array;
|
768
|
+
};
|
769
|
+
var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
|
770
|
+
var scratchVertexFormat = new VertexFormat_default();
|
771
|
+
var dummyOptions = {
|
772
|
+
polygonHierarchy: {}
|
773
|
+
};
|
774
|
+
PolygonGeometry.unpack = function(array, startingIndex, result) {
|
775
|
+
Check_default.defined("array", array);
|
776
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
777
|
+
const polygonHierarchy = PolygonGeometryLibrary_default.unpackPolygonHierarchy(
|
778
|
+
array,
|
779
|
+
startingIndex,
|
780
|
+
Cartesian3_default
|
781
|
+
);
|
782
|
+
startingIndex = polygonHierarchy.startingIndex;
|
783
|
+
delete polygonHierarchy.startingIndex;
|
784
|
+
const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
|
785
|
+
startingIndex += Ellipsoid_default.packedLength;
|
786
|
+
const vertexFormat = VertexFormat_default.unpack(
|
787
|
+
array,
|
788
|
+
startingIndex,
|
789
|
+
scratchVertexFormat
|
790
|
+
);
|
791
|
+
startingIndex += VertexFormat_default.packedLength;
|
792
|
+
const height = array[startingIndex++];
|
793
|
+
const extrudedHeight = array[startingIndex++];
|
794
|
+
const granularity = array[startingIndex++];
|
795
|
+
const stRotation = array[startingIndex++];
|
796
|
+
const perPositionHeightExtrude = array[startingIndex++] === 1;
|
797
|
+
const perPositionHeight = array[startingIndex++] === 1;
|
798
|
+
const closeTop = array[startingIndex++] === 1;
|
799
|
+
const closeBottom = array[startingIndex++] === 1;
|
800
|
+
const shadowVolume = array[startingIndex++] === 1;
|
801
|
+
const offsetAttribute = array[startingIndex++];
|
802
|
+
const arcType = array[startingIndex++];
|
803
|
+
const textureCoordinates = array[startingIndex] === -1 ? void 0 : PolygonGeometryLibrary_default.unpackPolygonHierarchy(
|
804
|
+
array,
|
805
|
+
startingIndex,
|
806
|
+
Cartesian2_default
|
807
|
+
);
|
808
|
+
if (defined_default(textureCoordinates)) {
|
809
|
+
startingIndex = textureCoordinates.startingIndex;
|
810
|
+
delete textureCoordinates.startingIndex;
|
811
|
+
} else {
|
812
|
+
startingIndex++;
|
813
|
+
}
|
814
|
+
const packedLength = array[startingIndex++];
|
815
|
+
if (!defined_default(result)) {
|
816
|
+
result = new PolygonGeometry(dummyOptions);
|
817
|
+
}
|
818
|
+
result._polygonHierarchy = polygonHierarchy;
|
819
|
+
result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
|
820
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
821
|
+
result._height = height;
|
822
|
+
result._extrudedHeight = extrudedHeight;
|
823
|
+
result._granularity = granularity;
|
824
|
+
result._stRotation = stRotation;
|
825
|
+
result._perPositionHeightExtrude = perPositionHeightExtrude;
|
826
|
+
result._perPositionHeight = perPositionHeight;
|
827
|
+
result._closeTop = closeTop;
|
828
|
+
result._closeBottom = closeBottom;
|
829
|
+
result._shadowVolume = shadowVolume;
|
830
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
831
|
+
result._arcType = arcType;
|
832
|
+
result._textureCoordinates = textureCoordinates;
|
833
|
+
result.packedLength = packedLength;
|
834
|
+
return result;
|
835
|
+
};
|
836
|
+
PolygonGeometry.computeRectangle = function(options, result) {
|
837
|
+
Check_default.typeOf.object("options", options);
|
838
|
+
Check_default.typeOf.object("options.polygonHierarchy", options.polygonHierarchy);
|
839
|
+
const granularity = defaultValue_default(
|
840
|
+
options.granularity,
|
841
|
+
Math_default.RADIANS_PER_DEGREE
|
842
|
+
);
|
843
|
+
const arcType = defaultValue_default(options.arcType, ArcType_default.GEODESIC);
|
844
|
+
if (arcType !== ArcType_default.GEODESIC && arcType !== ArcType_default.RHUMB) {
|
845
|
+
throw new DeveloperError_default(
|
846
|
+
"Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB."
|
999
847
|
);
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
result._closeTop = closeTop;
|
1043
|
-
result._closeBottom = closeBottom;
|
1044
|
-
result._shadowVolume = shadowVolume;
|
1045
|
-
result._offsetAttribute =
|
1046
|
-
offsetAttribute === -1 ? undefined : offsetAttribute;
|
1047
|
-
result._arcType = arcType;
|
1048
|
-
result._textureCoordinates = textureCoordinates;
|
1049
|
-
result.packedLength = packedLength;
|
1050
|
-
|
1051
|
-
return result;
|
848
|
+
}
|
849
|
+
const polygonHierarchy = options.polygonHierarchy;
|
850
|
+
const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84);
|
851
|
+
return computeRectangle(
|
852
|
+
polygonHierarchy.positions,
|
853
|
+
ellipsoid,
|
854
|
+
arcType,
|
855
|
+
granularity,
|
856
|
+
result
|
857
|
+
);
|
858
|
+
};
|
859
|
+
PolygonGeometry.createGeometry = function(polygonGeometry) {
|
860
|
+
const vertexFormat = polygonGeometry._vertexFormat;
|
861
|
+
const ellipsoid = polygonGeometry._ellipsoid;
|
862
|
+
const granularity = polygonGeometry._granularity;
|
863
|
+
const stRotation = polygonGeometry._stRotation;
|
864
|
+
const polygonHierarchy = polygonGeometry._polygonHierarchy;
|
865
|
+
const perPositionHeight = polygonGeometry._perPositionHeight;
|
866
|
+
const closeTop = polygonGeometry._closeTop;
|
867
|
+
const closeBottom = polygonGeometry._closeBottom;
|
868
|
+
const arcType = polygonGeometry._arcType;
|
869
|
+
const textureCoordinates = polygonGeometry._textureCoordinates;
|
870
|
+
const hasTextureCoordinates = defined_default(textureCoordinates);
|
871
|
+
let outerPositions = polygonHierarchy.positions;
|
872
|
+
if (outerPositions.length < 3) {
|
873
|
+
return;
|
874
|
+
}
|
875
|
+
const tangentPlane = EllipsoidTangentPlane_default.fromPoints(
|
876
|
+
outerPositions,
|
877
|
+
ellipsoid
|
878
|
+
);
|
879
|
+
const results = PolygonGeometryLibrary_default.polygonsFromHierarchy(
|
880
|
+
polygonHierarchy,
|
881
|
+
hasTextureCoordinates,
|
882
|
+
tangentPlane.projectPointsOntoPlane.bind(tangentPlane),
|
883
|
+
!perPositionHeight,
|
884
|
+
ellipsoid
|
885
|
+
);
|
886
|
+
const hierarchy = results.hierarchy;
|
887
|
+
const polygons = results.polygons;
|
888
|
+
const dummyFunction = function(identity) {
|
889
|
+
return identity;
|
1052
890
|
};
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
return computeRectangle(
|
1089
|
-
polygonHierarchy.positions,
|
1090
|
-
ellipsoid,
|
1091
|
-
arcType,
|
1092
|
-
granularity,
|
1093
|
-
result
|
1094
|
-
);
|
891
|
+
const textureCoordinatePolygons = hasTextureCoordinates ? PolygonGeometryLibrary_default.polygonsFromHierarchy(
|
892
|
+
textureCoordinates,
|
893
|
+
true,
|
894
|
+
dummyFunction,
|
895
|
+
false
|
896
|
+
).polygons : void 0;
|
897
|
+
if (hierarchy.length === 0) {
|
898
|
+
return;
|
899
|
+
}
|
900
|
+
outerPositions = hierarchy[0].outerRing;
|
901
|
+
const boundingRectangle = PolygonGeometryLibrary_default.computeBoundingRectangle(
|
902
|
+
tangentPlane.plane.normal,
|
903
|
+
tangentPlane.projectPointOntoPlane.bind(tangentPlane),
|
904
|
+
outerPositions,
|
905
|
+
stRotation,
|
906
|
+
scratchBoundingRectangle
|
907
|
+
);
|
908
|
+
const geometries = [];
|
909
|
+
const height = polygonGeometry._height;
|
910
|
+
const extrudedHeight = polygonGeometry._extrudedHeight;
|
911
|
+
const extrude = polygonGeometry._perPositionHeightExtrude || !Math_default.equalsEpsilon(height, extrudedHeight, 0, Math_default.EPSILON2);
|
912
|
+
const options = {
|
913
|
+
perPositionHeight,
|
914
|
+
vertexFormat,
|
915
|
+
geometry: void 0,
|
916
|
+
tangentPlane,
|
917
|
+
boundingRectangle,
|
918
|
+
ellipsoid,
|
919
|
+
stRotation,
|
920
|
+
textureCoordinates: void 0,
|
921
|
+
bottom: false,
|
922
|
+
top: true,
|
923
|
+
wall: false,
|
924
|
+
extrude: false,
|
925
|
+
arcType
|
1095
926
|
};
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
)
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
927
|
+
let i;
|
928
|
+
if (extrude) {
|
929
|
+
options.extrude = true;
|
930
|
+
options.top = closeTop;
|
931
|
+
options.bottom = closeBottom;
|
932
|
+
options.shadowVolume = polygonGeometry._shadowVolume;
|
933
|
+
options.offsetAttribute = polygonGeometry._offsetAttribute;
|
934
|
+
for (i = 0; i < polygons.length; i++) {
|
935
|
+
const splitGeometry = createGeometryFromPositionsExtruded(
|
936
|
+
ellipsoid,
|
937
|
+
polygons[i],
|
938
|
+
hasTextureCoordinates ? textureCoordinatePolygons[i] : void 0,
|
939
|
+
granularity,
|
940
|
+
hierarchy[i],
|
941
|
+
perPositionHeight,
|
942
|
+
closeTop,
|
943
|
+
closeBottom,
|
944
|
+
vertexFormat,
|
945
|
+
arcType
|
946
|
+
);
|
947
|
+
let topAndBottom;
|
948
|
+
if (closeTop && closeBottom) {
|
949
|
+
topAndBottom = splitGeometry.topAndBottom;
|
950
|
+
options.geometry = PolygonGeometryLibrary_default.scaleToGeodeticHeightExtruded(
|
951
|
+
topAndBottom.geometry,
|
952
|
+
height,
|
953
|
+
extrudedHeight,
|
954
|
+
ellipsoid,
|
955
|
+
perPositionHeight
|
956
|
+
);
|
957
|
+
} else if (closeTop) {
|
958
|
+
topAndBottom = splitGeometry.topAndBottom;
|
959
|
+
topAndBottom.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
|
960
|
+
topAndBottom.geometry.attributes.position.values,
|
961
|
+
height,
|
962
|
+
ellipsoid,
|
963
|
+
!perPositionHeight
|
964
|
+
);
|
965
|
+
options.geometry = topAndBottom.geometry;
|
966
|
+
} else if (closeBottom) {
|
967
|
+
topAndBottom = splitGeometry.topAndBottom;
|
968
|
+
topAndBottom.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
|
969
|
+
topAndBottom.geometry.attributes.position.values,
|
970
|
+
extrudedHeight,
|
971
|
+
ellipsoid,
|
972
|
+
true
|
973
|
+
);
|
974
|
+
options.geometry = topAndBottom.geometry;
|
975
|
+
}
|
976
|
+
if (closeTop || closeBottom) {
|
977
|
+
options.wall = false;
|
978
|
+
topAndBottom.geometry = computeAttributes(options);
|
979
|
+
geometries.push(topAndBottom);
|
980
|
+
}
|
981
|
+
const walls = splitGeometry.walls;
|
982
|
+
options.wall = true;
|
983
|
+
for (let k = 0; k < walls.length; k++) {
|
984
|
+
const wall = walls[k];
|
985
|
+
options.geometry = PolygonGeometryLibrary_default.scaleToGeodeticHeightExtruded(
|
986
|
+
wall.geometry,
|
987
|
+
height,
|
988
|
+
extrudedHeight,
|
989
|
+
ellipsoid,
|
990
|
+
perPositionHeight
|
991
|
+
);
|
992
|
+
wall.geometry = computeAttributes(options);
|
993
|
+
geometries.push(wall);
|
994
|
+
}
|
1153
995
|
}
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
tangentPlane.projectPointOntoPlane.bind(tangentPlane),
|
1159
|
-
outerPositions,
|
1160
|
-
stRotation,
|
1161
|
-
scratchBoundingRectangle
|
1162
|
-
);
|
1163
|
-
|
1164
|
-
const geometries = [];
|
1165
|
-
|
1166
|
-
const height = polygonGeometry._height;
|
1167
|
-
const extrudedHeight = polygonGeometry._extrudedHeight;
|
1168
|
-
const extrude =
|
1169
|
-
polygonGeometry._perPositionHeightExtrude ||
|
1170
|
-
!Math$1.CesiumMath.equalsEpsilon(height, extrudedHeight, 0, Math$1.CesiumMath.EPSILON2);
|
1171
|
-
|
1172
|
-
const options = {
|
1173
|
-
perPositionHeight: perPositionHeight,
|
1174
|
-
vertexFormat: vertexFormat,
|
1175
|
-
geometry: undefined,
|
1176
|
-
tangentPlane: tangentPlane,
|
1177
|
-
boundingRectangle: boundingRectangle,
|
1178
|
-
ellipsoid: ellipsoid,
|
1179
|
-
stRotation: stRotation,
|
1180
|
-
textureCoordinates: undefined,
|
1181
|
-
bottom: false,
|
1182
|
-
top: true,
|
1183
|
-
wall: false,
|
1184
|
-
extrude: false,
|
1185
|
-
arcType: arcType,
|
1186
|
-
};
|
1187
|
-
|
1188
|
-
let i;
|
1189
|
-
|
1190
|
-
if (extrude) {
|
1191
|
-
options.extrude = true;
|
1192
|
-
options.top = closeTop;
|
1193
|
-
options.bottom = closeBottom;
|
1194
|
-
options.shadowVolume = polygonGeometry._shadowVolume;
|
1195
|
-
options.offsetAttribute = polygonGeometry._offsetAttribute;
|
1196
|
-
for (i = 0; i < polygons.length; i++) {
|
1197
|
-
const splitGeometry = createGeometryFromPositionsExtruded(
|
996
|
+
} else {
|
997
|
+
for (i = 0; i < polygons.length; i++) {
|
998
|
+
const geometryInstance = new GeometryInstance_default({
|
999
|
+
geometry: PolygonGeometryLibrary_default.createGeometryFromPositions(
|
1198
1000
|
ellipsoid,
|
1199
1001
|
polygons[i],
|
1200
|
-
hasTextureCoordinates ? textureCoordinatePolygons[i] :
|
1002
|
+
hasTextureCoordinates ? textureCoordinatePolygons[i] : void 0,
|
1201
1003
|
granularity,
|
1202
|
-
hierarchy[i],
|
1203
1004
|
perPositionHeight,
|
1204
|
-
closeTop,
|
1205
|
-
closeBottom,
|
1206
1005
|
vertexFormat,
|
1207
1006
|
arcType
|
1007
|
+
)
|
1008
|
+
});
|
1009
|
+
geometryInstance.geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
|
1010
|
+
geometryInstance.geometry.attributes.position.values,
|
1011
|
+
height,
|
1012
|
+
ellipsoid,
|
1013
|
+
!perPositionHeight
|
1014
|
+
);
|
1015
|
+
options.geometry = geometryInstance.geometry;
|
1016
|
+
geometryInstance.geometry = computeAttributes(options);
|
1017
|
+
if (defined_default(polygonGeometry._offsetAttribute)) {
|
1018
|
+
const length = geometryInstance.geometry.attributes.position.values.length;
|
1019
|
+
const offsetValue = polygonGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
1020
|
+
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
1021
|
+
geometryInstance.geometry.attributes.applyOffset = new GeometryAttribute_default(
|
1022
|
+
{
|
1023
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
1024
|
+
componentsPerAttribute: 1,
|
1025
|
+
values: applyOffset
|
1026
|
+
}
|
1208
1027
|
);
|
1209
|
-
|
1210
|
-
let topAndBottom;
|
1211
|
-
if (closeTop && closeBottom) {
|
1212
|
-
topAndBottom = splitGeometry.topAndBottom;
|
1213
|
-
options.geometry = PolygonGeometryLibrary.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(
|
1214
|
-
topAndBottom.geometry,
|
1215
|
-
height,
|
1216
|
-
extrudedHeight,
|
1217
|
-
ellipsoid,
|
1218
|
-
perPositionHeight
|
1219
|
-
);
|
1220
|
-
} else if (closeTop) {
|
1221
|
-
topAndBottom = splitGeometry.topAndBottom;
|
1222
|
-
topAndBottom.geometry.attributes.position.values = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
1223
|
-
topAndBottom.geometry.attributes.position.values,
|
1224
|
-
height,
|
1225
|
-
ellipsoid,
|
1226
|
-
!perPositionHeight
|
1227
|
-
);
|
1228
|
-
options.geometry = topAndBottom.geometry;
|
1229
|
-
} else if (closeBottom) {
|
1230
|
-
topAndBottom = splitGeometry.topAndBottom;
|
1231
|
-
topAndBottom.geometry.attributes.position.values = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
1232
|
-
topAndBottom.geometry.attributes.position.values,
|
1233
|
-
extrudedHeight,
|
1234
|
-
ellipsoid,
|
1235
|
-
true
|
1236
|
-
);
|
1237
|
-
options.geometry = topAndBottom.geometry;
|
1238
|
-
}
|
1239
|
-
if (closeTop || closeBottom) {
|
1240
|
-
options.wall = false;
|
1241
|
-
topAndBottom.geometry = computeAttributes(options);
|
1242
|
-
geometries.push(topAndBottom);
|
1243
|
-
}
|
1244
|
-
|
1245
|
-
const walls = splitGeometry.walls;
|
1246
|
-
options.wall = true;
|
1247
|
-
for (let k = 0; k < walls.length; k++) {
|
1248
|
-
const wall = walls[k];
|
1249
|
-
options.geometry = PolygonGeometryLibrary.PolygonGeometryLibrary.scaleToGeodeticHeightExtruded(
|
1250
|
-
wall.geometry,
|
1251
|
-
height,
|
1252
|
-
extrudedHeight,
|
1253
|
-
ellipsoid,
|
1254
|
-
perPositionHeight
|
1255
|
-
);
|
1256
|
-
wall.geometry = computeAttributes(options);
|
1257
|
-
geometries.push(wall);
|
1258
|
-
}
|
1259
1028
|
}
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1029
|
+
geometries.push(geometryInstance);
|
1030
|
+
}
|
1031
|
+
}
|
1032
|
+
const geometry = GeometryPipeline_default.combineInstances(geometries)[0];
|
1033
|
+
geometry.attributes.position.values = new Float64Array(
|
1034
|
+
geometry.attributes.position.values
|
1035
|
+
);
|
1036
|
+
geometry.indices = IndexDatatype_default.createTypedArray(
|
1037
|
+
geometry.attributes.position.values.length / 3,
|
1038
|
+
geometry.indices
|
1039
|
+
);
|
1040
|
+
const attributes = geometry.attributes;
|
1041
|
+
const boundingSphere = BoundingSphere_default.fromVertices(
|
1042
|
+
attributes.position.values
|
1043
|
+
);
|
1044
|
+
if (!vertexFormat.position) {
|
1045
|
+
delete attributes.position;
|
1046
|
+
}
|
1047
|
+
return new Geometry_default({
|
1048
|
+
attributes,
|
1049
|
+
indices: geometry.indices,
|
1050
|
+
primitiveType: geometry.primitiveType,
|
1051
|
+
boundingSphere,
|
1052
|
+
offsetAttribute: polygonGeometry._offsetAttribute
|
1053
|
+
});
|
1054
|
+
};
|
1055
|
+
PolygonGeometry.createShadowVolume = function(polygonGeometry, minHeightFunc, maxHeightFunc) {
|
1056
|
+
const granularity = polygonGeometry._granularity;
|
1057
|
+
const ellipsoid = polygonGeometry._ellipsoid;
|
1058
|
+
const minHeight = minHeightFunc(granularity, ellipsoid);
|
1059
|
+
const maxHeight = maxHeightFunc(granularity, ellipsoid);
|
1060
|
+
return new PolygonGeometry({
|
1061
|
+
polygonHierarchy: polygonGeometry._polygonHierarchy,
|
1062
|
+
ellipsoid,
|
1063
|
+
stRotation: polygonGeometry._stRotation,
|
1064
|
+
granularity,
|
1065
|
+
perPositionHeight: false,
|
1066
|
+
extrudedHeight: minHeight,
|
1067
|
+
height: maxHeight,
|
1068
|
+
vertexFormat: VertexFormat_default.POSITION_ONLY,
|
1069
|
+
shadowVolume: true,
|
1070
|
+
arcType: polygonGeometry._arcType
|
1071
|
+
});
|
1072
|
+
};
|
1073
|
+
function textureCoordinateRotationPoints(polygonGeometry) {
|
1074
|
+
const stRotation = -polygonGeometry._stRotation;
|
1075
|
+
if (stRotation === 0) {
|
1076
|
+
return [0, 0, 0, 1, 1, 0];
|
1077
|
+
}
|
1078
|
+
const ellipsoid = polygonGeometry._ellipsoid;
|
1079
|
+
const positions = polygonGeometry._polygonHierarchy.positions;
|
1080
|
+
const boundingRectangle = polygonGeometry.rectangle;
|
1081
|
+
return Geometry_default._textureCoordinateRotationPoints(
|
1082
|
+
positions,
|
1083
|
+
stRotation,
|
1084
|
+
ellipsoid,
|
1085
|
+
boundingRectangle
|
1086
|
+
);
|
1087
|
+
}
|
1088
|
+
Object.defineProperties(PolygonGeometry.prototype, {
|
1089
|
+
/**
|
1090
|
+
* @private
|
1091
|
+
*/
|
1092
|
+
rectangle: {
|
1093
|
+
get: function() {
|
1094
|
+
if (!defined_default(this._rectangle)) {
|
1095
|
+
const positions = this._polygonHierarchy.positions;
|
1096
|
+
this._rectangle = computeRectangle(
|
1097
|
+
positions,
|
1098
|
+
this._ellipsoid,
|
1099
|
+
this._arcType,
|
1100
|
+
this._granularity
|
1278
1101
|
);
|
1279
|
-
options.geometry = geometryInstance.geometry;
|
1280
|
-
|
1281
|
-
geometryInstance.geometry = computeAttributes(options);
|
1282
|
-
|
1283
|
-
if (defaultValue.defined(polygonGeometry._offsetAttribute)) {
|
1284
|
-
const length =
|
1285
|
-
geometryInstance.geometry.attributes.position.values.length;
|
1286
|
-
const offsetValue =
|
1287
|
-
polygonGeometry._offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE
|
1288
|
-
? 0
|
1289
|
-
: 1;
|
1290
|
-
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
1291
|
-
geometryInstance.geometry.attributes.applyOffset = new GeometryAttribute.GeometryAttribute(
|
1292
|
-
{
|
1293
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
|
1294
|
-
componentsPerAttribute: 1,
|
1295
|
-
values: applyOffset,
|
1296
|
-
}
|
1297
|
-
);
|
1298
|
-
}
|
1299
|
-
|
1300
|
-
geometries.push(geometryInstance);
|
1301
1102
|
}
|
1103
|
+
return this._rectangle;
|
1302
1104
|
}
|
1303
|
-
|
1304
|
-
const geometry = GeometryPipeline.GeometryPipeline.combineInstances(geometries)[0];
|
1305
|
-
geometry.attributes.position.values = new Float64Array(
|
1306
|
-
geometry.attributes.position.values
|
1307
|
-
);
|
1308
|
-
geometry.indices = IndexDatatype.IndexDatatype.createTypedArray(
|
1309
|
-
geometry.attributes.position.values.length / 3,
|
1310
|
-
geometry.indices
|
1311
|
-
);
|
1312
|
-
|
1313
|
-
const attributes = geometry.attributes;
|
1314
|
-
const boundingSphere = Transforms.BoundingSphere.fromVertices(
|
1315
|
-
attributes.position.values
|
1316
|
-
);
|
1317
|
-
|
1318
|
-
if (!vertexFormat.position) {
|
1319
|
-
delete attributes.position;
|
1320
|
-
}
|
1321
|
-
|
1322
|
-
return new GeometryAttribute.Geometry({
|
1323
|
-
attributes: attributes,
|
1324
|
-
indices: geometry.indices,
|
1325
|
-
primitiveType: geometry.primitiveType,
|
1326
|
-
boundingSphere: boundingSphere,
|
1327
|
-
offsetAttribute: polygonGeometry._offsetAttribute,
|
1328
|
-
});
|
1329
|
-
};
|
1330
|
-
|
1105
|
+
},
|
1331
1106
|
/**
|
1107
|
+
* For remapping texture coordinates when rendering PolygonGeometries as GroundPrimitives.
|
1332
1108
|
* @private
|
1333
1109
|
*/
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
const minHeight = minHeightFunc(granularity, ellipsoid);
|
1343
|
-
const maxHeight = maxHeightFunc(granularity, ellipsoid);
|
1344
|
-
|
1345
|
-
return new PolygonGeometry({
|
1346
|
-
polygonHierarchy: polygonGeometry._polygonHierarchy,
|
1347
|
-
ellipsoid: ellipsoid,
|
1348
|
-
stRotation: polygonGeometry._stRotation,
|
1349
|
-
granularity: granularity,
|
1350
|
-
perPositionHeight: false,
|
1351
|
-
extrudedHeight: minHeight,
|
1352
|
-
height: maxHeight,
|
1353
|
-
vertexFormat: VertexFormat.VertexFormat.POSITION_ONLY,
|
1354
|
-
shadowVolume: true,
|
1355
|
-
arcType: polygonGeometry._arcType,
|
1356
|
-
});
|
1357
|
-
};
|
1358
|
-
|
1359
|
-
function textureCoordinateRotationPoints(polygonGeometry) {
|
1360
|
-
const stRotation = -polygonGeometry._stRotation;
|
1361
|
-
if (stRotation === 0.0) {
|
1362
|
-
return [0, 0, 0, 1, 1, 0];
|
1110
|
+
textureCoordinateRotationPoints: {
|
1111
|
+
get: function() {
|
1112
|
+
if (!defined_default(this._textureCoordinateRotationPoints)) {
|
1113
|
+
this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
|
1114
|
+
this
|
1115
|
+
);
|
1116
|
+
}
|
1117
|
+
return this._textureCoordinateRotationPoints;
|
1363
1118
|
}
|
1364
|
-
const ellipsoid = polygonGeometry._ellipsoid;
|
1365
|
-
const positions = polygonGeometry._polygonHierarchy.positions;
|
1366
|
-
const boundingRectangle = polygonGeometry.rectangle;
|
1367
|
-
return GeometryAttribute.Geometry._textureCoordinateRotationPoints(
|
1368
|
-
positions,
|
1369
|
-
stRotation,
|
1370
|
-
ellipsoid,
|
1371
|
-
boundingRectangle
|
1372
|
-
);
|
1373
1119
|
}
|
1120
|
+
});
|
1121
|
+
var PolygonGeometry_default = PolygonGeometry;
|
1374
1122
|
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
rectangle: {
|
1380
|
-
get: function () {
|
1381
|
-
if (!defaultValue.defined(this._rectangle)) {
|
1382
|
-
const positions = this._polygonHierarchy.positions;
|
1383
|
-
this._rectangle = computeRectangle(
|
1384
|
-
positions,
|
1385
|
-
this._ellipsoid,
|
1386
|
-
this._arcType,
|
1387
|
-
this._granularity
|
1388
|
-
);
|
1389
|
-
}
|
1390
|
-
|
1391
|
-
return this._rectangle;
|
1392
|
-
},
|
1393
|
-
},
|
1394
|
-
/**
|
1395
|
-
* For remapping texture coordinates when rendering PolygonGeometries as GroundPrimitives.
|
1396
|
-
* @private
|
1397
|
-
*/
|
1398
|
-
textureCoordinateRotationPoints: {
|
1399
|
-
get: function () {
|
1400
|
-
if (!defaultValue.defined(this._textureCoordinateRotationPoints)) {
|
1401
|
-
this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
|
1402
|
-
this
|
1403
|
-
);
|
1404
|
-
}
|
1405
|
-
return this._textureCoordinateRotationPoints;
|
1406
|
-
},
|
1407
|
-
},
|
1408
|
-
});
|
1409
|
-
|
1410
|
-
function createPolygonGeometry(polygonGeometry, offset) {
|
1411
|
-
if (defaultValue.defined(offset)) {
|
1412
|
-
polygonGeometry = PolygonGeometry.unpack(polygonGeometry, offset);
|
1413
|
-
}
|
1414
|
-
polygonGeometry._ellipsoid = Matrix3.Ellipsoid.clone(polygonGeometry._ellipsoid);
|
1415
|
-
return PolygonGeometry.createGeometry(polygonGeometry);
|
1123
|
+
// packages/engine/Source/Workers/createPolygonGeometry.js
|
1124
|
+
function createPolygonGeometry(polygonGeometry, offset) {
|
1125
|
+
if (defined_default(offset)) {
|
1126
|
+
polygonGeometry = PolygonGeometry_default.unpack(polygonGeometry, offset);
|
1416
1127
|
}
|
1417
|
-
|
1418
|
-
return
|
1419
|
-
|
1420
|
-
|
1128
|
+
polygonGeometry._ellipsoid = Ellipsoid_default.clone(polygonGeometry._ellipsoid);
|
1129
|
+
return PolygonGeometry_default.createGeometry(polygonGeometry);
|
1130
|
+
}
|
1131
|
+
var createPolygonGeometry_default = createPolygonGeometry;
|
1132
|
+
export {
|
1133
|
+
createPolygonGeometry_default as default
|
1134
|
+
};
|