@vcmap/ui 5.0.0-rc.17 → 5.0.0-rc.20

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.
Files changed (386) hide show
  1. package/README.md +6 -6
  2. package/build/build.js +2 -2
  3. package/build/buildCesium.js +3 -3
  4. package/build/buildHelpers.js +2 -1
  5. package/config/base.config.json +0 -4
  6. package/config/dev.config.json +35 -14
  7. package/config/www.config.json +752 -123
  8. package/dist/assets/cesium/Workers/ArcType-ce2e50ab.js +37 -0
  9. package/dist/assets/cesium/Workers/AttributeCompression-b646d393.js +716 -0
  10. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-ff186ccc.js +258 -0
  11. package/dist/assets/cesium/Workers/BoundingRectangle-be5924f4.js +369 -0
  12. package/dist/assets/cesium/Workers/BoxGeometry-12eeccaf.js +884 -0
  13. package/dist/assets/cesium/Workers/Check-666ab1a0.js +290 -0
  14. package/dist/assets/cesium/Workers/Color-a84038cb.js +2262 -0
  15. package/dist/assets/cesium/Workers/ComponentDatatype-f7b11d02.js +341 -0
  16. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-3272c1b3.js +132 -0
  17. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-0170e093.js +498 -0
  18. package/dist/assets/cesium/Workers/CylinderGeometry-7c5da648.js +467 -0
  19. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-372c07d8.js +63 -0
  20. package/dist/assets/cesium/Workers/EllipseGeometry-797d580e.js +1304 -0
  21. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-2939e1dc.js +366 -0
  22. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-8b50870f.js +443 -0
  23. package/dist/assets/cesium/Workers/EllipsoidGeodesic-98c62a56.js +520 -0
  24. package/dist/assets/cesium/Workers/EllipsoidGeometry-21c0e3a5.js +637 -0
  25. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-eff247c8.js +454 -0
  26. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-19756602.js +741 -0
  27. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-214683dc.js +373 -0
  28. package/dist/assets/cesium/Workers/EncodedCartesian3-81f70735.js +171 -0
  29. package/dist/assets/cesium/Workers/FrustumGeometry-ac42a6d9.js +2512 -0
  30. package/dist/assets/cesium/Workers/GeometryAttribute-7d6f1732.js +619 -0
  31. package/dist/assets/cesium/Workers/GeometryAttributes-f06a2792.js +91 -0
  32. package/dist/assets/cesium/Workers/GeometryInstance-451dc1cd.js +121 -0
  33. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-04332ce7.js +16 -0
  34. package/dist/assets/cesium/Workers/GeometryPipeline-ce4339ed.js +3690 -0
  35. package/dist/assets/cesium/Workers/IndexDatatype-a55ceaa1.js +200 -0
  36. package/dist/assets/cesium/Workers/IntersectionTests-f6e6bd8a.js +1836 -0
  37. package/dist/assets/cesium/Workers/Math-2dbd6b93.js +1330 -0
  38. package/dist/assets/cesium/Workers/Matrix2-13178034.js +7086 -0
  39. package/dist/assets/cesium/Workers/Matrix3-315394f6.js +4283 -0
  40. package/dist/assets/cesium/Workers/OrientedBoundingBox-04920dc7.js +1257 -0
  41. package/dist/assets/cesium/Workers/Plane-900aa728.js +309 -0
  42. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-a8680d96.js +1074 -0
  43. package/dist/assets/cesium/Workers/PolygonPipeline-844aab0a.js +1345 -0
  44. package/dist/assets/cesium/Workers/PolylinePipeline-32f36d2a.js +573 -0
  45. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-a510d657.js +781 -0
  46. package/dist/assets/cesium/Workers/PrimitivePipeline-ba38434a.js +966 -0
  47. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-bdba697e.js +280 -0
  48. package/dist/assets/cesium/Workers/RuntimeError-06c93819.js +68 -0
  49. package/dist/assets/cesium/Workers/TerrainEncoding-833187da.js +1227 -0
  50. package/dist/assets/cesium/Workers/Transforms-40229881.js +14696 -0
  51. package/dist/assets/cesium/Workers/VertexFormat-6b480673.js +312 -0
  52. package/dist/assets/cesium/Workers/WallGeometryLibrary-919eed92.js +211 -0
  53. package/dist/assets/cesium/Workers/WebGLConstants-a8cc3e8c.js +620 -0
  54. package/dist/assets/cesium/Workers/WebMercatorProjection-13a90d41.js +151 -0
  55. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-c2038105.js +129 -0
  56. package/dist/assets/cesium/Workers/cesiumWorkerBootstrapper.js +1336 -4
  57. package/dist/assets/cesium/Workers/combine-ca22a614.js +82 -0
  58. package/dist/assets/cesium/Workers/combineGeometry.js +17 -25
  59. package/dist/assets/cesium/Workers/createBoxGeometry.js +12 -25
  60. package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +313 -25
  61. package/dist/assets/cesium/Workers/createCircleGeometry.js +213 -25
  62. package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +160 -25
  63. package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +586 -25
  64. package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +236 -25
  65. package/dist/assets/cesium/Workers/createCorridorGeometry.js +1407 -25
  66. package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +603 -25
  67. package/dist/assets/cesium/Workers/createCylinderGeometry.js +12 -25
  68. package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +265 -25
  69. package/dist/assets/cesium/Workers/createEllipseGeometry.js +14 -25
  70. package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +14 -25
  71. package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +12 -25
  72. package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +15 -25
  73. package/dist/assets/cesium/Workers/createFrustumGeometry.js +12 -25
  74. package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +251 -25
  75. package/dist/assets/cesium/Workers/createGeometry.js +55 -25
  76. package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +2134 -25
  77. package/dist/assets/cesium/Workers/createPlaneGeometry.js +250 -25
  78. package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +115 -25
  79. package/dist/assets/cesium/Workers/createPolygonGeometry.js +1420 -25
  80. package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +683 -25
  81. package/dist/assets/cesium/Workers/createPolylineGeometry.js +571 -25
  82. package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +411 -25
  83. package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +301 -25
  84. package/dist/assets/cesium/Workers/createRectangleGeometry.js +1476 -25
  85. package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +535 -25
  86. package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +458 -25
  87. package/dist/assets/cesium/Workers/createSphereGeometry.js +123 -25
  88. package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +126 -25
  89. package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +127 -25
  90. package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +535 -25
  91. package/dist/assets/cesium/Workers/createVectorTileGeometries.js +445 -25
  92. package/dist/assets/cesium/Workers/createVectorTilePoints.js +79 -25
  93. package/dist/assets/cesium/Workers/createVectorTilePolygons.js +406 -25
  94. package/dist/assets/cesium/Workers/createVectorTilePolylines.js +254 -25
  95. package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +640 -25
  96. package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +2711 -27
  97. package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +994 -25
  98. package/dist/assets/cesium/Workers/createWallGeometry.js +623 -25
  99. package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +432 -25
  100. package/dist/assets/cesium/Workers/decodeDraco.js +381 -25
  101. package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +3687 -25
  102. package/dist/assets/cesium/Workers/decodeI3S.js +1040 -0
  103. package/dist/assets/cesium/Workers/defaultValue-0a909f67.js +51 -0
  104. package/dist/assets/cesium/Workers/package.js +2 -2
  105. package/dist/assets/cesium/Workers/transcodeKTX2.js +1516 -25
  106. package/dist/assets/cesium/Workers/transferTypedArrayTest.js +18 -2
  107. package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +1023 -25
  108. package/dist/assets/{cesium.41de56.js → cesium.adbd45.js} +112161 -108735
  109. package/dist/assets/cesium.js +1 -1
  110. package/dist/assets/{core.af84e3.js → core.60e74d.js} +1616 -1629
  111. package/dist/assets/core.f198cf.js +15993 -0
  112. package/dist/assets/core.js +1 -1
  113. package/dist/assets/{index.5b773cad.js → index.884a53ef.js} +1 -1
  114. package/dist/assets/{ol.5c7490.js → ol.c6ff35.js} +6992 -6972
  115. package/dist/assets/ol.dbd604.js +44299 -0
  116. package/dist/assets/ol.js +1 -1
  117. package/dist/assets/ui.bf504d.css +1 -0
  118. package/dist/assets/{ui.dffe32.js → ui.bf504d.js} +6171 -6821
  119. package/dist/assets/ui.js +1 -1
  120. package/dist/assets/{vue.25da17.js → vue.75b819.js} +0 -0
  121. package/dist/assets/vue.a831f1.js +4675 -0
  122. package/dist/assets/vue.js +2 -2
  123. package/dist/assets/{vuetify.e4ece7.css → vuetify.0d7360.css} +0 -0
  124. package/dist/assets/{vuetify.e4ece7.js → vuetify.0d7360.js} +1 -1
  125. package/dist/assets/vuetify.js +2 -2
  126. package/dist/index.html +1 -1
  127. package/index.js +2 -1
  128. package/lib/cesium.js +1 -1
  129. package/package.json +3 -4
  130. package/plugins/{simple-graph → @vcmap/simple-graph}/README.md +1 -1
  131. package/plugins/{simple-graph → @vcmap/simple-graph}/SimpleGraphComponent.vue +0 -0
  132. package/plugins/{simple-graph → @vcmap/simple-graph}/index.js +0 -0
  133. package/plugins/{simple-graph → @vcmap/simple-graph}/package.json +0 -0
  134. package/plugins/{simple-graph → @vcmap/simple-graph}/simpleGraphView.js +0 -0
  135. package/plugins/@vcmap-show-case/README.md +20 -0
  136. package/plugins/{buttonExamples/ButtonExamples.vue → @vcmap-show-case/buttons-example/ButtonsExample.vue} +19 -1
  137. package/plugins/@vcmap-show-case/buttons-example/README.md +4 -0
  138. package/plugins/{buttonExamples → @vcmap-show-case/buttons-example}/index.js +16 -8
  139. package/plugins/@vcmap-show-case/buttons-example/package.json +5 -0
  140. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Categories.vue +7 -6
  141. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/Category.vue +4 -3
  142. package/plugins/@vcmap-show-case/category-tester/README.md +3 -0
  143. package/plugins/{categoryTest → @vcmap-show-case/category-tester}/index.js +12 -4
  144. package/plugins/@vcmap-show-case/category-tester/package.json +5 -0
  145. package/plugins/@vcmap-show-case/config-editor/README.md +3 -0
  146. package/plugins/{test → @vcmap-show-case/config-editor}/editor.vue +0 -0
  147. package/plugins/@vcmap-show-case/config-editor/index.js +47 -0
  148. package/plugins/@vcmap-show-case/config-editor/package.json +5 -0
  149. package/plugins/@vcmap-show-case/context-menu-tester/README.md +3 -0
  150. package/plugins/@vcmap-show-case/context-menu-tester/index.js +33 -0
  151. package/plugins/@vcmap-show-case/context-menu-tester/package.json +5 -0
  152. package/plugins/{@vcmap/pluginExample/pluginExampleComponent.vue → @vcmap-show-case/form-inputs-example/FormInputsExample.vue} +14 -13
  153. package/plugins/@vcmap-show-case/form-inputs-example/README.md +4 -0
  154. package/plugins/@vcmap-show-case/form-inputs-example/config.json +5 -0
  155. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/exampleActions.js +1 -1
  156. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/index.js +23 -22
  157. package/plugins/@vcmap-show-case/form-inputs-example/package.json +5 -0
  158. package/plugins/{@vcmap/pluginExample → @vcmap-show-case/form-inputs-example}/validation.js +0 -0
  159. package/plugins/@vcmap-show-case/icons-example/README.md +5 -0
  160. package/plugins/@vcmap-show-case/icons-example/allIconsComponent.vue +51 -0
  161. package/plugins/@vcmap-show-case/icons-example/index.js +44 -0
  162. package/plugins/@vcmap-show-case/icons-example/package.json +5 -0
  163. package/plugins/{test/testList.vue → @vcmap-show-case/list-example/ListExample.vue} +1 -1
  164. package/plugins/@vcmap-show-case/list-example/README.md +3 -0
  165. package/plugins/@vcmap-show-case/list-example/index.js +44 -0
  166. package/plugins/@vcmap-show-case/list-example/package.json +5 -0
  167. package/plugins/@vcmap-show-case/notifier-tester/README.md +3 -0
  168. package/plugins/{notifier → @vcmap-show-case/notifier-tester}/index.js +11 -6
  169. package/plugins/{notifier → @vcmap-show-case/notifier-tester}/notifierTester.vue +0 -0
  170. package/plugins/@vcmap-show-case/notifier-tester/package.json +5 -0
  171. package/plugins/@vcmap-show-case/textfields-example/README.md +3 -0
  172. package/plugins/{example/mySuperComponent.vue → @vcmap-show-case/textfields-example/TextfieldsExample.vue} +1 -7
  173. package/plugins/{example → @vcmap-show-case/textfields-example}/index.js +58 -62
  174. package/plugins/@vcmap-show-case/textfields-example/package.json +5 -0
  175. package/plugins/@vcmap-show-case/window-tester/README.md +3 -0
  176. package/plugins/{test/windowManagerExample.vue → @vcmap-show-case/window-tester/WindowExample.vue} +36 -20
  177. package/plugins/{test → @vcmap-show-case/window-tester}/emptyComponent.vue +8 -3
  178. package/plugins/@vcmap-show-case/window-tester/index.js +62 -0
  179. package/plugins/{test → @vcmap-show-case/window-tester}/myCustomHeader.vue +0 -0
  180. package/plugins/@vcmap-show-case/window-tester/package.json +5 -0
  181. package/plugins/@vcmap-show-case/window-tester/toolbox-data.js +211 -0
  182. package/plugins/{test/vcsContent.vue → @vcmap-show-case/window-tester/windowExampleContent.vue} +1 -5
  183. package/plugins/@vcmap-show-case/wizard-example/README.md +3 -0
  184. package/plugins/{wizardExample → @vcmap-show-case/wizard-example}/index.js +12 -6
  185. package/plugins/@vcmap-show-case/wizard-example/package.json +5 -0
  186. package/plugins/@vcmap-show-case/wizard-example/wizardExample.vue +95 -0
  187. package/plugins/package.json +2 -1
  188. package/src/actions/actionHelper.js +4 -4
  189. package/src/actions/stateRefAction.js +0 -10
  190. package/src/application/VcsApp.vue +42 -23
  191. package/src/application/VcsMap.vue +9 -0
  192. package/src/application/VcsNavbar.vue +1 -1
  193. package/src/components/buttons/VcsActionButtonList.vue +1 -0
  194. package/src/components/buttons/VcsButton.vue +14 -3
  195. package/src/components/form-inputs-controls/VcsCheckbox.vue +3 -1
  196. package/src/components/form-inputs-controls/VcsWizard.vue +17 -20
  197. package/src/components/form-inputs-controls/VcsWizardStep.vue +160 -0
  198. package/src/{icons → components/icons}/+all.js +0 -0
  199. package/src/{icons → components/icons}/2DAreaIcon.vue +0 -0
  200. package/src/{icons → components/icons}/2DDistanceIcon.vue +0 -0
  201. package/src/{icons → components/icons}/3DAreaIcon.vue +0 -0
  202. package/src/{icons → components/icons}/3DDistanceIcon.vue +0 -0
  203. package/src/{icons → components/icons}/3DHeightIcon.vue +0 -0
  204. package/src/{icons → components/icons}/AngleIcon.vue +0 -0
  205. package/src/{icons → components/icons}/AssociationsIcon.vue +0 -0
  206. package/src/{icons → components/icons}/AxisIcon.vue +0 -0
  207. package/src/{icons → components/icons}/BoundingBoxIcon.vue +0 -0
  208. package/src/{icons → components/icons}/CheckboxCheckedIcon.vue +0 -0
  209. package/src/{icons → components/icons}/CheckboxIcon.vue +0 -0
  210. package/src/{icons → components/icons}/CheckboxIndeterminateIcon.vue +0 -0
  211. package/src/{icons → components/icons}/CircleIcon.vue +0 -0
  212. package/src/{icons → components/icons}/ClippingHorizontalIcon.vue +0 -0
  213. package/src/{icons → components/icons}/ClippingIcon.vue +0 -0
  214. package/src/{icons → components/icons}/ClippingVerticalIcon.vue +0 -0
  215. package/src/{icons → components/icons}/ColorPickerIcon.vue +0 -0
  216. package/src/{icons → components/icons}/ColorSwatchIcon.vue +0 -0
  217. package/src/{icons → components/icons}/CommentIcon.vue +0 -0
  218. package/src/{icons → components/icons}/CompassIcon.vue +0 -0
  219. package/src/{icons → components/icons}/ComponentsIcon.vue +0 -0
  220. package/src/{icons → components/icons}/ConeIcon.vue +0 -0
  221. package/src/{icons → components/icons}/DimensionsHouseIcon.vue +0 -0
  222. package/src/{icons → components/icons}/EditIcon.vue +0 -0
  223. package/src/{icons → components/icons}/ElevationProfileIcon.vue +0 -0
  224. package/src/{icons → components/icons}/ExportAreaIcon.vue +0 -0
  225. package/src/{icons → components/icons}/ExportFlightIcon.vue +0 -0
  226. package/src/{icons → components/icons}/ExportIcon.vue +0 -0
  227. package/src/{icons → components/icons}/ExternalLinkIcon.vue +0 -0
  228. package/src/{icons → components/icons}/EyeIcon.vue +0 -0
  229. package/src/{icons → components/icons}/FastForwardIcon.vue +0 -0
  230. package/src/{icons → components/icons}/FilterIcon.vue +0 -0
  231. package/src/{icons → components/icons}/GlobalTerrainIcon.vue +0 -0
  232. package/src/{icons → components/icons}/GlobeNatureIcon.vue +0 -0
  233. package/src/{icons → components/icons}/GroundIcon.vue +0 -0
  234. package/src/{icons → components/icons}/HealthCareIndustriesIcon.vue +0 -0
  235. package/src/{icons → components/icons}/HelpIcon.vue +0 -0
  236. package/src/{icons → components/icons}/HideIcon.vue +0 -0
  237. package/src/{icons → components/icons}/HomePointIcon.vue +0 -0
  238. package/src/{icons → components/icons}/HospitalsIcon.vue +0 -0
  239. package/src/{icons → components/icons}/HouseIcon.vue +0 -0
  240. package/src/{icons → components/icons}/ImportIcon.vue +0 -0
  241. package/src/{icons → components/icons}/InfoIcon.vue +0 -0
  242. package/src/{icons → components/icons}/KebabIcon.vue +0 -0
  243. package/src/{icons → components/icons}/LabelIcon.vue +0 -0
  244. package/src/{icons → components/icons}/LayersIcon.vue +0 -0
  245. package/src/{icons → components/icons}/LegendIcon.vue +0 -0
  246. package/src/{icons → components/icons}/LineIcon.vue +0 -0
  247. package/src/{icons → components/icons}/LinkIcon.vue +0 -0
  248. package/src/{icons → components/icons}/LogoutIcon.vue +0 -0
  249. package/src/{icons → components/icons}/MapIcon.vue +0 -0
  250. package/src/{icons → components/icons}/MenuIcon.vue +0 -0
  251. package/src/{icons → components/icons}/MinusIcon.vue +0 -0
  252. package/src/{icons → components/icons}/ObjectAttributeIcon.vue +0 -0
  253. package/src/{icons → components/icons}/ObjectSelectIcon.vue +0 -0
  254. package/src/{icons → components/icons}/ObliqueViewIcon.vue +0 -0
  255. package/src/{icons → components/icons}/PdfIcon.vue +0 -0
  256. package/src/{icons → components/icons}/PedestrianIcon.vue +0 -0
  257. package/src/{icons → components/icons}/PenIcon.vue +0 -0
  258. package/src/{icons → components/icons}/PlayCircleIcon.vue +0 -0
  259. package/src/{icons → components/icons}/PlusIcon.vue +0 -0
  260. package/src/{icons → components/icons}/PoiIcon.vue +0 -0
  261. package/src/{icons → components/icons}/PointSelectIcon.vue +0 -0
  262. package/src/{icons → components/icons}/PolygonIcon.vue +0 -0
  263. package/src/{icons → components/icons}/PresentationModeIcon.vue +0 -0
  264. package/src/{icons → components/icons}/ProgressIcon.vue +0 -0
  265. package/src/{icons → components/icons}/QueryIcon.vue +0 -0
  266. package/src/{icons → components/icons}/RectangleIcon.vue +0 -0
  267. package/src/{icons → components/icons}/ReturnIcon.vue +0 -0
  268. package/src/{icons → components/icons}/RewindIcon.vue +0 -0
  269. package/src/{icons → components/icons}/RotateLeftIcon.vue +0 -0
  270. package/src/{icons → components/icons}/RotateRightIcon.vue +0 -0
  271. package/src/{icons → components/icons}/ScreenshotIcon.vue +0 -0
  272. package/src/{icons → components/icons}/SearchIcon.vue +0 -0
  273. package/src/{icons → components/icons}/ShadowIcon.vue +0 -0
  274. package/src/{icons → components/icons}/ShapesIcon.vue +0 -0
  275. package/src/{icons → components/icons}/ShareIcon.vue +0 -0
  276. package/src/{icons → components/icons}/SimpleCircleFilledIcon.vue +0 -0
  277. package/src/{icons → components/icons}/SimpleCircleHalfFilledIcon.vue +0 -0
  278. package/src/{icons → components/icons}/SimpleCircleOutlinedIcon.vue +0 -0
  279. package/src/{icons → components/icons}/SkipNextIcon.vue +0 -0
  280. package/src/{icons → components/icons}/SkipPreviousIcon.vue +0 -0
  281. package/src/{icons → components/icons}/SplitViewIcon.vue +0 -0
  282. package/src/{icons → components/icons}/TerrainBoxIcon.vue +0 -0
  283. package/src/{icons → components/icons}/TextStyleIcon.vue +0 -0
  284. package/src/{icons → components/icons}/ThreeDimensionsIcon.vue +0 -0
  285. package/src/{icons → components/icons}/ToolsIcon.vue +0 -0
  286. package/src/{icons → components/icons}/TouchIcon.vue +0 -0
  287. package/src/{icons → components/icons}/TrashCanIcon.vue +0 -0
  288. package/src/{icons → components/icons}/TriangleIcon.vue +0 -0
  289. package/src/{icons → components/icons}/TwoDimensionsIcon.vue +0 -0
  290. package/src/{icons → components/icons}/UploadIcon.vue +0 -0
  291. package/src/{icons → components/icons}/UserProfileIcon.vue +0 -0
  292. package/src/{icons → components/icons}/UserShareIcon.vue +0 -0
  293. package/src/{icons → components/icons}/VideoRecorderIcon.vue +0 -0
  294. package/src/{icons → components/icons}/ViewpointFlightIcon.vue +0 -0
  295. package/src/{icons → components/icons}/ViewpointIcon.vue +0 -0
  296. package/src/{icons → components/icons}/Viewshed360Icon.vue +0 -0
  297. package/src/{icons → components/icons}/ViewshedConeIcon.vue +0 -0
  298. package/src/{icons → components/icons}/ViewshedIcon.vue +0 -0
  299. package/src/{icons → components/icons}/WalkingIcon.vue +0 -0
  300. package/src/{icons → components/icons}/WallIcon.vue +0 -0
  301. package/src/{icons → components/icons}/WandIcon.vue +0 -0
  302. package/src/components/lists/VcsActionList.vue +2 -0
  303. package/src/components/lists/VcsList.vue +21 -12
  304. package/src/components/lists/VcsTreeviewLeaf.vue +14 -2
  305. package/src/components/notification/VcsTooltip.vue +1 -1
  306. package/src/contentTree/layerContentTreeItem.js +2 -2
  307. package/src/featureInfo/BalloonComponent.vue +2 -2
  308. package/src/featureInfo/abstractFeatureInfoView.js +1 -1
  309. package/src/featureInfo/addressBalloonFeatureInfoView.js +1 -1
  310. package/src/featureInfo/balloonFeatureInfoView.js +1 -1
  311. package/src/featureInfo/balloonHelper.js +6 -6
  312. package/src/featureInfo/featureInfo.js +2 -2
  313. package/src/i18n/de.js +8 -8
  314. package/src/i18n/en.js +6 -6
  315. package/src/legend/legendHelper.js +8 -8
  316. package/src/legend/vcsLegend.vue +33 -5
  317. package/src/manager/toolbox/ToolboxManager.vue +1 -0
  318. package/src/manager/window/WindowComponent.vue +42 -4
  319. package/src/manager/window/WindowComponentHeader.vue +1 -1
  320. package/src/manager/window/windowHelper.js +7 -11
  321. package/src/manager/window/windowManager.js +15 -11
  322. package/src/navigation/mapNavCompass.vue +13 -7
  323. package/src/navigation/mapNavigation.vue +66 -4
  324. package/src/navigation/orientationToolsButton.vue +1 -1
  325. package/src/navigation/overviewMap.js +26 -10
  326. package/src/navigation/vcsCompass.vue +4 -73
  327. package/src/setup.js +1 -1
  328. package/src/vuePlugins/vuetify.js +1 -1
  329. package/dist/assets/cesium/Workers/ArcType-c9b2b290.js +0 -25
  330. package/dist/assets/cesium/Workers/AttributeCompression-7b0f288d.js +0 -25
  331. package/dist/assets/cesium/Workers/AxisAlignedBoundingBox-d0c22774.js +0 -25
  332. package/dist/assets/cesium/Workers/BoundingRectangle-201b1a81.js +0 -25
  333. package/dist/assets/cesium/Workers/BoxGeometry-4985457c.js +0 -25
  334. package/dist/assets/cesium/Workers/Color-cc8c18b3.js +0 -25
  335. package/dist/assets/cesium/Workers/ComponentDatatype-0200bf8c.js +0 -25
  336. package/dist/assets/cesium/Workers/CoplanarPolygonGeometryLibrary-4345acdf.js +0 -25
  337. package/dist/assets/cesium/Workers/CorridorGeometryLibrary-850a6c35.js +0 -25
  338. package/dist/assets/cesium/Workers/CylinderGeometry-57a1051a.js +0 -25
  339. package/dist/assets/cesium/Workers/CylinderGeometryLibrary-62ce5a1f.js +0 -25
  340. package/dist/assets/cesium/Workers/EllipseGeometry-8627398f.js +0 -25
  341. package/dist/assets/cesium/Workers/EllipseGeometryLibrary-e5919563.js +0 -25
  342. package/dist/assets/cesium/Workers/EllipseOutlineGeometry-96fd4ae1.js +0 -25
  343. package/dist/assets/cesium/Workers/EllipsoidGeodesic-8bfefbff.js +0 -25
  344. package/dist/assets/cesium/Workers/EllipsoidGeometry-377329b9.js +0 -25
  345. package/dist/assets/cesium/Workers/EllipsoidOutlineGeometry-e6e16e49.js +0 -25
  346. package/dist/assets/cesium/Workers/EllipsoidRhumbLine-03528f73.js +0 -25
  347. package/dist/assets/cesium/Workers/EllipsoidTangentPlane-c080fd1b.js +0 -25
  348. package/dist/assets/cesium/Workers/EncodedCartesian3-ea0e408f.js +0 -25
  349. package/dist/assets/cesium/Workers/FrustumGeometry-a8b5d817.js +0 -25
  350. package/dist/assets/cesium/Workers/GeometryAttribute-8458a8fd.js +0 -25
  351. package/dist/assets/cesium/Workers/GeometryAttributes-ac0f8485.js +0 -25
  352. package/dist/assets/cesium/Workers/GeometryInstance-ee3aa3ba.js +0 -25
  353. package/dist/assets/cesium/Workers/GeometryOffsetAttribute-08ae0c50.js +0 -25
  354. package/dist/assets/cesium/Workers/GeometryPipeline-33ca229c.js +0 -25
  355. package/dist/assets/cesium/Workers/IndexDatatype-e713bfd2.js +0 -25
  356. package/dist/assets/cesium/Workers/IntersectionTests-eb4db8e0.js +0 -25
  357. package/dist/assets/cesium/Workers/Matrix2-eefef8eb.js +0 -25
  358. package/dist/assets/cesium/Workers/OrientedBoundingBox-5193f9a2.js +0 -25
  359. package/dist/assets/cesium/Workers/Plane-b0299683.js +0 -25
  360. package/dist/assets/cesium/Workers/PolygonGeometryLibrary-b61295f3.js +0 -25
  361. package/dist/assets/cesium/Workers/PolygonPipeline-eb527514.js +0 -25
  362. package/dist/assets/cesium/Workers/PolylinePipeline-0f23dd84.js +0 -25
  363. package/dist/assets/cesium/Workers/PolylineVolumeGeometryLibrary-2d903430.js +0 -25
  364. package/dist/assets/cesium/Workers/PrimitivePipeline-e2640413.js +0 -25
  365. package/dist/assets/cesium/Workers/RectangleGeometryLibrary-ae8bf8a5.js +0 -25
  366. package/dist/assets/cesium/Workers/RuntimeError-5baf5c66.js +0 -25
  367. package/dist/assets/cesium/Workers/TerrainEncoding-bc10ab54.js +0 -25
  368. package/dist/assets/cesium/Workers/Transforms-d2e5867e.js +0 -63
  369. package/dist/assets/cesium/Workers/VertexFormat-5ec0d9ff.js +0 -25
  370. package/dist/assets/cesium/Workers/WallGeometryLibrary-1a33e416.js +0 -25
  371. package/dist/assets/cesium/Workers/WebGLConstants-5b50ced1.js +0 -25
  372. package/dist/assets/cesium/Workers/WebMercatorProjection-cd2f30c2.js +0 -25
  373. package/dist/assets/cesium/Workers/_commonjsHelpers-bc29abbc.js +0 -25
  374. package/dist/assets/cesium/Workers/arrayRemoveDuplicates-f13aceb1.js +0 -25
  375. package/dist/assets/cesium/Workers/combine-7533016d.js +0 -25
  376. package/dist/assets/cesium/Workers/defaultValue-0c475b81.js +0 -25
  377. package/dist/assets/cesium/Workers/package.json +0 -1
  378. package/dist/assets/ui.dffe32.css +0 -1
  379. package/plugins/@vcmap/pluginExample/config.json +0 -6
  380. package/plugins/@vcmap/pluginExample/package.json +0 -7
  381. package/plugins/categoryTest/ItemEditor.vue +0 -13
  382. package/plugins/test/allIconsComponent.vue +0 -50
  383. package/plugins/test/index.js +0 -207
  384. package/plugins/test/toolbox-data.js +0 -154
  385. package/plugins/wizardExample/wizardExample.vue +0 -77
  386. package/src/components/form-inputs-controls/VcsColorPicker.vue +0 -85
@@ -1,25 +1,1476 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.97.1
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
- define(["./defaultValue-0c475b81","./Matrix2-eefef8eb","./Transforms-d2e5867e","./ComponentDatatype-0200bf8c","./GeometryAttribute-8458a8fd","./GeometryAttributes-ac0f8485","./GeometryInstance-ee3aa3ba","./GeometryOffsetAttribute-08ae0c50","./GeometryPipeline-33ca229c","./IndexDatatype-e713bfd2","./PolygonPipeline-eb527514","./RectangleGeometryLibrary-ae8bf8a5","./VertexFormat-5ec0d9ff","./RuntimeError-5baf5c66","./_commonjsHelpers-bc29abbc","./combine-7533016d","./WebGLConstants-5b50ced1","./AttributeCompression-7b0f288d","./EncodedCartesian3-ea0e408f","./IntersectionTests-eb4db8e0","./Plane-b0299683","./EllipsoidRhumbLine-03528f73"],(function(t,e,n,a,o,r,i,s,l,u,c,m,p,d,g,y,f,h,b,_,A,x){"use strict";const w=new e.Cartesian3,C=new e.Cartesian3,v=new e.Cartesian3,R=new e.Cartesian3,E=new e.Rectangle,G=new e.Cartesian2,F=new n.BoundingSphere,P=new n.BoundingSphere;function V(t,e){const n=new o.Geometry({attributes:new r.GeometryAttributes,primitiveType:o.PrimitiveType.TRIANGLES});return n.attributes.position=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.DOUBLE,componentsPerAttribute:3,values:e.positions}),t.normal&&(n.attributes.normal=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.normals})),t.tangent&&(n.attributes.tangent=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.tangents})),t.bitangent&&(n.attributes.bitangent=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:e.bitangents})),n}const L=new e.Cartesian3,D=new e.Cartesian3;function M(t,n){const r=t._vertexFormat,i=t._ellipsoid,s=n.height,l=n.width,c=n.northCap,p=n.southCap;let d=0,g=s,y=s,f=0;c&&(d=1,y-=1,f+=1),p&&(g-=1,y-=1,f+=1),f+=l*y;const h=r.position?new Float64Array(3*f):void 0,b=r.st?new Float32Array(2*f):void 0;let _=0,A=0;const x=w,E=G;let F=Number.MAX_VALUE,P=Number.MAX_VALUE,L=-Number.MAX_VALUE,D=-Number.MAX_VALUE;for(let t=d;t<g;++t)for(let e=0;e<l;++e)m.RectangleGeometryLibrary.computePosition(n,i,r.st,t,e,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,r.st&&(b[A++]=E.x,b[A++]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y));if(c&&(m.RectangleGeometryLibrary.computePosition(n,i,r.st,0,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_++]=x.z,r.st&&(b[A++]=E.x,b[A++]=E.y,F=E.x,P=E.y,L=E.x,D=E.y)),p&&(m.RectangleGeometryLibrary.computePosition(n,i,r.st,s-1,0,x,E),h[_++]=x.x,h[_++]=x.y,h[_]=x.z,r.st&&(b[A++]=E.x,b[A]=E.y,F=Math.min(F,E.x),P=Math.min(P,E.y),L=Math.max(L,E.x),D=Math.max(D,E.y))),r.st&&(F<0||P<0||L>1||D>1))for(let t=0;t<b.length;t+=2)b[t]=(b[t]-F)/(L-F),b[t+1]=(b[t+1]-P)/(D-P);const M=function(t,n,a,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0;const c=R,m=v;let p=C;if(n.normal||n.tangent||n.bitangent)for(let d=0;d<r;d+=3){const r=e.Cartesian3.fromArray(t,d,w),g=u+1,y=u+2;p=a.geodeticSurfaceNormal(r,p),(n.tangent||n.bitangent)&&(e.Cartesian3.cross(e.Cartesian3.UNIT_Z,p,m),e.Matrix3.multiplyByVector(o,m,m),e.Cartesian3.normalize(m,m),n.bitangent&&e.Cartesian3.normalize(e.Cartesian3.cross(p,m,c),c)),n.normal&&(i[u]=p.x,i[g]=p.y,i[y]=p.z),n.tangent&&(s[u]=m.x,s[g]=m.y,s[y]=m.z),n.bitangent&&(l[u]=c.x,l[g]=c.y,l[y]=c.z),u+=3}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(h,r,i,n.tangentRotationMatrix);let T=6*(l-1)*(y-1);c&&(T+=3*(l-1)),p&&(T+=3*(l-1));const O=u.IndexDatatype.createTypedArray(f,T);let N,S=0,I=0;for(N=0;N<y-1;++N){for(let t=0;t<l-1;++t){const t=S,e=t+l,n=e+1,a=t+1;O[I++]=t,O[I++]=e,O[I++]=a,O[I++]=a,O[I++]=e,O[I++]=n,++S}++S}if(c||p){let t=f-1;const e=f-1;let n,a;if(c&&p&&(t=f-2),S=0,c)for(N=0;N<l-1;N++)n=S,a=n+1,O[I++]=t,O[I++]=n,O[I++]=a,++S;if(p)for(S=(y-1)*l,N=0;N<l-1;N++)n=S,a=n+1,O[I++]=n,O[I++]=e,O[I++]=a,++S}return M.indices=O,r.st&&(M.attributes.st=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:b})),M}function T(t,e,n,a,o){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n+2],t[e++]=o[n],t[e++]=o[n+1],t[e]=o[n+2],t}function O(t,e,n,a){return t[e++]=a[n],t[e++]=a[n+1],t[e++]=a[n],t[e]=a[n+1],t}const N=new p.VertexFormat;function S(n,r){const m=n._shadowVolume,d=n._offsetAttribute,g=n._vertexFormat,y=n._extrudedHeight,f=n._surfaceHeight,h=n._ellipsoid,b=r.height,_=r.width;let A;if(m){const t=p.VertexFormat.clone(g,N);t.normal=!0,n._vertexFormat=t}const x=M(n,r);m&&(n._vertexFormat=g);let E=c.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,f,h,!1);E=new Float64Array(E);let G=E.length;const F=2*G,P=new Float64Array(F);P.set(E);const S=c.PolygonPipeline.scaleToGeodeticHeight(x.attributes.position.values,y,h);P.set(S,G),x.attributes.position.values=P;const I=g.normal?new Float32Array(F):void 0,k=g.tangent?new Float32Array(F):void 0,H=g.bitangent?new Float32Array(F):void 0,z=g.st?new Float32Array(F/3*2):void 0;let B,U,Y;if(g.normal){for(U=x.attributes.normal.values,I.set(U),A=0;A<G;A++)U[A]=-U[A];I.set(U,G),x.attributes.normal.values=I}if(m){U=x.attributes.normal.values,g.normal||(x.attributes.normal=void 0);const t=new Float32Array(F);for(A=0;A<G;A++)U[A]=-U[A];t.set(U,G),x.attributes.extrudeDirection=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:t})}const q=t.defined(d);if(q){const t=G/3*2;let e=new Uint8Array(t);d===s.GeometryOffsetAttribute.TOP?e=e.fill(1,0,t/2):(Y=d===s.GeometryOffsetAttribute.NONE?0:1,e=e.fill(Y)),x.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:e})}if(g.tangent){const t=x.attributes.tangent.values;for(k.set(t),A=0;A<G;A++)t[A]=-t[A];k.set(t,G),x.attributes.tangent.values=k}if(g.bitangent){const t=x.attributes.bitangent.values;H.set(t),H.set(t,G),x.attributes.bitangent.values=H}g.st&&(B=x.attributes.st.values,z.set(B),z.set(B,G/3*2),x.attributes.st.values=z);const X=x.indices,Q=X.length,W=G/3,j=u.IndexDatatype.createTypedArray(F/3,2*Q);for(j.set(X),A=0;A<Q;A+=3)j[A+Q]=X[A+2]+W,j[A+1+Q]=X[A+1]+W,j[A+2+Q]=X[A]+W;x.indices=j;const J=r.northCap,Z=r.southCap;let K=b,$=2,tt=0,et=4,nt=4;J&&($-=1,K-=1,tt+=1,et-=2,nt-=1),Z&&($-=1,K-=1,tt+=1,et-=2,nt-=1),tt+=$*_+2*K-et;const at=2*(tt+nt);let ot=new Float64Array(3*at);const rt=m?new Float32Array(3*at):void 0;let it=q?new Uint8Array(at):void 0,st=g.st?new Float32Array(2*at):void 0;const lt=d===s.GeometryOffsetAttribute.TOP;q&&!lt&&(Y=d===s.GeometryOffsetAttribute.ALL?1:0,it=it.fill(Y));let ut=0,ct=0,mt=0,pt=0;const dt=_*K;let gt;for(A=0;A<dt;A+=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),m&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[pt++]=1,pt+=1);if(Z){const t=J?dt+1:dt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),m&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[pt++]=1,pt+=1)}else for(A=dt-_;A<dt;A++)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),m&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[pt++]=1,pt+=1);for(A=dt-1;A>0;A-=_)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),m&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[pt++]=1,pt+=1);if(J){const t=dt;for(gt=3*t,A=0;A<2;A++)ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*t,B),ct+=4),m&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[pt++]=1,pt+=1)}else for(A=_-1;A>=0;A--)gt=3*A,ot=T(ot,ut,gt,E,S),ut+=6,g.st&&(st=O(st,ct,2*A,B),ct+=4),m&&(mt+=3,rt[mt++]=U[gt],rt[mt++]=U[gt+1],rt[mt++]=U[gt+2]),lt&&(it[pt++]=1,pt+=1);let yt=function(t,n,o){const r=t.length,i=n.normal?new Float32Array(r):void 0,s=n.tangent?new Float32Array(r):void 0,l=n.bitangent?new Float32Array(r):void 0;let u=0,c=0,m=0,p=!0,d=R,g=v,y=C;if(n.normal||n.tangent||n.bitangent)for(let f=0;f<r;f+=6){const h=e.Cartesian3.fromArray(t,f,w),b=e.Cartesian3.fromArray(t,(f+6)%r,L);if(p){const n=e.Cartesian3.fromArray(t,(f+3)%r,D);e.Cartesian3.subtract(b,h,b),e.Cartesian3.subtract(n,h,n),y=e.Cartesian3.normalize(e.Cartesian3.cross(n,b,y),y),p=!1}e.Cartesian3.equalsEpsilon(b,h,a.CesiumMath.EPSILON10)&&(p=!0),(n.tangent||n.bitangent)&&(d=o.geodeticSurfaceNormal(h,d),n.tangent&&(g=e.Cartesian3.normalize(e.Cartesian3.cross(d,y,g),g))),n.normal&&(i[u++]=y.x,i[u++]=y.y,i[u++]=y.z,i[u++]=y.x,i[u++]=y.y,i[u++]=y.z),n.tangent&&(s[c++]=g.x,s[c++]=g.y,s[c++]=g.z,s[c++]=g.x,s[c++]=g.y,s[c++]=g.z),n.bitangent&&(l[m++]=d.x,l[m++]=d.y,l[m++]=d.z,l[m++]=d.x,l[m++]=d.y,l[m++]=d.z)}return V(n,{positions:t,normals:i,tangents:s,bitangents:l})}(ot,g,h);g.st&&(yt.attributes.st=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:st})),m&&(yt.attributes.extrudeDirection=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.FLOAT,componentsPerAttribute:3,values:rt})),q&&(yt.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:it}));const ft=u.IndexDatatype.createTypedArray(at,6*tt);let ht,bt,_t,At;G=ot.length/3;let xt=0;for(A=0;A<G-1;A+=2){ht=A,At=(ht+2)%G;const t=e.Cartesian3.fromArray(ot,3*ht,L),n=e.Cartesian3.fromArray(ot,3*At,D);e.Cartesian3.equalsEpsilon(t,n,a.CesiumMath.EPSILON10)||(bt=(ht+1)%G,_t=(bt+2)%G,ft[xt++]=ht,ft[xt++]=bt,ft[xt++]=At,ft[xt++]=At,ft[xt++]=bt,ft[xt++]=_t)}return yt.indices=ft,yt=l.GeometryPipeline.combineInstances([new i.GeometryInstance({geometry:x}),new i.GeometryInstance({geometry:yt})]),yt[0]}const I=[new e.Cartesian3,new e.Cartesian3,new e.Cartesian3,new e.Cartesian3],k=new e.Cartographic,H=new e.Cartographic;function z(t,n,a,o,r){if(0===a)return e.Rectangle.clone(t,r);const i=m.RectangleGeometryLibrary.computeOptions(t,n,a,0,E,k),s=i.height,l=i.width,u=I;return m.RectangleGeometryLibrary.computePosition(i,o,!1,0,0,u[0]),m.RectangleGeometryLibrary.computePosition(i,o,!1,0,l-1,u[1]),m.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,0,u[2]),m.RectangleGeometryLibrary.computePosition(i,o,!1,s-1,l-1,u[3]),e.Rectangle.fromCartesianArray(u,o,r)}function B(n){const o=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,r=t.defaultValue(n.height,0),i=t.defaultValue(n.extrudedHeight,r);this._rectangle=e.Rectangle.clone(o),this._granularity=t.defaultValue(n.granularity,a.CesiumMath.RADIANS_PER_DEGREE),this._ellipsoid=e.Ellipsoid.clone(t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84)),this._surfaceHeight=Math.max(r,i),this._rotation=t.defaultValue(n.rotation,0),this._stRotation=t.defaultValue(n.stRotation,0),this._vertexFormat=p.VertexFormat.clone(t.defaultValue(n.vertexFormat,p.VertexFormat.DEFAULT)),this._extrudedHeight=Math.min(r,i),this._shadowVolume=t.defaultValue(n.shadowVolume,!1),this._workerName="createRectangleGeometry",this._offsetAttribute=n.offsetAttribute,this._rotatedRectangle=void 0,this._textureCoordinateRotationPoints=void 0}B.packedLength=e.Rectangle.packedLength+e.Ellipsoid.packedLength+p.VertexFormat.packedLength+7,B.pack=function(n,a,o){return o=t.defaultValue(o,0),e.Rectangle.pack(n._rectangle,a,o),o+=e.Rectangle.packedLength,e.Ellipsoid.pack(n._ellipsoid,a,o),o+=e.Ellipsoid.packedLength,p.VertexFormat.pack(n._vertexFormat,a,o),o+=p.VertexFormat.packedLength,a[o++]=n._granularity,a[o++]=n._surfaceHeight,a[o++]=n._rotation,a[o++]=n._stRotation,a[o++]=n._extrudedHeight,a[o++]=n._shadowVolume?1:0,a[o]=t.defaultValue(n._offsetAttribute,-1),a};const U=new e.Rectangle,Y=e.Ellipsoid.clone(e.Ellipsoid.UNIT_SPHERE),q={rectangle:U,ellipsoid:Y,vertexFormat:N,granularity:void 0,height:void 0,rotation:void 0,stRotation:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};B.unpack=function(n,a,o){a=t.defaultValue(a,0);const r=e.Rectangle.unpack(n,a,U);a+=e.Rectangle.packedLength;const i=e.Ellipsoid.unpack(n,a,Y);a+=e.Ellipsoid.packedLength;const s=p.VertexFormat.unpack(n,a,N);a+=p.VertexFormat.packedLength;const l=n[a++],u=n[a++],c=n[a++],m=n[a++],d=n[a++],g=1===n[a++],y=n[a];return t.defined(o)?(o._rectangle=e.Rectangle.clone(r,o._rectangle),o._ellipsoid=e.Ellipsoid.clone(i,o._ellipsoid),o._vertexFormat=p.VertexFormat.clone(s,o._vertexFormat),o._granularity=l,o._surfaceHeight=u,o._rotation=c,o._stRotation=m,o._extrudedHeight=d,o._shadowVolume=g,o._offsetAttribute=-1===y?void 0:y,o):(q.granularity=l,q.height=u,q.rotation=c,q.stRotation=m,q.extrudedHeight=d,q.shadowVolume=g,q.offsetAttribute=-1===y?void 0:y,new B(q))},B.computeRectangle=function(n,o){const r=(n=t.defaultValue(n,t.defaultValue.EMPTY_OBJECT)).rectangle,i=t.defaultValue(n.granularity,a.CesiumMath.RADIANS_PER_DEGREE),s=t.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84);return z(r,i,t.defaultValue(n.rotation,0),s,o)};const X=new e.Matrix3,Q=new n.Quaternion,W=new e.Cartographic;B.createGeometry=function(r){if(a.CesiumMath.equalsEpsilon(r._rectangle.north,r._rectangle.south,a.CesiumMath.EPSILON10)||a.CesiumMath.equalsEpsilon(r._rectangle.east,r._rectangle.west,a.CesiumMath.EPSILON10))return;let i=r._rectangle;const l=r._ellipsoid,u=r._rotation,p=r._stRotation,d=r._vertexFormat,g=m.RectangleGeometryLibrary.computeOptions(i,r._granularity,u,p,E,k,H),y=X;if(0!==p||0!==u){const t=e.Rectangle.center(i,W),a=l.geodeticSurfaceNormalCartographic(t,L);n.Quaternion.fromAxisAngle(a,-p,Q),e.Matrix3.fromQuaternion(Q,y)}else e.Matrix3.clone(e.Matrix3.IDENTITY,y);const f=r._surfaceHeight,h=r._extrudedHeight,b=!a.CesiumMath.equalsEpsilon(f,h,0,a.CesiumMath.EPSILON2);let _,A;if(g.lonScalar=1/r._rectangle.width,g.latScalar=1/r._rectangle.height,g.tangentRotationMatrix=y,i=r._rectangle,b){_=S(r,g);const t=n.BoundingSphere.fromRectangle3D(i,l,f,P),e=n.BoundingSphere.fromRectangle3D(i,l,h,F);A=n.BoundingSphere.union(t,e)}else{if(_=M(r,g),_.attributes.position.values=c.PolygonPipeline.scaleToGeodeticHeight(_.attributes.position.values,f,l,!1),t.defined(r._offsetAttribute)){const t=_.attributes.position.values.length,e=r._offsetAttribute===s.GeometryOffsetAttribute.NONE?0:1,n=new Uint8Array(t/3).fill(e);_.attributes.applyOffset=new o.GeometryAttribute({componentDatatype:a.ComponentDatatype.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}A=n.BoundingSphere.fromRectangle3D(i,l,f)}return d.position||delete _.attributes.position,new o.Geometry({attributes:_.attributes,indices:_.indices,primitiveType:_.primitiveType,boundingSphere:A,offsetAttribute:r._offsetAttribute})},B.createShadowVolume=function(t,e,n){const a=t._granularity,o=t._ellipsoid,r=e(a,o),i=n(a,o);return new B({rectangle:t._rectangle,rotation:t._rotation,ellipsoid:o,stRotation:t._stRotation,granularity:a,extrudedHeight:i,height:r,vertexFormat:p.VertexFormat.POSITION_ONLY,shadowVolume:!0})};const j=new e.Rectangle,J=[new e.Cartesian2,new e.Cartesian2,new e.Cartesian2],Z=new e.Matrix2,K=new e.Cartographic;return Object.defineProperties(B.prototype,{rectangle:{get:function(){return t.defined(this._rotatedRectangle)||(this._rotatedRectangle=z(this._rectangle,this._granularity,this._rotation,this._ellipsoid)),this._rotatedRectangle}},textureCoordinateRotationPoints:{get:function(){return t.defined(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=function(t){if(0===t._stRotation)return[0,0,0,1,1,0];const n=e.Rectangle.clone(t._rectangle,j),a=t._granularity,o=t._ellipsoid,r=z(n,a,t._rotation-t._stRotation,o,j),i=J;i[0].x=r.west,i[0].y=r.south,i[1].x=r.west,i[1].y=r.north,i[2].x=r.east,i[2].y=r.south;const s=t.rectangle,l=e.Matrix2.fromRotation(t._stRotation,Z),u=e.Rectangle.center(s,K);for(let t=0;t<3;++t){const n=i[t];n.x-=u.longitude,n.y-=u.latitude,e.Matrix2.multiplyByVector(l,n,n),n.x+=u.longitude,n.y+=u.latitude,n.x=(n.x-s.west)/s.width,n.y=(n.y-s.south)/s.height}const c=i[0],m=i[1],p=i[2],d=new Array(6);return e.Cartesian2.pack(c,d),e.Cartesian2.pack(m,d,2),e.Cartesian2.pack(p,d,4),d}(this)),this._textureCoordinateRotationPoints}}}),function(n,a){return t.defined(a)&&(n=B.unpack(n,a)),n._ellipsoid=e.Ellipsoid.clone(n._ellipsoid),n._rectangle=e.Rectangle.clone(n._rectangle),B.createGeometry(n)}}));
1
+ define(['./defaultValue-0a909f67', './Matrix3-315394f6', './Matrix2-13178034', './Transforms-40229881', './Check-666ab1a0', './ComponentDatatype-f7b11d02', './GeometryAttribute-7d6f1732', './GeometryAttributes-f06a2792', './GeometryInstance-451dc1cd', './GeometryOffsetAttribute-04332ce7', './GeometryPipeline-ce4339ed', './IndexDatatype-a55ceaa1', './Math-2dbd6b93', './PolygonPipeline-844aab0a', './RectangleGeometryLibrary-bdba697e', './VertexFormat-6b480673', './RuntimeError-06c93819', './combine-ca22a614', './WebGLConstants-a8cc3e8c', './AttributeCompression-b646d393', './EncodedCartesian3-81f70735', './IntersectionTests-f6e6bd8a', './Plane-900aa728', './EllipsoidRhumbLine-19756602'], (function (defaultValue, Matrix3, Matrix2, Transforms, Check, ComponentDatatype, GeometryAttribute, GeometryAttributes, GeometryInstance, GeometryOffsetAttribute, GeometryPipeline, IndexDatatype, Math$1, PolygonPipeline, RectangleGeometryLibrary, VertexFormat, RuntimeError, combine, WebGLConstants, AttributeCompression, EncodedCartesian3, IntersectionTests, Plane, EllipsoidRhumbLine) { 'use strict';
2
+
3
+ const positionScratch = new Matrix3.Cartesian3();
4
+ const normalScratch = new Matrix3.Cartesian3();
5
+ const tangentScratch = new Matrix3.Cartesian3();
6
+ const bitangentScratch = new Matrix3.Cartesian3();
7
+ const rectangleScratch = new Matrix2.Rectangle();
8
+ const stScratch = new Matrix2.Cartesian2();
9
+ const bottomBoundingSphere = new Transforms.BoundingSphere();
10
+ const topBoundingSphere = new Transforms.BoundingSphere();
11
+
12
+ function createAttributes(vertexFormat, attributes) {
13
+ const geo = new GeometryAttribute.Geometry({
14
+ attributes: new GeometryAttributes.GeometryAttributes(),
15
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
16
+ });
17
+
18
+ geo.attributes.position = new GeometryAttribute.GeometryAttribute({
19
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
20
+ componentsPerAttribute: 3,
21
+ values: attributes.positions,
22
+ });
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
+ }
46
+
47
+ function calculateAttributes(
48
+ positions,
49
+ vertexFormat,
50
+ ellipsoid,
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,
108
+ });
109
+ }
110
+
111
+ const v1Scratch = new Matrix3.Cartesian3();
112
+ const v2Scratch = new Matrix3.Cartesian3();
113
+
114
+ function calculateAttributesWall(positions, vertexFormat, ellipsoid) {
115
+ const length = positions.length;
116
+
117
+ const normals = vertexFormat.normal ? new Float32Array(length) : undefined;
118
+ const tangents = vertexFormat.tangent ? new Float32Array(length) : undefined;
119
+ const bitangents = vertexFormat.bitangent
120
+ ? new Float32Array(length)
121
+ : undefined;
122
+
123
+ let normalIndex = 0;
124
+ let tangentIndex = 0;
125
+ let bitangentIndex = 0;
126
+ let recomputeNormal = true;
127
+
128
+ let bitangent = bitangentScratch;
129
+ let tangent = tangentScratch;
130
+ let normal = normalScratch;
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
+
176
+ if (vertexFormat.bitangent) {
177
+ bitangents[bitangentIndex++] = bitangent.x;
178
+ bitangents[bitangentIndex++] = bitangent.y;
179
+ bitangents[bitangentIndex++] = bitangent.z;
180
+ bitangents[bitangentIndex++] = bitangent.x;
181
+ bitangents[bitangentIndex++] = bitangent.y;
182
+ bitangents[bitangentIndex++] = bitangent.z;
183
+ }
184
+ }
185
+ }
186
+
187
+ return createAttributes(vertexFormat, {
188
+ positions: positions,
189
+ normals: normals,
190
+ tangents: tangents,
191
+ bitangents: bitangents,
192
+ });
193
+ }
194
+
195
+ function constructRectangle(rectangleGeometry, computedOptions) {
196
+ const vertexFormat = rectangleGeometry._vertexFormat;
197
+ const ellipsoid = rectangleGeometry._ellipsoid;
198
+ const height = computedOptions.height;
199
+ const width = computedOptions.width;
200
+ const northCap = computedOptions.northCap;
201
+ const southCap = computedOptions.southCap;
202
+
203
+ let rowStart = 0;
204
+ let rowEnd = height;
205
+ let rowHeight = height;
206
+ let size = 0;
207
+ if (northCap) {
208
+ rowStart = 1;
209
+ rowHeight -= 1;
210
+ size += 1;
211
+ }
212
+ if (southCap) {
213
+ rowEnd -= 1;
214
+ rowHeight -= 1;
215
+ size += 1;
216
+ }
217
+ size += width * rowHeight;
218
+
219
+ const positions = vertexFormat.position
220
+ ? new Float64Array(size * 3)
221
+ : undefined;
222
+ const textureCoordinates = vertexFormat.st
223
+ ? new Float32Array(size * 2)
224
+ : undefined;
225
+
226
+ let posIndex = 0;
227
+ let stIndex = 0;
228
+
229
+ const position = positionScratch;
230
+ const st = stScratch;
231
+
232
+ let minX = Number.MAX_VALUE;
233
+ let minY = Number.MAX_VALUE;
234
+ let maxX = -Number.MAX_VALUE;
235
+ let maxY = -Number.MAX_VALUE;
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);
261
+ }
262
+ }
263
+ }
264
+ if (northCap) {
265
+ RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
266
+ computedOptions,
267
+ ellipsoid,
268
+ vertexFormat.st,
269
+ 0,
270
+ 0,
271
+ position,
272
+ st
273
+ );
274
+
275
+ positions[posIndex++] = position.x;
276
+ positions[posIndex++] = position.y;
277
+ positions[posIndex++] = position.z;
278
+
279
+ if (vertexFormat.st) {
280
+ textureCoordinates[stIndex++] = st.x;
281
+ 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
+ minX = Math.min(minX, st.x);
309
+ minY = Math.min(minY, st.y);
310
+ maxX = Math.max(maxX, st.x);
311
+ maxY = Math.max(maxY, st.y);
312
+ }
313
+ }
314
+
315
+ if (
316
+ vertexFormat.st &&
317
+ (minX < 0.0 || minY < 0.0 || maxX > 1.0 || maxY > 1.0)
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,
329
+ ellipsoid,
330
+ computedOptions.tangentRotationMatrix
331
+ );
332
+
333
+ let indicesSize = 6 * (width - 1) * (rowHeight - 1);
334
+ if (northCap) {
335
+ indicesSize += 3 * (width - 1);
336
+ }
337
+ if (southCap) {
338
+ indicesSize += 3 * (width - 1);
339
+ }
340
+ const indices = IndexDatatype.IndexDatatype.createTypedArray(size, indicesSize);
341
+ let index = 0;
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
+ }
392
+ }
393
+
394
+ geo.indices = indices;
395
+ if (vertexFormat.st) {
396
+ geo.attributes.st = new GeometryAttribute.GeometryAttribute({
397
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
398
+ componentsPerAttribute: 2,
399
+ values: textureCoordinates,
400
+ });
401
+ }
402
+
403
+ return geo;
404
+ }
405
+
406
+ function addWallPositions(
407
+ wallPositions,
408
+ posIndex,
409
+ i,
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;
420
+ }
421
+
422
+ function addWallTextureCoordinates(wallTextures, stIndex, i, st) {
423
+ wallTextures[stIndex++] = st[i];
424
+ wallTextures[stIndex++] = st[i + 1];
425
+ wallTextures[stIndex++] = st[i];
426
+ wallTextures[stIndex] = st[i + 1];
427
+ return wallTextures;
428
+ }
429
+
430
+ const scratchVertexFormat = new VertexFormat.VertexFormat();
431
+
432
+ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
433
+ const shadowVolume = rectangleGeometry._shadowVolume;
434
+ const offsetAttributeValue = rectangleGeometry._offsetAttribute;
435
+ const vertexFormat = rectangleGeometry._vertexFormat;
436
+ const minHeight = rectangleGeometry._extrudedHeight;
437
+ const maxHeight = rectangleGeometry._surfaceHeight;
438
+ const ellipsoid = rectangleGeometry._ellipsoid;
439
+
440
+ const height = computedOptions.height;
441
+ const width = computedOptions.width;
442
+
443
+ let i;
444
+
445
+ if (shadowVolume) {
446
+ const newVertexFormat = VertexFormat.VertexFormat.clone(
447
+ vertexFormat,
448
+ scratchVertexFormat
449
+ );
450
+ newVertexFormat.normal = true;
451
+ rectangleGeometry._vertexFormat = newVertexFormat;
452
+ }
453
+
454
+ const topBottomGeo = constructRectangle(rectangleGeometry, computedOptions);
455
+
456
+ if (shadowVolume) {
457
+ rectangleGeometry._vertexFormat = vertexFormat;
458
+ }
459
+
460
+ let topPositions = PolygonPipeline.PolygonPipeline.scaleToGeodeticHeight(
461
+ topBottomGeo.attributes.position.values,
462
+ maxHeight,
463
+ ellipsoid,
464
+ false
465
+ );
466
+ topPositions = new Float64Array(topPositions);
467
+ let length = topPositions.length;
468
+ const newLength = length * 2;
469
+ const positions = new Float64Array(newLength);
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];
496
+ }
497
+ normals.set(topNormals, length);
498
+ topBottomGeo.attributes.normal.values = normals;
499
+ }
500
+ if (shadowVolume) {
501
+ topNormals = topBottomGeo.attributes.normal.values;
502
+ if (!vertexFormat.normal) {
503
+ topBottomGeo.attributes.normal = undefined;
504
+ }
505
+ const extrudeNormals = new Float32Array(newLength);
506
+ for (i = 0; i < length; i++) {
507
+ topNormals[i] = -topNormals[i];
508
+ }
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
+ }
516
+
517
+ let offsetValue;
518
+ const hasOffsets = defaultValue.defined(offsetAttributeValue);
519
+ if (hasOffsets) {
520
+ const size = (length / 3) * 2;
521
+ let offsetAttribute = new Uint8Array(size);
522
+ if (offsetAttributeValue === GeometryOffsetAttribute.GeometryOffsetAttribute.TOP) {
523
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
524
+ } else {
525
+ offsetValue =
526
+ offsetAttributeValue === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE ? 0 : 1;
527
+ offsetAttribute = offsetAttribute.fill(offsetValue);
528
+ }
529
+
530
+ topBottomGeo.attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
531
+ componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
532
+ componentsPerAttribute: 1,
533
+ values: offsetAttribute,
534
+ });
535
+ }
536
+
537
+ if (vertexFormat.tangent) {
538
+ const topTangents = topBottomGeo.attributes.tangent.values;
539
+ tangents.set(topTangents);
540
+ for (i = 0; i < length; i++) {
541
+ topTangents[i] = -topTangents[i];
542
+ }
543
+ tangents.set(topTangents, length);
544
+ topBottomGeo.attributes.tangent.values = tangents;
545
+ }
546
+ if (vertexFormat.bitangent) {
547
+ const topBitangents = topBottomGeo.attributes.bitangent.values;
548
+ bitangents.set(topBitangents);
549
+ bitangents.set(topBitangents, length);
550
+ topBottomGeo.attributes.bitangent.values = bitangents;
551
+ }
552
+ if (vertexFormat.st) {
553
+ topSt = topBottomGeo.attributes.st.values;
554
+ textures.set(topSt);
555
+ textures.set(topSt, (length / 3) * 2);
556
+ topBottomGeo.attributes.st.values = textures;
557
+ }
558
+
559
+ const indices = topBottomGeo.indices;
560
+ const indicesLength = indices.length;
561
+ const posLength = length / 3;
562
+ const newIndices = IndexDatatype.IndexDatatype.createTypedArray(
563
+ newLength / 3,
564
+ indicesLength * 2
565
+ );
566
+ newIndices.set(indices);
567
+ for (i = 0; i < indicesLength; i += 3) {
568
+ newIndices[i + indicesLength] = indices[i + 2] + posLength;
569
+ newIndices[i + 1 + indicesLength] = indices[i + 1] + posLength;
570
+ newIndices[i + 2 + indicesLength] = indices[i] + posLength;
571
+ }
572
+ topBottomGeo.indices = newIndices;
573
+
574
+ const northCap = computedOptions.northCap;
575
+ const southCap = computedOptions.southCap;
576
+
577
+ let rowHeight = height;
578
+ let widthMultiplier = 2;
579
+ let perimeterPositions = 0;
580
+ let corners = 4;
581
+ let dupliateCorners = 4;
582
+ if (northCap) {
583
+ widthMultiplier -= 1;
584
+ rowHeight -= 1;
585
+ perimeterPositions += 1;
586
+ corners -= 2;
587
+ dupliateCorners -= 1;
588
+ }
589
+ if (southCap) {
590
+ widthMultiplier -= 1;
591
+ rowHeight -= 1;
592
+ perimeterPositions += 1;
593
+ corners -= 2;
594
+ dupliateCorners -= 1;
595
+ }
596
+ perimeterPositions += widthMultiplier * width + 2 * rowHeight - corners;
597
+
598
+ const wallCount = (perimeterPositions + dupliateCorners) * 2;
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);
614
+ }
615
+
616
+ let posIndex = 0;
617
+ let stIndex = 0;
618
+ let extrudeNormalIndex = 0;
619
+ let wallOffsetIndex = 0;
620
+ const area = width * rowHeight;
621
+ let threeI;
622
+ for (i = 0; i < area; i += width) {
623
+ threeI = i * 3;
624
+ wallPositions = addWallPositions(
625
+ wallPositions,
626
+ posIndex,
627
+ threeI,
628
+ topPositions,
629
+ bottomPositions
630
+ );
631
+ posIndex += 6;
632
+ if (vertexFormat.st) {
633
+ wallTextures = addWallTextureCoordinates(
634
+ wallTextures,
635
+ stIndex,
636
+ i * 2,
637
+ topSt
638
+ );
639
+ stIndex += 4;
640
+ }
641
+ if (shadowVolume) {
642
+ extrudeNormalIndex += 3;
643
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
644
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
645
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
646
+ }
647
+ if (computeTopOffsets) {
648
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
649
+ wallOffsetIndex += 1;
650
+ }
651
+ }
652
+
653
+ if (!southCap) {
654
+ for (i = area - width; i < area; i++) {
655
+ threeI = i * 3;
656
+ wallPositions = addWallPositions(
657
+ wallPositions,
658
+ posIndex,
659
+ threeI,
660
+ topPositions,
661
+ bottomPositions
662
+ );
663
+ posIndex += 6;
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
+ }
683
+ }
684
+ } else {
685
+ const southIndex = northCap ? area + 1 : area;
686
+ threeI = southIndex * 3;
687
+
688
+ for (i = 0; i < 2; i++) {
689
+ // duplicate corner points
690
+ wallPositions = addWallPositions(
691
+ wallPositions,
692
+ posIndex,
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
+ }
717
+ }
718
+ }
719
+
720
+ for (i = area - 1; i > 0; i -= width) {
721
+ threeI = i * 3;
722
+ wallPositions = addWallPositions(
723
+ wallPositions,
724
+ posIndex,
725
+ threeI,
726
+ topPositions,
727
+ bottomPositions
728
+ );
729
+ posIndex += 6;
730
+ if (vertexFormat.st) {
731
+ wallTextures = addWallTextureCoordinates(
732
+ wallTextures,
733
+ stIndex,
734
+ i * 2,
735
+ topSt
736
+ );
737
+ stIndex += 4;
738
+ }
739
+ if (shadowVolume) {
740
+ extrudeNormalIndex += 3;
741
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI];
742
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 1];
743
+ wallExtrudeNormals[extrudeNormalIndex++] = topNormals[threeI + 2];
744
+ }
745
+ if (computeTopOffsets) {
746
+ wallOffsetAttribute[wallOffsetIndex++] = 1;
747
+ wallOffsetIndex += 1;
748
+ }
749
+ }
750
+
751
+ if (!northCap) {
752
+ for (i = width - 1; i >= 0; i--) {
753
+ threeI = i * 3;
754
+ wallPositions = addWallPositions(
755
+ wallPositions,
756
+ posIndex,
757
+ threeI,
758
+ topPositions,
759
+ bottomPositions
760
+ );
761
+ posIndex += 6;
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
+ }
781
+ }
782
+ } else {
783
+ const northIndex = area;
784
+ threeI = northIndex * 3;
785
+
786
+ for (i = 0; i < 2; i++) {
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
+ }
815
+ }
816
+ }
817
+
818
+ let geo = calculateAttributesWall(wallPositions, vertexFormat, ellipsoid);
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;
860
+ }
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
+ }
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
+ }
884
+
885
+ const scratchRectanglePoints = [
886
+ new Matrix3.Cartesian3(),
887
+ new Matrix3.Cartesian3(),
888
+ new Matrix3.Cartesian3(),
889
+ new Matrix3.Cartesian3(),
890
+ ];
891
+ const nwScratch = new Matrix3.Cartographic();
892
+ const stNwScratch = new Matrix3.Cartographic();
893
+ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
894
+ if (rotation === 0.0) {
895
+ return Matrix2.Rectangle.clone(rectangle, result);
896
+ }
897
+
898
+ const computedOptions = RectangleGeometryLibrary.RectangleGeometryLibrary.computeOptions(
899
+ rectangle,
900
+ granularity,
901
+ rotation,
902
+ 0,
903
+ rectangleScratch,
904
+ nwScratch
905
+ );
906
+
907
+ const height = computedOptions.height;
908
+ const width = computedOptions.width;
909
+
910
+ const positions = scratchRectanglePoints;
911
+ RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
912
+ computedOptions,
913
+ ellipsoid,
914
+ false,
915
+ 0,
916
+ 0,
917
+ positions[0]
918
+ );
919
+ RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
920
+ computedOptions,
921
+ ellipsoid,
922
+ false,
923
+ 0,
924
+ width - 1,
925
+ positions[1]
926
+ );
927
+ RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
928
+ computedOptions,
929
+ ellipsoid,
930
+ false,
931
+ height - 1,
932
+ 0,
933
+ positions[2]
934
+ );
935
+ RectangleGeometryLibrary.RectangleGeometryLibrary.computePosition(
936
+ computedOptions,
937
+ ellipsoid,
938
+ false,
939
+ height - 1,
940
+ width - 1,
941
+ positions[3]
942
+ );
943
+
944
+ return Matrix2.Rectangle.fromCartesianArray(positions, ellipsoid, result);
945
+ }
946
+
947
+ /**
948
+ * A description of a cartographic rectangle on an ellipsoid centered at the origin. Rectangle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
949
+ *
950
+ * @alias RectangleGeometry
951
+ * @constructor
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
+ );
1003
+ }
1004
+ //>>includeEnd('debug');
1005
+
1006
+ const height = defaultValue.defaultValue(options.height, 0.0);
1007
+ const extrudedHeight = defaultValue.defaultValue(options.extrudedHeight, height);
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)
1022
+ );
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
+ }
1031
+
1032
+ /**
1033
+ * The number of elements used to pack the object into an array.
1034
+ * @type {Number}
1035
+ */
1036
+ RectangleGeometry.packedLength =
1037
+ Matrix2.Rectangle.packedLength +
1038
+ Matrix3.Ellipsoid.packedLength +
1039
+ VertexFormat.VertexFormat.packedLength +
1040
+ 7;
1041
+
1042
+ /**
1043
+ * Stores the provided instance into the provided array.
1044
+ *
1045
+ * @param {RectangleGeometry} value The value to pack.
1046
+ * @param {Number[]} array The array to pack into.
1047
+ * @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
1048
+ *
1049
+ * @returns {Number[]} The array that was packed into
1050
+ */
1051
+ RectangleGeometry.pack = function (value, array, startingIndex) {
1052
+ //>>includeStart('debug', pragmas.debug);
1053
+ Check.Check.typeOf.object("value", value);
1054
+ Check.Check.defined("array", array);
1055
+ //>>includeEnd('debug');
1056
+
1057
+ startingIndex = defaultValue.defaultValue(startingIndex, 0);
1058
+
1059
+ Matrix2.Rectangle.pack(value._rectangle, array, startingIndex);
1060
+ startingIndex += Matrix2.Rectangle.packedLength;
1061
+
1062
+ Matrix3.Ellipsoid.pack(value._ellipsoid, array, startingIndex);
1063
+ startingIndex += Matrix3.Ellipsoid.packedLength;
1064
+
1065
+ VertexFormat.VertexFormat.pack(value._vertexFormat, array, startingIndex);
1066
+ startingIndex += VertexFormat.VertexFormat.packedLength;
1067
+
1068
+ array[startingIndex++] = value._granularity;
1069
+ array[startingIndex++] = value._surfaceHeight;
1070
+ array[startingIndex++] = value._rotation;
1071
+ array[startingIndex++] = value._stRotation;
1072
+ array[startingIndex++] = value._extrudedHeight;
1073
+ array[startingIndex++] = value._shadowVolume ? 1.0 : 0.0;
1074
+ array[startingIndex] = defaultValue.defaultValue(value._offsetAttribute, -1);
1075
+
1076
+ return array;
1077
+ };
1078
+
1079
+ const scratchRectangle = new Matrix2.Rectangle();
1080
+ const scratchEllipsoid = Matrix3.Ellipsoid.clone(Matrix3.Ellipsoid.UNIT_SPHERE);
1081
+ const scratchOptions = {
1082
+ rectangle: scratchRectangle,
1083
+ ellipsoid: scratchEllipsoid,
1084
+ vertexFormat: scratchVertexFormat,
1085
+ granularity: undefined,
1086
+ height: undefined,
1087
+ rotation: undefined,
1088
+ stRotation: undefined,
1089
+ extrudedHeight: undefined,
1090
+ shadowVolume: undefined,
1091
+ offsetAttribute: undefined,
1092
+ };
1093
+
1094
+ /**
1095
+ * Retrieves an instance from a packed array.
1096
+ *
1097
+ * @param {Number[]} array The packed array.
1098
+ * @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
1099
+ * @param {RectangleGeometry} [result] The object into which to store the result.
1100
+ * @returns {RectangleGeometry} The modified result parameter or a new RectangleGeometry instance if one was not provided.
1101
+ */
1102
+ RectangleGeometry.unpack = function (array, startingIndex, result) {
1103
+ //>>includeStart('debug', pragmas.debug);
1104
+ Check.Check.defined("array", array);
1105
+ //>>includeEnd('debug');
1106
+
1107
+ startingIndex = defaultValue.defaultValue(startingIndex, 0);
1108
+
1109
+ const rectangle = Matrix2.Rectangle.unpack(array, startingIndex, scratchRectangle);
1110
+ startingIndex += Matrix2.Rectangle.packedLength;
1111
+
1112
+ const ellipsoid = Matrix3.Ellipsoid.unpack(array, startingIndex, scratchEllipsoid);
1113
+ startingIndex += Matrix3.Ellipsoid.packedLength;
1114
+
1115
+ const vertexFormat = VertexFormat.VertexFormat.unpack(
1116
+ array,
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();
1198
+ /**
1199
+ * Computes the geometric representation of a rectangle, including its vertices, indices, and a bounding sphere.
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.
1205
+ */
1206
+ RectangleGeometry.createGeometry = function (rectangleGeometry) {
1207
+ if (
1208
+ Math$1.CesiumMath.equalsEpsilon(
1209
+ rectangleGeometry._rectangle.north,
1210
+ rectangleGeometry._rectangle.south,
1211
+ Math$1.CesiumMath.EPSILON10
1212
+ ) ||
1213
+ Math$1.CesiumMath.equalsEpsilon(
1214
+ rectangleGeometry._rectangle.east,
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
+ });
1300
+ }
1301
+
1302
+ boundingSphere = Transforms.BoundingSphere.fromRectangle3D(
1303
+ rectangle,
1304
+ ellipsoid,
1305
+ surfaceHeight
1306
+ );
1307
+ }
1308
+
1309
+ if (!vertexFormat.position) {
1310
+ delete geometry.attributes.position;
1311
+ }
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
+
1322
+ /**
1323
+ * @private
1324
+ */
1325
+ RectangleGeometry.createShadowVolume = function (
1326
+ rectangleGeometry,
1327
+ minHeightFunc,
1328
+ maxHeightFunc
1329
+ ) {
1330
+ const granularity = rectangleGeometry._granularity;
1331
+ const ellipsoid = rectangleGeometry._ellipsoid;
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;
1417
+ }
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
+ }
1428
+
1429
+ Object.defineProperties(RectangleGeometry.prototype, {
1430
+ /**
1431
+ * @private
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);
1472
+ }
1473
+
1474
+ return createRectangleGeometry;
1475
+
1476
+ }));