@vcmap/ui 5.0.0-rc.29 → 5.0.0-rc.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/buildHelpers.js +4 -3
- package/config/base.config.json +5 -4
- package/config/dev.config.json +8 -0
- package/config/graphFeatureInfo.config.json +1 -1
- package/config/projects.config.json +2 -2
- package/dist/assets/cesium/ThirdParty/Workers/basis_transcoder.js +1 -1
- package/dist/assets/cesium/Workers/chunk-227AJNOA.js +59 -0
- package/dist/assets/cesium/Workers/chunk-2R5O53JW.js +157 -0
- package/dist/assets/cesium/Workers/chunk-34YUDLRP.js +781 -0
- package/dist/assets/cesium/Workers/chunk-3W63OHNJ.js +100 -0
- package/dist/assets/cesium/Workers/chunk-4MFFIWUA.js +163 -0
- package/dist/assets/cesium/Workers/chunk-66QLLS45.js +218 -0
- package/dist/assets/cesium/Workers/chunk-6BTKZDRG.js +77 -0
- package/dist/assets/cesium/Workers/chunk-A4JVFBQ3.js +101 -0
- package/dist/assets/cesium/Workers/chunk-ABADGKYE.js +58 -0
- package/dist/assets/cesium/Workers/chunk-AFFLIKOH.js +353 -0
- package/dist/assets/cesium/Workers/chunk-AHKEZ2OE.js +629 -0
- package/dist/assets/cesium/Workers/chunk-C3SXRKRW.js +476 -0
- package/dist/assets/cesium/Workers/chunk-CCFQRR6D.js +55 -0
- package/dist/assets/cesium/Workers/chunk-CHHNOC2C.js +1860 -0
- package/dist/assets/cesium/Workers/chunk-CTELOFLA.js +196 -0
- package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +3273 -0
- package/dist/assets/cesium/Workers/chunk-EW2GWJYB.js +44 -0
- package/dist/assets/cesium/Workers/chunk-GLZBE3ML.js +421 -0
- package/dist/assets/cesium/Workers/chunk-HARLBUOL.js +236 -0
- package/dist/assets/cesium/Workers/chunk-HQF437NJ.js +117 -0
- package/dist/assets/cesium/Workers/chunk-IPA4EACJ.js +368 -0
- package/dist/assets/cesium/Workers/chunk-J3JY6I2C.js +1009 -0
- package/dist/assets/cesium/Workers/chunk-JB2LWGH4.js +390 -0
- package/dist/assets/cesium/Workers/chunk-JS3AW5BK.js +634 -0
- package/dist/assets/cesium/Workers/chunk-K36FEYS7.js +452 -0
- package/dist/assets/cesium/Workers/chunk-KD4Y7CZL.js +400 -0
- package/dist/assets/cesium/Workers/chunk-KTJSNCK4.js +842 -0
- package/dist/assets/cesium/Workers/chunk-LLUNNUJV.js +258 -0
- package/dist/assets/cesium/Workers/{package.js → chunk-MPAZH4BF.js} +13 -2
- package/dist/assets/cesium/Workers/chunk-MYZB7C4T.js +1258 -0
- package/dist/assets/cesium/Workers/chunk-N3JIFFX2.js +501 -0
- package/dist/assets/cesium/Workers/chunk-O5AMBQ36.js +430 -0
- package/dist/assets/cesium/Workers/chunk-OAVNIRB4.js +124 -0
- package/dist/assets/cesium/Workers/chunk-OYFCF4PL.js +171 -0
- package/dist/assets/cesium/Workers/chunk-OZJDGN5F.js +1477 -0
- package/dist/assets/cesium/Workers/chunk-PCJWUS4M.js +2041 -0
- package/dist/assets/cesium/Workers/chunk-PFQBCKBM.js +8644 -0
- package/dist/assets/cesium/Workers/chunk-QIKODV5G.js +305 -0
- package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +73 -0
- package/dist/assets/cesium/Workers/chunk-QMEMZIJI.js +138 -0
- package/dist/assets/cesium/Workers/chunk-QT3MPEMI.js +102 -0
- package/dist/assets/cesium/Workers/chunk-RP2A7BR5.js +289 -0
- package/dist/assets/cesium/Workers/chunk-RW6LU2CJ.js +138 -0
- package/dist/assets/cesium/Workers/chunk-TFC6TZ3S.js +757 -0
- package/dist/assets/cesium/Workers/chunk-V3NGATMV.js +693 -0
- package/dist/assets/cesium/Workers/chunk-VLGOATD6.js +1075 -0
- package/dist/assets/cesium/Workers/chunk-WXTV4ATB.js +39 -0
- package/dist/assets/cesium/Workers/chunk-X4SU25DT.js +302 -0
- package/dist/assets/cesium/Workers/chunk-XTY7B2N6.js +2716 -0
- package/dist/assets/cesium/Workers/chunk-XY7MGBKC.js +513 -0
- package/dist/assets/cesium/Workers/chunk-Z24VKNDO.js +834 -0
- package/dist/assets/cesium/Workers/chunk-ZA25DG4Y.js +684 -0
- package/dist/assets/cesium/Workers/chunk-ZFOBYDGF.js +73 -0
- package/dist/assets/cesium/Workers/combineGeometry.js +65 -15
- package/dist/assets/cesium/Workers/createBoxGeometry.js +55 -10
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +231 -310
- package/dist/assets/cesium/Workers/createCircleGeometry.js +185 -202
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +141 -155
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +477 -557
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +218 -230
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +1162 -1307
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +533 -569
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +57 -10
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +224 -258
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +68 -12
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +61 -12
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +56 -10
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +58 -13
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +55 -10
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +226 -243
- package/dist/assets/cesium/Workers/createGeometry.js +143 -48
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +1484 -2011
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +216 -243
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +121 -113
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +1041 -1327
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +516 -657
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +471 -547
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +352 -384
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +271 -295
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +1128 -1331
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +445 -500
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +381 -440
- package/dist/assets/cesium/Workers/createSphereGeometry.js +112 -118
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +112 -121
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +32 -127
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +462 -505
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +377 -436
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +110 -77
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +369 -391
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +252 -244
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +543 -615
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2244 -2677
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +682 -926
- package/dist/assets/cesium/Workers/createWallGeometry.js +459 -593
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +324 -419
- package/dist/assets/cesium/Workers/decodeDraco.js +327 -347
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2530 -3567
- package/dist/assets/cesium/Workers/decodeI3S.js +765 -970
- package/dist/assets/cesium/Workers/transcodeKTX2.js +3353 -1464
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +3 -4
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +748 -953
- package/dist/assets/{cesium.16590b.js → cesium.77d0f7.js} +8915 -13165
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.74da2a.js → core.720589.js} +3421 -3365
- package/dist/assets/core.js +1 -1
- package/dist/assets/index-dd539204.js +1 -0
- package/dist/assets/{ol.50a512.js → ol.e48649.js} +4 -4
- package/dist/assets/ol.js +1 -1
- package/dist/assets/{ui.d3054c.css → ui.50452a.css} +2 -2
- package/dist/assets/{ui.d3054c.js → ui.50452a.js} +5312 -4776
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +2 -2
- package/dist/assets/{vuetify.946bd8.js → vuetify.f0a769.js} +1 -1
- package/dist/assets/vuetify.js +2 -2
- package/dist/index.html +27 -23
- package/index.html +23 -22
- package/index.js +6 -0
- package/package.json +5 -5
- package/plugins/@vcmap-show-case/form-inputs-example/FormInputsExample.vue +37 -1
- package/plugins/@vcmap-show-case/form-inputs-example/index.js +3 -0
- package/plugins/@vcmap-show-case/form-inputs-example/validation.js +11 -0
- package/plugins/@vcmap-show-case/plugin-editors/PluginEditors.vue +119 -0
- package/plugins/@vcmap-show-case/plugin-editors/index.js +41 -0
- package/plugins/@vcmap-show-case/plugin-editors/package.json +5 -0
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ProjectSelectorComponent.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/config.json +2 -2
- package/plugins/{@vcmap → @vcmap-show-case}/project-selector/package.json +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/package.json +1 -1
- package/plugins/@vcmap-show-case/style-input-example/styleExample.vue +0 -1
- package/plugins/@vcmap-show-case/table-example/DataTableExample.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/ThemeChangerComponent.vue +1 -1
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/config.json +2 -2
- package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/package.json +1 -1
- package/plugins/@vcmap-show-case/vector-properties-example/index.js +40 -0
- package/plugins/@vcmap-show-case/vector-properties-example/package.json +5 -0
- package/plugins/@vcmap-show-case/vector-properties-example/vectorPropertiesExample.vue +128 -0
- package/plugins/package.json +6 -2
- package/src/application/VcsAttributions.vue +27 -20
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +290 -0
- package/src/components/form-inputs-controls/VcsSlider.vue +1 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +9 -3
- package/src/components/icons/2DAreaIcon.vue +2 -17
- package/src/components/icons/2DDistanceIcon.vue +0 -3
- package/src/components/icons/3DAreaIcon.vue +2 -17
- package/src/components/icons/3DDistanceIcon.vue +0 -3
- package/src/components/icons/3DHeightIcon.vue +0 -3
- package/src/components/icons/AngleIcon.vue +0 -1
- package/src/components/icons/AssociationsIcon.vue +1 -3
- package/src/components/icons/AxisIcon.vue +0 -4
- package/src/components/icons/BoundingBoxIcon.vue +1 -4
- package/src/components/icons/CheckboxIcon.vue +0 -2
- package/src/components/icons/CheckboxIndeterminateIcon.vue +1 -5
- package/src/components/icons/CircleIcon.vue +1 -6
- package/src/components/icons/ClippingHorizontalIcon.vue +0 -1
- package/src/components/icons/ClippingIcon.vue +0 -1
- package/src/components/icons/ClippingVerticalIcon.vue +0 -1
- package/src/components/icons/ColorPickerIcon.vue +0 -1
- package/src/components/icons/ColorSwatchIcon.vue +0 -2
- package/src/components/icons/CommentIcon.vue +0 -1
- package/src/components/icons/CompassIcon.vue +0 -2
- package/src/components/icons/ComponentsIcon.vue +0 -1
- package/src/components/icons/ConeIcon.vue +1 -4
- package/src/components/icons/DimensionsHouseIcon.vue +0 -2
- package/src/components/icons/EditIcon.vue +0 -1
- package/src/components/icons/EditVerticesIcon.vue +0 -4
- package/src/components/icons/ElevationProfileIcon.vue +1 -13
- package/src/components/icons/ExportAreaIcon.vue +0 -1
- package/src/components/icons/ExportFlightIcon.vue +0 -1
- package/src/components/icons/ExportIcon.vue +12 -8
- package/src/components/icons/ExternalLinkIcon.vue +0 -2
- package/src/components/icons/FastForwardIcon.vue +0 -1
- package/src/components/icons/FilterIcon.vue +0 -1
- package/src/components/icons/GlobeNatureIcon.vue +0 -3
- package/src/components/icons/GroundIcon.vue +0 -1
- package/src/components/icons/HealthCareIndustriesIcon.vue +1 -11
- package/src/components/icons/HideIcon.vue +0 -1
- package/src/components/icons/HomePointIcon.vue +0 -1
- package/src/components/icons/HospitalsIcon.vue +1 -20
- package/src/components/icons/HouseIcon.vue +3 -13
- package/src/components/icons/ImportIcon.vue +6 -14
- package/src/components/icons/InfoIcon.vue +0 -2
- package/src/components/icons/KebabIcon.vue +1 -9
- package/src/components/icons/LabelIcon.vue +0 -2
- package/src/components/icons/LayersIcon.vue +1 -9
- package/src/components/icons/LegendIcon.vue +0 -1
- package/src/components/icons/LineIcon.vue +0 -2
- package/src/components/icons/LinkIcon.vue +0 -1
- package/src/components/icons/LogoutIcon.vue +0 -1
- package/src/components/icons/MapIcon.vue +0 -2
- package/src/components/icons/MenuIcon.vue +1 -5
- package/src/components/icons/MinusIcon.vue +0 -2
- package/src/components/icons/ObjectSelectIcon.vue +0 -2
- package/src/components/icons/ObliqueViewIcon.vue +0 -1
- package/src/components/icons/PdfIcon.vue +0 -1
- package/src/components/icons/PedestrianIcon.vue +0 -1
- package/src/components/icons/PenIcon.vue +0 -1
- package/src/components/icons/PlayCircleIcon.vue +1 -8
- package/src/components/icons/PlusIcon.vue +0 -2
- package/src/components/icons/PoiIcon.vue +0 -1
- package/src/components/icons/PointIcon.vue +2 -6
- package/src/components/icons/PointSelectIcon.vue +0 -1
- package/src/components/icons/PresentationModeIcon.vue +0 -1
- package/src/components/icons/ProgressIcon.vue +1 -1
- package/src/components/icons/QueryIcon.vue +0 -1
- package/src/components/icons/RectangleIcon.vue +1 -6
- package/src/components/icons/ReturnIcon.vue +0 -1
- package/src/components/icons/RewindIcon.vue +0 -1
- package/src/components/icons/RotateLeftIcon.vue +0 -1
- package/src/components/icons/RotateRightIcon.vue +0 -1
- package/src/components/icons/ScreenshotIcon.vue +1 -6
- package/src/components/icons/SearchIcon.vue +0 -1
- package/src/components/icons/ShadowIcon.vue +0 -2
- package/src/components/icons/ShapesIcon.vue +1 -4
- package/src/components/icons/ShareIcon.vue +0 -1
- package/src/components/icons/SimpleCircleFilledIcon.vue +0 -1
- package/src/components/icons/SimpleCircleHalfFilledIcon.vue +0 -1
- package/src/components/icons/SimpleCircleOutlinedIcon.vue +1 -7
- package/src/components/icons/SkipPreviousIcon.vue +1 -6
- package/src/components/icons/SplitViewIcon.vue +0 -1
- package/src/components/icons/TextStyleIcon.vue +0 -3
- package/src/components/icons/ThreeDimensionsIcon.vue +0 -1
- package/src/components/icons/ToolsIcon.vue +0 -1
- package/src/components/icons/TouchIcon.vue +0 -1
- package/src/components/icons/TriangleIcon.vue +0 -3
- package/src/components/icons/TwoDimensionsIcon.vue +0 -2
- package/src/components/icons/UploadIcon.vue +0 -1
- package/src/components/icons/UserProfileIcon.vue +0 -1
- package/src/components/icons/UserShareIcon.vue +0 -1
- package/src/components/icons/ViewpointFlightIcon.vue +0 -1
- package/src/components/icons/ViewpointIcon.vue +0 -1
- package/src/components/icons/Viewshed360Icon.vue +0 -1
- package/src/components/icons/ViewshedConeIcon.vue +0 -1
- package/src/components/icons/ViewshedIcon.vue +0 -1
- package/src/components/icons/WalkingIcon.vue +0 -1
- package/src/components/icons/WallIcon.vue +1 -4
- package/src/components/icons/WandIcon.vue +22 -70
- package/src/components/lists/VcsList.vue +18 -12
- package/src/components/plugins/AbstractConfigEditor.vue +84 -0
- package/src/components/style/VcsImageSelector.vue +6 -5
- package/src/components/style/VcsTextSelector.vue +1 -1
- package/src/components/tables/VcsDataTable.vue +1 -1
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +780 -0
- package/src/components/vector-properties/composables.js +93 -0
- package/src/contentTree/contentTreeCollection.js +30 -9
- package/src/i18n/de.js +41 -7
- package/src/i18n/en.js +39 -5
- package/src/i18n/i18nCollection.js +19 -65
- package/src/manager/buttonManager.js +4 -0
- package/src/manager/collectionManager/collectionComponent.js +1 -1
- package/src/manager/contextMenu/contextMenuManager.js +2 -0
- package/src/pluginHelper.js +57 -17
- package/src/vcsUiApp.js +25 -30
- package/src/vuePlugins/i18n.js +0 -8
- package/dist/assets/cesium/ThirdParty/Workers/draco_decoder_nodejs.js +0 -117
- package/dist/assets/cesium/Workers/ArcType-2d9abbbc.js +0 -37
- package/dist/assets/cesium/Workers/AttributeCompression-f9f6c717.js +0 -716
- package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-4140c51f.js +0 -258
- package/dist/assets/cesium/Workers/BoundingRectangle-c714b156.js +0 -369
- package/dist/assets/cesium/Workers/BoxGeometry-6f3da43d.js +0 -884
- package/dist/assets/cesium/Workers/Check-6ede7e26.js +0 -290
- package/dist/assets/cesium/Workers/Color-8a565ff2.js +0 -2262
- package/dist/assets/cesium/Workers/ComponentDatatype-cf1fa08e.js +0 -341
- package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4b4d4096.js +0 -132
- package/dist/assets/cesium/Workers/CorridorGeometryLibrary-7b94502b.js +0 -498
- package/dist/assets/cesium/Workers/CylinderGeometry-ca070b87.js +0 -467
- package/dist/assets/cesium/Workers/CylinderGeometryLibrary-7bf291b4.js +0 -63
- package/dist/assets/cesium/Workers/EllipseGeometry-122e51fa.js +0 -1304
- package/dist/assets/cesium/Workers/EllipseGeometryLibrary-4d326efc.js +0 -366
- package/dist/assets/cesium/Workers/EllipseOutlineGeometry-16cc2bd7.js +0 -443
- package/dist/assets/cesium/Workers/EllipsoidGeodesic-5b3623dc.js +0 -520
- package/dist/assets/cesium/Workers/EllipsoidGeometry-cb148ca2.js +0 -637
- package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-0fa10c79.js +0 -454
- package/dist/assets/cesium/Workers/EllipsoidRhumbLine-ef872433.js +0 -741
- package/dist/assets/cesium/Workers/EllipsoidTangentPlane-6dd1b7af.js +0 -373
- package/dist/assets/cesium/Workers/EncodedCartesian3-57415c8a.js +0 -171
- package/dist/assets/cesium/Workers/FrustumGeometry-ee73037c.js +0 -2540
- package/dist/assets/cesium/Workers/GeometryAttribute-ff5b4fb1.js +0 -619
- package/dist/assets/cesium/Workers/GeometryAttributes-ad136444.js +0 -91
- package/dist/assets/cesium/Workers/GeometryInstance-34d9e21e.js +0 -121
- package/dist/assets/cesium/Workers/GeometryOffsetAttribute-9ad0019c.js +0 -16
- package/dist/assets/cesium/Workers/GeometryPipeline-1f8fbf05.js +0 -3690
- package/dist/assets/cesium/Workers/IndexDatatype-2643aa47.js +0 -200
- package/dist/assets/cesium/Workers/IntersectionTests-70d39ba9.js +0 -1836
- package/dist/assets/cesium/Workers/Math-0a2ac845.js +0 -1340
- package/dist/assets/cesium/Workers/Matrix2-e1298525.js +0 -7086
- package/dist/assets/cesium/Workers/Matrix3-41c58dde.js +0 -4283
- package/dist/assets/cesium/Workers/OrientedBoundingBox-159cf1d6.js +0 -1259
- package/dist/assets/cesium/Workers/Plane-4c3d403b.js +0 -309
- package/dist/assets/cesium/Workers/PolygonGeometryLibrary-076a5d25.js +0 -1074
- package/dist/assets/cesium/Workers/PolygonPipeline-b9f2810a.js +0 -1344
- package/dist/assets/cesium/Workers/PolylinePipeline-639192e0.js +0 -573
- package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-b73549fb.js +0 -781
- package/dist/assets/cesium/Workers/PrimitivePipeline-10ede1b6.js +0 -966
- package/dist/assets/cesium/Workers/RectangleGeometryLibrary-c35a7356.js +0 -280
- package/dist/assets/cesium/Workers/RuntimeError-ef395448.js +0 -68
- package/dist/assets/cesium/Workers/TerrainEncoding-668d242f.js +0 -1227
- package/dist/assets/cesium/Workers/Transforms-a2a85221.js +0 -14712
- package/dist/assets/cesium/Workers/VertexFormat-030f11ff.js +0 -312
- package/dist/assets/cesium/Workers/WallGeometryLibrary-1938bf0d.js +0 -211
- package/dist/assets/cesium/Workers/WebGLConstants-0b1ce7ba.js +0 -620
- package/dist/assets/cesium/Workers/WebMercatorProjection-13ed1a6e.js +0 -151
- package/dist/assets/cesium/Workers/arrayRemoveDuplicates-d2061e85.js +0 -129
- package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +0 -1363
- package/dist/assets/cesium/Workers/combine-d9581036.js +0 -82
- package/dist/assets/cesium/Workers/defaultValue-fe22d8c0.js +0 -51
- package/dist/assets/index-cb070eff.js +0 -1
- package/plugins/@vcmap/create-link/fallbackCreateLink.vue +0 -76
- package/plugins/@vcmap/create-link/index.js +0 -95
- package/plugins/@vcmap/create-link/package.json +0 -6
- package/plugins/@vcmap/search-nominatim/LICENSE.md +0 -13
- package/plugins/@vcmap/search-nominatim/README.md +0 -3
- package/plugins/@vcmap/search-nominatim/config.json +0 -3
- package/plugins/@vcmap/search-nominatim/index.js +0 -29
- package/plugins/@vcmap/search-nominatim/nominatim.js +0 -175
- package/plugins/@vcmap/search-nominatim/package.json +0 -9
- /package/dist/assets/{vue.30740e.js → vue.5d696e.js} +0 -0
- /package/dist/assets/{vuetify.946bd8.css → vuetify.f0a769.css} +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/ModulesListComponent.vue +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/de.json +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/en.json +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/project-selector/index.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/SimpleGraphComponent.vue +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/index.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/simple-graph/simpleGraphView.js +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/README.md +0 -0
- /package/plugins/{@vcmap → @vcmap-show-case}/theme-changer/index.js +0 -0
@@ -1,625 +1,650 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
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
|
+
RectangleGeometryLibrary_default
|
28
|
+
} from "./chunk-HARLBUOL.js";
|
29
|
+
import {
|
30
|
+
GeometryInstance_default
|
31
|
+
} from "./chunk-227AJNOA.js";
|
32
|
+
import {
|
33
|
+
GeometryPipeline_default
|
34
|
+
} from "./chunk-XTY7B2N6.js";
|
35
|
+
import "./chunk-O5AMBQ36.js";
|
36
|
+
import "./chunk-QT3MPEMI.js";
|
37
|
+
import {
|
38
|
+
GeometryOffsetAttribute_default
|
39
|
+
} from "./chunk-MPAZH4BF.js";
|
40
|
+
import {
|
41
|
+
VertexFormat_default
|
42
|
+
} from "./chunk-QMEMZIJI.js";
|
43
|
+
import {
|
44
|
+
PolygonPipeline_default
|
45
|
+
} from "./chunk-J3JY6I2C.js";
|
46
|
+
import "./chunk-K36FEYS7.js";
|
47
|
+
import "./chunk-MYZB7C4T.js";
|
48
|
+
import "./chunk-OYFCF4PL.js";
|
49
|
+
import {
|
50
|
+
IndexDatatype_default
|
51
|
+
} from "./chunk-RW6LU2CJ.js";
|
52
|
+
import {
|
53
|
+
GeometryAttributes_default
|
54
|
+
} from "./chunk-EW2GWJYB.js";
|
55
|
+
import {
|
56
|
+
GeometryAttribute_default,
|
57
|
+
Geometry_default,
|
58
|
+
PrimitiveType_default
|
59
|
+
} from "./chunk-X4SU25DT.js";
|
60
|
+
import {
|
61
|
+
BoundingSphere_default,
|
62
|
+
Quaternion_default
|
63
|
+
} from "./chunk-PFQBCKBM.js";
|
64
|
+
import "./chunk-QJ3DFBH3.js";
|
65
|
+
import {
|
66
|
+
Cartesian2_default,
|
67
|
+
Matrix2_default,
|
68
|
+
Rectangle_default
|
69
|
+
} from "./chunk-DUHWWBQQ.js";
|
70
|
+
import {
|
71
|
+
ComponentDatatype_default
|
72
|
+
} from "./chunk-LLUNNUJV.js";
|
73
|
+
import {
|
74
|
+
Cartesian3_default,
|
75
|
+
Cartographic_default,
|
76
|
+
Ellipsoid_default,
|
77
|
+
Matrix3_default
|
78
|
+
} from "./chunk-PCJWUS4M.js";
|
79
|
+
import {
|
80
|
+
Math_default
|
81
|
+
} from "./chunk-N3JIFFX2.js";
|
82
|
+
import "./chunk-AHKEZ2OE.js";
|
83
|
+
import "./chunk-ABADGKYE.js";
|
84
|
+
import {
|
85
|
+
defaultValue_default
|
86
|
+
} from "./chunk-WXTV4ATB.js";
|
87
|
+
import {
|
88
|
+
Check_default,
|
89
|
+
DeveloperError_default
|
90
|
+
} from "./chunk-4MFFIWUA.js";
|
91
|
+
import {
|
92
|
+
defined_default
|
93
|
+
} from "./chunk-6BTKZDRG.js";
|
94
|
+
|
95
|
+
// packages/engine/Source/Core/RectangleGeometry.js
|
96
|
+
var positionScratch = new Cartesian3_default();
|
97
|
+
var normalScratch = new Cartesian3_default();
|
98
|
+
var tangentScratch = new Cartesian3_default();
|
99
|
+
var bitangentScratch = new Cartesian3_default();
|
100
|
+
var rectangleScratch = new Rectangle_default();
|
101
|
+
var stScratch = new Cartesian2_default();
|
102
|
+
var bottomBoundingSphere = new BoundingSphere_default();
|
103
|
+
var topBoundingSphere = new BoundingSphere_default();
|
104
|
+
function createAttributes(vertexFormat, attributes) {
|
105
|
+
const geo = new Geometry_default({
|
106
|
+
attributes: new GeometryAttributes_default(),
|
107
|
+
primitiveType: PrimitiveType_default.TRIANGLES
|
108
|
+
});
|
109
|
+
geo.attributes.position = new GeometryAttribute_default({
|
110
|
+
componentDatatype: ComponentDatatype_default.DOUBLE,
|
111
|
+
componentsPerAttribute: 3,
|
112
|
+
values: attributes.positions
|
113
|
+
});
|
114
|
+
if (vertexFormat.normal) {
|
115
|
+
geo.attributes.normal = new GeometryAttribute_default({
|
116
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
117
|
+
componentsPerAttribute: 3,
|
118
|
+
values: attributes.normals
|
16
119
|
});
|
17
|
-
|
18
|
-
|
19
|
-
|
120
|
+
}
|
121
|
+
if (vertexFormat.tangent) {
|
122
|
+
geo.attributes.tangent = new GeometryAttribute_default({
|
123
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
20
124
|
componentsPerAttribute: 3,
|
21
|
-
values: attributes.
|
125
|
+
values: attributes.tangents
|
22
126
|
});
|
23
|
-
if (vertexFormat.normal) {
|
24
|
-
geo.attributes.normal = new GeometryAttribute.GeometryAttribute({
|
25
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
26
|
-
componentsPerAttribute: 3,
|
27
|
-
values: attributes.normals,
|
28
|
-
});
|
29
|
-
}
|
30
|
-
if (vertexFormat.tangent) {
|
31
|
-
geo.attributes.tangent = new GeometryAttribute.GeometryAttribute({
|
32
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
33
|
-
componentsPerAttribute: 3,
|
34
|
-
values: attributes.tangents,
|
35
|
-
});
|
36
|
-
}
|
37
|
-
if (vertexFormat.bitangent) {
|
38
|
-
geo.attributes.bitangent = new GeometryAttribute.GeometryAttribute({
|
39
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
40
|
-
componentsPerAttribute: 3,
|
41
|
-
values: attributes.bitangents,
|
42
|
-
});
|
43
|
-
}
|
44
|
-
return geo;
|
45
127
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
tangentRotationMatrix
|
52
|
-
) {
|
53
|
-
const length = positions.length;
|
54
|
-
|
55
|
-
const normals = vertexFormat.normal ? new Float32Array(length) : undefined;
|
56
|
-
const tangents = vertexFormat.tangent ? new Float32Array(length) : undefined;
|
57
|
-
const bitangents = vertexFormat.bitangent
|
58
|
-
? new Float32Array(length)
|
59
|
-
: undefined;
|
60
|
-
|
61
|
-
let attrIndex = 0;
|
62
|
-
const bitangent = bitangentScratch;
|
63
|
-
const tangent = tangentScratch;
|
64
|
-
let normal = normalScratch;
|
65
|
-
if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
|
66
|
-
for (let i = 0; i < length; i += 3) {
|
67
|
-
const p = Matrix3.Cartesian3.fromArray(positions, i, positionScratch);
|
68
|
-
const attrIndex1 = attrIndex + 1;
|
69
|
-
const attrIndex2 = attrIndex + 2;
|
70
|
-
|
71
|
-
normal = ellipsoid.geodeticSurfaceNormal(p, normal);
|
72
|
-
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
73
|
-
Matrix3.Cartesian3.cross(Matrix3.Cartesian3.UNIT_Z, normal, tangent);
|
74
|
-
Matrix3.Matrix3.multiplyByVector(tangentRotationMatrix, tangent, tangent);
|
75
|
-
Matrix3.Cartesian3.normalize(tangent, tangent);
|
76
|
-
|
77
|
-
if (vertexFormat.bitangent) {
|
78
|
-
Matrix3.Cartesian3.normalize(
|
79
|
-
Matrix3.Cartesian3.cross(normal, tangent, bitangent),
|
80
|
-
bitangent
|
81
|
-
);
|
82
|
-
}
|
83
|
-
}
|
84
|
-
|
85
|
-
if (vertexFormat.normal) {
|
86
|
-
normals[attrIndex] = normal.x;
|
87
|
-
normals[attrIndex1] = normal.y;
|
88
|
-
normals[attrIndex2] = normal.z;
|
89
|
-
}
|
90
|
-
if (vertexFormat.tangent) {
|
91
|
-
tangents[attrIndex] = tangent.x;
|
92
|
-
tangents[attrIndex1] = tangent.y;
|
93
|
-
tangents[attrIndex2] = tangent.z;
|
94
|
-
}
|
95
|
-
if (vertexFormat.bitangent) {
|
96
|
-
bitangents[attrIndex] = bitangent.x;
|
97
|
-
bitangents[attrIndex1] = bitangent.y;
|
98
|
-
bitangents[attrIndex2] = bitangent.z;
|
99
|
-
}
|
100
|
-
attrIndex += 3;
|
101
|
-
}
|
102
|
-
}
|
103
|
-
return createAttributes(vertexFormat, {
|
104
|
-
positions: positions,
|
105
|
-
normals: normals,
|
106
|
-
tangents: tangents,
|
107
|
-
bitangents: bitangents,
|
128
|
+
if (vertexFormat.bitangent) {
|
129
|
+
geo.attributes.bitangent = new GeometryAttribute_default({
|
130
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
131
|
+
componentsPerAttribute: 3,
|
132
|
+
values: attributes.bitangents
|
108
133
|
});
|
109
134
|
}
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
|
132
|
-
for (let i = 0; i < length; i += 6) {
|
133
|
-
const p = Matrix3.Cartesian3.fromArray(positions, i, positionScratch);
|
134
|
-
const p1 = Matrix3.Cartesian3.fromArray(positions, (i + 6) % length, v1Scratch);
|
135
|
-
if (recomputeNormal) {
|
136
|
-
const p2 = Matrix3.Cartesian3.fromArray(positions, (i + 3) % length, v2Scratch);
|
137
|
-
Matrix3.Cartesian3.subtract(p1, p, p1);
|
138
|
-
Matrix3.Cartesian3.subtract(p2, p, p2);
|
139
|
-
normal = Matrix3.Cartesian3.normalize(Matrix3.Cartesian3.cross(p2, p1, normal), normal);
|
140
|
-
recomputeNormal = false;
|
141
|
-
}
|
142
|
-
|
143
|
-
if (Matrix3.Cartesian3.equalsEpsilon(p1, p, Math$1.CesiumMath.EPSILON10)) {
|
144
|
-
// if we've reached a corner
|
145
|
-
recomputeNormal = true;
|
146
|
-
}
|
147
|
-
|
148
|
-
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
149
|
-
bitangent = ellipsoid.geodeticSurfaceNormal(p, bitangent);
|
150
|
-
if (vertexFormat.tangent) {
|
151
|
-
tangent = Matrix3.Cartesian3.normalize(
|
152
|
-
Matrix3.Cartesian3.cross(bitangent, normal, tangent),
|
153
|
-
tangent
|
154
|
-
);
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
if (vertexFormat.normal) {
|
159
|
-
normals[normalIndex++] = normal.x;
|
160
|
-
normals[normalIndex++] = normal.y;
|
161
|
-
normals[normalIndex++] = normal.z;
|
162
|
-
normals[normalIndex++] = normal.x;
|
163
|
-
normals[normalIndex++] = normal.y;
|
164
|
-
normals[normalIndex++] = normal.z;
|
165
|
-
}
|
166
|
-
|
167
|
-
if (vertexFormat.tangent) {
|
168
|
-
tangents[tangentIndex++] = tangent.x;
|
169
|
-
tangents[tangentIndex++] = tangent.y;
|
170
|
-
tangents[tangentIndex++] = tangent.z;
|
171
|
-
tangents[tangentIndex++] = tangent.x;
|
172
|
-
tangents[tangentIndex++] = tangent.y;
|
173
|
-
tangents[tangentIndex++] = tangent.z;
|
174
|
-
}
|
175
|
-
|
135
|
+
return geo;
|
136
|
+
}
|
137
|
+
function calculateAttributes(positions, vertexFormat, ellipsoid, tangentRotationMatrix) {
|
138
|
+
const length = positions.length;
|
139
|
+
const normals = vertexFormat.normal ? new Float32Array(length) : void 0;
|
140
|
+
const tangents = vertexFormat.tangent ? new Float32Array(length) : void 0;
|
141
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(length) : void 0;
|
142
|
+
let attrIndex = 0;
|
143
|
+
const bitangent = bitangentScratch;
|
144
|
+
const tangent = tangentScratch;
|
145
|
+
let normal = normalScratch;
|
146
|
+
if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
|
147
|
+
for (let i = 0; i < length; i += 3) {
|
148
|
+
const p = Cartesian3_default.fromArray(positions, i, positionScratch);
|
149
|
+
const attrIndex1 = attrIndex + 1;
|
150
|
+
const attrIndex2 = attrIndex + 2;
|
151
|
+
normal = ellipsoid.geodeticSurfaceNormal(p, normal);
|
152
|
+
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
153
|
+
Cartesian3_default.cross(Cartesian3_default.UNIT_Z, normal, tangent);
|
154
|
+
Matrix3_default.multiplyByVector(tangentRotationMatrix, tangent, tangent);
|
155
|
+
Cartesian3_default.normalize(tangent, tangent);
|
176
156
|
if (vertexFormat.bitangent) {
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
bitangents[bitangentIndex++] = bitangent.y;
|
182
|
-
bitangents[bitangentIndex++] = bitangent.z;
|
157
|
+
Cartesian3_default.normalize(
|
158
|
+
Cartesian3_default.cross(normal, tangent, bitangent),
|
159
|
+
bitangent
|
160
|
+
);
|
183
161
|
}
|
184
162
|
}
|
163
|
+
if (vertexFormat.normal) {
|
164
|
+
normals[attrIndex] = normal.x;
|
165
|
+
normals[attrIndex1] = normal.y;
|
166
|
+
normals[attrIndex2] = normal.z;
|
167
|
+
}
|
168
|
+
if (vertexFormat.tangent) {
|
169
|
+
tangents[attrIndex] = tangent.x;
|
170
|
+
tangents[attrIndex1] = tangent.y;
|
171
|
+
tangents[attrIndex2] = tangent.z;
|
172
|
+
}
|
173
|
+
if (vertexFormat.bitangent) {
|
174
|
+
bitangents[attrIndex] = bitangent.x;
|
175
|
+
bitangents[attrIndex1] = bitangent.y;
|
176
|
+
bitangents[attrIndex2] = bitangent.z;
|
177
|
+
}
|
178
|
+
attrIndex += 3;
|
185
179
|
}
|
186
|
-
|
187
|
-
return createAttributes(vertexFormat, {
|
188
|
-
positions: positions,
|
189
|
-
normals: normals,
|
190
|
-
tangents: tangents,
|
191
|
-
bitangents: bitangents,
|
192
|
-
});
|
193
180
|
}
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
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
|
-
for (let row = rowStart; row < rowEnd; ++row) {
|
238
|
-
for (let col = 0; col < width; ++col) {
|
239
|
-
RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
|
240
|
-
computedOptions,
|
241
|
-
ellipsoid,
|
242
|
-
vertexFormat.st,
|
243
|
-
row,
|
244
|
-
col,
|
245
|
-
position,
|
246
|
-
st
|
247
|
-
);
|
248
|
-
|
249
|
-
positions[posIndex++] = position.x;
|
250
|
-
positions[posIndex++] = position.y;
|
251
|
-
positions[posIndex++] = position.z;
|
252
|
-
|
253
|
-
if (vertexFormat.st) {
|
254
|
-
textureCoordinates[stIndex++] = st.x;
|
255
|
-
textureCoordinates[stIndex++] = st.y;
|
256
|
-
|
257
|
-
minX = Math.min(minX, st.x);
|
258
|
-
minY = Math.min(minY, st.y);
|
259
|
-
maxX = Math.max(maxX, st.x);
|
260
|
-
maxY = Math.max(maxY, st.y);
|
181
|
+
return createAttributes(vertexFormat, {
|
182
|
+
positions,
|
183
|
+
normals,
|
184
|
+
tangents,
|
185
|
+
bitangents
|
186
|
+
});
|
187
|
+
}
|
188
|
+
var v1Scratch = new Cartesian3_default();
|
189
|
+
var v2Scratch = new Cartesian3_default();
|
190
|
+
function calculateAttributesWall(positions, vertexFormat, ellipsoid) {
|
191
|
+
const length = positions.length;
|
192
|
+
const normals = vertexFormat.normal ? new Float32Array(length) : void 0;
|
193
|
+
const tangents = vertexFormat.tangent ? new Float32Array(length) : void 0;
|
194
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(length) : void 0;
|
195
|
+
let normalIndex = 0;
|
196
|
+
let tangentIndex = 0;
|
197
|
+
let bitangentIndex = 0;
|
198
|
+
let recomputeNormal = true;
|
199
|
+
let bitangent = bitangentScratch;
|
200
|
+
let tangent = tangentScratch;
|
201
|
+
let normal = normalScratch;
|
202
|
+
if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
|
203
|
+
for (let i = 0; i < length; i += 6) {
|
204
|
+
const p = Cartesian3_default.fromArray(positions, i, positionScratch);
|
205
|
+
const p1 = Cartesian3_default.fromArray(positions, (i + 6) % length, v1Scratch);
|
206
|
+
if (recomputeNormal) {
|
207
|
+
const p2 = Cartesian3_default.fromArray(positions, (i + 3) % length, v2Scratch);
|
208
|
+
Cartesian3_default.subtract(p1, p, p1);
|
209
|
+
Cartesian3_default.subtract(p2, p, p2);
|
210
|
+
normal = Cartesian3_default.normalize(Cartesian3_default.cross(p2, p1, normal), normal);
|
211
|
+
recomputeNormal = false;
|
212
|
+
}
|
213
|
+
if (Cartesian3_default.equalsEpsilon(p1, p, Math_default.EPSILON10)) {
|
214
|
+
recomputeNormal = true;
|
215
|
+
}
|
216
|
+
if (vertexFormat.tangent || vertexFormat.bitangent) {
|
217
|
+
bitangent = ellipsoid.geodeticSurfaceNormal(p, bitangent);
|
218
|
+
if (vertexFormat.tangent) {
|
219
|
+
tangent = Cartesian3_default.normalize(
|
220
|
+
Cartesian3_default.cross(bitangent, normal, tangent),
|
221
|
+
tangent
|
222
|
+
);
|
261
223
|
}
|
262
224
|
}
|
225
|
+
if (vertexFormat.normal) {
|
226
|
+
normals[normalIndex++] = normal.x;
|
227
|
+
normals[normalIndex++] = normal.y;
|
228
|
+
normals[normalIndex++] = normal.z;
|
229
|
+
normals[normalIndex++] = normal.x;
|
230
|
+
normals[normalIndex++] = normal.y;
|
231
|
+
normals[normalIndex++] = normal.z;
|
232
|
+
}
|
233
|
+
if (vertexFormat.tangent) {
|
234
|
+
tangents[tangentIndex++] = tangent.x;
|
235
|
+
tangents[tangentIndex++] = tangent.y;
|
236
|
+
tangents[tangentIndex++] = tangent.z;
|
237
|
+
tangents[tangentIndex++] = tangent.x;
|
238
|
+
tangents[tangentIndex++] = tangent.y;
|
239
|
+
tangents[tangentIndex++] = tangent.z;
|
240
|
+
}
|
241
|
+
if (vertexFormat.bitangent) {
|
242
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
243
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
244
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
245
|
+
bitangents[bitangentIndex++] = bitangent.x;
|
246
|
+
bitangents[bitangentIndex++] = bitangent.y;
|
247
|
+
bitangents[bitangentIndex++] = bitangent.z;
|
248
|
+
}
|
263
249
|
}
|
264
|
-
|
265
|
-
|
250
|
+
}
|
251
|
+
return createAttributes(vertexFormat, {
|
252
|
+
positions,
|
253
|
+
normals,
|
254
|
+
tangents,
|
255
|
+
bitangents
|
256
|
+
});
|
257
|
+
}
|
258
|
+
function constructRectangle(rectangleGeometry, computedOptions) {
|
259
|
+
const vertexFormat = rectangleGeometry._vertexFormat;
|
260
|
+
const ellipsoid = rectangleGeometry._ellipsoid;
|
261
|
+
const height = computedOptions.height;
|
262
|
+
const width = computedOptions.width;
|
263
|
+
const northCap = computedOptions.northCap;
|
264
|
+
const southCap = computedOptions.southCap;
|
265
|
+
let rowStart = 0;
|
266
|
+
let rowEnd = height;
|
267
|
+
let rowHeight = height;
|
268
|
+
let size = 0;
|
269
|
+
if (northCap) {
|
270
|
+
rowStart = 1;
|
271
|
+
rowHeight -= 1;
|
272
|
+
size += 1;
|
273
|
+
}
|
274
|
+
if (southCap) {
|
275
|
+
rowEnd -= 1;
|
276
|
+
rowHeight -= 1;
|
277
|
+
size += 1;
|
278
|
+
}
|
279
|
+
size += width * rowHeight;
|
280
|
+
const positions = vertexFormat.position ? new Float64Array(size * 3) : void 0;
|
281
|
+
const textureCoordinates = vertexFormat.st ? new Float32Array(size * 2) : void 0;
|
282
|
+
let posIndex = 0;
|
283
|
+
let stIndex = 0;
|
284
|
+
const position = positionScratch;
|
285
|
+
const st = stScratch;
|
286
|
+
let minX = Number.MAX_VALUE;
|
287
|
+
let minY = Number.MAX_VALUE;
|
288
|
+
let maxX = -Number.MAX_VALUE;
|
289
|
+
let maxY = -Number.MAX_VALUE;
|
290
|
+
for (let row = rowStart; row < rowEnd; ++row) {
|
291
|
+
for (let col = 0; col < width; ++col) {
|
292
|
+
RectangleGeometryLibrary_default.computePosition(
|
266
293
|
computedOptions,
|
267
294
|
ellipsoid,
|
268
295
|
vertexFormat.st,
|
269
|
-
|
270
|
-
|
296
|
+
row,
|
297
|
+
col,
|
271
298
|
position,
|
272
299
|
st
|
273
300
|
);
|
274
|
-
|
275
301
|
positions[posIndex++] = position.x;
|
276
302
|
positions[posIndex++] = position.y;
|
277
303
|
positions[posIndex++] = position.z;
|
278
|
-
|
279
304
|
if (vertexFormat.st) {
|
280
305
|
textureCoordinates[stIndex++] = st.x;
|
281
306
|
textureCoordinates[stIndex++] = st.y;
|
282
|
-
|
283
|
-
minX = st.x;
|
284
|
-
minY = st.y;
|
285
|
-
maxX = st.x;
|
286
|
-
maxY = st.y;
|
287
|
-
}
|
288
|
-
}
|
289
|
-
if (southCap) {
|
290
|
-
RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
|
291
|
-
computedOptions,
|
292
|
-
ellipsoid,
|
293
|
-
vertexFormat.st,
|
294
|
-
height - 1,
|
295
|
-
0,
|
296
|
-
position,
|
297
|
-
st
|
298
|
-
);
|
299
|
-
|
300
|
-
positions[posIndex++] = position.x;
|
301
|
-
positions[posIndex++] = position.y;
|
302
|
-
positions[posIndex] = position.z;
|
303
|
-
|
304
|
-
if (vertexFormat.st) {
|
305
|
-
textureCoordinates[stIndex++] = st.x;
|
306
|
-
textureCoordinates[stIndex] = st.y;
|
307
|
-
|
308
307
|
minX = Math.min(minX, st.x);
|
309
308
|
minY = Math.min(minY, st.y);
|
310
309
|
maxX = Math.max(maxX, st.x);
|
311
310
|
maxY = Math.max(maxY, st.y);
|
312
311
|
}
|
313
312
|
}
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
) {
|
319
|
-
for (let k = 0; k < textureCoordinates.length; k += 2) {
|
320
|
-
textureCoordinates[k] = (textureCoordinates[k] - minX) / (maxX - minX);
|
321
|
-
textureCoordinates[k + 1] =
|
322
|
-
(textureCoordinates[k + 1] - minY) / (maxY - minY);
|
323
|
-
}
|
324
|
-
}
|
325
|
-
|
326
|
-
const geo = calculateAttributes(
|
327
|
-
positions,
|
328
|
-
vertexFormat,
|
313
|
+
}
|
314
|
+
if (northCap) {
|
315
|
+
RectangleGeometryLibrary_default.computePosition(
|
316
|
+
computedOptions,
|
329
317
|
ellipsoid,
|
330
|
-
|
318
|
+
vertexFormat.st,
|
319
|
+
0,
|
320
|
+
0,
|
321
|
+
position,
|
322
|
+
st
|
331
323
|
);
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
let indicesIndex = 0;
|
343
|
-
let i;
|
344
|
-
for (i = 0; i < rowHeight - 1; ++i) {
|
345
|
-
for (let j = 0; j < width - 1; ++j) {
|
346
|
-
const upperLeft = index;
|
347
|
-
const lowerLeft = upperLeft + width;
|
348
|
-
const lowerRight = lowerLeft + 1;
|
349
|
-
const upperRight = upperLeft + 1;
|
350
|
-
indices[indicesIndex++] = upperLeft;
|
351
|
-
indices[indicesIndex++] = lowerLeft;
|
352
|
-
indices[indicesIndex++] = upperRight;
|
353
|
-
indices[indicesIndex++] = upperRight;
|
354
|
-
indices[indicesIndex++] = lowerLeft;
|
355
|
-
indices[indicesIndex++] = lowerRight;
|
356
|
-
++index;
|
357
|
-
}
|
358
|
-
++index;
|
359
|
-
}
|
360
|
-
if (northCap || southCap) {
|
361
|
-
let northIndex = size - 1;
|
362
|
-
const southIndex = size - 1;
|
363
|
-
if (northCap && southCap) {
|
364
|
-
northIndex = size - 2;
|
365
|
-
}
|
366
|
-
|
367
|
-
let p1;
|
368
|
-
let p2;
|
369
|
-
index = 0;
|
370
|
-
|
371
|
-
if (northCap) {
|
372
|
-
for (i = 0; i < width - 1; i++) {
|
373
|
-
p1 = index;
|
374
|
-
p2 = p1 + 1;
|
375
|
-
indices[indicesIndex++] = northIndex;
|
376
|
-
indices[indicesIndex++] = p1;
|
377
|
-
indices[indicesIndex++] = p2;
|
378
|
-
++index;
|
379
|
-
}
|
380
|
-
}
|
381
|
-
if (southCap) {
|
382
|
-
index = (rowHeight - 1) * width;
|
383
|
-
for (i = 0; i < width - 1; i++) {
|
384
|
-
p1 = index;
|
385
|
-
p2 = p1 + 1;
|
386
|
-
indices[indicesIndex++] = p1;
|
387
|
-
indices[indicesIndex++] = southIndex;
|
388
|
-
indices[indicesIndex++] = p2;
|
389
|
-
++index;
|
390
|
-
}
|
391
|
-
}
|
324
|
+
positions[posIndex++] = position.x;
|
325
|
+
positions[posIndex++] = position.y;
|
326
|
+
positions[posIndex++] = position.z;
|
327
|
+
if (vertexFormat.st) {
|
328
|
+
textureCoordinates[stIndex++] = st.x;
|
329
|
+
textureCoordinates[stIndex++] = st.y;
|
330
|
+
minX = st.x;
|
331
|
+
minY = st.y;
|
332
|
+
maxX = st.x;
|
333
|
+
maxY = st.y;
|
392
334
|
}
|
393
|
-
|
394
|
-
|
335
|
+
}
|
336
|
+
if (southCap) {
|
337
|
+
RectangleGeometryLibrary_default.computePosition(
|
338
|
+
computedOptions,
|
339
|
+
ellipsoid,
|
340
|
+
vertexFormat.st,
|
341
|
+
height - 1,
|
342
|
+
0,
|
343
|
+
position,
|
344
|
+
st
|
345
|
+
);
|
346
|
+
positions[posIndex++] = position.x;
|
347
|
+
positions[posIndex++] = position.y;
|
348
|
+
positions[posIndex] = position.z;
|
395
349
|
if (vertexFormat.st) {
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
350
|
+
textureCoordinates[stIndex++] = st.x;
|
351
|
+
textureCoordinates[stIndex] = st.y;
|
352
|
+
minX = Math.min(minX, st.x);
|
353
|
+
minY = Math.min(minY, st.y);
|
354
|
+
maxX = Math.max(maxX, st.x);
|
355
|
+
maxY = Math.max(maxY, st.y);
|
401
356
|
}
|
402
|
-
|
403
|
-
return geo;
|
404
357
|
}
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
topPositions,
|
411
|
-
bottomPositions
|
412
|
-
) {
|
413
|
-
wallPositions[posIndex++] = topPositions[i];
|
414
|
-
wallPositions[posIndex++] = topPositions[i + 1];
|
415
|
-
wallPositions[posIndex++] = topPositions[i + 2];
|
416
|
-
wallPositions[posIndex++] = bottomPositions[i];
|
417
|
-
wallPositions[posIndex++] = bottomPositions[i + 1];
|
418
|
-
wallPositions[posIndex] = bottomPositions[i + 2];
|
419
|
-
return wallPositions;
|
358
|
+
if (vertexFormat.st && (minX < 0 || minY < 0 || maxX > 1 || maxY > 1)) {
|
359
|
+
for (let k = 0; k < textureCoordinates.length; k += 2) {
|
360
|
+
textureCoordinates[k] = (textureCoordinates[k] - minX) / (maxX - minX);
|
361
|
+
textureCoordinates[k + 1] = (textureCoordinates[k + 1] - minY) / (maxY - minY);
|
362
|
+
}
|
420
363
|
}
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
364
|
+
const geo = calculateAttributes(
|
365
|
+
positions,
|
366
|
+
vertexFormat,
|
367
|
+
ellipsoid,
|
368
|
+
computedOptions.tangentRotationMatrix
|
369
|
+
);
|
370
|
+
let indicesSize = 6 * (width - 1) * (rowHeight - 1);
|
371
|
+
if (northCap) {
|
372
|
+
indicesSize += 3 * (width - 1);
|
428
373
|
}
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
);
|
450
|
-
newVertexFormat.normal = true;
|
451
|
-
rectangleGeometry._vertexFormat = newVertexFormat;
|
374
|
+
if (southCap) {
|
375
|
+
indicesSize += 3 * (width - 1);
|
376
|
+
}
|
377
|
+
const indices = IndexDatatype_default.createTypedArray(size, indicesSize);
|
378
|
+
let index = 0;
|
379
|
+
let indicesIndex = 0;
|
380
|
+
let i;
|
381
|
+
for (i = 0; i < rowHeight - 1; ++i) {
|
382
|
+
for (let j = 0; j < width - 1; ++j) {
|
383
|
+
const upperLeft = index;
|
384
|
+
const lowerLeft = upperLeft + width;
|
385
|
+
const lowerRight = lowerLeft + 1;
|
386
|
+
const upperRight = upperLeft + 1;
|
387
|
+
indices[indicesIndex++] = upperLeft;
|
388
|
+
indices[indicesIndex++] = lowerLeft;
|
389
|
+
indices[indicesIndex++] = upperRight;
|
390
|
+
indices[indicesIndex++] = upperRight;
|
391
|
+
indices[indicesIndex++] = lowerLeft;
|
392
|
+
indices[indicesIndex++] = lowerRight;
|
393
|
+
++index;
|
452
394
|
}
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
395
|
+
++index;
|
396
|
+
}
|
397
|
+
if (northCap || southCap) {
|
398
|
+
let northIndex = size - 1;
|
399
|
+
const southIndex = size - 1;
|
400
|
+
if (northCap && southCap) {
|
401
|
+
northIndex = size - 2;
|
458
402
|
}
|
459
|
-
|
460
|
-
let
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
positions.set(topPositions);
|
471
|
-
const bottomPositions = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
472
|
-
topBottomGeo.attributes.position.values,
|
473
|
-
minHeight,
|
474
|
-
ellipsoid
|
475
|
-
);
|
476
|
-
positions.set(bottomPositions, length);
|
477
|
-
topBottomGeo.attributes.position.values = positions;
|
478
|
-
|
479
|
-
const normals = vertexFormat.normal ? new Float32Array(newLength) : undefined;
|
480
|
-
const tangents = vertexFormat.tangent
|
481
|
-
? new Float32Array(newLength)
|
482
|
-
: undefined;
|
483
|
-
const bitangents = vertexFormat.bitangent
|
484
|
-
? new Float32Array(newLength)
|
485
|
-
: undefined;
|
486
|
-
const textures = vertexFormat.st
|
487
|
-
? new Float32Array((newLength / 3) * 2)
|
488
|
-
: undefined;
|
489
|
-
let topSt;
|
490
|
-
let topNormals;
|
491
|
-
if (vertexFormat.normal) {
|
492
|
-
topNormals = topBottomGeo.attributes.normal.values;
|
493
|
-
normals.set(topNormals);
|
494
|
-
for (i = 0; i < length; i++) {
|
495
|
-
topNormals[i] = -topNormals[i];
|
403
|
+
let p1;
|
404
|
+
let p2;
|
405
|
+
index = 0;
|
406
|
+
if (northCap) {
|
407
|
+
for (i = 0; i < width - 1; i++) {
|
408
|
+
p1 = index;
|
409
|
+
p2 = p1 + 1;
|
410
|
+
indices[indicesIndex++] = northIndex;
|
411
|
+
indices[indicesIndex++] = p1;
|
412
|
+
indices[indicesIndex++] = p2;
|
413
|
+
++index;
|
496
414
|
}
|
497
|
-
normals.set(topNormals, length);
|
498
|
-
topBottomGeo.attributes.normal.values = normals;
|
499
415
|
}
|
500
|
-
if (
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
416
|
+
if (southCap) {
|
417
|
+
index = (rowHeight - 1) * width;
|
418
|
+
for (i = 0; i < width - 1; i++) {
|
419
|
+
p1 = index;
|
420
|
+
p2 = p1 + 1;
|
421
|
+
indices[indicesIndex++] = p1;
|
422
|
+
indices[indicesIndex++] = southIndex;
|
423
|
+
indices[indicesIndex++] = p2;
|
424
|
+
++index;
|
508
425
|
}
|
509
|
-
extrudeNormals.set(topNormals, length); //only get normals for bottom layer that's going to be pushed down
|
510
|
-
topBottomGeo.attributes.extrudeDirection = new GeometryAttribute.GeometryAttribute({
|
511
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
512
|
-
componentsPerAttribute: 3,
|
513
|
-
values: extrudeNormals,
|
514
|
-
});
|
515
426
|
}
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
427
|
+
}
|
428
|
+
geo.indices = indices;
|
429
|
+
if (vertexFormat.st) {
|
430
|
+
geo.attributes.st = new GeometryAttribute_default({
|
431
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
432
|
+
componentsPerAttribute: 2,
|
433
|
+
values: textureCoordinates
|
434
|
+
});
|
435
|
+
}
|
436
|
+
return geo;
|
437
|
+
}
|
438
|
+
function addWallPositions(wallPositions, posIndex, i, topPositions, bottomPositions) {
|
439
|
+
wallPositions[posIndex++] = topPositions[i];
|
440
|
+
wallPositions[posIndex++] = topPositions[i + 1];
|
441
|
+
wallPositions[posIndex++] = topPositions[i + 2];
|
442
|
+
wallPositions[posIndex++] = bottomPositions[i];
|
443
|
+
wallPositions[posIndex++] = bottomPositions[i + 1];
|
444
|
+
wallPositions[posIndex] = bottomPositions[i + 2];
|
445
|
+
return wallPositions;
|
446
|
+
}
|
447
|
+
function addWallTextureCoordinates(wallTextures, stIndex, i, st) {
|
448
|
+
wallTextures[stIndex++] = st[i];
|
449
|
+
wallTextures[stIndex++] = st[i + 1];
|
450
|
+
wallTextures[stIndex++] = st[i];
|
451
|
+
wallTextures[stIndex] = st[i + 1];
|
452
|
+
return wallTextures;
|
453
|
+
}
|
454
|
+
var scratchVertexFormat = new VertexFormat_default();
|
455
|
+
function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
|
456
|
+
const shadowVolume = rectangleGeometry._shadowVolume;
|
457
|
+
const offsetAttributeValue = rectangleGeometry._offsetAttribute;
|
458
|
+
const vertexFormat = rectangleGeometry._vertexFormat;
|
459
|
+
const minHeight = rectangleGeometry._extrudedHeight;
|
460
|
+
const maxHeight = rectangleGeometry._surfaceHeight;
|
461
|
+
const ellipsoid = rectangleGeometry._ellipsoid;
|
462
|
+
const height = computedOptions.height;
|
463
|
+
const width = computedOptions.width;
|
464
|
+
let i;
|
465
|
+
if (shadowVolume) {
|
466
|
+
const newVertexFormat = VertexFormat_default.clone(
|
467
|
+
vertexFormat,
|
468
|
+
scratchVertexFormat
|
469
|
+
);
|
470
|
+
newVertexFormat.normal = true;
|
471
|
+
rectangleGeometry._vertexFormat = newVertexFormat;
|
472
|
+
}
|
473
|
+
const topBottomGeo = constructRectangle(rectangleGeometry, computedOptions);
|
474
|
+
if (shadowVolume) {
|
475
|
+
rectangleGeometry._vertexFormat = vertexFormat;
|
476
|
+
}
|
477
|
+
let topPositions = PolygonPipeline_default.scaleToGeodeticHeight(
|
478
|
+
topBottomGeo.attributes.position.values,
|
479
|
+
maxHeight,
|
480
|
+
ellipsoid,
|
481
|
+
false
|
482
|
+
);
|
483
|
+
topPositions = new Float64Array(topPositions);
|
484
|
+
let length = topPositions.length;
|
485
|
+
const newLength = length * 2;
|
486
|
+
const positions = new Float64Array(newLength);
|
487
|
+
positions.set(topPositions);
|
488
|
+
const bottomPositions = PolygonPipeline_default.scaleToGeodeticHeight(
|
489
|
+
topBottomGeo.attributes.position.values,
|
490
|
+
minHeight,
|
491
|
+
ellipsoid
|
492
|
+
);
|
493
|
+
positions.set(bottomPositions, length);
|
494
|
+
topBottomGeo.attributes.position.values = positions;
|
495
|
+
const normals = vertexFormat.normal ? new Float32Array(newLength) : void 0;
|
496
|
+
const tangents = vertexFormat.tangent ? new Float32Array(newLength) : void 0;
|
497
|
+
const bitangents = vertexFormat.bitangent ? new Float32Array(newLength) : void 0;
|
498
|
+
const textures = vertexFormat.st ? new Float32Array(newLength / 3 * 2) : void 0;
|
499
|
+
let topSt;
|
500
|
+
let topNormals;
|
501
|
+
if (vertexFormat.normal) {
|
502
|
+
topNormals = topBottomGeo.attributes.normal.values;
|
503
|
+
normals.set(topNormals);
|
504
|
+
for (i = 0; i < length; i++) {
|
505
|
+
topNormals[i] = -topNormals[i];
|
535
506
|
}
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
tangents.set(topTangents, length);
|
544
|
-
topBottomGeo.attributes.tangent.values = tangents;
|
507
|
+
normals.set(topNormals, length);
|
508
|
+
topBottomGeo.attributes.normal.values = normals;
|
509
|
+
}
|
510
|
+
if (shadowVolume) {
|
511
|
+
topNormals = topBottomGeo.attributes.normal.values;
|
512
|
+
if (!vertexFormat.normal) {
|
513
|
+
topBottomGeo.attributes.normal = void 0;
|
545
514
|
}
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
bitangents.set(topBitangents, length);
|
550
|
-
topBottomGeo.attributes.bitangent.values = bitangents;
|
515
|
+
const extrudeNormals = new Float32Array(newLength);
|
516
|
+
for (i = 0; i < length; i++) {
|
517
|
+
topNormals[i] = -topNormals[i];
|
551
518
|
}
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
519
|
+
extrudeNormals.set(topNormals, length);
|
520
|
+
topBottomGeo.attributes.extrudeDirection = new GeometryAttribute_default({
|
521
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
522
|
+
componentsPerAttribute: 3,
|
523
|
+
values: extrudeNormals
|
524
|
+
});
|
525
|
+
}
|
526
|
+
let offsetValue;
|
527
|
+
const hasOffsets = defined_default(offsetAttributeValue);
|
528
|
+
if (hasOffsets) {
|
529
|
+
const size = length / 3 * 2;
|
530
|
+
let offsetAttribute = new Uint8Array(size);
|
531
|
+
if (offsetAttributeValue === GeometryOffsetAttribute_default.TOP) {
|
532
|
+
offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
|
533
|
+
} else {
|
534
|
+
offsetValue = offsetAttributeValue === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
535
|
+
offsetAttribute = offsetAttribute.fill(offsetValue);
|
557
536
|
}
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
for (i = 0; i <
|
568
|
-
|
569
|
-
newIndices[i + 1 + indicesLength] = indices[i + 1] + posLength;
|
570
|
-
newIndices[i + 2 + indicesLength] = indices[i] + posLength;
|
537
|
+
topBottomGeo.attributes.applyOffset = new GeometryAttribute_default({
|
538
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
539
|
+
componentsPerAttribute: 1,
|
540
|
+
values: offsetAttribute
|
541
|
+
});
|
542
|
+
}
|
543
|
+
if (vertexFormat.tangent) {
|
544
|
+
const topTangents = topBottomGeo.attributes.tangent.values;
|
545
|
+
tangents.set(topTangents);
|
546
|
+
for (i = 0; i < length; i++) {
|
547
|
+
topTangents[i] = -topTangents[i];
|
571
548
|
}
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
549
|
+
tangents.set(topTangents, length);
|
550
|
+
topBottomGeo.attributes.tangent.values = tangents;
|
551
|
+
}
|
552
|
+
if (vertexFormat.bitangent) {
|
553
|
+
const topBitangents = topBottomGeo.attributes.bitangent.values;
|
554
|
+
bitangents.set(topBitangents);
|
555
|
+
bitangents.set(topBitangents, length);
|
556
|
+
topBottomGeo.attributes.bitangent.values = bitangents;
|
557
|
+
}
|
558
|
+
if (vertexFormat.st) {
|
559
|
+
topSt = topBottomGeo.attributes.st.values;
|
560
|
+
textures.set(topSt);
|
561
|
+
textures.set(topSt, length / 3 * 2);
|
562
|
+
topBottomGeo.attributes.st.values = textures;
|
563
|
+
}
|
564
|
+
const indices = topBottomGeo.indices;
|
565
|
+
const indicesLength = indices.length;
|
566
|
+
const posLength = length / 3;
|
567
|
+
const newIndices = IndexDatatype_default.createTypedArray(
|
568
|
+
newLength / 3,
|
569
|
+
indicesLength * 2
|
570
|
+
);
|
571
|
+
newIndices.set(indices);
|
572
|
+
for (i = 0; i < indicesLength; i += 3) {
|
573
|
+
newIndices[i + indicesLength] = indices[i + 2] + posLength;
|
574
|
+
newIndices[i + 1 + indicesLength] = indices[i + 1] + posLength;
|
575
|
+
newIndices[i + 2 + indicesLength] = indices[i] + posLength;
|
576
|
+
}
|
577
|
+
topBottomGeo.indices = newIndices;
|
578
|
+
const northCap = computedOptions.northCap;
|
579
|
+
const southCap = computedOptions.southCap;
|
580
|
+
let rowHeight = height;
|
581
|
+
let widthMultiplier = 2;
|
582
|
+
let perimeterPositions = 0;
|
583
|
+
let corners = 4;
|
584
|
+
let dupliateCorners = 4;
|
585
|
+
if (northCap) {
|
586
|
+
widthMultiplier -= 1;
|
587
|
+
rowHeight -= 1;
|
588
|
+
perimeterPositions += 1;
|
589
|
+
corners -= 2;
|
590
|
+
dupliateCorners -= 1;
|
591
|
+
}
|
592
|
+
if (southCap) {
|
593
|
+
widthMultiplier -= 1;
|
594
|
+
rowHeight -= 1;
|
595
|
+
perimeterPositions += 1;
|
596
|
+
corners -= 2;
|
597
|
+
dupliateCorners -= 1;
|
598
|
+
}
|
599
|
+
perimeterPositions += widthMultiplier * width + 2 * rowHeight - corners;
|
600
|
+
const wallCount = (perimeterPositions + dupliateCorners) * 2;
|
601
|
+
let wallPositions = new Float64Array(wallCount * 3);
|
602
|
+
const wallExtrudeNormals = shadowVolume ? new Float32Array(wallCount * 3) : void 0;
|
603
|
+
let wallOffsetAttribute = hasOffsets ? new Uint8Array(wallCount) : void 0;
|
604
|
+
let wallTextures = vertexFormat.st ? new Float32Array(wallCount * 2) : void 0;
|
605
|
+
const computeTopOffsets = offsetAttributeValue === GeometryOffsetAttribute_default.TOP;
|
606
|
+
if (hasOffsets && !computeTopOffsets) {
|
607
|
+
offsetValue = offsetAttributeValue === GeometryOffsetAttribute_default.ALL ? 1 : 0;
|
608
|
+
wallOffsetAttribute = wallOffsetAttribute.fill(offsetValue);
|
609
|
+
}
|
610
|
+
let posIndex = 0;
|
611
|
+
let stIndex = 0;
|
612
|
+
let extrudeNormalIndex = 0;
|
613
|
+
let wallOffsetIndex = 0;
|
614
|
+
const area = width * rowHeight;
|
615
|
+
let threeI;
|
616
|
+
for (i = 0; i < area; i += width) {
|
617
|
+
threeI = i * 3;
|
618
|
+
wallPositions = addWallPositions(
|
619
|
+
wallPositions,
|
620
|
+
posIndex,
|
621
|
+
threeI,
|
622
|
+
topPositions,
|
623
|
+
bottomPositions
|
624
|
+
);
|
625
|
+
posIndex += 6;
|
626
|
+
if (vertexFormat.st) {
|
627
|
+
wallTextures = addWallTextureCoordinates(
|
628
|
+
wallTextures,
|
629
|
+
stIndex,
|
630
|
+
i * 2,
|
631
|
+
topSt
|
632
|
+
);
|
633
|
+
stIndex += 4;
|
588
634
|
}
|
589
|
-
if (
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
dupliateCorners -= 1;
|
635
|
+
if (shadowVolume) {
|
636
|
+
extrudeNormalIndex += 3;
|
637
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
638
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
639
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
595
640
|
}
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
let wallPositions = new Float64Array(wallCount * 3);
|
601
|
-
const wallExtrudeNormals = shadowVolume
|
602
|
-
? new Float32Array(wallCount * 3)
|
603
|
-
: undefined;
|
604
|
-
let wallOffsetAttribute = hasOffsets ? new Uint8Array(wallCount) : undefined;
|
605
|
-
let wallTextures = vertexFormat.st
|
606
|
-
? new Float32Array(wallCount * 2)
|
607
|
-
: undefined;
|
608
|
-
|
609
|
-
const computeTopOffsets =
|
610
|
-
offsetAttributeValue === GeometryOffsetAttribute.GeometryOffsetAttribute.TOP;
|
611
|
-
if (hasOffsets && !computeTopOffsets) {
|
612
|
-
offsetValue = offsetAttributeValue === GeometryOffsetAttribute.GeometryOffsetAttribute.ALL ? 1 : 0;
|
613
|
-
wallOffsetAttribute = wallOffsetAttribute.fill(offsetValue);
|
641
|
+
if (computeTopOffsets) {
|
642
|
+
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
643
|
+
wallOffsetIndex += 1;
|
614
644
|
}
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
let extrudeNormalIndex = 0;
|
619
|
-
let wallOffsetIndex = 0;
|
620
|
-
const area = width * rowHeight;
|
621
|
-
let threeI;
|
622
|
-
for (i = 0; i < area; i += width) {
|
645
|
+
}
|
646
|
+
if (!southCap) {
|
647
|
+
for (i = area - width; i < area; i++) {
|
623
648
|
threeI = i * 3;
|
624
649
|
wallPositions = addWallPositions(
|
625
650
|
wallPositions,
|
@@ -649,75 +674,71 @@ define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Matrix2-e1298525', '
|
|
649
674
|
wallOffsetIndex += 1;
|
650
675
|
}
|
651
676
|
}
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
677
|
+
} else {
|
678
|
+
const southIndex = northCap ? area + 1 : area;
|
679
|
+
threeI = southIndex * 3;
|
680
|
+
for (i = 0; i < 2; i++) {
|
681
|
+
wallPositions = addWallPositions(
|
682
|
+
wallPositions,
|
683
|
+
posIndex,
|
684
|
+
threeI,
|
685
|
+
topPositions,
|
686
|
+
bottomPositions
|
687
|
+
);
|
688
|
+
posIndex += 6;
|
689
|
+
if (vertexFormat.st) {
|
690
|
+
wallTextures = addWallTextureCoordinates(
|
691
|
+
wallTextures,
|
692
|
+
stIndex,
|
693
|
+
southIndex * 2,
|
694
|
+
topSt
|
662
695
|
);
|
663
|
-
|
664
|
-
if (vertexFormat.st) {
|
665
|
-
wallTextures = addWallTextureCoordinates(
|
666
|
-
wallTextures,
|
667
|
-
stIndex,
|
668
|
-
i * 2,
|
669
|
-
topSt
|
670
|
-
);
|
671
|
-
stIndex += 4;
|
672
|
-
}
|
673
|
-
if (shadowVolume) {
|
674
|
-
extrudeNormalIndex += 3;
|
675
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
676
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
677
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
678
|
-
}
|
679
|
-
if (computeTopOffsets) {
|
680
|
-
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
681
|
-
wallOffsetIndex += 1;
|
682
|
-
}
|
696
|
+
stIndex += 4;
|
683
697
|
}
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
threeI,
|
694
|
-
topPositions,
|
695
|
-
bottomPositions
|
696
|
-
);
|
697
|
-
posIndex += 6;
|
698
|
-
if (vertexFormat.st) {
|
699
|
-
wallTextures = addWallTextureCoordinates(
|
700
|
-
wallTextures,
|
701
|
-
stIndex,
|
702
|
-
southIndex * 2,
|
703
|
-
topSt
|
704
|
-
);
|
705
|
-
stIndex += 4;
|
706
|
-
}
|
707
|
-
if (shadowVolume) {
|
708
|
-
extrudeNormalIndex += 3;
|
709
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
710
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
711
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
712
|
-
}
|
713
|
-
if (computeTopOffsets) {
|
714
|
-
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
715
|
-
wallOffsetIndex += 1;
|
716
|
-
}
|
698
|
+
if (shadowVolume) {
|
699
|
+
extrudeNormalIndex += 3;
|
700
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
701
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
702
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
703
|
+
}
|
704
|
+
if (computeTopOffsets) {
|
705
|
+
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
706
|
+
wallOffsetIndex += 1;
|
717
707
|
}
|
718
708
|
}
|
719
|
-
|
720
|
-
|
709
|
+
}
|
710
|
+
for (i = area - 1; i > 0; i -= width) {
|
711
|
+
threeI = i * 3;
|
712
|
+
wallPositions = addWallPositions(
|
713
|
+
wallPositions,
|
714
|
+
posIndex,
|
715
|
+
threeI,
|
716
|
+
topPositions,
|
717
|
+
bottomPositions
|
718
|
+
);
|
719
|
+
posIndex += 6;
|
720
|
+
if (vertexFormat.st) {
|
721
|
+
wallTextures = addWallTextureCoordinates(
|
722
|
+
wallTextures,
|
723
|
+
stIndex,
|
724
|
+
i * 2,
|
725
|
+
topSt
|
726
|
+
);
|
727
|
+
stIndex += 4;
|
728
|
+
}
|
729
|
+
if (shadowVolume) {
|
730
|
+
extrudeNormalIndex += 3;
|
731
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
732
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
733
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
734
|
+
}
|
735
|
+
if (computeTopOffsets) {
|
736
|
+
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
737
|
+
wallOffsetIndex += 1;
|
738
|
+
}
|
739
|
+
}
|
740
|
+
if (!northCap) {
|
741
|
+
for (i = width - 1; i >= 0; i--) {
|
721
742
|
threeI = i * 3;
|
722
743
|
wallPositions = addWallPositions(
|
723
744
|
wallPositions,
|
@@ -747,730 +768,506 @@ define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Matrix2-e1298525', '
|
|
747
768
|
wallOffsetIndex += 1;
|
748
769
|
}
|
749
770
|
}
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
771
|
+
} else {
|
772
|
+
const northIndex = area;
|
773
|
+
threeI = northIndex * 3;
|
774
|
+
for (i = 0; i < 2; i++) {
|
775
|
+
wallPositions = addWallPositions(
|
776
|
+
wallPositions,
|
777
|
+
posIndex,
|
778
|
+
threeI,
|
779
|
+
topPositions,
|
780
|
+
bottomPositions
|
781
|
+
);
|
782
|
+
posIndex += 6;
|
783
|
+
if (vertexFormat.st) {
|
784
|
+
wallTextures = addWallTextureCoordinates(
|
785
|
+
wallTextures,
|
786
|
+
stIndex,
|
787
|
+
northIndex * 2,
|
788
|
+
topSt
|
760
789
|
);
|
761
|
-
|
762
|
-
if (vertexFormat.st) {
|
763
|
-
wallTextures = addWallTextureCoordinates(
|
764
|
-
wallTextures,
|
765
|
-
stIndex,
|
766
|
-
i * 2,
|
767
|
-
topSt
|
768
|
-
);
|
769
|
-
stIndex += 4;
|
770
|
-
}
|
771
|
-
if (shadowVolume) {
|
772
|
-
extrudeNormalIndex += 3;
|
773
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
774
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
775
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
776
|
-
}
|
777
|
-
if (computeTopOffsets) {
|
778
|
-
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
779
|
-
wallOffsetIndex += 1;
|
780
|
-
}
|
790
|
+
stIndex += 4;
|
781
791
|
}
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
// duplicate corner points
|
788
|
-
wallPositions = addWallPositions(
|
789
|
-
wallPositions,
|
790
|
-
posIndex,
|
791
|
-
threeI,
|
792
|
-
topPositions,
|
793
|
-
bottomPositions
|
794
|
-
);
|
795
|
-
posIndex += 6;
|
796
|
-
if (vertexFormat.st) {
|
797
|
-
wallTextures = addWallTextureCoordinates(
|
798
|
-
wallTextures,
|
799
|
-
stIndex,
|
800
|
-
northIndex * 2,
|
801
|
-
topSt
|
802
|
-
);
|
803
|
-
stIndex += 4;
|
804
|
-
}
|
805
|
-
if (shadowVolume) {
|
806
|
-
extrudeNormalIndex += 3;
|
807
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
808
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
809
|
-
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
810
|
-
}
|
811
|
-
if (computeTopOffsets) {
|
812
|
-
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
813
|
-
wallOffsetIndex += 1;
|
814
|
-
}
|
792
|
+
if (shadowVolume) {
|
793
|
+
extrudeNormalIndex += 3;
|
794
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
|
795
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
|
796
|
+
wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
|
815
797
|
}
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
if (vertexFormat.st) {
|
821
|
-
geo.attributes.st = new GeometryAttribute.GeometryAttribute({
|
822
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
823
|
-
componentsPerAttribute: 2,
|
824
|
-
values: wallTextures,
|
825
|
-
});
|
826
|
-
}
|
827
|
-
if (shadowVolume) {
|
828
|
-
geo.attributes.extrudeDirection = new GeometryAttribute.GeometryAttribute({
|
829
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
|
830
|
-
componentsPerAttribute: 3,
|
831
|
-
values: wallExtrudeNormals,
|
832
|
-
});
|
833
|
-
}
|
834
|
-
if (hasOffsets) {
|
835
|
-
geo.attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
|
836
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
|
837
|
-
componentsPerAttribute: 1,
|
838
|
-
values: wallOffsetAttribute,
|
839
|
-
});
|
840
|
-
}
|
841
|
-
|
842
|
-
const wallIndices = IndexDatatype.IndexDatatype.createTypedArray(
|
843
|
-
wallCount,
|
844
|
-
perimeterPositions * 6
|
845
|
-
);
|
846
|
-
|
847
|
-
let upperLeft;
|
848
|
-
let lowerLeft;
|
849
|
-
let lowerRight;
|
850
|
-
let upperRight;
|
851
|
-
length = wallPositions.length / 3;
|
852
|
-
let index = 0;
|
853
|
-
for (i = 0; i < length - 1; i += 2) {
|
854
|
-
upperLeft = i;
|
855
|
-
upperRight = (upperLeft + 2) % length;
|
856
|
-
const p1 = Matrix3.Cartesian3.fromArray(wallPositions, upperLeft * 3, v1Scratch);
|
857
|
-
const p2 = Matrix3.Cartesian3.fromArray(wallPositions, upperRight * 3, v2Scratch);
|
858
|
-
if (Matrix3.Cartesian3.equalsEpsilon(p1, p2, Math$1.CesiumMath.EPSILON10)) {
|
859
|
-
continue;
|
798
|
+
if (computeTopOffsets) {
|
799
|
+
wallOffsetAttribute[wallOffsetIndex++] = 1;
|
800
|
+
wallOffsetIndex += 1;
|
860
801
|
}
|
861
|
-
lowerLeft = (upperLeft + 1) % length;
|
862
|
-
lowerRight = (lowerLeft + 2) % length;
|
863
|
-
wallIndices[index++] = upperLeft;
|
864
|
-
wallIndices[index++] = lowerLeft;
|
865
|
-
wallIndices[index++] = upperRight;
|
866
|
-
wallIndices[index++] = upperRight;
|
867
|
-
wallIndices[index++] = lowerLeft;
|
868
|
-
wallIndices[index++] = lowerRight;
|
869
802
|
}
|
870
|
-
|
871
|
-
geo.indices = wallIndices;
|
872
|
-
|
873
|
-
geo = GeometryPipeline.GeometryPipeline.combineInstances([
|
874
|
-
new GeometryInstance.GeometryInstance({
|
875
|
-
geometry: topBottomGeo,
|
876
|
-
}),
|
877
|
-
new GeometryInstance.GeometryInstance({
|
878
|
-
geometry: geo,
|
879
|
-
}),
|
880
|
-
]);
|
881
|
-
|
882
|
-
return geo[0];
|
883
803
|
}
|
884
|
-
|
885
|
-
|
886
|
-
new
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
804
|
+
let geo = calculateAttributesWall(wallPositions, vertexFormat, ellipsoid);
|
805
|
+
if (vertexFormat.st) {
|
806
|
+
geo.attributes.st = new GeometryAttribute_default({
|
807
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
808
|
+
componentsPerAttribute: 2,
|
809
|
+
values: wallTextures
|
810
|
+
});
|
811
|
+
}
|
812
|
+
if (shadowVolume) {
|
813
|
+
geo.attributes.extrudeDirection = new GeometryAttribute_default({
|
814
|
+
componentDatatype: ComponentDatatype_default.FLOAT,
|
815
|
+
componentsPerAttribute: 3,
|
816
|
+
values: wallExtrudeNormals
|
817
|
+
});
|
818
|
+
}
|
819
|
+
if (hasOffsets) {
|
820
|
+
geo.attributes.applyOffset = new GeometryAttribute_default({
|
821
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
822
|
+
componentsPerAttribute: 1,
|
823
|
+
values: wallOffsetAttribute
|
824
|
+
});
|
825
|
+
}
|
826
|
+
const wallIndices = IndexDatatype_default.createTypedArray(
|
827
|
+
wallCount,
|
828
|
+
perimeterPositions * 6
|
829
|
+
);
|
830
|
+
let upperLeft;
|
831
|
+
let lowerLeft;
|
832
|
+
let lowerRight;
|
833
|
+
let upperRight;
|
834
|
+
length = wallPositions.length / 3;
|
835
|
+
let index = 0;
|
836
|
+
for (i = 0; i < length - 1; i += 2) {
|
837
|
+
upperLeft = i;
|
838
|
+
upperRight = (upperLeft + 2) % length;
|
839
|
+
const p1 = Cartesian3_default.fromArray(wallPositions, upperLeft * 3, v1Scratch);
|
840
|
+
const p2 = Cartesian3_default.fromArray(wallPositions, upperRight * 3, v2Scratch);
|
841
|
+
if (Cartesian3_default.equalsEpsilon(p1, p2, Math_default.EPSILON10)) {
|
842
|
+
continue;
|
896
843
|
}
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
844
|
+
lowerLeft = (upperLeft + 1) % length;
|
845
|
+
lowerRight = (lowerLeft + 2) % length;
|
846
|
+
wallIndices[index++] = upperLeft;
|
847
|
+
wallIndices[index++] = lowerLeft;
|
848
|
+
wallIndices[index++] = upperRight;
|
849
|
+
wallIndices[index++] = upperRight;
|
850
|
+
wallIndices[index++] = lowerLeft;
|
851
|
+
wallIndices[index++] = lowerRight;
|
852
|
+
}
|
853
|
+
geo.indices = wallIndices;
|
854
|
+
geo = GeometryPipeline_default.combineInstances([
|
855
|
+
new GeometryInstance_default({
|
856
|
+
geometry: topBottomGeo
|
857
|
+
}),
|
858
|
+
new GeometryInstance_default({
|
859
|
+
geometry: geo
|
860
|
+
})
|
861
|
+
]);
|
862
|
+
return geo[0];
|
863
|
+
}
|
864
|
+
var scratchRectanglePoints = [
|
865
|
+
new Cartesian3_default(),
|
866
|
+
new Cartesian3_default(),
|
867
|
+
new Cartesian3_default(),
|
868
|
+
new Cartesian3_default()
|
869
|
+
];
|
870
|
+
var nwScratch = new Cartographic_default();
|
871
|
+
var stNwScratch = new Cartographic_default();
|
872
|
+
function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
|
873
|
+
if (rotation === 0) {
|
874
|
+
return Rectangle_default.clone(rectangle, result);
|
875
|
+
}
|
876
|
+
const computedOptions = RectangleGeometryLibrary_default.computeOptions(
|
877
|
+
rectangle,
|
878
|
+
granularity,
|
879
|
+
rotation,
|
880
|
+
0,
|
881
|
+
rectangleScratch,
|
882
|
+
nwScratch
|
883
|
+
);
|
884
|
+
const height = computedOptions.height;
|
885
|
+
const width = computedOptions.width;
|
886
|
+
const positions = scratchRectanglePoints;
|
887
|
+
RectangleGeometryLibrary_default.computePosition(
|
888
|
+
computedOptions,
|
889
|
+
ellipsoid,
|
890
|
+
false,
|
891
|
+
0,
|
892
|
+
0,
|
893
|
+
positions[0]
|
894
|
+
);
|
895
|
+
RectangleGeometryLibrary_default.computePosition(
|
896
|
+
computedOptions,
|
897
|
+
ellipsoid,
|
898
|
+
false,
|
899
|
+
0,
|
900
|
+
width - 1,
|
901
|
+
positions[1]
|
902
|
+
);
|
903
|
+
RectangleGeometryLibrary_default.computePosition(
|
904
|
+
computedOptions,
|
905
|
+
ellipsoid,
|
906
|
+
false,
|
907
|
+
height - 1,
|
908
|
+
0,
|
909
|
+
positions[2]
|
910
|
+
);
|
911
|
+
RectangleGeometryLibrary_default.computePosition(
|
912
|
+
computedOptions,
|
913
|
+
ellipsoid,
|
914
|
+
false,
|
915
|
+
height - 1,
|
916
|
+
width - 1,
|
917
|
+
positions[3]
|
918
|
+
);
|
919
|
+
return Rectangle_default.fromCartesianArray(positions, ellipsoid, result);
|
920
|
+
}
|
921
|
+
function RectangleGeometry(options) {
|
922
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
923
|
+
const rectangle = options.rectangle;
|
924
|
+
Check_default.typeOf.object("rectangle", rectangle);
|
925
|
+
Rectangle_default.validate(rectangle);
|
926
|
+
if (rectangle.north < rectangle.south) {
|
927
|
+
throw new DeveloperError_default(
|
928
|
+
"options.rectangle.north must be greater than or equal to options.rectangle.south"
|
905
929
|
);
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
930
|
+
}
|
931
|
+
const height = defaultValue_default(options.height, 0);
|
932
|
+
const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
|
933
|
+
this._rectangle = Rectangle_default.clone(rectangle);
|
934
|
+
this._granularity = defaultValue_default(
|
935
|
+
options.granularity,
|
936
|
+
Math_default.RADIANS_PER_DEGREE
|
937
|
+
);
|
938
|
+
this._ellipsoid = Ellipsoid_default.clone(
|
939
|
+
defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84)
|
940
|
+
);
|
941
|
+
this._surfaceHeight = Math.max(height, extrudedHeight);
|
942
|
+
this._rotation = defaultValue_default(options.rotation, 0);
|
943
|
+
this._stRotation = defaultValue_default(options.stRotation, 0);
|
944
|
+
this._vertexFormat = VertexFormat_default.clone(
|
945
|
+
defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
|
946
|
+
);
|
947
|
+
this._extrudedHeight = Math.min(height, extrudedHeight);
|
948
|
+
this._shadowVolume = defaultValue_default(options.shadowVolume, false);
|
949
|
+
this._workerName = "createRectangleGeometry";
|
950
|
+
this._offsetAttribute = options.offsetAttribute;
|
951
|
+
this._rotatedRectangle = void 0;
|
952
|
+
this._textureCoordinateRotationPoints = void 0;
|
953
|
+
}
|
954
|
+
RectangleGeometry.packedLength = Rectangle_default.packedLength + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 7;
|
955
|
+
RectangleGeometry.pack = function(value, array, startingIndex) {
|
956
|
+
Check_default.typeOf.object("value", value);
|
957
|
+
Check_default.defined("array", array);
|
958
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
959
|
+
Rectangle_default.pack(value._rectangle, array, startingIndex);
|
960
|
+
startingIndex += Rectangle_default.packedLength;
|
961
|
+
Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
|
962
|
+
startingIndex += Ellipsoid_default.packedLength;
|
963
|
+
VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
|
964
|
+
startingIndex += VertexFormat_default.packedLength;
|
965
|
+
array[startingIndex++] = value._granularity;
|
966
|
+
array[startingIndex++] = value._surfaceHeight;
|
967
|
+
array[startingIndex++] = value._rotation;
|
968
|
+
array[startingIndex++] = value._stRotation;
|
969
|
+
array[startingIndex++] = value._extrudedHeight;
|
970
|
+
array[startingIndex++] = value._shadowVolume ? 1 : 0;
|
971
|
+
array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
|
972
|
+
return array;
|
973
|
+
};
|
974
|
+
var scratchRectangle = new Rectangle_default();
|
975
|
+
var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
|
976
|
+
var scratchOptions = {
|
977
|
+
rectangle: scratchRectangle,
|
978
|
+
ellipsoid: scratchEllipsoid,
|
979
|
+
vertexFormat: scratchVertexFormat,
|
980
|
+
granularity: void 0,
|
981
|
+
height: void 0,
|
982
|
+
rotation: void 0,
|
983
|
+
stRotation: void 0,
|
984
|
+
extrudedHeight: void 0,
|
985
|
+
shadowVolume: void 0,
|
986
|
+
offsetAttribute: void 0
|
987
|
+
};
|
988
|
+
RectangleGeometry.unpack = function(array, startingIndex, result) {
|
989
|
+
Check_default.defined("array", array);
|
990
|
+
startingIndex = defaultValue_default(startingIndex, 0);
|
991
|
+
const rectangle = Rectangle_default.unpack(array, startingIndex, scratchRectangle);
|
992
|
+
startingIndex += Rectangle_default.packedLength;
|
993
|
+
const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
|
994
|
+
startingIndex += Ellipsoid_default.packedLength;
|
995
|
+
const vertexFormat = VertexFormat_default.unpack(
|
996
|
+
array,
|
997
|
+
startingIndex,
|
998
|
+
scratchVertexFormat
|
999
|
+
);
|
1000
|
+
startingIndex += VertexFormat_default.packedLength;
|
1001
|
+
const granularity = array[startingIndex++];
|
1002
|
+
const surfaceHeight = array[startingIndex++];
|
1003
|
+
const rotation = array[startingIndex++];
|
1004
|
+
const stRotation = array[startingIndex++];
|
1005
|
+
const extrudedHeight = array[startingIndex++];
|
1006
|
+
const shadowVolume = array[startingIndex++] === 1;
|
1007
|
+
const offsetAttribute = array[startingIndex];
|
1008
|
+
if (!defined_default(result)) {
|
1009
|
+
scratchOptions.granularity = granularity;
|
1010
|
+
scratchOptions.height = surfaceHeight;
|
1011
|
+
scratchOptions.rotation = rotation;
|
1012
|
+
scratchOptions.stRotation = stRotation;
|
1013
|
+
scratchOptions.extrudedHeight = extrudedHeight;
|
1014
|
+
scratchOptions.shadowVolume = shadowVolume;
|
1015
|
+
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
1016
|
+
return new RectangleGeometry(scratchOptions);
|
1017
|
+
}
|
1018
|
+
result._rectangle = Rectangle_default.clone(rectangle, result._rectangle);
|
1019
|
+
result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
|
1020
|
+
result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
|
1021
|
+
result._granularity = granularity;
|
1022
|
+
result._surfaceHeight = surfaceHeight;
|
1023
|
+
result._rotation = rotation;
|
1024
|
+
result._stRotation = stRotation;
|
1025
|
+
result._extrudedHeight = extrudedHeight;
|
1026
|
+
result._shadowVolume = shadowVolume;
|
1027
|
+
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
1028
|
+
return result;
|
1029
|
+
};
|
1030
|
+
RectangleGeometry.computeRectangle = function(options, result) {
|
1031
|
+
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
1032
|
+
const rectangle = options.rectangle;
|
1033
|
+
Check_default.typeOf.object("rectangle", rectangle);
|
1034
|
+
Rectangle_default.validate(rectangle);
|
1035
|
+
if (rectangle.north < rectangle.south) {
|
1036
|
+
throw new DeveloperError_default(
|
1037
|
+
"options.rectangle.north must be greater than or equal to options.rectangle.south"
|
918
1038
|
);
|
919
|
-
|
920
|
-
|
1039
|
+
}
|
1040
|
+
const granularity = defaultValue_default(
|
1041
|
+
options.granularity,
|
1042
|
+
Math_default.RADIANS_PER_DEGREE
|
1043
|
+
);
|
1044
|
+
const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84);
|
1045
|
+
const rotation = defaultValue_default(options.rotation, 0);
|
1046
|
+
return computeRectangle(rectangle, granularity, rotation, ellipsoid, result);
|
1047
|
+
};
|
1048
|
+
var tangentRotationMatrixScratch = new Matrix3_default();
|
1049
|
+
var quaternionScratch = new Quaternion_default();
|
1050
|
+
var centerScratch = new Cartographic_default();
|
1051
|
+
RectangleGeometry.createGeometry = function(rectangleGeometry) {
|
1052
|
+
if (Math_default.equalsEpsilon(
|
1053
|
+
rectangleGeometry._rectangle.north,
|
1054
|
+
rectangleGeometry._rectangle.south,
|
1055
|
+
Math_default.EPSILON10
|
1056
|
+
) || Math_default.equalsEpsilon(
|
1057
|
+
rectangleGeometry._rectangle.east,
|
1058
|
+
rectangleGeometry._rectangle.west,
|
1059
|
+
Math_default.EPSILON10
|
1060
|
+
)) {
|
1061
|
+
return void 0;
|
1062
|
+
}
|
1063
|
+
let rectangle = rectangleGeometry._rectangle;
|
1064
|
+
const ellipsoid = rectangleGeometry._ellipsoid;
|
1065
|
+
const rotation = rectangleGeometry._rotation;
|
1066
|
+
const stRotation = rectangleGeometry._stRotation;
|
1067
|
+
const vertexFormat = rectangleGeometry._vertexFormat;
|
1068
|
+
const computedOptions = RectangleGeometryLibrary_default.computeOptions(
|
1069
|
+
rectangle,
|
1070
|
+
rectangleGeometry._granularity,
|
1071
|
+
rotation,
|
1072
|
+
stRotation,
|
1073
|
+
rectangleScratch,
|
1074
|
+
nwScratch,
|
1075
|
+
stNwScratch
|
1076
|
+
);
|
1077
|
+
const tangentRotationMatrix = tangentRotationMatrixScratch;
|
1078
|
+
if (stRotation !== 0 || rotation !== 0) {
|
1079
|
+
const center = Rectangle_default.center(rectangle, centerScratch);
|
1080
|
+
const axis = ellipsoid.geodeticSurfaceNormalCartographic(center, v1Scratch);
|
1081
|
+
Quaternion_default.fromAxisAngle(axis, -stRotation, quaternionScratch);
|
1082
|
+
Matrix3_default.fromQuaternion(quaternionScratch, tangentRotationMatrix);
|
1083
|
+
} else {
|
1084
|
+
Matrix3_default.clone(Matrix3_default.IDENTITY, tangentRotationMatrix);
|
1085
|
+
}
|
1086
|
+
const surfaceHeight = rectangleGeometry._surfaceHeight;
|
1087
|
+
const extrudedHeight = rectangleGeometry._extrudedHeight;
|
1088
|
+
const extrude = !Math_default.equalsEpsilon(
|
1089
|
+
surfaceHeight,
|
1090
|
+
extrudedHeight,
|
1091
|
+
0,
|
1092
|
+
Math_default.EPSILON2
|
1093
|
+
);
|
1094
|
+
computedOptions.lonScalar = 1 / rectangleGeometry._rectangle.width;
|
1095
|
+
computedOptions.latScalar = 1 / rectangleGeometry._rectangle.height;
|
1096
|
+
computedOptions.tangentRotationMatrix = tangentRotationMatrix;
|
1097
|
+
let geometry;
|
1098
|
+
let boundingSphere;
|
1099
|
+
rectangle = rectangleGeometry._rectangle;
|
1100
|
+
if (extrude) {
|
1101
|
+
geometry = constructExtrudedRectangle(rectangleGeometry, computedOptions);
|
1102
|
+
const topBS = BoundingSphere_default.fromRectangle3D(
|
1103
|
+
rectangle,
|
921
1104
|
ellipsoid,
|
922
|
-
|
923
|
-
|
924
|
-
width - 1,
|
925
|
-
positions[1]
|
1105
|
+
surfaceHeight,
|
1106
|
+
topBoundingSphere
|
926
1107
|
);
|
927
|
-
|
928
|
-
|
1108
|
+
const bottomBS = BoundingSphere_default.fromRectangle3D(
|
1109
|
+
rectangle,
|
929
1110
|
ellipsoid,
|
930
|
-
|
931
|
-
|
932
|
-
0,
|
933
|
-
positions[2]
|
1111
|
+
extrudedHeight,
|
1112
|
+
bottomBoundingSphere
|
934
1113
|
);
|
935
|
-
|
936
|
-
|
1114
|
+
boundingSphere = BoundingSphere_default.union(topBS, bottomBS);
|
1115
|
+
} else {
|
1116
|
+
geometry = constructRectangle(rectangleGeometry, computedOptions);
|
1117
|
+
geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
|
1118
|
+
geometry.attributes.position.values,
|
1119
|
+
surfaceHeight,
|
937
1120
|
ellipsoid,
|
938
|
-
false
|
939
|
-
height - 1,
|
940
|
-
width - 1,
|
941
|
-
positions[3]
|
1121
|
+
false
|
942
1122
|
);
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
*
|
953
|
-
* @param {object} options Object with the following properties:
|
954
|
-
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
955
|
-
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
|
956
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
|
957
|
-
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
958
|
-
* @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
|
959
|
-
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
960
|
-
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
|
961
|
-
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
|
962
|
-
*
|
963
|
-
* @exception {DeveloperError} <code>options.rectangle.north</code> must be in the interval [<code>-Pi/2</code>, <code>Pi/2</code>].
|
964
|
-
* @exception {DeveloperError} <code>options.rectangle.south</code> must be in the interval [<code>-Pi/2</code>, <code>Pi/2</code>].
|
965
|
-
* @exception {DeveloperError} <code>options.rectangle.east</code> must be in the interval [<code>-Pi</code>, <code>Pi</code>].
|
966
|
-
* @exception {DeveloperError} <code>options.rectangle.west</code> must be in the interval [<code>-Pi</code>, <code>Pi</code>].
|
967
|
-
* @exception {DeveloperError} <code>options.rectangle.north</code> must be greater than <code>options.rectangle.south</code>.
|
968
|
-
*
|
969
|
-
* @see RectangleGeometry#createGeometry
|
970
|
-
*
|
971
|
-
* @demo {@link https://sandcastle.cesium.com/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo}
|
972
|
-
*
|
973
|
-
* @example
|
974
|
-
* // 1. create a rectangle
|
975
|
-
* const rectangle = new Cesium.RectangleGeometry({
|
976
|
-
* ellipsoid : Cesium.Ellipsoid.WGS84,
|
977
|
-
* rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
|
978
|
-
* height : 10000.0
|
979
|
-
* });
|
980
|
-
* const geometry = Cesium.RectangleGeometry.createGeometry(rectangle);
|
981
|
-
*
|
982
|
-
* // 2. create an extruded rectangle without a top
|
983
|
-
* const rectangle = new Cesium.RectangleGeometry({
|
984
|
-
* ellipsoid : Cesium.Ellipsoid.WGS84,
|
985
|
-
* rectangle : Cesium.Rectangle.fromDegrees(-80.0, 39.0, -74.0, 42.0),
|
986
|
-
* height : 10000.0,
|
987
|
-
* extrudedHeight: 300000
|
988
|
-
* });
|
989
|
-
* const geometry = Cesium.RectangleGeometry.createGeometry(rectangle);
|
990
|
-
*/
|
991
|
-
function RectangleGeometry(options) {
|
992
|
-
options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
|
993
|
-
|
994
|
-
const rectangle = options.rectangle;
|
995
|
-
|
996
|
-
//>>includeStart('debug', pragmas.debug);
|
997
|
-
Check.Check.typeOf.object("rectangle", rectangle);
|
998
|
-
Matrix2.Rectangle.validate(rectangle);
|
999
|
-
if (rectangle.north < rectangle.south) {
|
1000
|
-
throw new Check.DeveloperError(
|
1001
|
-
"options.rectangle.north must be greater than or equal to options.rectangle.south"
|
1002
|
-
);
|
1123
|
+
if (defined_default(rectangleGeometry._offsetAttribute)) {
|
1124
|
+
const length = geometry.attributes.position.values.length;
|
1125
|
+
const offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
1126
|
+
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
1127
|
+
geometry.attributes.applyOffset = new GeometryAttribute_default({
|
1128
|
+
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
1129
|
+
componentsPerAttribute: 1,
|
1130
|
+
values: applyOffset
|
1131
|
+
});
|
1003
1132
|
}
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
this._rectangle = Matrix2.Rectangle.clone(rectangle);
|
1010
|
-
this._granularity = defaultValue.defaultValue(
|
1011
|
-
options.granularity,
|
1012
|
-
Math$1.CesiumMath.RADIANS_PER_DEGREE
|
1013
|
-
);
|
1014
|
-
this._ellipsoid = Matrix3.Ellipsoid.clone(
|
1015
|
-
defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84)
|
1016
|
-
);
|
1017
|
-
this._surfaceHeight = Math.max(height, extrudedHeight);
|
1018
|
-
this._rotation = defaultValue.defaultValue(options.rotation, 0.0);
|
1019
|
-
this._stRotation = defaultValue.defaultValue(options.stRotation, 0.0);
|
1020
|
-
this._vertexFormat = VertexFormat.VertexFormat.clone(
|
1021
|
-
defaultValue.defaultValue(options.vertexFormat, VertexFormat.VertexFormat.DEFAULT)
|
1133
|
+
boundingSphere = BoundingSphere_default.fromRectangle3D(
|
1134
|
+
rectangle,
|
1135
|
+
ellipsoid,
|
1136
|
+
surfaceHeight
|
1022
1137
|
);
|
1023
|
-
this._extrudedHeight = Math.min(height, extrudedHeight);
|
1024
|
-
this._shadowVolume = defaultValue.defaultValue(options.shadowVolume, false);
|
1025
|
-
this._workerName = "createRectangleGeometry";
|
1026
|
-
this._offsetAttribute = options.offsetAttribute;
|
1027
|
-
this._rotatedRectangle = undefined;
|
1028
|
-
|
1029
|
-
this._textureCoordinateRotationPoints = undefined;
|
1030
1138
|
}
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
const
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
startingIndex,
|
1118
|
-
scratchVertexFormat
|
1119
|
-
);
|
1120
|
-
startingIndex += VertexFormat.VertexFormat.packedLength;
|
1121
|
-
|
1122
|
-
const granularity = array[startingIndex++];
|
1123
|
-
const surfaceHeight = array[startingIndex++];
|
1124
|
-
const rotation = array[startingIndex++];
|
1125
|
-
const stRotation = array[startingIndex++];
|
1126
|
-
const extrudedHeight = array[startingIndex++];
|
1127
|
-
const shadowVolume = array[startingIndex++] === 1.0;
|
1128
|
-
const offsetAttribute = array[startingIndex];
|
1129
|
-
|
1130
|
-
if (!defaultValue.defined(result)) {
|
1131
|
-
scratchOptions.granularity = granularity;
|
1132
|
-
scratchOptions.height = surfaceHeight;
|
1133
|
-
scratchOptions.rotation = rotation;
|
1134
|
-
scratchOptions.stRotation = stRotation;
|
1135
|
-
scratchOptions.extrudedHeight = extrudedHeight;
|
1136
|
-
scratchOptions.shadowVolume = shadowVolume;
|
1137
|
-
scratchOptions.offsetAttribute =
|
1138
|
-
offsetAttribute === -1 ? undefined : offsetAttribute;
|
1139
|
-
|
1140
|
-
return new RectangleGeometry(scratchOptions);
|
1141
|
-
}
|
1142
|
-
|
1143
|
-
result._rectangle = Matrix2.Rectangle.clone(rectangle, result._rectangle);
|
1144
|
-
result._ellipsoid = Matrix3.Ellipsoid.clone(ellipsoid, result._ellipsoid);
|
1145
|
-
result._vertexFormat = VertexFormat.VertexFormat.clone(vertexFormat, result._vertexFormat);
|
1146
|
-
result._granularity = granularity;
|
1147
|
-
result._surfaceHeight = surfaceHeight;
|
1148
|
-
result._rotation = rotation;
|
1149
|
-
result._stRotation = stRotation;
|
1150
|
-
result._extrudedHeight = extrudedHeight;
|
1151
|
-
result._shadowVolume = shadowVolume;
|
1152
|
-
result._offsetAttribute =
|
1153
|
-
offsetAttribute === -1 ? undefined : offsetAttribute;
|
1154
|
-
|
1155
|
-
return result;
|
1156
|
-
};
|
1157
|
-
|
1158
|
-
/**
|
1159
|
-
* Computes the bounding rectangle based on the provided options
|
1160
|
-
*
|
1161
|
-
* @param {object} options Object with the following properties:
|
1162
|
-
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
|
1163
|
-
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
|
1164
|
-
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
|
1165
|
-
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
|
1166
|
-
* @param {Rectangle} [result] An object in which to store the result.
|
1167
|
-
*
|
1168
|
-
* @returns {Rectangle} The result rectangle
|
1169
|
-
*/
|
1170
|
-
RectangleGeometry.computeRectangle = function (options, result) {
|
1171
|
-
options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
|
1172
|
-
|
1173
|
-
const rectangle = options.rectangle;
|
1174
|
-
|
1175
|
-
//>>includeStart('debug', pragmas.debug);
|
1176
|
-
Check.Check.typeOf.object("rectangle", rectangle);
|
1177
|
-
Matrix2.Rectangle.validate(rectangle);
|
1178
|
-
if (rectangle.north < rectangle.south) {
|
1179
|
-
throw new Check.DeveloperError(
|
1180
|
-
"options.rectangle.north must be greater than or equal to options.rectangle.south"
|
1181
|
-
);
|
1182
|
-
}
|
1183
|
-
//>>includeEnd('debug');
|
1184
|
-
|
1185
|
-
const granularity = defaultValue.defaultValue(
|
1186
|
-
options.granularity,
|
1187
|
-
Math$1.CesiumMath.RADIANS_PER_DEGREE
|
1188
|
-
);
|
1189
|
-
const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
|
1190
|
-
const rotation = defaultValue.defaultValue(options.rotation, 0.0);
|
1191
|
-
|
1192
|
-
return computeRectangle(rectangle, granularity, rotation, ellipsoid, result);
|
1193
|
-
};
|
1194
|
-
|
1195
|
-
const tangentRotationMatrixScratch = new Matrix3.Matrix3();
|
1196
|
-
const quaternionScratch = new Transforms.Quaternion();
|
1197
|
-
const centerScratch = new Matrix3.Cartographic();
|
1139
|
+
if (!vertexFormat.position) {
|
1140
|
+
delete geometry.attributes.position;
|
1141
|
+
}
|
1142
|
+
return new Geometry_default({
|
1143
|
+
attributes: geometry.attributes,
|
1144
|
+
indices: geometry.indices,
|
1145
|
+
primitiveType: geometry.primitiveType,
|
1146
|
+
boundingSphere,
|
1147
|
+
offsetAttribute: rectangleGeometry._offsetAttribute
|
1148
|
+
});
|
1149
|
+
};
|
1150
|
+
RectangleGeometry.createShadowVolume = function(rectangleGeometry, minHeightFunc, maxHeightFunc) {
|
1151
|
+
const granularity = rectangleGeometry._granularity;
|
1152
|
+
const ellipsoid = rectangleGeometry._ellipsoid;
|
1153
|
+
const minHeight = minHeightFunc(granularity, ellipsoid);
|
1154
|
+
const maxHeight = maxHeightFunc(granularity, ellipsoid);
|
1155
|
+
return new RectangleGeometry({
|
1156
|
+
rectangle: rectangleGeometry._rectangle,
|
1157
|
+
rotation: rectangleGeometry._rotation,
|
1158
|
+
ellipsoid,
|
1159
|
+
stRotation: rectangleGeometry._stRotation,
|
1160
|
+
granularity,
|
1161
|
+
extrudedHeight: maxHeight,
|
1162
|
+
height: minHeight,
|
1163
|
+
vertexFormat: VertexFormat_default.POSITION_ONLY,
|
1164
|
+
shadowVolume: true
|
1165
|
+
});
|
1166
|
+
};
|
1167
|
+
var unrotatedTextureRectangleScratch = new Rectangle_default();
|
1168
|
+
var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
|
1169
|
+
var rotation2DScratch = new Matrix2_default();
|
1170
|
+
var rectangleCenterScratch = new Cartographic_default();
|
1171
|
+
function textureCoordinateRotationPoints(rectangleGeometry) {
|
1172
|
+
if (rectangleGeometry._stRotation === 0) {
|
1173
|
+
return [0, 0, 0, 1, 1, 0];
|
1174
|
+
}
|
1175
|
+
const rectangle = Rectangle_default.clone(
|
1176
|
+
rectangleGeometry._rectangle,
|
1177
|
+
unrotatedTextureRectangleScratch
|
1178
|
+
);
|
1179
|
+
const granularity = rectangleGeometry._granularity;
|
1180
|
+
const ellipsoid = rectangleGeometry._ellipsoid;
|
1181
|
+
const rotation = rectangleGeometry._rotation - rectangleGeometry._stRotation;
|
1182
|
+
const unrotatedTextureRectangle = computeRectangle(
|
1183
|
+
rectangle,
|
1184
|
+
granularity,
|
1185
|
+
rotation,
|
1186
|
+
ellipsoid,
|
1187
|
+
unrotatedTextureRectangleScratch
|
1188
|
+
);
|
1189
|
+
const points2D = points2DScratch;
|
1190
|
+
points2D[0].x = unrotatedTextureRectangle.west;
|
1191
|
+
points2D[0].y = unrotatedTextureRectangle.south;
|
1192
|
+
points2D[1].x = unrotatedTextureRectangle.west;
|
1193
|
+
points2D[1].y = unrotatedTextureRectangle.north;
|
1194
|
+
points2D[2].x = unrotatedTextureRectangle.east;
|
1195
|
+
points2D[2].y = unrotatedTextureRectangle.south;
|
1196
|
+
const boundingRectangle = rectangleGeometry.rectangle;
|
1197
|
+
const toDesiredInComputed = Matrix2_default.fromRotation(
|
1198
|
+
rectangleGeometry._stRotation,
|
1199
|
+
rotation2DScratch
|
1200
|
+
);
|
1201
|
+
const boundingRectangleCenter = Rectangle_default.center(
|
1202
|
+
boundingRectangle,
|
1203
|
+
rectangleCenterScratch
|
1204
|
+
);
|
1205
|
+
for (let i = 0; i < 3; ++i) {
|
1206
|
+
const point2D = points2D[i];
|
1207
|
+
point2D.x -= boundingRectangleCenter.longitude;
|
1208
|
+
point2D.y -= boundingRectangleCenter.latitude;
|
1209
|
+
Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
|
1210
|
+
point2D.x += boundingRectangleCenter.longitude;
|
1211
|
+
point2D.y += boundingRectangleCenter.latitude;
|
1212
|
+
point2D.x = (point2D.x - boundingRectangle.west) / boundingRectangle.width;
|
1213
|
+
point2D.y = (point2D.y - boundingRectangle.south) / boundingRectangle.height;
|
1214
|
+
}
|
1215
|
+
const minXYCorner = points2D[0];
|
1216
|
+
const maxYCorner = points2D[1];
|
1217
|
+
const maxXCorner = points2D[2];
|
1218
|
+
const result = new Array(6);
|
1219
|
+
Cartesian2_default.pack(minXYCorner, result);
|
1220
|
+
Cartesian2_default.pack(maxYCorner, result, 2);
|
1221
|
+
Cartesian2_default.pack(maxXCorner, result, 4);
|
1222
|
+
return result;
|
1223
|
+
}
|
1224
|
+
Object.defineProperties(RectangleGeometry.prototype, {
|
1198
1225
|
/**
|
1199
|
-
*
|
1200
|
-
*
|
1201
|
-
* @param {RectangleGeometry} rectangleGeometry A description of the rectangle.
|
1202
|
-
* @returns {Geometry|undefined} The computed vertices and indices.
|
1203
|
-
*
|
1204
|
-
* @exception {DeveloperError} Rotated rectangle is invalid.
|
1226
|
+
* @private
|
1205
1227
|
*/
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
rectangleGeometry._rectangle.west,
|
1216
|
-
Math$1.CesiumMath.EPSILON10
|
1217
|
-
)
|
1218
|
-
) {
|
1219
|
-
return undefined;
|
1220
|
-
}
|
1221
|
-
|
1222
|
-
let rectangle = rectangleGeometry._rectangle;
|
1223
|
-
const ellipsoid = rectangleGeometry._ellipsoid;
|
1224
|
-
const rotation = rectangleGeometry._rotation;
|
1225
|
-
const stRotation = rectangleGeometry._stRotation;
|
1226
|
-
const vertexFormat = rectangleGeometry._vertexFormat;
|
1227
|
-
|
1228
|
-
const computedOptions = RectangleGeometryLibrary.RectangleGeometryLibrary.computeOptions(
|
1229
|
-
rectangle,
|
1230
|
-
rectangleGeometry._granularity,
|
1231
|
-
rotation,
|
1232
|
-
stRotation,
|
1233
|
-
rectangleScratch,
|
1234
|
-
nwScratch,
|
1235
|
-
stNwScratch
|
1236
|
-
);
|
1237
|
-
|
1238
|
-
const tangentRotationMatrix = tangentRotationMatrixScratch;
|
1239
|
-
if (stRotation !== 0 || rotation !== 0) {
|
1240
|
-
const center = Matrix2.Rectangle.center(rectangle, centerScratch);
|
1241
|
-
const axis = ellipsoid.geodeticSurfaceNormalCartographic(center, v1Scratch);
|
1242
|
-
Transforms.Quaternion.fromAxisAngle(axis, -stRotation, quaternionScratch);
|
1243
|
-
Matrix3.Matrix3.fromQuaternion(quaternionScratch, tangentRotationMatrix);
|
1244
|
-
} else {
|
1245
|
-
Matrix3.Matrix3.clone(Matrix3.Matrix3.IDENTITY, tangentRotationMatrix);
|
1246
|
-
}
|
1247
|
-
|
1248
|
-
const surfaceHeight = rectangleGeometry._surfaceHeight;
|
1249
|
-
const extrudedHeight = rectangleGeometry._extrudedHeight;
|
1250
|
-
const extrude = !Math$1.CesiumMath.equalsEpsilon(
|
1251
|
-
surfaceHeight,
|
1252
|
-
extrudedHeight,
|
1253
|
-
0,
|
1254
|
-
Math$1.CesiumMath.EPSILON2
|
1255
|
-
);
|
1256
|
-
|
1257
|
-
computedOptions.lonScalar = 1.0 / rectangleGeometry._rectangle.width;
|
1258
|
-
computedOptions.latScalar = 1.0 / rectangleGeometry._rectangle.height;
|
1259
|
-
computedOptions.tangentRotationMatrix = tangentRotationMatrix;
|
1260
|
-
|
1261
|
-
let geometry;
|
1262
|
-
let boundingSphere;
|
1263
|
-
rectangle = rectangleGeometry._rectangle;
|
1264
|
-
if (extrude) {
|
1265
|
-
geometry = constructExtrudedRectangle(rectangleGeometry, computedOptions);
|
1266
|
-
const topBS = Transforms.BoundingSphere.fromRectangle3D(
|
1267
|
-
rectangle,
|
1268
|
-
ellipsoid,
|
1269
|
-
surfaceHeight,
|
1270
|
-
topBoundingSphere
|
1271
|
-
);
|
1272
|
-
const bottomBS = Transforms.BoundingSphere.fromRectangle3D(
|
1273
|
-
rectangle,
|
1274
|
-
ellipsoid,
|
1275
|
-
extrudedHeight,
|
1276
|
-
bottomBoundingSphere
|
1277
|
-
);
|
1278
|
-
boundingSphere = Transforms.BoundingSphere.union(topBS, bottomBS);
|
1279
|
-
} else {
|
1280
|
-
geometry = constructRectangle(rectangleGeometry, computedOptions);
|
1281
|
-
geometry.attributes.position.values = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
|
1282
|
-
geometry.attributes.position.values,
|
1283
|
-
surfaceHeight,
|
1284
|
-
ellipsoid,
|
1285
|
-
false
|
1286
|
-
);
|
1287
|
-
|
1288
|
-
if (defaultValue.defined(rectangleGeometry._offsetAttribute)) {
|
1289
|
-
const length = geometry.attributes.position.values.length;
|
1290
|
-
const offsetValue =
|
1291
|
-
rectangleGeometry._offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE
|
1292
|
-
? 0
|
1293
|
-
: 1;
|
1294
|
-
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
1295
|
-
geometry.attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
|
1296
|
-
componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
|
1297
|
-
componentsPerAttribute: 1,
|
1298
|
-
values: applyOffset,
|
1299
|
-
});
|
1228
|
+
rectangle: {
|
1229
|
+
get: function() {
|
1230
|
+
if (!defined_default(this._rotatedRectangle)) {
|
1231
|
+
this._rotatedRectangle = computeRectangle(
|
1232
|
+
this._rectangle,
|
1233
|
+
this._granularity,
|
1234
|
+
this._rotation,
|
1235
|
+
this._ellipsoid
|
1236
|
+
);
|
1300
1237
|
}
|
1301
|
-
|
1302
|
-
boundingSphere = Transforms.BoundingSphere.fromRectangle3D(
|
1303
|
-
rectangle,
|
1304
|
-
ellipsoid,
|
1305
|
-
surfaceHeight
|
1306
|
-
);
|
1307
|
-
}
|
1308
|
-
|
1309
|
-
if (!vertexFormat.position) {
|
1310
|
-
delete geometry.attributes.position;
|
1238
|
+
return this._rotatedRectangle;
|
1311
1239
|
}
|
1312
|
-
|
1313
|
-
return new GeometryAttribute.Geometry({
|
1314
|
-
attributes: geometry.attributes,
|
1315
|
-
indices: geometry.indices,
|
1316
|
-
primitiveType: geometry.primitiveType,
|
1317
|
-
boundingSphere: boundingSphere,
|
1318
|
-
offsetAttribute: rectangleGeometry._offsetAttribute,
|
1319
|
-
});
|
1320
|
-
};
|
1321
|
-
|
1240
|
+
},
|
1322
1241
|
/**
|
1242
|
+
* For remapping texture coordinates when rendering RectangleGeometries as GroundPrimitives.
|
1243
|
+
* This version permits skew in textures by computing offsets directly in cartographic space and
|
1244
|
+
* more accurately approximates rendering RectangleGeometries with height as standard Primitives.
|
1245
|
+
* @see Geometry#_textureCoordinateRotationPoints
|
1323
1246
|
* @private
|
1324
1247
|
*/
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
const minHeight = minHeightFunc(granularity, ellipsoid);
|
1334
|
-
const maxHeight = maxHeightFunc(granularity, ellipsoid);
|
1335
|
-
|
1336
|
-
return new RectangleGeometry({
|
1337
|
-
rectangle: rectangleGeometry._rectangle,
|
1338
|
-
rotation: rectangleGeometry._rotation,
|
1339
|
-
ellipsoid: ellipsoid,
|
1340
|
-
stRotation: rectangleGeometry._stRotation,
|
1341
|
-
granularity: granularity,
|
1342
|
-
extrudedHeight: maxHeight,
|
1343
|
-
height: minHeight,
|
1344
|
-
vertexFormat: VertexFormat.VertexFormat.POSITION_ONLY,
|
1345
|
-
shadowVolume: true,
|
1346
|
-
});
|
1347
|
-
};
|
1348
|
-
|
1349
|
-
const unrotatedTextureRectangleScratch = new Matrix2.Rectangle();
|
1350
|
-
const points2DScratch = [new Matrix2.Cartesian2(), new Matrix2.Cartesian2(), new Matrix2.Cartesian2()];
|
1351
|
-
const rotation2DScratch = new Matrix2.Matrix2();
|
1352
|
-
const rectangleCenterScratch = new Matrix3.Cartographic();
|
1353
|
-
|
1354
|
-
function textureCoordinateRotationPoints(rectangleGeometry) {
|
1355
|
-
if (rectangleGeometry._stRotation === 0.0) {
|
1356
|
-
return [0, 0, 0, 1, 1, 0];
|
1357
|
-
}
|
1358
|
-
|
1359
|
-
const rectangle = Matrix2.Rectangle.clone(
|
1360
|
-
rectangleGeometry._rectangle,
|
1361
|
-
unrotatedTextureRectangleScratch
|
1362
|
-
);
|
1363
|
-
const granularity = rectangleGeometry._granularity;
|
1364
|
-
const ellipsoid = rectangleGeometry._ellipsoid;
|
1365
|
-
|
1366
|
-
// Rotate to align the texture coordinates with ENU
|
1367
|
-
const rotation = rectangleGeometry._rotation - rectangleGeometry._stRotation;
|
1368
|
-
|
1369
|
-
const unrotatedTextureRectangle = computeRectangle(
|
1370
|
-
rectangle,
|
1371
|
-
granularity,
|
1372
|
-
rotation,
|
1373
|
-
ellipsoid,
|
1374
|
-
unrotatedTextureRectangleScratch
|
1375
|
-
);
|
1376
|
-
|
1377
|
-
// Assume a computed "east-north" texture coordinate system based on spherical or planar tricks, bounded by `boundingRectangle`.
|
1378
|
-
// The "desired" texture coordinate system forms an oriented rectangle (un-oriented computed) around the geometry that completely and tightly bounds it.
|
1379
|
-
// We want to map from the "east-north" texture coordinate system into the "desired" system using a pair of lines (analagous planes in 2D)
|
1380
|
-
// Compute 3 corners of the "desired" texture coordinate system in "east-north" texture space by the following in cartographic space:
|
1381
|
-
// - rotate 3 of the corners in unrotatedTextureRectangle by stRotation around the center of the bounding rectangle
|
1382
|
-
// - apply the "east-north" system's normalization formula to the rotated cartographics, even though this is likely to produce values outside [0-1].
|
1383
|
-
// This gives us a set of points in the "east-north" texture coordinate system that can be used to map "east-north" texture coordinates to "desired."
|
1384
|
-
|
1385
|
-
const points2D = points2DScratch;
|
1386
|
-
points2D[0].x = unrotatedTextureRectangle.west;
|
1387
|
-
points2D[0].y = unrotatedTextureRectangle.south;
|
1388
|
-
|
1389
|
-
points2D[1].x = unrotatedTextureRectangle.west;
|
1390
|
-
points2D[1].y = unrotatedTextureRectangle.north;
|
1391
|
-
|
1392
|
-
points2D[2].x = unrotatedTextureRectangle.east;
|
1393
|
-
points2D[2].y = unrotatedTextureRectangle.south;
|
1394
|
-
|
1395
|
-
const boundingRectangle = rectangleGeometry.rectangle;
|
1396
|
-
const toDesiredInComputed = Matrix2.Matrix2.fromRotation(
|
1397
|
-
rectangleGeometry._stRotation,
|
1398
|
-
rotation2DScratch
|
1399
|
-
);
|
1400
|
-
const boundingRectangleCenter = Matrix2.Rectangle.center(
|
1401
|
-
boundingRectangle,
|
1402
|
-
rectangleCenterScratch
|
1403
|
-
);
|
1404
|
-
|
1405
|
-
for (let i = 0; i < 3; ++i) {
|
1406
|
-
const point2D = points2D[i];
|
1407
|
-
point2D.x -= boundingRectangleCenter.longitude;
|
1408
|
-
point2D.y -= boundingRectangleCenter.latitude;
|
1409
|
-
Matrix2.Matrix2.multiplyByVector(toDesiredInComputed, point2D, point2D);
|
1410
|
-
point2D.x += boundingRectangleCenter.longitude;
|
1411
|
-
point2D.y += boundingRectangleCenter.latitude;
|
1412
|
-
|
1413
|
-
// Convert point into east-north texture coordinate space
|
1414
|
-
point2D.x = (point2D.x - boundingRectangle.west) / boundingRectangle.width;
|
1415
|
-
point2D.y =
|
1416
|
-
(point2D.y - boundingRectangle.south) / boundingRectangle.height;
|
1248
|
+
textureCoordinateRotationPoints: {
|
1249
|
+
get: function() {
|
1250
|
+
if (!defined_default(this._textureCoordinateRotationPoints)) {
|
1251
|
+
this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
|
1252
|
+
this
|
1253
|
+
);
|
1254
|
+
}
|
1255
|
+
return this._textureCoordinateRotationPoints;
|
1417
1256
|
}
|
1418
|
-
|
1419
|
-
const minXYCorner = points2D[0];
|
1420
|
-
const maxYCorner = points2D[1];
|
1421
|
-
const maxXCorner = points2D[2];
|
1422
|
-
const result = new Array(6);
|
1423
|
-
Matrix2.Cartesian2.pack(minXYCorner, result);
|
1424
|
-
Matrix2.Cartesian2.pack(maxYCorner, result, 2);
|
1425
|
-
Matrix2.Cartesian2.pack(maxXCorner, result, 4);
|
1426
|
-
return result;
|
1427
1257
|
}
|
1258
|
+
});
|
1259
|
+
var RectangleGeometry_default = RectangleGeometry;
|
1428
1260
|
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
rectangle: {
|
1434
|
-
get: function () {
|
1435
|
-
if (!defaultValue.defined(this._rotatedRectangle)) {
|
1436
|
-
this._rotatedRectangle = computeRectangle(
|
1437
|
-
this._rectangle,
|
1438
|
-
this._granularity,
|
1439
|
-
this._rotation,
|
1440
|
-
this._ellipsoid
|
1441
|
-
);
|
1442
|
-
}
|
1443
|
-
return this._rotatedRectangle;
|
1444
|
-
},
|
1445
|
-
},
|
1446
|
-
/**
|
1447
|
-
* For remapping texture coordinates when rendering RectangleGeometries as GroundPrimitives.
|
1448
|
-
* This version permits skew in textures by computing offsets directly in cartographic space and
|
1449
|
-
* more accurately approximates rendering RectangleGeometries with height as standard Primitives.
|
1450
|
-
* @see Geometry#_textureCoordinateRotationPoints
|
1451
|
-
* @private
|
1452
|
-
*/
|
1453
|
-
textureCoordinateRotationPoints: {
|
1454
|
-
get: function () {
|
1455
|
-
if (!defaultValue.defined(this._textureCoordinateRotationPoints)) {
|
1456
|
-
this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
|
1457
|
-
this
|
1458
|
-
);
|
1459
|
-
}
|
1460
|
-
return this._textureCoordinateRotationPoints;
|
1461
|
-
},
|
1462
|
-
},
|
1463
|
-
});
|
1464
|
-
|
1465
|
-
function createRectangleGeometry(rectangleGeometry, offset) {
|
1466
|
-
if (defaultValue.defined(offset)) {
|
1467
|
-
rectangleGeometry = RectangleGeometry.unpack(rectangleGeometry, offset);
|
1468
|
-
}
|
1469
|
-
rectangleGeometry._ellipsoid = Matrix3.Ellipsoid.clone(rectangleGeometry._ellipsoid);
|
1470
|
-
rectangleGeometry._rectangle = Matrix2.Rectangle.clone(rectangleGeometry._rectangle);
|
1471
|
-
return RectangleGeometry.createGeometry(rectangleGeometry);
|
1261
|
+
// packages/engine/Source/Workers/createRectangleGeometry.js
|
1262
|
+
function createRectangleGeometry(rectangleGeometry, offset) {
|
1263
|
+
if (defined_default(offset)) {
|
1264
|
+
rectangleGeometry = RectangleGeometry_default.unpack(rectangleGeometry, offset);
|
1472
1265
|
}
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
}
|
1266
|
+
rectangleGeometry._ellipsoid = Ellipsoid_default.clone(rectangleGeometry._ellipsoid);
|
1267
|
+
rectangleGeometry._rectangle = Rectangle_default.clone(rectangleGeometry._rectangle);
|
1268
|
+
return RectangleGeometry_default.createGeometry(rectangleGeometry);
|
1269
|
+
}
|
1270
|
+
var createRectangleGeometry_default = createRectangleGeometry;
|
1271
|
+
export {
|
1272
|
+
createRectangleGeometry_default as default
|
1273
|
+
};
|