@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,176 +1,214 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
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
|
+
CorridorGeometryLibrary_default
|
28
|
+
} from "./chunk-C3SXRKRW.js";
|
29
|
+
import {
|
30
|
+
CornerType_default
|
31
|
+
} from "./chunk-V3NGATMV.js";
|
32
|
+
import "./chunk-GLZBE3ML.js";
|
33
|
+
import "./chunk-AFFLIKOH.js";
|
34
|
+
import {
|
35
|
+
GeometryOffsetAttribute_default
|
36
|
+
} from "./chunk-MPAZH4BF.js";
|
37
|
+
import {
|
38
|
+
VertexFormat_default
|
39
|
+
} from "./chunk-QMEMZIJI.js";
|
40
|
+
import "./chunk-RP2A7BR5.js";
|
41
|
+
import "./chunk-2R5O53JW.js";
|
42
|
+
import {
|
43
|
+
PolygonPipeline_default
|
44
|
+
} from "./chunk-J3JY6I2C.js";
|
45
|
+
import {
|
46
|
+
arrayRemoveDuplicates_default
|
47
|
+
} from "./chunk-3W63OHNJ.js";
|
48
|
+
import "./chunk-K36FEYS7.js";
|
49
|
+
import "./chunk-MYZB7C4T.js";
|
50
|
+
import "./chunk-OYFCF4PL.js";
|
51
|
+
import {
|
52
|
+
IndexDatatype_default
|
53
|
+
} from "./chunk-RW6LU2CJ.js";
|
54
|
+
import {
|
55
|
+
GeometryAttributes_default
|
56
|
+
} from "./chunk-EW2GWJYB.js";
|
57
|
+
import {
|
58
|
+
GeometryAttribute_default,
|
59
|
+
Geometry_default,
|
60
|
+
PrimitiveType_default
|
61
|
+
} from "./chunk-X4SU25DT.js";
|
62
|
+
import {
|
63
|
+
BoundingSphere_default
|
64
|
+
} from "./chunk-PFQBCKBM.js";
|
65
|
+
import "./chunk-QJ3DFBH3.js";
|
66
|
+
import {
|
67
|
+
Rectangle_default
|
68
|
+
} from "./chunk-DUHWWBQQ.js";
|
69
|
+
import {
|
70
|
+
ComponentDatatype_default
|
71
|
+
} from "./chunk-LLUNNUJV.js";
|
72
|
+
import {
|
73
|
+
Cartesian3_default,
|
74
|
+
Cartographic_default,
|
75
|
+
Ellipsoid_default
|
76
|
+
} from "./chunk-PCJWUS4M.js";
|
77
|
+
import {
|
78
|
+
Math_default
|
79
|
+
} from "./chunk-N3JIFFX2.js";
|
80
|
+
import "./chunk-AHKEZ2OE.js";
|
81
|
+
import "./chunk-ABADGKYE.js";
|
82
|
+
import {
|
83
|
+
defaultValue_default
|
84
|
+
} from "./chunk-WXTV4ATB.js";
|
85
|
+
import {
|
86
|
+
Check_default
|
87
|
+
} from "./chunk-4MFFIWUA.js";
|
88
|
+
import {
|
89
|
+
defined_default
|
90
|
+
} from "./chunk-6BTKZDRG.js";
|
91
|
+
|
92
|
+
// packages/engine/Source/Core/CorridorGeometry.js
|
93
|
+
var cartesian1 = new Cartesian3_default();
|
94
|
+
var cartesian2 = new Cartesian3_default();
|
95
|
+
var cartesian3 = new Cartesian3_default();
|
96
|
+
var cartesian4 = new Cartesian3_default();
|
97
|
+
var cartesian5 = new Cartesian3_default();
|
98
|
+
var cartesian6 = new Cartesian3_default();
|
99
|
+
var scratch1 = new Cartesian3_default();
|
100
|
+
var scratch2 = new Cartesian3_default();
|
101
|
+
function scaleToSurface(positions, ellipsoid) {
|
102
|
+
for (let i = 0; i < positions.length; i++) {
|
103
|
+
positions[i] = ellipsoid.scaleToGeodeticSurface(positions[i], positions[i]);
|
18
104
|
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
if (vertexFormat.tangent) {
|
32
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(tangents, forward, front, back);
|
33
|
-
}
|
34
|
-
if (vertexFormat.bitangent) {
|
35
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(bitangents, left, front, back);
|
36
|
-
}
|
105
|
+
return positions;
|
106
|
+
}
|
107
|
+
function addNormals(attr, normal, left, front, back, vertexFormat) {
|
108
|
+
const normals = attr.normals;
|
109
|
+
const tangents = attr.tangents;
|
110
|
+
const bitangents = attr.bitangents;
|
111
|
+
const forward = Cartesian3_default.normalize(
|
112
|
+
Cartesian3_default.cross(left, normal, scratch1),
|
113
|
+
scratch1
|
114
|
+
);
|
115
|
+
if (vertexFormat.normal) {
|
116
|
+
CorridorGeometryLibrary_default.addAttribute(normals, normal, front, back);
|
37
117
|
}
|
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
|
-
endPositionLength = endPositions[0].length - 3;
|
78
|
-
leftCount += endPositionLength;
|
79
|
-
rightCount += endPositionLength;
|
80
|
-
endPositionLength /= 3;
|
81
|
-
indicesLength += endPositionLength * 6;
|
82
|
-
}
|
83
|
-
const size = leftCount + rightCount;
|
84
|
-
const finalPositions = new Float64Array(size);
|
85
|
-
const normals = vertexFormat.normal ? new Float32Array(size) : undefined;
|
86
|
-
const tangents = vertexFormat.tangent ? new Float32Array(size) : undefined;
|
87
|
-
const bitangents = vertexFormat.bitangent
|
88
|
-
? new Float32Array(size)
|
89
|
-
: undefined;
|
90
|
-
const attr = {
|
91
|
-
normals: normals,
|
92
|
-
tangents: tangents,
|
93
|
-
bitangents: bitangents,
|
94
|
-
};
|
95
|
-
let front = 0;
|
96
|
-
let back = size - 1;
|
97
|
-
let UL, LL, UR, LR;
|
98
|
-
let normal = cartesian1;
|
99
|
-
let left = cartesian2;
|
100
|
-
let rightPos, leftPos;
|
101
|
-
const halfLength = endPositionLength / 2;
|
102
|
-
|
103
|
-
const indices = IndexDatatype.IndexDatatype.createTypedArray(size / 3, indicesLength);
|
104
|
-
let index = 0;
|
105
|
-
if (addEndPositions) {
|
106
|
-
// add rounded end
|
107
|
-
leftPos = cartesian3;
|
108
|
-
rightPos = cartesian4;
|
109
|
-
const firstEndPositions = endPositions[0];
|
110
|
-
normal = Matrix3.Cartesian3.fromArray(computedNormals, 0, normal);
|
111
|
-
left = Matrix3.Cartesian3.fromArray(computedLefts, 0, left);
|
112
|
-
for (i = 0; i < halfLength; i++) {
|
113
|
-
leftPos = Matrix3.Cartesian3.fromArray(
|
114
|
-
firstEndPositions,
|
115
|
-
(halfLength - 1 - i) * 3,
|
116
|
-
leftPos
|
117
|
-
);
|
118
|
-
rightPos = Matrix3.Cartesian3.fromArray(
|
119
|
-
firstEndPositions,
|
120
|
-
(halfLength + i) * 3,
|
121
|
-
rightPos
|
122
|
-
);
|
123
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(finalPositions, rightPos, front);
|
124
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
125
|
-
finalPositions,
|
126
|
-
leftPos,
|
127
|
-
undefined,
|
128
|
-
back
|
129
|
-
);
|
130
|
-
addNormals(attr, normal, left, front, back, vertexFormat);
|
131
|
-
|
132
|
-
LL = front / 3;
|
133
|
-
LR = LL + 1;
|
134
|
-
UL = (back - 2) / 3;
|
135
|
-
UR = UL - 1;
|
136
|
-
indices[index++] = UL;
|
137
|
-
indices[index++] = LL;
|
138
|
-
indices[index++] = UR;
|
139
|
-
indices[index++] = UR;
|
140
|
-
indices[index++] = LL;
|
141
|
-
indices[index++] = LR;
|
142
|
-
|
143
|
-
front += 3;
|
144
|
-
back -= 3;
|
145
|
-
}
|
118
|
+
if (vertexFormat.tangent) {
|
119
|
+
CorridorGeometryLibrary_default.addAttribute(tangents, forward, front, back);
|
120
|
+
}
|
121
|
+
if (vertexFormat.bitangent) {
|
122
|
+
CorridorGeometryLibrary_default.addAttribute(bitangents, left, front, back);
|
123
|
+
}
|
124
|
+
}
|
125
|
+
function combine(computedPositions, vertexFormat, ellipsoid) {
|
126
|
+
const positions = computedPositions.positions;
|
127
|
+
const corners = computedPositions.corners;
|
128
|
+
const endPositions = computedPositions.endPositions;
|
129
|
+
const computedLefts = computedPositions.lefts;
|
130
|
+
const computedNormals = computedPositions.normals;
|
131
|
+
const attributes = new GeometryAttributes_default();
|
132
|
+
let corner;
|
133
|
+
let leftCount = 0;
|
134
|
+
let rightCount = 0;
|
135
|
+
let i;
|
136
|
+
let indicesLength = 0;
|
137
|
+
let length;
|
138
|
+
for (i = 0; i < positions.length; i += 2) {
|
139
|
+
length = positions[i].length - 3;
|
140
|
+
leftCount += length;
|
141
|
+
indicesLength += length * 2;
|
142
|
+
rightCount += positions[i + 1].length - 3;
|
143
|
+
}
|
144
|
+
leftCount += 3;
|
145
|
+
rightCount += 3;
|
146
|
+
for (i = 0; i < corners.length; i++) {
|
147
|
+
corner = corners[i];
|
148
|
+
const leftSide = corners[i].leftPositions;
|
149
|
+
if (defined_default(leftSide)) {
|
150
|
+
length = leftSide.length;
|
151
|
+
leftCount += length;
|
152
|
+
indicesLength += length;
|
153
|
+
} else {
|
154
|
+
length = corners[i].rightPositions.length;
|
155
|
+
rightCount += length;
|
156
|
+
indicesLength += length;
|
146
157
|
}
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
158
|
+
}
|
159
|
+
const addEndPositions = defined_default(endPositions);
|
160
|
+
let endPositionLength;
|
161
|
+
if (addEndPositions) {
|
162
|
+
endPositionLength = endPositions[0].length - 3;
|
163
|
+
leftCount += endPositionLength;
|
164
|
+
rightCount += endPositionLength;
|
165
|
+
endPositionLength /= 3;
|
166
|
+
indicesLength += endPositionLength * 6;
|
167
|
+
}
|
168
|
+
const size = leftCount + rightCount;
|
169
|
+
const finalPositions = new Float64Array(size);
|
170
|
+
const normals = vertexFormat.normal ? new Float32Array(size) : void 0;
|
171
|
+
const tangents = vertexFormat.tangent ? new Float32Array(size) : void 0;
|
172
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(size) : void 0;
|
173
|
+
const attr = {
|
174
|
+
normals,
|
175
|
+
tangents,
|
176
|
+
bitangents
|
177
|
+
};
|
178
|
+
let front = 0;
|
179
|
+
let back = size - 1;
|
180
|
+
let UL, LL, UR, LR;
|
181
|
+
let normal = cartesian1;
|
182
|
+
let left = cartesian2;
|
183
|
+
let rightPos, leftPos;
|
184
|
+
const halfLength = endPositionLength / 2;
|
185
|
+
const indices = IndexDatatype_default.createTypedArray(size / 3, indicesLength);
|
186
|
+
let index = 0;
|
187
|
+
if (addEndPositions) {
|
188
|
+
leftPos = cartesian3;
|
189
|
+
rightPos = cartesian4;
|
190
|
+
const firstEndPositions = endPositions[0];
|
191
|
+
normal = Cartesian3_default.fromArray(computedNormals, 0, normal);
|
192
|
+
left = Cartesian3_default.fromArray(computedLefts, 0, left);
|
193
|
+
for (i = 0; i < halfLength; i++) {
|
194
|
+
leftPos = Cartesian3_default.fromArray(
|
195
|
+
firstEndPositions,
|
196
|
+
(halfLength - 1 - i) * 3,
|
197
|
+
leftPos
|
163
198
|
);
|
164
|
-
|
165
|
-
|
166
|
-
|
199
|
+
rightPos = Cartesian3_default.fromArray(
|
200
|
+
firstEndPositions,
|
201
|
+
(halfLength + i) * 3,
|
202
|
+
rightPos
|
167
203
|
);
|
168
|
-
|
169
|
-
|
170
|
-
|
204
|
+
CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
|
205
|
+
CorridorGeometryLibrary_default.addAttribute(
|
206
|
+
finalPositions,
|
207
|
+
leftPos,
|
208
|
+
void 0,
|
209
|
+
back
|
171
210
|
);
|
172
211
|
addNormals(attr, normal, left, front, back, vertexFormat);
|
173
|
-
|
174
212
|
LL = front / 3;
|
175
213
|
LR = LL + 1;
|
176
214
|
UL = (back - 2) / 3;
|
@@ -181,1227 +219,1044 @@ define(['./arrayRemoveDuplicates-d2061e85', './Transforms-a2a85221', './Matrix3-
|
|
181
219
|
indices[index++] = UR;
|
182
220
|
indices[index++] = LL;
|
183
221
|
indices[index++] = LR;
|
184
|
-
|
185
222
|
front += 3;
|
186
223
|
back -= 3;
|
187
224
|
}
|
188
|
-
|
225
|
+
}
|
226
|
+
let posIndex = 0;
|
227
|
+
let compIndex = 0;
|
228
|
+
let rightEdge = positions[posIndex++];
|
229
|
+
let leftEdge = positions[posIndex++];
|
230
|
+
finalPositions.set(rightEdge, front);
|
231
|
+
finalPositions.set(leftEdge, back - leftEdge.length + 1);
|
232
|
+
left = Cartesian3_default.fromArray(computedLefts, compIndex, left);
|
233
|
+
let rightNormal;
|
234
|
+
let leftNormal;
|
235
|
+
length = leftEdge.length - 3;
|
236
|
+
for (i = 0; i < length; i += 3) {
|
189
237
|
rightNormal = ellipsoid.geodeticSurfaceNormal(
|
190
|
-
|
238
|
+
Cartesian3_default.fromArray(rightEdge, i, scratch1),
|
191
239
|
scratch1
|
192
240
|
);
|
193
241
|
leftNormal = ellipsoid.geodeticSurfaceNormal(
|
194
|
-
|
242
|
+
Cartesian3_default.fromArray(leftEdge, length - i, scratch2),
|
195
243
|
scratch2
|
196
244
|
);
|
197
|
-
normal =
|
198
|
-
|
245
|
+
normal = Cartesian3_default.normalize(
|
246
|
+
Cartesian3_default.add(rightNormal, leftNormal, normal),
|
199
247
|
normal
|
200
248
|
);
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
249
|
+
addNormals(attr, normal, left, front, back, vertexFormat);
|
250
|
+
LL = front / 3;
|
251
|
+
LR = LL + 1;
|
252
|
+
UL = (back - 2) / 3;
|
253
|
+
UR = UL - 1;
|
254
|
+
indices[index++] = UL;
|
255
|
+
indices[index++] = LL;
|
256
|
+
indices[index++] = UR;
|
257
|
+
indices[index++] = UR;
|
258
|
+
indices[index++] = LL;
|
259
|
+
indices[index++] = LR;
|
260
|
+
front += 3;
|
261
|
+
back -= 3;
|
262
|
+
}
|
263
|
+
rightNormal = ellipsoid.geodeticSurfaceNormal(
|
264
|
+
Cartesian3_default.fromArray(rightEdge, length, scratch1),
|
265
|
+
scratch1
|
266
|
+
);
|
267
|
+
leftNormal = ellipsoid.geodeticSurfaceNormal(
|
268
|
+
Cartesian3_default.fromArray(leftEdge, length, scratch2),
|
269
|
+
scratch2
|
270
|
+
);
|
271
|
+
normal = Cartesian3_default.normalize(
|
272
|
+
Cartesian3_default.add(rightNormal, leftNormal, normal),
|
273
|
+
normal
|
274
|
+
);
|
275
|
+
compIndex += 3;
|
276
|
+
for (i = 0; i < corners.length; i++) {
|
277
|
+
let j;
|
278
|
+
corner = corners[i];
|
279
|
+
const l = corner.leftPositions;
|
280
|
+
const r = corner.rightPositions;
|
281
|
+
let pivot;
|
282
|
+
let start;
|
283
|
+
let outsidePoint = cartesian6;
|
284
|
+
let previousPoint = cartesian3;
|
285
|
+
let nextPoint = cartesian4;
|
286
|
+
normal = Cartesian3_default.fromArray(computedNormals, compIndex, normal);
|
287
|
+
if (defined_default(l)) {
|
288
|
+
addNormals(attr, normal, left, void 0, back, vertexFormat);
|
289
|
+
back -= 3;
|
290
|
+
pivot = LR;
|
291
|
+
start = UR;
|
292
|
+
for (j = 0; j < l.length / 3; j++) {
|
293
|
+
outsidePoint = Cartesian3_default.fromArray(l, j * 3, outsidePoint);
|
294
|
+
indices[index++] = pivot;
|
295
|
+
indices[index++] = start - j - 1;
|
296
|
+
indices[index++] = start - j;
|
297
|
+
CorridorGeometryLibrary_default.addAttribute(
|
243
298
|
finalPositions,
|
244
|
-
pivot * 3,
|
245
|
-
outsidePoint
|
246
|
-
);
|
247
|
-
previousPoint = Matrix3.Cartesian3.subtract(
|
248
|
-
Matrix3.Cartesian3.fromArray(finalPositions, start * 3, previousPoint),
|
249
299
|
outsidePoint,
|
250
|
-
|
300
|
+
void 0,
|
301
|
+
back
|
251
302
|
);
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
303
|
+
previousPoint = Cartesian3_default.fromArray(
|
304
|
+
finalPositions,
|
305
|
+
(start - j - 1) * 3,
|
306
|
+
previousPoint
|
256
307
|
);
|
257
|
-
|
258
|
-
|
308
|
+
nextPoint = Cartesian3_default.fromArray(finalPositions, pivot * 3, nextPoint);
|
309
|
+
left = Cartesian3_default.normalize(
|
310
|
+
Cartesian3_default.subtract(previousPoint, nextPoint, left),
|
259
311
|
left
|
260
312
|
);
|
261
|
-
addNormals(attr, normal, left,
|
262
|
-
|
263
|
-
}
|
264
|
-
|
265
|
-
|
266
|
-
pivot
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
313
|
+
addNormals(attr, normal, left, void 0, back, vertexFormat);
|
314
|
+
back -= 3;
|
315
|
+
}
|
316
|
+
outsidePoint = Cartesian3_default.fromArray(
|
317
|
+
finalPositions,
|
318
|
+
pivot * 3,
|
319
|
+
outsidePoint
|
320
|
+
);
|
321
|
+
previousPoint = Cartesian3_default.subtract(
|
322
|
+
Cartesian3_default.fromArray(finalPositions, start * 3, previousPoint),
|
323
|
+
outsidePoint,
|
324
|
+
previousPoint
|
325
|
+
);
|
326
|
+
nextPoint = Cartesian3_default.subtract(
|
327
|
+
Cartesian3_default.fromArray(finalPositions, (start - j) * 3, nextPoint),
|
328
|
+
outsidePoint,
|
329
|
+
nextPoint
|
330
|
+
);
|
331
|
+
left = Cartesian3_default.normalize(
|
332
|
+
Cartesian3_default.add(previousPoint, nextPoint, left),
|
333
|
+
left
|
334
|
+
);
|
335
|
+
addNormals(attr, normal, left, front, void 0, vertexFormat);
|
336
|
+
front += 3;
|
337
|
+
} else {
|
338
|
+
addNormals(attr, normal, left, front, void 0, vertexFormat);
|
339
|
+
front += 3;
|
340
|
+
pivot = UR;
|
341
|
+
start = LR;
|
342
|
+
for (j = 0; j < r.length / 3; j++) {
|
343
|
+
outsidePoint = Cartesian3_default.fromArray(r, j * 3, outsidePoint);
|
344
|
+
indices[index++] = pivot;
|
345
|
+
indices[index++] = start + j;
|
346
|
+
indices[index++] = start + j + 1;
|
347
|
+
CorridorGeometryLibrary_default.addAttribute(
|
296
348
|
finalPositions,
|
297
|
-
pivot * 3,
|
298
|
-
outsidePoint
|
299
|
-
);
|
300
|
-
previousPoint = Matrix3.Cartesian3.subtract(
|
301
|
-
Matrix3.Cartesian3.fromArray(finalPositions, (start + j) * 3, previousPoint),
|
302
349
|
outsidePoint,
|
350
|
+
front
|
351
|
+
);
|
352
|
+
previousPoint = Cartesian3_default.fromArray(
|
353
|
+
finalPositions,
|
354
|
+
pivot * 3,
|
303
355
|
previousPoint
|
304
356
|
);
|
305
|
-
nextPoint =
|
306
|
-
|
307
|
-
|
357
|
+
nextPoint = Cartesian3_default.fromArray(
|
358
|
+
finalPositions,
|
359
|
+
(start + j) * 3,
|
308
360
|
nextPoint
|
309
361
|
);
|
310
|
-
left =
|
311
|
-
|
362
|
+
left = Cartesian3_default.normalize(
|
363
|
+
Cartesian3_default.subtract(previousPoint, nextPoint, left),
|
312
364
|
left
|
313
365
|
);
|
314
|
-
addNormals(attr, normal, left,
|
315
|
-
back -= 3;
|
316
|
-
}
|
317
|
-
rightEdge = positions[posIndex++];
|
318
|
-
leftEdge = positions[posIndex++];
|
319
|
-
rightEdge.splice(0, 3); //remove duplicate points added by corner
|
320
|
-
leftEdge.splice(leftEdge.length - 3, 3);
|
321
|
-
finalPositions.set(rightEdge, front);
|
322
|
-
finalPositions.set(leftEdge, back - leftEdge.length + 1);
|
323
|
-
length = leftEdge.length - 3;
|
324
|
-
|
325
|
-
compIndex += 3;
|
326
|
-
left = Matrix3.Cartesian3.fromArray(computedLefts, compIndex, left);
|
327
|
-
for (j = 0; j < leftEdge.length; j += 3) {
|
328
|
-
rightNormal = ellipsoid.geodeticSurfaceNormal(
|
329
|
-
Matrix3.Cartesian3.fromArray(rightEdge, j, scratch1),
|
330
|
-
scratch1
|
331
|
-
);
|
332
|
-
leftNormal = ellipsoid.geodeticSurfaceNormal(
|
333
|
-
Matrix3.Cartesian3.fromArray(leftEdge, length - j, scratch2),
|
334
|
-
scratch2
|
335
|
-
);
|
336
|
-
normal = Matrix3.Cartesian3.normalize(
|
337
|
-
Matrix3.Cartesian3.add(rightNormal, leftNormal, normal),
|
338
|
-
normal
|
339
|
-
);
|
340
|
-
addNormals(attr, normal, left, front, back, vertexFormat);
|
341
|
-
|
342
|
-
LR = front / 3;
|
343
|
-
LL = LR - 1;
|
344
|
-
UR = (back - 2) / 3;
|
345
|
-
UL = UR + 1;
|
346
|
-
indices[index++] = UL;
|
347
|
-
indices[index++] = LL;
|
348
|
-
indices[index++] = UR;
|
349
|
-
indices[index++] = UR;
|
350
|
-
indices[index++] = LL;
|
351
|
-
indices[index++] = LR;
|
352
|
-
|
366
|
+
addNormals(attr, normal, left, front, void 0, vertexFormat);
|
353
367
|
front += 3;
|
354
|
-
back -= 3;
|
355
368
|
}
|
356
|
-
|
357
|
-
|
369
|
+
outsidePoint = Cartesian3_default.fromArray(
|
370
|
+
finalPositions,
|
371
|
+
pivot * 3,
|
372
|
+
outsidePoint
|
373
|
+
);
|
374
|
+
previousPoint = Cartesian3_default.subtract(
|
375
|
+
Cartesian3_default.fromArray(finalPositions, (start + j) * 3, previousPoint),
|
376
|
+
outsidePoint,
|
377
|
+
previousPoint
|
378
|
+
);
|
379
|
+
nextPoint = Cartesian3_default.subtract(
|
380
|
+
Cartesian3_default.fromArray(finalPositions, start * 3, nextPoint),
|
381
|
+
outsidePoint,
|
382
|
+
nextPoint
|
383
|
+
);
|
384
|
+
left = Cartesian3_default.normalize(
|
385
|
+
Cartesian3_default.negate(Cartesian3_default.add(nextPoint, previousPoint, left), left),
|
386
|
+
left
|
387
|
+
);
|
388
|
+
addNormals(attr, normal, left, void 0, back, vertexFormat);
|
389
|
+
back -= 3;
|
358
390
|
}
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
);
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
391
|
+
rightEdge = positions[posIndex++];
|
392
|
+
leftEdge = positions[posIndex++];
|
393
|
+
rightEdge.splice(0, 3);
|
394
|
+
leftEdge.splice(leftEdge.length - 3, 3);
|
395
|
+
finalPositions.set(rightEdge, front);
|
396
|
+
finalPositions.set(leftEdge, back - leftEdge.length + 1);
|
397
|
+
length = leftEdge.length - 3;
|
398
|
+
compIndex += 3;
|
399
|
+
left = Cartesian3_default.fromArray(computedLefts, compIndex, left);
|
400
|
+
for (j = 0; j < leftEdge.length; j += 3) {
|
401
|
+
rightNormal = ellipsoid.geodeticSurfaceNormal(
|
402
|
+
Cartesian3_default.fromArray(rightEdge, j, scratch1),
|
403
|
+
scratch1
|
404
|
+
);
|
405
|
+
leftNormal = ellipsoid.geodeticSurfaceNormal(
|
406
|
+
Cartesian3_default.fromArray(leftEdge, length - j, scratch2),
|
407
|
+
scratch2
|
408
|
+
);
|
409
|
+
normal = Cartesian3_default.normalize(
|
410
|
+
Cartesian3_default.add(rightNormal, leftNormal, normal),
|
411
|
+
normal
|
412
|
+
);
|
413
|
+
addNormals(attr, normal, left, front, back, vertexFormat);
|
414
|
+
LR = front / 3;
|
415
|
+
LL = LR - 1;
|
416
|
+
UR = (back - 2) / 3;
|
417
|
+
UL = UR + 1;
|
418
|
+
indices[index++] = UL;
|
419
|
+
indices[index++] = LL;
|
420
|
+
indices[index++] = UR;
|
421
|
+
indices[index++] = UR;
|
422
|
+
indices[index++] = LL;
|
423
|
+
indices[index++] = LR;
|
368
424
|
front += 3;
|
369
425
|
back -= 3;
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
426
|
+
}
|
427
|
+
front -= 3;
|
428
|
+
back += 3;
|
429
|
+
}
|
430
|
+
normal = Cartesian3_default.fromArray(
|
431
|
+
computedNormals,
|
432
|
+
computedNormals.length - 3,
|
433
|
+
normal
|
434
|
+
);
|
435
|
+
addNormals(attr, normal, left, front, back, vertexFormat);
|
436
|
+
if (addEndPositions) {
|
437
|
+
front += 3;
|
438
|
+
back -= 3;
|
439
|
+
leftPos = cartesian3;
|
440
|
+
rightPos = cartesian4;
|
441
|
+
const lastEndPositions = endPositions[1];
|
442
|
+
for (i = 0; i < halfLength; i++) {
|
443
|
+
leftPos = Cartesian3_default.fromArray(
|
444
|
+
lastEndPositions,
|
445
|
+
(endPositionLength - i - 1) * 3,
|
446
|
+
leftPos
|
447
|
+
);
|
448
|
+
rightPos = Cartesian3_default.fromArray(lastEndPositions, i * 3, rightPos);
|
449
|
+
CorridorGeometryLibrary_default.addAttribute(
|
450
|
+
finalPositions,
|
451
|
+
leftPos,
|
452
|
+
void 0,
|
453
|
+
back
|
454
|
+
);
|
455
|
+
CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
|
456
|
+
addNormals(attr, normal, left, front, back, vertexFormat);
|
457
|
+
LR = front / 3;
|
458
|
+
LL = LR - 1;
|
459
|
+
UR = (back - 2) / 3;
|
460
|
+
UL = UR + 1;
|
461
|
+
indices[index++] = UL;
|
462
|
+
indices[index++] = LL;
|
463
|
+
indices[index++] = UR;
|
464
|
+
indices[index++] = UR;
|
465
|
+
indices[index++] = LL;
|
466
|
+
indices[index++] = LR;
|
467
|
+
front += 3;
|
468
|
+
back -= 3;
|
469
|
+
}
|
470
|
+
}
|
471
|
+
attributes.position = new GeometryAttribute_default({
|
472
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
473
|
+
componentsPerAttribute: 3,
|
474
|
+
values: finalPositions
|
475
|
+
});
|
476
|
+
if (vertexFormat.st) {
|
477
|
+
const st = new Float32Array(size / 3 * 2);
|
478
|
+
let rightSt;
|
479
|
+
let leftSt;
|
480
|
+
let stIndex = 0;
|
481
|
+
if (addEndPositions) {
|
482
|
+
leftCount /= 3;
|
483
|
+
rightCount /= 3;
|
484
|
+
const theta = Math.PI / (endPositionLength + 1);
|
485
|
+
leftSt = 1 / (leftCount - endPositionLength + 1);
|
486
|
+
rightSt = 1 / (rightCount - endPositionLength + 1);
|
487
|
+
let a;
|
488
|
+
const halfEndPos = endPositionLength / 2;
|
489
|
+
for (i = halfEndPos + 1; i < endPositionLength + 1; i++) {
|
490
|
+
a = Math_default.PI_OVER_TWO + theta * i;
|
491
|
+
st[stIndex++] = rightSt * (1 + Math.cos(a));
|
492
|
+
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
493
|
+
}
|
494
|
+
for (i = 1; i < rightCount - endPositionLength + 1; i++) {
|
495
|
+
st[stIndex++] = i * rightSt;
|
496
|
+
st[stIndex++] = 0;
|
497
|
+
}
|
498
|
+
for (i = endPositionLength; i > halfEndPos; i--) {
|
499
|
+
a = Math_default.PI_OVER_TWO - i * theta;
|
500
|
+
st[stIndex++] = 1 - rightSt * (1 + Math.cos(a));
|
501
|
+
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
502
|
+
}
|
503
|
+
for (i = halfEndPos; i > 0; i--) {
|
504
|
+
a = Math_default.PI_OVER_TWO - theta * i;
|
505
|
+
st[stIndex++] = 1 - leftSt * (1 + Math.cos(a));
|
506
|
+
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
507
|
+
}
|
508
|
+
for (i = leftCount - endPositionLength; i > 0; i--) {
|
509
|
+
st[stIndex++] = i * leftSt;
|
510
|
+
st[stIndex++] = 1;
|
511
|
+
}
|
512
|
+
for (i = 1; i < halfEndPos + 1; i++) {
|
513
|
+
a = Math_default.PI_OVER_TWO + theta * i;
|
514
|
+
st[stIndex++] = leftSt * (1 + Math.cos(a));
|
515
|
+
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
516
|
+
}
|
517
|
+
} else {
|
518
|
+
leftCount /= 3;
|
519
|
+
rightCount /= 3;
|
520
|
+
leftSt = 1 / (leftCount - 1);
|
521
|
+
rightSt = 1 / (rightCount - 1);
|
522
|
+
for (i = 0; i < rightCount; i++) {
|
523
|
+
st[stIndex++] = i * rightSt;
|
524
|
+
st[stIndex++] = 0;
|
525
|
+
}
|
526
|
+
for (i = leftCount; i > 0; i--) {
|
527
|
+
st[stIndex++] = (i - 1) * leftSt;
|
528
|
+
st[stIndex++] = 1;
|
402
529
|
}
|
403
530
|
}
|
404
|
-
|
405
|
-
|
406
|
-
|
531
|
+
attributes.st = new GeometryAttribute_default({
|
532
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
533
|
+
componentsPerAttribute: 2,
|
534
|
+
values: st
|
535
|
+
});
|
536
|
+
}
|
537
|
+
if (vertexFormat.normal) {
|
538
|
+
attributes.normal = new GeometryAttribute_default({
|
539
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
407
540
|
componentsPerAttribute: 3,
|
408
|
-
values:
|
541
|
+
values: attr.normals
|
409
542
|
});
|
410
|
-
|
411
|
-
if (vertexFormat.st) {
|
412
|
-
const st = new Float32Array((size / 3) * 2);
|
413
|
-
let rightSt;
|
414
|
-
let leftSt;
|
415
|
-
let stIndex = 0;
|
416
|
-
if (addEndPositions) {
|
417
|
-
leftCount /= 3;
|
418
|
-
rightCount /= 3;
|
419
|
-
const theta = Math.PI / (endPositionLength + 1);
|
420
|
-
leftSt = 1 / (leftCount - endPositionLength + 1);
|
421
|
-
rightSt = 1 / (rightCount - endPositionLength + 1);
|
422
|
-
let a;
|
423
|
-
const halfEndPos = endPositionLength / 2;
|
424
|
-
for (i = halfEndPos + 1; i < endPositionLength + 1; i++) {
|
425
|
-
// lower left rounded end
|
426
|
-
a = Math$1.CesiumMath.PI_OVER_TWO + theta * i;
|
427
|
-
st[stIndex++] = rightSt * (1 + Math.cos(a));
|
428
|
-
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
429
|
-
}
|
430
|
-
for (i = 1; i < rightCount - endPositionLength + 1; i++) {
|
431
|
-
// bottom edge
|
432
|
-
st[stIndex++] = i * rightSt;
|
433
|
-
st[stIndex++] = 0;
|
434
|
-
}
|
435
|
-
for (i = endPositionLength; i > halfEndPos; i--) {
|
436
|
-
// lower right rounded end
|
437
|
-
a = Math$1.CesiumMath.PI_OVER_TWO - i * theta;
|
438
|
-
st[stIndex++] = 1 - rightSt * (1 + Math.cos(a));
|
439
|
-
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
440
|
-
}
|
441
|
-
for (i = halfEndPos; i > 0; i--) {
|
442
|
-
// upper right rounded end
|
443
|
-
a = Math$1.CesiumMath.PI_OVER_TWO - theta * i;
|
444
|
-
st[stIndex++] = 1 - leftSt * (1 + Math.cos(a));
|
445
|
-
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
446
|
-
}
|
447
|
-
for (i = leftCount - endPositionLength; i > 0; i--) {
|
448
|
-
// top edge
|
449
|
-
st[stIndex++] = i * leftSt;
|
450
|
-
st[stIndex++] = 1;
|
451
|
-
}
|
452
|
-
for (i = 1; i < halfEndPos + 1; i++) {
|
453
|
-
// upper left rounded end
|
454
|
-
a = Math$1.CesiumMath.PI_OVER_TWO + theta * i;
|
455
|
-
st[stIndex++] = leftSt * (1 + Math.cos(a));
|
456
|
-
st[stIndex++] = 0.5 * (1 + Math.sin(a));
|
457
|
-
}
|
458
|
-
} else {
|
459
|
-
leftCount /= 3;
|
460
|
-
rightCount /= 3;
|
461
|
-
leftSt = 1 / (leftCount - 1);
|
462
|
-
rightSt = 1 / (rightCount - 1);
|
463
|
-
for (i = 0; i < rightCount; i++) {
|
464
|
-
// bottom edge
|
465
|
-
st[stIndex++] = i * rightSt;
|
466
|
-
st[stIndex++] = 0;
|
467
|
-
}
|
468
|
-
for (i = leftCount; i > 0; i--) {
|
469
|
-
// top edge
|
470
|
-
st[stIndex++] = (i - 1) * leftSt;
|
471
|
-
st[stIndex++] = 1;
|
472
|
-
}
|
473
|
-
}
|
474
|
-
|
475
|
-
attributes.st = new GeometryAttribute.GeometryAttribute({
|
476
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
477
|
-
componentsPerAttribute: 2,
|
478
|
-
values: st,
|
479
|
-
});
|
480
|
-
}
|
481
|
-
|
482
|
-
if (vertexFormat.normal) {
|
483
|
-
attributes.normal = new GeometryAttribute.GeometryAttribute({
|
484
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
485
|
-
componentsPerAttribute: 3,
|
486
|
-
values: attr.normals,
|
487
|
-
});
|
488
|
-
}
|
489
|
-
|
490
|
-
if (vertexFormat.tangent) {
|
491
|
-
attributes.tangent = new GeometryAttribute.GeometryAttribute({
|
492
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
493
|
-
componentsPerAttribute: 3,
|
494
|
-
values: attr.tangents,
|
495
|
-
});
|
496
|
-
}
|
497
|
-
|
498
|
-
if (vertexFormat.bitangent) {
|
499
|
-
attributes.bitangent = new GeometryAttribute.GeometryAttribute({
|
500
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
501
|
-
componentsPerAttribute: 3,
|
502
|
-
values: attr.bitangents,
|
503
|
-
});
|
504
|
-
}
|
505
|
-
|
506
|
-
return {
|
507
|
-
attributes: attributes,
|
508
|
-
indices: indices,
|
509
|
-
};
|
510
543
|
}
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
bottomPosition
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
)
|
568
|
-
previousPosition
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
544
|
+
if (vertexFormat.tangent) {
|
545
|
+
attributes.tangent = new GeometryAttribute_default({
|
546
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
547
|
+
componentsPerAttribute: 3,
|
548
|
+
values: attr.tangents
|
549
|
+
});
|
550
|
+
}
|
551
|
+
if (vertexFormat.bitangent) {
|
552
|
+
attributes.bitangent = new GeometryAttribute_default({
|
553
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
554
|
+
componentsPerAttribute: 3,
|
555
|
+
values: attr.bitangents
|
556
|
+
});
|
557
|
+
}
|
558
|
+
return {
|
559
|
+
attributes,
|
560
|
+
indices
|
561
|
+
};
|
562
|
+
}
|
563
|
+
function extrudedAttributes(attributes, vertexFormat) {
|
564
|
+
if (!vertexFormat.normal && !vertexFormat.tangent && !vertexFormat.bitangent && !vertexFormat.st) {
|
565
|
+
return attributes;
|
566
|
+
}
|
567
|
+
const positions = attributes.position.values;
|
568
|
+
let topNormals;
|
569
|
+
let topBitangents;
|
570
|
+
if (vertexFormat.normal || vertexFormat.bitangent) {
|
571
|
+
topNormals = attributes.normal.values;
|
572
|
+
topBitangents = attributes.bitangent.values;
|
573
|
+
}
|
574
|
+
const size = attributes.position.values.length / 18;
|
575
|
+
const threeSize = size * 3;
|
576
|
+
const twoSize = size * 2;
|
577
|
+
const sixSize = threeSize * 2;
|
578
|
+
let i;
|
579
|
+
if (vertexFormat.normal || vertexFormat.bitangent || vertexFormat.tangent) {
|
580
|
+
const normals = vertexFormat.normal ? new Float32Array(threeSize * 6) : void 0;
|
581
|
+
const tangents = vertexFormat.tangent ? new Float32Array(threeSize * 6) : void 0;
|
582
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(threeSize * 6) : void 0;
|
583
|
+
let topPosition = cartesian1;
|
584
|
+
let bottomPosition = cartesian2;
|
585
|
+
let previousPosition = cartesian3;
|
586
|
+
let normal = cartesian4;
|
587
|
+
let tangent = cartesian5;
|
588
|
+
let bitangent = cartesian6;
|
589
|
+
let attrIndex = sixSize;
|
590
|
+
for (i = 0; i < threeSize; i += 3) {
|
591
|
+
const attrIndexOffset = attrIndex + sixSize;
|
592
|
+
topPosition = Cartesian3_default.fromArray(positions, i, topPosition);
|
593
|
+
bottomPosition = Cartesian3_default.fromArray(
|
594
|
+
positions,
|
595
|
+
i + threeSize,
|
596
|
+
bottomPosition
|
597
|
+
);
|
598
|
+
previousPosition = Cartesian3_default.fromArray(
|
599
|
+
positions,
|
600
|
+
(i + 3) % threeSize,
|
601
|
+
previousPosition
|
602
|
+
);
|
603
|
+
bottomPosition = Cartesian3_default.subtract(
|
604
|
+
bottomPosition,
|
605
|
+
topPosition,
|
606
|
+
bottomPosition
|
607
|
+
);
|
608
|
+
previousPosition = Cartesian3_default.subtract(
|
609
|
+
previousPosition,
|
610
|
+
topPosition,
|
611
|
+
previousPosition
|
612
|
+
);
|
613
|
+
normal = Cartesian3_default.normalize(
|
614
|
+
Cartesian3_default.cross(bottomPosition, previousPosition, normal),
|
615
|
+
normal
|
616
|
+
);
|
617
|
+
if (vertexFormat.normal) {
|
618
|
+
CorridorGeometryLibrary_default.addAttribute(normals, normal, attrIndexOffset);
|
619
|
+
CorridorGeometryLibrary_default.addAttribute(
|
620
|
+
normals,
|
621
|
+
normal,
|
622
|
+
attrIndexOffset + 3
|
576
623
|
);
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
624
|
+
CorridorGeometryLibrary_default.addAttribute(normals, normal, attrIndex);
|
625
|
+
CorridorGeometryLibrary_default.addAttribute(normals, normal, attrIndex + 3);
|
626
|
+
}
|
627
|
+
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
628
|
+
bitangent = Cartesian3_default.fromArray(topNormals, i, bitangent);
|
629
|
+
if (vertexFormat.bitangent) {
|
630
|
+
CorridorGeometryLibrary_default.addAttribute(
|
631
|
+
bitangents,
|
632
|
+
bitangent,
|
633
|
+
attrIndexOffset
|
634
|
+
);
|
635
|
+
CorridorGeometryLibrary_default.addAttribute(
|
636
|
+
bitangents,
|
637
|
+
bitangent,
|
582
638
|
attrIndexOffset + 3
|
583
639
|
);
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
);
|
595
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
596
|
-
bitangents,
|
597
|
-
bitangent,
|
598
|
-
attrIndexOffset + 3
|
599
|
-
);
|
600
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
601
|
-
bitangents,
|
602
|
-
bitangent,
|
603
|
-
attrIndex
|
604
|
-
);
|
605
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
606
|
-
bitangents,
|
607
|
-
bitangent,
|
608
|
-
attrIndex + 3
|
609
|
-
);
|
610
|
-
}
|
611
|
-
|
612
|
-
if (vertexFormat.tangent) {
|
613
|
-
tangent = Matrix3.Cartesian3.normalize(
|
614
|
-
Matrix3.Cartesian3.cross(bitangent, normal, tangent),
|
615
|
-
tangent
|
616
|
-
);
|
617
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
618
|
-
tangents,
|
619
|
-
tangent,
|
620
|
-
attrIndexOffset
|
621
|
-
);
|
622
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
623
|
-
tangents,
|
624
|
-
tangent,
|
625
|
-
attrIndexOffset + 3
|
626
|
-
);
|
627
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(tangents, tangent, attrIndex);
|
628
|
-
CorridorGeometryLibrary.CorridorGeometryLibrary.addAttribute(
|
629
|
-
tangents,
|
630
|
-
tangent,
|
631
|
-
attrIndex + 3
|
632
|
-
);
|
633
|
-
}
|
640
|
+
CorridorGeometryLibrary_default.addAttribute(
|
641
|
+
bitangents,
|
642
|
+
bitangent,
|
643
|
+
attrIndex
|
644
|
+
);
|
645
|
+
CorridorGeometryLibrary_default.addAttribute(
|
646
|
+
bitangents,
|
647
|
+
bitangent,
|
648
|
+
attrIndex + 3
|
649
|
+
);
|
634
650
|
}
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
651
|
+
if (vertexFormat.tangent) {
|
652
|
+
tangent = Cartesian3_default.normalize(
|
653
|
+
Cartesian3_default.cross(bitangent, normal, tangent),
|
654
|
+
tangent
|
655
|
+
);
|
656
|
+
CorridorGeometryLibrary_default.addAttribute(
|
657
|
+
tangents,
|
658
|
+
tangent,
|
659
|
+
attrIndexOffset
|
660
|
+
);
|
661
|
+
CorridorGeometryLibrary_default.addAttribute(
|
662
|
+
tangents,
|
663
|
+
tangent,
|
664
|
+
attrIndexOffset + 3
|
665
|
+
);
|
666
|
+
CorridorGeometryLibrary_default.addAttribute(tangents, tangent, attrIndex);
|
667
|
+
CorridorGeometryLibrary_default.addAttribute(
|
668
|
+
tangents,
|
669
|
+
tangent,
|
670
|
+
attrIndex + 3
|
671
|
+
);
|
645
672
|
}
|
646
|
-
attributes.normal.values = normals;
|
647
|
-
} else {
|
648
|
-
attributes.normal = undefined;
|
649
|
-
}
|
650
|
-
|
651
|
-
if (vertexFormat.bitangent) {
|
652
|
-
bitangents.set(topBitangents); //top
|
653
|
-
bitangents.set(topBitangents, threeSize); //bottom
|
654
|
-
attributes.bitangent.values = bitangents;
|
655
|
-
} else {
|
656
|
-
attributes.bitangent = undefined;
|
657
|
-
}
|
658
|
-
|
659
|
-
if (vertexFormat.tangent) {
|
660
|
-
const topTangents = attributes.tangent.values;
|
661
|
-
tangents.set(topTangents); //top
|
662
|
-
tangents.set(topTangents, threeSize); //bottom
|
663
|
-
attributes.tangent.values = tangents;
|
664
673
|
}
|
674
|
+
attrIndex += 6;
|
665
675
|
}
|
666
|
-
if (vertexFormat.
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
for (let j = 0; j < 2; j++) {
|
674
|
-
st[index++] = topSt[0];
|
675
|
-
st[index++] = topSt[1];
|
676
|
-
for (i = 2; i < twoSize; i += 2) {
|
677
|
-
const s = topSt[i];
|
678
|
-
const t = topSt[i + 1];
|
679
|
-
st[index++] = s;
|
680
|
-
st[index++] = t;
|
681
|
-
st[index++] = s;
|
682
|
-
st[index++] = t;
|
683
|
-
}
|
684
|
-
st[index++] = topSt[0];
|
685
|
-
st[index++] = topSt[1];
|
676
|
+
if (vertexFormat.normal) {
|
677
|
+
normals.set(topNormals);
|
678
|
+
for (i = 0; i < threeSize; i += 3) {
|
679
|
+
normals[i + threeSize] = -topNormals[i];
|
680
|
+
normals[i + threeSize + 1] = -topNormals[i + 1];
|
681
|
+
normals[i + threeSize + 2] = -topNormals[i + 2];
|
686
682
|
}
|
687
|
-
attributes.
|
683
|
+
attributes.normal.values = normals;
|
684
|
+
} else {
|
685
|
+
attributes.normal = void 0;
|
688
686
|
}
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
wallPositions[index++] = x;
|
702
|
-
wallPositions[index++] = y;
|
703
|
-
wallPositions[index++] = z;
|
704
|
-
wallPositions[index++] = x;
|
705
|
-
wallPositions[index++] = y;
|
706
|
-
wallPositions[index++] = z;
|
687
|
+
if (vertexFormat.bitangent) {
|
688
|
+
bitangents.set(topBitangents);
|
689
|
+
bitangents.set(topBitangents, threeSize);
|
690
|
+
attributes.bitangent.values = bitangents;
|
691
|
+
} else {
|
692
|
+
attributes.bitangent = void 0;
|
693
|
+
}
|
694
|
+
if (vertexFormat.tangent) {
|
695
|
+
const topTangents = attributes.tangent.values;
|
696
|
+
tangents.set(topTangents);
|
697
|
+
tangents.set(topTangents, threeSize);
|
698
|
+
attributes.tangent.values = tangents;
|
707
699
|
}
|
708
|
-
wallPositions[index++] = positions[0];
|
709
|
-
wallPositions[index++] = positions[1];
|
710
|
-
wallPositions[index++] = positions[2];
|
711
|
-
|
712
|
-
return wallPositions;
|
713
700
|
}
|
714
|
-
|
715
|
-
|
716
|
-
const
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
st
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
const indices = attr.indices;
|
731
|
-
let positions = attributes.position.values;
|
732
|
-
let length = positions.length;
|
733
|
-
const newPositions = new Float64Array(length * 6);
|
734
|
-
let extrudedPositions = new Float64Array(length);
|
735
|
-
extrudedPositions.set(positions);
|
736
|
-
let wallPositions = new Float64Array(length * 4);
|
737
|
-
|
738
|
-
positions = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
739
|
-
positions,
|
740
|
-
height,
|
741
|
-
ellipsoid
|
742
|
-
);
|
743
|
-
wallPositions = addWallPositions(positions, 0, wallPositions);
|
744
|
-
extrudedPositions = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
745
|
-
extrudedPositions,
|
746
|
-
extrudedHeight,
|
747
|
-
ellipsoid
|
748
|
-
);
|
749
|
-
wallPositions = addWallPositions(
|
750
|
-
extrudedPositions,
|
751
|
-
length * 2,
|
752
|
-
wallPositions
|
753
|
-
);
|
754
|
-
newPositions.set(positions);
|
755
|
-
newPositions.set(extrudedPositions, length);
|
756
|
-
newPositions.set(wallPositions, length * 2);
|
757
|
-
attributes.position.values = newPositions;
|
758
|
-
|
759
|
-
attributes = extrudedAttributes(attributes, vertexFormat);
|
760
|
-
let i;
|
761
|
-
const size = length / 3;
|
762
|
-
if (params.shadowVolume) {
|
763
|
-
const topNormals = attributes.normal.values;
|
764
|
-
length = topNormals.length;
|
765
|
-
|
766
|
-
let extrudeNormals = new Float32Array(length * 6);
|
767
|
-
for (i = 0; i < length; i++) {
|
768
|
-
topNormals[i] = -topNormals[i];
|
769
|
-
}
|
770
|
-
//only get normals for bottom layer that's going to be pushed down
|
771
|
-
extrudeNormals.set(topNormals, length); //bottom face
|
772
|
-
extrudeNormals = addWallPositions(topNormals, length * 4, extrudeNormals); //bottom wall
|
773
|
-
attributes.extrudeDirection = new GeometryAttribute.GeometryAttribute({
|
774
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
775
|
-
componentsPerAttribute: 3,
|
776
|
-
values: extrudeNormals,
|
777
|
-
});
|
778
|
-
if (!vertexFormat.normal) {
|
779
|
-
attributes.normal = undefined;
|
701
|
+
if (vertexFormat.st) {
|
702
|
+
const topSt = attributes.st.values;
|
703
|
+
const st = new Float32Array(twoSize * 6);
|
704
|
+
st.set(topSt);
|
705
|
+
st.set(topSt, twoSize);
|
706
|
+
let index = twoSize * 2;
|
707
|
+
for (let j = 0; j < 2; j++) {
|
708
|
+
st[index++] = topSt[0];
|
709
|
+
st[index++] = topSt[1];
|
710
|
+
for (i = 2; i < twoSize; i += 2) {
|
711
|
+
const s = topSt[i];
|
712
|
+
const t = topSt[i + 1];
|
713
|
+
st[index++] = s;
|
714
|
+
st[index++] = t;
|
715
|
+
st[index++] = s;
|
716
|
+
st[index++] = t;
|
780
717
|
}
|
718
|
+
st[index++] = topSt[0];
|
719
|
+
st[index++] = topSt[1];
|
781
720
|
}
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
721
|
+
attributes.st.values = st;
|
722
|
+
}
|
723
|
+
return attributes;
|
724
|
+
}
|
725
|
+
function addWallPositions(positions, index, wallPositions) {
|
726
|
+
wallPositions[index++] = positions[0];
|
727
|
+
wallPositions[index++] = positions[1];
|
728
|
+
wallPositions[index++] = positions[2];
|
729
|
+
for (let i = 3; i < positions.length; i += 3) {
|
730
|
+
const x = positions[i];
|
731
|
+
const y = positions[i + 1];
|
732
|
+
const z = positions[i + 2];
|
733
|
+
wallPositions[index++] = x;
|
734
|
+
wallPositions[index++] = y;
|
735
|
+
wallPositions[index++] = z;
|
736
|
+
wallPositions[index++] = x;
|
737
|
+
wallPositions[index++] = y;
|
738
|
+
wallPositions[index++] = z;
|
739
|
+
}
|
740
|
+
wallPositions[index++] = positions[0];
|
741
|
+
wallPositions[index++] = positions[1];
|
742
|
+
wallPositions[index++] = positions[2];
|
743
|
+
return wallPositions;
|
744
|
+
}
|
745
|
+
function computePositionsExtruded(params, vertexFormat) {
|
746
|
+
const topVertexFormat = new VertexFormat_default({
|
747
|
+
position: vertexFormat.position,
|
748
|
+
normal: vertexFormat.normal || vertexFormat.bitangent || params.shadowVolume,
|
749
|
+
tangent: vertexFormat.tangent,
|
750
|
+
bitangent: vertexFormat.normal || vertexFormat.bitangent,
|
751
|
+
st: vertexFormat.st
|
752
|
+
});
|
753
|
+
const ellipsoid = params.ellipsoid;
|
754
|
+
const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
|
755
|
+
const attr = combine(computedPositions, topVertexFormat, ellipsoid);
|
756
|
+
const height = params.height;
|
757
|
+
const extrudedHeight = params.extrudedHeight;
|
758
|
+
let attributes = attr.attributes;
|
759
|
+
const indices = attr.indices;
|
760
|
+
let positions = attributes.position.values;
|
761
|
+
let length = positions.length;
|
762
|
+
const newPositions = new Float64Array(length * 6);
|
763
|
+
let extrudedPositions = new Float64Array(length);
|
764
|
+
extrudedPositions.set(positions);
|
765
|
+
let wallPositions = new Float64Array(length * 4);
|
766
|
+
positions = PolygonPipeline_default.scaleToGeodeticHeight(
|
767
|
+
positions,
|
768
|
+
height,
|
769
|
+
ellipsoid
|
770
|
+
);
|
771
|
+
wallPositions = addWallPositions(positions, 0, wallPositions);
|
772
|
+
extrudedPositions = PolygonPipeline_default.scaleToGeodeticHeight(
|
773
|
+
extrudedPositions,
|
774
|
+
extrudedHeight,
|
775
|
+
ellipsoid
|
776
|
+
);
|
777
|
+
wallPositions = addWallPositions(
|
778
|
+
extrudedPositions,
|
779
|
+
length * 2,
|
780
|
+
wallPositions
|
781
|
+
);
|
782
|
+
newPositions.set(positions);
|
783
|
+
newPositions.set(extrudedPositions, length);
|
784
|
+
newPositions.set(wallPositions, length * 2);
|
785
|
+
attributes.position.values = newPositions;
|
786
|
+
attributes = extrudedAttributes(attributes, vertexFormat);
|
787
|
+
let i;
|
788
|
+
const size = length / 3;
|
789
|
+
if (params.shadowVolume) {
|
790
|
+
const topNormals = attributes.normal.values;
|
791
|
+
length = topNormals.length;
|
792
|
+
let extrudeNormals = new Float32Array(length * 6);
|
793
|
+
for (i = 0; i < length; i++) {
|
794
|
+
topNormals[i] = -topNormals[i];
|
798
795
|
}
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
);
|
806
|
-
|
807
|
-
|
808
|
-
for (i = 0; i < iLength; i += 3) {
|
809
|
-
// bottom indices
|
810
|
-
const v0 = indices[i];
|
811
|
-
const v1 = indices[i + 1];
|
812
|
-
const v2 = indices[i + 2];
|
813
|
-
newIndices[index++] = v2 + size;
|
814
|
-
newIndices[index++] = v1 + size;
|
815
|
-
newIndices[index++] = v0 + size;
|
796
|
+
extrudeNormals.set(topNormals, length);
|
797
|
+
extrudeNormals = addWallPositions(topNormals, length * 4, extrudeNormals);
|
798
|
+
attributes.extrudeDirection = new GeometryAttribute_default({
|
799
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
800
|
+
componentsPerAttribute: 3,
|
801
|
+
values: extrudeNormals
|
802
|
+
});
|
803
|
+
if (!vertexFormat.normal) {
|
804
|
+
attributes.normal = void 0;
|
816
805
|
}
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
LR = LL + 1;
|
826
|
-
newIndices[index++] = UL;
|
827
|
-
newIndices[index++] = LL;
|
828
|
-
newIndices[index++] = UR;
|
829
|
-
newIndices[index++] = UR;
|
830
|
-
newIndices[index++] = LL;
|
831
|
-
newIndices[index++] = LR;
|
806
|
+
}
|
807
|
+
if (defined_default(params.offsetAttribute)) {
|
808
|
+
let applyOffset = new Uint8Array(size * 6);
|
809
|
+
if (params.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
|
810
|
+
applyOffset = applyOffset.fill(1, 0, size).fill(1, size * 2, size * 4);
|
811
|
+
} else {
|
812
|
+
const applyOffsetValue = params.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
813
|
+
applyOffset = applyOffset.fill(applyOffsetValue);
|
832
814
|
}
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
};
|
815
|
+
attributes.applyOffset = new GeometryAttribute_default({
|
816
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
817
|
+
componentsPerAttribute: 1,
|
818
|
+
values: applyOffset
|
819
|
+
});
|
838
820
|
}
|
839
|
-
|
840
|
-
const
|
841
|
-
const
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
821
|
+
const iLength = indices.length;
|
822
|
+
const twoSize = size + size;
|
823
|
+
const newIndices = IndexDatatype_default.createTypedArray(
|
824
|
+
newPositions.length / 3,
|
825
|
+
iLength * 2 + twoSize * 3
|
826
|
+
);
|
827
|
+
newIndices.set(indices);
|
828
|
+
let index = iLength;
|
829
|
+
for (i = 0; i < iLength; i += 3) {
|
830
|
+
const v0 = indices[i];
|
831
|
+
const v1 = indices[i + 1];
|
832
|
+
const v2 = indices[i + 2];
|
833
|
+
newIndices[index++] = v2 + size;
|
834
|
+
newIndices[index++] = v1 + size;
|
835
|
+
newIndices[index++] = v0 + size;
|
836
|
+
}
|
837
|
+
let UL, LL, UR, LR;
|
838
|
+
for (i = 0; i < twoSize; i += 2) {
|
839
|
+
UL = i + twoSize;
|
840
|
+
LL = UL + twoSize;
|
841
|
+
UR = UL + 1;
|
842
|
+
LR = LL + 1;
|
843
|
+
newIndices[index++] = UL;
|
844
|
+
newIndices[index++] = LL;
|
845
|
+
newIndices[index++] = UR;
|
846
|
+
newIndices[index++] = UR;
|
847
|
+
newIndices[index++] = LL;
|
848
|
+
newIndices[index++] = LR;
|
849
|
+
}
|
850
|
+
return {
|
851
|
+
attributes,
|
852
|
+
indices: newIndices
|
853
|
+
};
|
854
|
+
}
|
855
|
+
var scratchCartesian1 = new Cartesian3_default();
|
856
|
+
var scratchCartesian2 = new Cartesian3_default();
|
857
|
+
var scratchCartographic = new Cartographic_default();
|
858
|
+
function computeOffsetPoints(position1, position2, ellipsoid, halfWidth, min, max) {
|
859
|
+
const direction = Cartesian3_default.subtract(
|
846
860
|
position2,
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
)
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
861
|
+
position1,
|
862
|
+
scratchCartesian1
|
863
|
+
);
|
864
|
+
Cartesian3_default.normalize(direction, direction);
|
865
|
+
const normal = ellipsoid.geodeticSurfaceNormal(position1, scratchCartesian2);
|
866
|
+
const offsetDirection = Cartesian3_default.cross(
|
867
|
+
direction,
|
868
|
+
normal,
|
869
|
+
scratchCartesian1
|
870
|
+
);
|
871
|
+
Cartesian3_default.multiplyByScalar(offsetDirection, halfWidth, offsetDirection);
|
872
|
+
let minLat = min.latitude;
|
873
|
+
let minLon = min.longitude;
|
874
|
+
let maxLat = max.latitude;
|
875
|
+
let maxLon = max.longitude;
|
876
|
+
Cartesian3_default.add(position1, offsetDirection, scratchCartesian2);
|
877
|
+
ellipsoid.cartesianToCartographic(scratchCartesian2, scratchCartographic);
|
878
|
+
let lat = scratchCartographic.latitude;
|
879
|
+
let lon = scratchCartographic.longitude;
|
880
|
+
minLat = Math.min(minLat, lat);
|
881
|
+
minLon = Math.min(minLon, lon);
|
882
|
+
maxLat = Math.max(maxLat, lat);
|
883
|
+
maxLon = Math.max(maxLon, lon);
|
884
|
+
Cartesian3_default.subtract(position1, offsetDirection, scratchCartesian2);
|
885
|
+
ellipsoid.cartesianToCartographic(scratchCartesian2, scratchCartographic);
|
886
|
+
lat = scratchCartographic.latitude;
|
887
|
+
lon = scratchCartographic.longitude;
|
888
|
+
minLat = Math.min(minLat, lat);
|
889
|
+
minLon = Math.min(minLon, lon);
|
890
|
+
maxLat = Math.max(maxLat, lat);
|
891
|
+
maxLon = Math.max(maxLon, lon);
|
892
|
+
min.latitude = minLat;
|
893
|
+
min.longitude = minLon;
|
894
|
+
max.latitude = maxLat;
|
895
|
+
max.longitude = maxLon;
|
896
|
+
}
|
897
|
+
var scratchCartesianOffset = new Cartesian3_default();
|
898
|
+
var scratchCartesianEnds = new Cartesian3_default();
|
899
|
+
var scratchCartographicMin = new Cartographic_default();
|
900
|
+
var scratchCartographicMax = new Cartographic_default();
|
901
|
+
function computeRectangle(positions, ellipsoid, width, cornerType, result) {
|
902
|
+
positions = scaleToSurface(positions, ellipsoid);
|
903
|
+
const cleanPositions = arrayRemoveDuplicates_default(
|
904
|
+
positions,
|
905
|
+
Cartesian3_default.equalsEpsilon
|
906
|
+
);
|
907
|
+
const length = cleanPositions.length;
|
908
|
+
if (length < 2 || width <= 0) {
|
909
|
+
return new Rectangle_default();
|
910
|
+
}
|
911
|
+
const halfWidth = width * 0.5;
|
912
|
+
scratchCartographicMin.latitude = Number.POSITIVE_INFINITY;
|
913
|
+
scratchCartographicMin.longitude = Number.POSITIVE_INFINITY;
|
914
|
+
scratchCartographicMax.latitude = Number.NEGATIVE_INFINITY;
|
915
|
+
scratchCartographicMax.longitude = Number.NEGATIVE_INFINITY;
|
916
|
+
let lat, lon;
|
917
|
+
if (cornerType === CornerType_default.ROUNDED) {
|
918
|
+
const first = cleanPositions[0];
|
919
|
+
Cartesian3_default.subtract(first, cleanPositions[1], scratchCartesianOffset);
|
920
|
+
Cartesian3_default.normalize(scratchCartesianOffset, scratchCartesianOffset);
|
921
|
+
Cartesian3_default.multiplyByScalar(
|
922
|
+
scratchCartesianOffset,
|
923
|
+
halfWidth,
|
924
|
+
scratchCartesianOffset
|
857
925
|
);
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
normal,
|
863
|
-
scratchCartesian1
|
926
|
+
Cartesian3_default.add(first, scratchCartesianOffset, scratchCartesianEnds);
|
927
|
+
ellipsoid.cartesianToCartographic(
|
928
|
+
scratchCartesianEnds,
|
929
|
+
scratchCartographic
|
864
930
|
);
|
865
|
-
Matrix3.Cartesian3.multiplyByScalar(offsetDirection, halfWidth, offsetDirection);
|
866
|
-
|
867
|
-
let minLat = min.latitude;
|
868
|
-
let minLon = min.longitude;
|
869
|
-
let maxLat = max.latitude;
|
870
|
-
let maxLon = max.longitude;
|
871
|
-
|
872
|
-
// Compute 2 offset points
|
873
|
-
Matrix3.Cartesian3.add(position1, offsetDirection, scratchCartesian2);
|
874
|
-
ellipsoid.cartesianToCartographic(scratchCartesian2, scratchCartographic);
|
875
|
-
|
876
|
-
let lat = scratchCartographic.latitude;
|
877
|
-
let lon = scratchCartographic.longitude;
|
878
|
-
minLat = Math.min(minLat, lat);
|
879
|
-
minLon = Math.min(minLon, lon);
|
880
|
-
maxLat = Math.max(maxLat, lat);
|
881
|
-
maxLon = Math.max(maxLon, lon);
|
882
|
-
|
883
|
-
Matrix3.Cartesian3.subtract(position1, offsetDirection, scratchCartesian2);
|
884
|
-
ellipsoid.cartesianToCartographic(scratchCartesian2, scratchCartographic);
|
885
|
-
|
886
931
|
lat = scratchCartographic.latitude;
|
887
932
|
lon = scratchCartographic.longitude;
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
maxLon = Math.max(maxLon, lon);
|
892
|
-
|
893
|
-
min.latitude = minLat;
|
894
|
-
min.longitude = minLon;
|
895
|
-
max.latitude = maxLat;
|
896
|
-
max.longitude = maxLon;
|
897
|
-
}
|
898
|
-
|
899
|
-
const scratchCartesianOffset = new Matrix3.Cartesian3();
|
900
|
-
const scratchCartesianEnds = new Matrix3.Cartesian3();
|
901
|
-
const scratchCartographicMin = new Matrix3.Cartographic();
|
902
|
-
const scratchCartographicMax = new Matrix3.Cartographic();
|
903
|
-
|
904
|
-
function computeRectangle(positions, ellipsoid, width, cornerType, result) {
|
905
|
-
positions = scaleToSurface(positions, ellipsoid);
|
906
|
-
const cleanPositions = arrayRemoveDuplicates.arrayRemoveDuplicates(
|
907
|
-
positions,
|
908
|
-
Matrix3.Cartesian3.equalsEpsilon
|
933
|
+
scratchCartographicMin.latitude = Math.min(
|
934
|
+
scratchCartographicMin.latitude,
|
935
|
+
lat
|
909
936
|
);
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
scratchCartographicMin.longitude = Number.POSITIVE_INFINITY;
|
918
|
-
scratchCartographicMax.latitude = Number.NEGATIVE_INFINITY;
|
919
|
-
scratchCartographicMax.longitude = Number.NEGATIVE_INFINITY;
|
920
|
-
|
921
|
-
let lat, lon;
|
922
|
-
if (cornerType === PolylineVolumeGeometryLibrary.CornerType.ROUNDED) {
|
923
|
-
// Compute start cap
|
924
|
-
const first = cleanPositions[0];
|
925
|
-
Matrix3.Cartesian3.subtract(first, cleanPositions[1], scratchCartesianOffset);
|
926
|
-
Matrix3.Cartesian3.normalize(scratchCartesianOffset, scratchCartesianOffset);
|
927
|
-
Matrix3.Cartesian3.multiplyByScalar(
|
928
|
-
scratchCartesianOffset,
|
929
|
-
halfWidth,
|
930
|
-
scratchCartesianOffset
|
931
|
-
);
|
932
|
-
Matrix3.Cartesian3.add(first, scratchCartesianOffset, scratchCartesianEnds);
|
933
|
-
|
934
|
-
ellipsoid.cartesianToCartographic(
|
935
|
-
scratchCartesianEnds,
|
936
|
-
scratchCartographic
|
937
|
-
);
|
938
|
-
lat = scratchCartographic.latitude;
|
939
|
-
lon = scratchCartographic.longitude;
|
940
|
-
scratchCartographicMin.latitude = Math.min(
|
941
|
-
scratchCartographicMin.latitude,
|
942
|
-
lat
|
943
|
-
);
|
944
|
-
scratchCartographicMin.longitude = Math.min(
|
945
|
-
scratchCartographicMin.longitude,
|
946
|
-
lon
|
947
|
-
);
|
948
|
-
scratchCartographicMax.latitude = Math.max(
|
949
|
-
scratchCartographicMax.latitude,
|
950
|
-
lat
|
951
|
-
);
|
952
|
-
scratchCartographicMax.longitude = Math.max(
|
953
|
-
scratchCartographicMax.longitude,
|
954
|
-
lon
|
955
|
-
);
|
956
|
-
}
|
957
|
-
|
958
|
-
// Compute the rest
|
959
|
-
for (let i = 0; i < length - 1; ++i) {
|
960
|
-
computeOffsetPoints(
|
961
|
-
cleanPositions[i],
|
962
|
-
cleanPositions[i + 1],
|
963
|
-
ellipsoid,
|
964
|
-
halfWidth,
|
965
|
-
scratchCartographicMin,
|
966
|
-
scratchCartographicMax
|
967
|
-
);
|
968
|
-
}
|
969
|
-
|
970
|
-
// Compute ending point
|
971
|
-
const last = cleanPositions[length - 1];
|
972
|
-
Matrix3.Cartesian3.subtract(last, cleanPositions[length - 2], scratchCartesianOffset);
|
973
|
-
Matrix3.Cartesian3.normalize(scratchCartesianOffset, scratchCartesianOffset);
|
974
|
-
Matrix3.Cartesian3.multiplyByScalar(
|
975
|
-
scratchCartesianOffset,
|
976
|
-
halfWidth,
|
977
|
-
scratchCartesianOffset
|
937
|
+
scratchCartographicMin.longitude = Math.min(
|
938
|
+
scratchCartographicMin.longitude,
|
939
|
+
lon
|
940
|
+
);
|
941
|
+
scratchCartographicMax.latitude = Math.max(
|
942
|
+
scratchCartographicMax.latitude,
|
943
|
+
lat
|
978
944
|
);
|
979
|
-
|
945
|
+
scratchCartographicMax.longitude = Math.max(
|
946
|
+
scratchCartographicMax.longitude,
|
947
|
+
lon
|
948
|
+
);
|
949
|
+
}
|
950
|
+
for (let i = 0; i < length - 1; ++i) {
|
980
951
|
computeOffsetPoints(
|
981
|
-
|
982
|
-
|
952
|
+
cleanPositions[i],
|
953
|
+
cleanPositions[i + 1],
|
983
954
|
ellipsoid,
|
984
955
|
halfWidth,
|
985
956
|
scratchCartographicMin,
|
986
957
|
scratchCartographicMax
|
987
958
|
);
|
988
|
-
|
989
|
-
if (cornerType === PolylineVolumeGeometryLibrary.CornerType.ROUNDED) {
|
990
|
-
// Compute end cap
|
991
|
-
ellipsoid.cartesianToCartographic(
|
992
|
-
scratchCartesianEnds,
|
993
|
-
scratchCartographic
|
994
|
-
);
|
995
|
-
lat = scratchCartographic.latitude;
|
996
|
-
lon = scratchCartographic.longitude;
|
997
|
-
scratchCartographicMin.latitude = Math.min(
|
998
|
-
scratchCartographicMin.latitude,
|
999
|
-
lat
|
1000
|
-
);
|
1001
|
-
scratchCartographicMin.longitude = Math.min(
|
1002
|
-
scratchCartographicMin.longitude,
|
1003
|
-
lon
|
1004
|
-
);
|
1005
|
-
scratchCartographicMax.latitude = Math.max(
|
1006
|
-
scratchCartographicMax.latitude,
|
1007
|
-
lat
|
1008
|
-
);
|
1009
|
-
scratchCartographicMax.longitude = Math.max(
|
1010
|
-
scratchCartographicMax.longitude,
|
1011
|
-
lon
|
1012
|
-
);
|
1013
|
-
}
|
1014
|
-
|
1015
|
-
const rectangle = defaultValue.defined(result) ? result : new Matrix2.Rectangle();
|
1016
|
-
rectangle.north = scratchCartographicMax.latitude;
|
1017
|
-
rectangle.south = scratchCartographicMin.latitude;
|
1018
|
-
rectangle.east = scratchCartographicMax.longitude;
|
1019
|
-
rectangle.west = scratchCartographicMin.longitude;
|
1020
|
-
|
1021
|
-
return rectangle;
|
1022
959
|
}
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
*
|
1045
|
-
* @example
|
1046
|
-
* const corridor = new Cesium.CorridorGeometry({
|
1047
|
-
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
|
1048
|
-
* positions : Cesium.Cartesian3.fromDegreesArray([-72.0, 40.0, -70.0, 35.0]),
|
1049
|
-
* width : 100000
|
1050
|
-
* });
|
1051
|
-
*/
|
1052
|
-
function CorridorGeometry(options) {
|
1053
|
-
options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
|
1054
|
-
const positions = options.positions;
|
1055
|
-
const width = options.width;
|
1056
|
-
|
1057
|
-
//>>includeStart('debug', pragmas.debug);
|
1058
|
-
Check.Check.defined("options.positions", positions);
|
1059
|
-
Check.Check.defined("options.width", width);
|
1060
|
-
//>>includeEnd('debug');
|
1061
|
-
|
1062
|
-
const height = defaultValue.defaultValue(options.height, 0.0);
|
1063
|
-
const extrudedHeight = defaultValue.defaultValue(options.extrudedHeight, height);
|
1064
|
-
|
1065
|
-
this._positions = positions;
|
1066
|
-
this._ellipsoid = Matrix3.Ellipsoid.clone(
|
1067
|
-
defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84)
|
960
|
+
const last = cleanPositions[length - 1];
|
961
|
+
Cartesian3_default.subtract(last, cleanPositions[length - 2], scratchCartesianOffset);
|
962
|
+
Cartesian3_default.normalize(scratchCartesianOffset, scratchCartesianOffset);
|
963
|
+
Cartesian3_default.multiplyByScalar(
|
964
|
+
scratchCartesianOffset,
|
965
|
+
halfWidth,
|
966
|
+
scratchCartesianOffset
|
967
|
+
);
|
968
|
+
Cartesian3_default.add(last, scratchCartesianOffset, scratchCartesianEnds);
|
969
|
+
computeOffsetPoints(
|
970
|
+
last,
|
971
|
+
scratchCartesianEnds,
|
972
|
+
ellipsoid,
|
973
|
+
halfWidth,
|
974
|
+
scratchCartographicMin,
|
975
|
+
scratchCartographicMax
|
976
|
+
);
|
977
|
+
if (cornerType === CornerType_default.ROUNDED) {
|
978
|
+
ellipsoid.cartesianToCartographic(
|
979
|
+
scratchCartesianEnds,
|
980
|
+
scratchCartographic
|
1068
981
|
);
|
1069
|
-
|
1070
|
-
|
982
|
+
lat = scratchCartographic.latitude;
|
983
|
+
lon = scratchCartographic.longitude;
|
984
|
+
scratchCartographicMin.latitude = Math.min(
|
985
|
+
scratchCartographicMin.latitude,
|
986
|
+
lat
|
1071
987
|
);
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
988
|
+
scratchCartographicMin.longitude = Math.min(
|
989
|
+
scratchCartographicMin.longitude,
|
990
|
+
lon
|
991
|
+
);
|
992
|
+
scratchCartographicMax.latitude = Math.max(
|
993
|
+
scratchCartographicMax.latitude,
|
994
|
+
lat
|
995
|
+
);
|
996
|
+
scratchCartographicMax.longitude = Math.max(
|
997
|
+
scratchCartographicMax.longitude,
|
998
|
+
lon
|
1079
999
|
);
|
1080
|
-
this._shadowVolume = defaultValue.defaultValue(options.shadowVolume, false);
|
1081
|
-
this._workerName = "createCorridorGeometry";
|
1082
|
-
this._offsetAttribute = options.offsetAttribute;
|
1083
|
-
this._rectangle = undefined;
|
1084
|
-
|
1085
|
-
/**
|
1086
|
-
* The number of elements used to pack the object into an array.
|
1087
|
-
* @type {number}
|
1088
|
-
*/
|
1089
|
-
this.packedLength =
|
1090
|
-
1 +
|
1091
|
-
positions.length * Matrix3.Cartesian3.packedLength +
|
1092
|
-
Matrix3.Ellipsoid.packedLength +
|
1093
|
-
VertexFormat.VertexFormat.packedLength +
|
1094
|
-
7;
|
1095
1000
|
}
|
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
|
-
|
1001
|
+
const rectangle = defined_default(result) ? result : new Rectangle_default();
|
1002
|
+
rectangle.north = scratchCartographicMax.latitude;
|
1003
|
+
rectangle.south = scratchCartographicMin.latitude;
|
1004
|
+
rectangle.east = scratchCartographicMax.longitude;
|
1005
|
+
rectangle.west = scratchCartographicMin.longitude;
|
1006
|
+
return rectangle;
|
1007
|
+
}
|
1008
|
+
function CorridorGeometry(options) {
|
1009
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
1010
|
+
const positions = options.positions;
|
1011
|
+
const width = options.width;
|
1012
|
+
Check_default.defined("options.positions", positions);
|
1013
|
+
Check_default.defined("options.width", width);
|
1014
|
+
const height = defaultValue_default(options.height, 0);
|
1015
|
+
const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
|
1016
|
+
this._positions = positions;
|
1017
|
+
this._ellipsoid = Ellipsoid_default.clone(
|
1018
|
+
defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84)
|
1019
|
+
);
|
1020
|
+
this._vertexFormat = VertexFormat_default.clone(
|
1021
|
+
defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
|
1022
|
+
);
|
1023
|
+
this._width = width;
|
1024
|
+
this._height = Math.max(height, extrudedHeight);
|
1025
|
+
this._extrudedHeight = Math.min(height, extrudedHeight);
|
1026
|
+
this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
|
1027
|
+
this._granularity = defaultValue_default(
|
1028
|
+
options.granularity,
|
1029
|
+
Math_default.RADIANS_PER_DEGREE
|
1030
|
+
);
|
1031
|
+
this._shadowVolume = defaultValue_default(options.shadowVolume, false);
|
1032
|
+
this._workerName = "createCorridorGeometry";
|
1033
|
+
this._offsetAttribute = options.offsetAttribute;
|
1034
|
+
this._rectangle = void 0;
|
1035
|
+
this.packedLength = 1 + positions.length * Cartesian3_default.packedLength + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 7;
|
1036
|
+
}
|
1037
|
+
CorridorGeometry.pack = function(value, array, startingIndex) {
|
1038
|
+
Check_default.defined("value", value);
|
1039
|
+
Check_default.defined("array", array);
|
1040
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
1041
|
+
const positions = value._positions;
|
1042
|
+
const length = positions.length;
|
1043
|
+
array[startingIndex++] = length;
|
1044
|
+
for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
|
1045
|
+
Cartesian3_default.pack(positions[i], array, startingIndex);
|
1046
|
+
}
|
1047
|
+
Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
|
1048
|
+
startingIndex += Ellipsoid_default.packedLength;
|
1049
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
1050
|
+
startingIndex += VertexFormat_default.packedLength;
|
1051
|
+
array[startingIndex++] = value._width;
|
1052
|
+
array[startingIndex++] = value._height;
|
1053
|
+
array[startingIndex++] = value._extrudedHeight;
|
1054
|
+
array[startingIndex++] = value._cornerType;
|
1055
|
+
array[startingIndex++] = value._granularity;
|
1056
|
+
array[startingIndex++] = value._shadowVolume ? 1 : 0;
|
1057
|
+
array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
|
1058
|
+
return array;
|
1059
|
+
};
|
1060
|
+
var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
|
1061
|
+
var scratchVertexFormat = new VertexFormat_default();
|
1062
|
+
var scratchOptions = {
|
1063
|
+
positions: void 0,
|
1064
|
+
ellipsoid: scratchEllipsoid,
|
1065
|
+
vertexFormat: scratchVertexFormat,
|
1066
|
+
width: void 0,
|
1067
|
+
height: void 0,
|
1068
|
+
extrudedHeight: void 0,
|
1069
|
+
cornerType: void 0,
|
1070
|
+
granularity: void 0,
|
1071
|
+
shadowVolume: void 0,
|
1072
|
+
offsetAttribute: void 0
|
1073
|
+
};
|
1074
|
+
CorridorGeometry.unpack = function(array, startingIndex, result) {
|
1075
|
+
Check_default.defined("array", array);
|
1076
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
1077
|
+
const length = array[startingIndex++];
|
1078
|
+
const positions = new Array(length);
|
1079
|
+
for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
|
1080
|
+
positions[i] = Cartesian3_default.unpack(array, startingIndex);
|
1081
|
+
}
|
1082
|
+
const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
|
1083
|
+
startingIndex += Ellipsoid_default.packedLength;
|
1084
|
+
const vertexFormat = VertexFormat_default.unpack(
|
1085
|
+
array,
|
1086
|
+
startingIndex,
|
1087
|
+
scratchVertexFormat
|
1088
|
+
);
|
1089
|
+
startingIndex += VertexFormat_default.packedLength;
|
1090
|
+
const width = array[startingIndex++];
|
1091
|
+
const height = array[startingIndex++];
|
1092
|
+
const extrudedHeight = array[startingIndex++];
|
1093
|
+
const cornerType = array[startingIndex++];
|
1094
|
+
const granularity = array[startingIndex++];
|
1095
|
+
const shadowVolume = array[startingIndex++] === 1;
|
1096
|
+
const offsetAttribute = array[startingIndex];
|
1097
|
+
if (!defined_default(result)) {
|
1098
|
+
scratchOptions.positions = positions;
|
1099
|
+
scratchOptions.width = width;
|
1100
|
+
scratchOptions.height = height;
|
1101
|
+
scratchOptions.extrudedHeight = extrudedHeight;
|
1102
|
+
scratchOptions.cornerType = cornerType;
|
1103
|
+
scratchOptions.granularity = granularity;
|
1104
|
+
scratchOptions.shadowVolume = shadowVolume;
|
1105
|
+
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
1106
|
+
return new CorridorGeometry(scratchOptions);
|
1107
|
+
}
|
1108
|
+
result._positions = positions;
|
1109
|
+
result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
|
1110
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
1111
|
+
result._width = width;
|
1112
|
+
result._height = height;
|
1113
|
+
result._extrudedHeight = extrudedHeight;
|
1114
|
+
result._cornerType = cornerType;
|
1115
|
+
result._granularity = granularity;
|
1116
|
+
result._shadowVolume = shadowVolume;
|
1117
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
1118
|
+
return result;
|
1119
|
+
};
|
1120
|
+
CorridorGeometry.computeRectangle = function(options, result) {
|
1121
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
1122
|
+
const positions = options.positions;
|
1123
|
+
const width = options.width;
|
1124
|
+
Check_default.defined("options.positions", positions);
|
1125
|
+
Check_default.defined("options.width", width);
|
1126
|
+
const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84);
|
1127
|
+
const cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
|
1128
|
+
return computeRectangle(positions, ellipsoid, width, cornerType, result);
|
1129
|
+
};
|
1130
|
+
CorridorGeometry.createGeometry = function(corridorGeometry) {
|
1131
|
+
let positions = corridorGeometry._positions;
|
1132
|
+
const width = corridorGeometry._width;
|
1133
|
+
const ellipsoid = corridorGeometry._ellipsoid;
|
1134
|
+
positions = scaleToSurface(positions, ellipsoid);
|
1135
|
+
const cleanPositions = arrayRemoveDuplicates_default(
|
1136
|
+
positions,
|
1137
|
+
Cartesian3_default.equalsEpsilon
|
1138
|
+
);
|
1139
|
+
if (cleanPositions.length < 2 || width <= 0) {
|
1140
|
+
return;
|
1141
|
+
}
|
1142
|
+
const height = corridorGeometry._height;
|
1143
|
+
const extrudedHeight = corridorGeometry._extrudedHeight;
|
1144
|
+
const extrude = !Math_default.equalsEpsilon(
|
1145
|
+
height,
|
1146
|
+
extrudedHeight,
|
1147
|
+
0,
|
1148
|
+
Math_default.EPSILON2
|
1149
|
+
);
|
1150
|
+
const vertexFormat = corridorGeometry._vertexFormat;
|
1151
|
+
const params = {
|
1152
|
+
ellipsoid,
|
1153
|
+
positions: cleanPositions,
|
1154
|
+
width,
|
1155
|
+
cornerType: corridorGeometry._cornerType,
|
1156
|
+
granularity: corridorGeometry._granularity,
|
1157
|
+
saveAttributes: true
|
1152
1158
|
};
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
startingIndex = defaultValue.defaultValue(startingIndex, 0);
|
1168
|
-
|
1169
|
-
const length = array[startingIndex++];
|
1170
|
-
const positions = new Array(length);
|
1171
|
-
|
1172
|
-
for (let i = 0; i < length; ++i, startingIndex += Matrix3.Cartesian3.packedLength) {
|
1173
|
-
positions[i] = Matrix3.Cartesian3.unpack(array, startingIndex);
|
1174
|
-
}
|
1175
|
-
|
1176
|
-
const ellipsoid = Matrix3.Ellipsoid.unpack(array, startingIndex, scratchEllipsoid);
|
1177
|
-
startingIndex += Matrix3.Ellipsoid.packedLength;
|
1178
|
-
|
1179
|
-
const vertexFormat = VertexFormat.VertexFormat.unpack(
|
1180
|
-
array,
|
1181
|
-
startingIndex,
|
1182
|
-
scratchVertexFormat
|
1159
|
+
let attr;
|
1160
|
+
if (extrude) {
|
1161
|
+
params.height = height;
|
1162
|
+
params.extrudedHeight = extrudedHeight;
|
1163
|
+
params.shadowVolume = corridorGeometry._shadowVolume;
|
1164
|
+
params.offsetAttribute = corridorGeometry._offsetAttribute;
|
1165
|
+
attr = computePositionsExtruded(params, vertexFormat);
|
1166
|
+
} else {
|
1167
|
+
const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
|
1168
|
+
attr = combine(computedPositions, vertexFormat, ellipsoid);
|
1169
|
+
attr.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
|
1170
|
+
attr.attributes.position.values,
|
1171
|
+
height,
|
1172
|
+
ellipsoid
|
1183
1173
|
);
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
if (!defaultValue.defined(result)) {
|
1195
|
-
scratchOptions.positions = positions;
|
1196
|
-
scratchOptions.width = width;
|
1197
|
-
scratchOptions.height = height;
|
1198
|
-
scratchOptions.extrudedHeight = extrudedHeight;
|
1199
|
-
scratchOptions.cornerType = cornerType;
|
1200
|
-
scratchOptions.granularity = granularity;
|
1201
|
-
scratchOptions.shadowVolume = shadowVolume;
|
1202
|
-
scratchOptions.offsetAttribute =
|
1203
|
-
offsetAttribute === -1 ? undefined : offsetAttribute;
|
1204
|
-
|
1205
|
-
return new CorridorGeometry(scratchOptions);
|
1174
|
+
if (defined_default(corridorGeometry._offsetAttribute)) {
|
1175
|
+
const applyOffsetValue = corridorGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
1176
|
+
const length = attr.attributes.position.values.length;
|
1177
|
+
const applyOffset = new Uint8Array(length / 3).fill(applyOffsetValue);
|
1178
|
+
attr.attributes.applyOffset = new GeometryAttribute_default({
|
1179
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
1180
|
+
componentsPerAttribute: 1,
|
1181
|
+
values: applyOffset
|
1182
|
+
});
|
1206
1183
|
}
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
//>>includeEnd('debug');
|
1244
|
-
|
1245
|
-
const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
|
1246
|
-
const cornerType = defaultValue.defaultValue(options.cornerType, PolylineVolumeGeometryLibrary.CornerType.ROUNDED);
|
1247
|
-
|
1248
|
-
return computeRectangle(positions, ellipsoid, width, cornerType, result);
|
1249
|
-
};
|
1250
|
-
|
1184
|
+
}
|
1185
|
+
const attributes = attr.attributes;
|
1186
|
+
const boundingSphere = BoundingSphere_default.fromVertices(
|
1187
|
+
attributes.position.values,
|
1188
|
+
void 0,
|
1189
|
+
3
|
1190
|
+
);
|
1191
|
+
if (!vertexFormat.position) {
|
1192
|
+
attr.attributes.position.values = void 0;
|
1193
|
+
}
|
1194
|
+
return new Geometry_default({
|
1195
|
+
attributes,
|
1196
|
+
indices: attr.indices,
|
1197
|
+
primitiveType: PrimitiveType_default.TRIANGLES,
|
1198
|
+
boundingSphere,
|
1199
|
+
offsetAttribute: corridorGeometry._offsetAttribute
|
1200
|
+
});
|
1201
|
+
};
|
1202
|
+
CorridorGeometry.createShadowVolume = function(corridorGeometry, minHeightFunc, maxHeightFunc) {
|
1203
|
+
const granularity = corridorGeometry._granularity;
|
1204
|
+
const ellipsoid = corridorGeometry._ellipsoid;
|
1205
|
+
const minHeight = minHeightFunc(granularity, ellipsoid);
|
1206
|
+
const maxHeight = maxHeightFunc(granularity, ellipsoid);
|
1207
|
+
return new CorridorGeometry({
|
1208
|
+
positions: corridorGeometry._positions,
|
1209
|
+
width: corridorGeometry._width,
|
1210
|
+
cornerType: corridorGeometry._cornerType,
|
1211
|
+
ellipsoid,
|
1212
|
+
granularity,
|
1213
|
+
extrudedHeight: minHeight,
|
1214
|
+
height: maxHeight,
|
1215
|
+
vertexFormat: VertexFormat_default.POSITION_ONLY,
|
1216
|
+
shadowVolume: true
|
1217
|
+
});
|
1218
|
+
};
|
1219
|
+
Object.defineProperties(CorridorGeometry.prototype, {
|
1251
1220
|
/**
|
1252
|
-
*
|
1253
|
-
*
|
1254
|
-
* @param {CorridorGeometry} corridorGeometry A description of the corridor.
|
1255
|
-
* @returns {Geometry|undefined} The computed vertices and indices.
|
1221
|
+
* @private
|
1256
1222
|
*/
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
);
|
1267
|
-
|
1268
|
-
if (cleanPositions.length < 2 || width <= 0) {
|
1269
|
-
return;
|
1270
|
-
}
|
1271
|
-
|
1272
|
-
const height = corridorGeometry._height;
|
1273
|
-
const extrudedHeight = corridorGeometry._extrudedHeight;
|
1274
|
-
const extrude = !Math$1.CesiumMath.equalsEpsilon(
|
1275
|
-
height,
|
1276
|
-
extrudedHeight,
|
1277
|
-
0,
|
1278
|
-
Math$1.CesiumMath.EPSILON2
|
1279
|
-
);
|
1280
|
-
|
1281
|
-
const vertexFormat = corridorGeometry._vertexFormat;
|
1282
|
-
const params = {
|
1283
|
-
ellipsoid: ellipsoid,
|
1284
|
-
positions: cleanPositions,
|
1285
|
-
width: width,
|
1286
|
-
cornerType: corridorGeometry._cornerType,
|
1287
|
-
granularity: corridorGeometry._granularity,
|
1288
|
-
saveAttributes: true,
|
1289
|
-
};
|
1290
|
-
let attr;
|
1291
|
-
if (extrude) {
|
1292
|
-
params.height = height;
|
1293
|
-
params.extrudedHeight = extrudedHeight;
|
1294
|
-
params.shadowVolume = corridorGeometry._shadowVolume;
|
1295
|
-
params.offsetAttribute = corridorGeometry._offsetAttribute;
|
1296
|
-
attr = computePositionsExtruded(params, vertexFormat);
|
1297
|
-
} else {
|
1298
|
-
const computedPositions = CorridorGeometryLibrary.CorridorGeometryLibrary.computePositions(params);
|
1299
|
-
attr = combine(computedPositions, vertexFormat, ellipsoid);
|
1300
|
-
attr.attributes.position.values = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
1301
|
-
attr.attributes.position.values,
|
1302
|
-
height,
|
1303
|
-
ellipsoid
|
1304
|
-
);
|
1305
|
-
|
1306
|
-
if (defaultValue.defined(corridorGeometry._offsetAttribute)) {
|
1307
|
-
const applyOffsetValue =
|
1308
|
-
corridorGeometry._offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE
|
1309
|
-
? 0
|
1310
|
-
: 1;
|
1311
|
-
const length = attr.attributes.position.values.length;
|
1312
|
-
const applyOffset = new Uint8Array(length / 3).fill(applyOffsetValue);
|
1313
|
-
attr.attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
|
1314
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
|
1315
|
-
componentsPerAttribute: 1,
|
1316
|
-
values: applyOffset,
|
1317
|
-
});
|
1223
|
+
rectangle: {
|
1224
|
+
get: function() {
|
1225
|
+
if (!defined_default(this._rectangle)) {
|
1226
|
+
this._rectangle = computeRectangle(
|
1227
|
+
this._positions,
|
1228
|
+
this._ellipsoid,
|
1229
|
+
this._width,
|
1230
|
+
this._cornerType
|
1231
|
+
);
|
1318
1232
|
}
|
1233
|
+
return this._rectangle;
|
1319
1234
|
}
|
1320
|
-
|
1321
|
-
const boundingSphere = Transforms.BoundingSphere.fromVertices(
|
1322
|
-
attributes.position.values,
|
1323
|
-
undefined,
|
1324
|
-
3
|
1325
|
-
);
|
1326
|
-
if (!vertexFormat.position) {
|
1327
|
-
attr.attributes.position.values = undefined;
|
1328
|
-
}
|
1329
|
-
|
1330
|
-
return new GeometryAttribute.Geometry({
|
1331
|
-
attributes: attributes,
|
1332
|
-
indices: attr.indices,
|
1333
|
-
primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
|
1334
|
-
boundingSphere: boundingSphere,
|
1335
|
-
offsetAttribute: corridorGeometry._offsetAttribute,
|
1336
|
-
});
|
1337
|
-
};
|
1338
|
-
|
1235
|
+
},
|
1339
1236
|
/**
|
1237
|
+
* For remapping texture coordinates when rendering CorridorGeometries as GroundPrimitives.
|
1238
|
+
*
|
1239
|
+
* Corridors don't support stRotation,
|
1240
|
+
* so just return the corners of the original system.
|
1340
1241
|
* @private
|
1341
1242
|
*/
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
maxHeightFunc
|
1346
|
-
) {
|
1347
|
-
const granularity = corridorGeometry._granularity;
|
1348
|
-
const ellipsoid = corridorGeometry._ellipsoid;
|
1349
|
-
|
1350
|
-
const minHeight = minHeightFunc(granularity, ellipsoid);
|
1351
|
-
const maxHeight = maxHeightFunc(granularity, ellipsoid);
|
1352
|
-
|
1353
|
-
return new CorridorGeometry({
|
1354
|
-
positions: corridorGeometry._positions,
|
1355
|
-
width: corridorGeometry._width,
|
1356
|
-
cornerType: corridorGeometry._cornerType,
|
1357
|
-
ellipsoid: ellipsoid,
|
1358
|
-
granularity: granularity,
|
1359
|
-
extrudedHeight: minHeight,
|
1360
|
-
height: maxHeight,
|
1361
|
-
vertexFormat: VertexFormat.VertexFormat.POSITION_ONLY,
|
1362
|
-
shadowVolume: true,
|
1363
|
-
});
|
1364
|
-
};
|
1365
|
-
|
1366
|
-
Object.defineProperties(CorridorGeometry.prototype, {
|
1367
|
-
/**
|
1368
|
-
* @private
|
1369
|
-
*/
|
1370
|
-
rectangle: {
|
1371
|
-
get: function () {
|
1372
|
-
if (!defaultValue.defined(this._rectangle)) {
|
1373
|
-
this._rectangle = computeRectangle(
|
1374
|
-
this._positions,
|
1375
|
-
this._ellipsoid,
|
1376
|
-
this._width,
|
1377
|
-
this._cornerType
|
1378
|
-
);
|
1379
|
-
}
|
1380
|
-
return this._rectangle;
|
1381
|
-
},
|
1382
|
-
},
|
1383
|
-
/**
|
1384
|
-
* For remapping texture coordinates when rendering CorridorGeometries as GroundPrimitives.
|
1385
|
-
*
|
1386
|
-
* Corridors don't support stRotation,
|
1387
|
-
* so just return the corners of the original system.
|
1388
|
-
* @private
|
1389
|
-
*/
|
1390
|
-
textureCoordinateRotationPoints: {
|
1391
|
-
get: function () {
|
1392
|
-
return [0, 0, 0, 1, 1, 0];
|
1393
|
-
},
|
1394
|
-
},
|
1395
|
-
});
|
1396
|
-
|
1397
|
-
function createCorridorGeometry(corridorGeometry, offset) {
|
1398
|
-
if (defaultValue.defined(offset)) {
|
1399
|
-
corridorGeometry = CorridorGeometry.unpack(corridorGeometry, offset);
|
1243
|
+
textureCoordinateRotationPoints: {
|
1244
|
+
get: function() {
|
1245
|
+
return [0, 0, 0, 1, 1, 0];
|
1400
1246
|
}
|
1401
|
-
corridorGeometry._ellipsoid = Matrix3.Ellipsoid.clone(corridorGeometry._ellipsoid);
|
1402
|
-
return CorridorGeometry.createGeometry(corridorGeometry);
|
1403
1247
|
}
|
1248
|
+
});
|
1249
|
+
var CorridorGeometry_default = CorridorGeometry;
|
1404
1250
|
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1251
|
+
// packages/engine/Source/Workers/createCorridorGeometry.js
|
1252
|
+
function createCorridorGeometry(corridorGeometry, offset) {
|
1253
|
+
if (defined_default(offset)) {
|
1254
|
+
corridorGeometry = CorridorGeometry_default.unpack(corridorGeometry, offset);
|
1255
|
+
}
|
1256
|
+
corridorGeometry._ellipsoid = Ellipsoid_default.clone(corridorGeometry._ellipsoid);
|
1257
|
+
return CorridorGeometry_default.createGeometry(corridorGeometry);
|
1258
|
+
}
|
1259
|
+
var createCorridorGeometry_default = createCorridorGeometry;
|
1260
|
+
export {
|
1261
|
+
createCorridorGeometry_default as default
|
1262
|
+
};
|