@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
@@ -0,0 +1,1304 @@
1
+ define(['exports', './Transforms-40229881', './Matrix2-13178034', './Matrix3-315394f6', './Check-666ab1a0', './ComponentDatatype-f7b11d02', './defaultValue-0a909f67', './EllipseGeometryLibrary-2939e1dc', './GeometryAttribute-7d6f1732', './GeometryAttributes-f06a2792', './GeometryInstance-451dc1cd', './GeometryOffsetAttribute-04332ce7', './GeometryPipeline-ce4339ed', './IndexDatatype-a55ceaa1', './Math-2dbd6b93', './VertexFormat-6b480673'], (function (exports, Transforms, Matrix2, Matrix3, Check, ComponentDatatype, defaultValue, EllipseGeometryLibrary, GeometryAttribute, GeometryAttributes, GeometryInstance, GeometryOffsetAttribute, GeometryPipeline, IndexDatatype, Math$1, VertexFormat) { 'use strict';
2
+
3
+ const scratchCartesian1 = new Matrix3.Cartesian3();
4
+ const scratchCartesian2 = new Matrix3.Cartesian3();
5
+ const scratchCartesian3 = new Matrix3.Cartesian3();
6
+ const scratchCartesian4 = new Matrix3.Cartesian3();
7
+ const texCoordScratch = new Matrix2.Cartesian2();
8
+ const textureMatrixScratch = new Matrix3.Matrix3();
9
+ const tangentMatrixScratch = new Matrix3.Matrix3();
10
+ const quaternionScratch = new Transforms.Quaternion();
11
+
12
+ const scratchNormal = new Matrix3.Cartesian3();
13
+ const scratchTangent = new Matrix3.Cartesian3();
14
+ const scratchBitangent = new Matrix3.Cartesian3();
15
+
16
+ const scratchCartographic = new Matrix3.Cartographic();
17
+ const projectedCenterScratch = new Matrix3.Cartesian3();
18
+
19
+ const scratchMinTexCoord = new Matrix2.Cartesian2();
20
+ const scratchMaxTexCoord = new Matrix2.Cartesian2();
21
+
22
+ function computeTopBottomAttributes(positions, options, extrude) {
23
+ const vertexFormat = options.vertexFormat;
24
+ const center = options.center;
25
+ const semiMajorAxis = options.semiMajorAxis;
26
+ const semiMinorAxis = options.semiMinorAxis;
27
+ const ellipsoid = options.ellipsoid;
28
+ const stRotation = options.stRotation;
29
+ const size = extrude ? (positions.length / 3) * 2 : positions.length / 3;
30
+ const shadowVolume = options.shadowVolume;
31
+
32
+ const textureCoordinates = vertexFormat.st
33
+ ? new Float32Array(size * 2)
34
+ : undefined;
35
+ const normals = vertexFormat.normal ? new Float32Array(size * 3) : undefined;
36
+ const tangents = vertexFormat.tangent
37
+ ? new Float32Array(size * 3)
38
+ : undefined;
39
+ const bitangents = vertexFormat.bitangent
40
+ ? new Float32Array(size * 3)
41
+ : undefined;
42
+
43
+ const extrudeNormals = shadowVolume ? new Float32Array(size * 3) : undefined;
44
+
45
+ let textureCoordIndex = 0;
46
+
47
+ // Raise positions to a height above the ellipsoid and compute the
48
+ // texture coordinates, normals, tangents, and bitangents.
49
+ let normal = scratchNormal;
50
+ let tangent = scratchTangent;
51
+ let bitangent = scratchBitangent;
52
+
53
+ const projection = new Transforms.GeographicProjection(ellipsoid);
54
+ const projectedCenter = projection.project(
55
+ ellipsoid.cartesianToCartographic(center, scratchCartographic),
56
+ projectedCenterScratch
57
+ );
58
+
59
+ const geodeticNormal = ellipsoid.scaleToGeodeticSurface(
60
+ center,
61
+ scratchCartesian1
62
+ );
63
+ ellipsoid.geodeticSurfaceNormal(geodeticNormal, geodeticNormal);
64
+
65
+ let textureMatrix = textureMatrixScratch;
66
+ let tangentMatrix = tangentMatrixScratch;
67
+ if (stRotation !== 0) {
68
+ let rotation = Transforms.Quaternion.fromAxisAngle(
69
+ geodeticNormal,
70
+ stRotation,
71
+ quaternionScratch
72
+ );
73
+ textureMatrix = Matrix3.Matrix3.fromQuaternion(rotation, textureMatrix);
74
+
75
+ rotation = Transforms.Quaternion.fromAxisAngle(
76
+ geodeticNormal,
77
+ -stRotation,
78
+ quaternionScratch
79
+ );
80
+ tangentMatrix = Matrix3.Matrix3.fromQuaternion(rotation, tangentMatrix);
81
+ } else {
82
+ textureMatrix = Matrix3.Matrix3.clone(Matrix3.Matrix3.IDENTITY, textureMatrix);
83
+ tangentMatrix = Matrix3.Matrix3.clone(Matrix3.Matrix3.IDENTITY, tangentMatrix);
84
+ }
85
+
86
+ const minTexCoord = Matrix2.Cartesian2.fromElements(
87
+ Number.POSITIVE_INFINITY,
88
+ Number.POSITIVE_INFINITY,
89
+ scratchMinTexCoord
90
+ );
91
+ const maxTexCoord = Matrix2.Cartesian2.fromElements(
92
+ Number.NEGATIVE_INFINITY,
93
+ Number.NEGATIVE_INFINITY,
94
+ scratchMaxTexCoord
95
+ );
96
+
97
+ let length = positions.length;
98
+ const bottomOffset = extrude ? length : 0;
99
+ const stOffset = (bottomOffset / 3) * 2;
100
+ for (let i = 0; i < length; i += 3) {
101
+ const i1 = i + 1;
102
+ const i2 = i + 2;
103
+ const position = Matrix3.Cartesian3.fromArray(positions, i, scratchCartesian1);
104
+
105
+ if (vertexFormat.st) {
106
+ const rotatedPoint = Matrix3.Matrix3.multiplyByVector(
107
+ textureMatrix,
108
+ position,
109
+ scratchCartesian2
110
+ );
111
+ const projectedPoint = projection.project(
112
+ ellipsoid.cartesianToCartographic(rotatedPoint, scratchCartographic),
113
+ scratchCartesian3
114
+ );
115
+ Matrix3.Cartesian3.subtract(projectedPoint, projectedCenter, projectedPoint);
116
+
117
+ texCoordScratch.x =
118
+ (projectedPoint.x + semiMajorAxis) / (2.0 * semiMajorAxis);
119
+ texCoordScratch.y =
120
+ (projectedPoint.y + semiMinorAxis) / (2.0 * semiMinorAxis);
121
+
122
+ minTexCoord.x = Math.min(texCoordScratch.x, minTexCoord.x);
123
+ minTexCoord.y = Math.min(texCoordScratch.y, minTexCoord.y);
124
+ maxTexCoord.x = Math.max(texCoordScratch.x, maxTexCoord.x);
125
+ maxTexCoord.y = Math.max(texCoordScratch.y, maxTexCoord.y);
126
+
127
+ if (extrude) {
128
+ textureCoordinates[textureCoordIndex + stOffset] = texCoordScratch.x;
129
+ textureCoordinates[textureCoordIndex + 1 + stOffset] =
130
+ texCoordScratch.y;
131
+ }
132
+
133
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.x;
134
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.y;
135
+ }
136
+
137
+ if (
138
+ vertexFormat.normal ||
139
+ vertexFormat.tangent ||
140
+ vertexFormat.bitangent ||
141
+ shadowVolume
142
+ ) {
143
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
144
+
145
+ if (shadowVolume) {
146
+ extrudeNormals[i + bottomOffset] = -normal.x;
147
+ extrudeNormals[i1 + bottomOffset] = -normal.y;
148
+ extrudeNormals[i2 + bottomOffset] = -normal.z;
149
+ }
150
+
151
+ if (
152
+ vertexFormat.normal ||
153
+ vertexFormat.tangent ||
154
+ vertexFormat.bitangent
155
+ ) {
156
+ if (vertexFormat.tangent || vertexFormat.bitangent) {
157
+ tangent = Matrix3.Cartesian3.normalize(
158
+ Matrix3.Cartesian3.cross(Matrix3.Cartesian3.UNIT_Z, normal, tangent),
159
+ tangent
160
+ );
161
+ Matrix3.Matrix3.multiplyByVector(tangentMatrix, tangent, tangent);
162
+ }
163
+ if (vertexFormat.normal) {
164
+ normals[i] = normal.x;
165
+ normals[i1] = normal.y;
166
+ normals[i2] = normal.z;
167
+ if (extrude) {
168
+ normals[i + bottomOffset] = -normal.x;
169
+ normals[i1 + bottomOffset] = -normal.y;
170
+ normals[i2 + bottomOffset] = -normal.z;
171
+ }
172
+ }
173
+
174
+ if (vertexFormat.tangent) {
175
+ tangents[i] = tangent.x;
176
+ tangents[i1] = tangent.y;
177
+ tangents[i2] = tangent.z;
178
+ if (extrude) {
179
+ tangents[i + bottomOffset] = -tangent.x;
180
+ tangents[i1 + bottomOffset] = -tangent.y;
181
+ tangents[i2 + bottomOffset] = -tangent.z;
182
+ }
183
+ }
184
+
185
+ if (vertexFormat.bitangent) {
186
+ bitangent = Matrix3.Cartesian3.normalize(
187
+ Matrix3.Cartesian3.cross(normal, tangent, bitangent),
188
+ bitangent
189
+ );
190
+ bitangents[i] = bitangent.x;
191
+ bitangents[i1] = bitangent.y;
192
+ bitangents[i2] = bitangent.z;
193
+ if (extrude) {
194
+ bitangents[i + bottomOffset] = bitangent.x;
195
+ bitangents[i1 + bottomOffset] = bitangent.y;
196
+ bitangents[i2 + bottomOffset] = bitangent.z;
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+
203
+ if (vertexFormat.st) {
204
+ length = textureCoordinates.length;
205
+ for (let k = 0; k < length; k += 2) {
206
+ textureCoordinates[k] =
207
+ (textureCoordinates[k] - minTexCoord.x) /
208
+ (maxTexCoord.x - minTexCoord.x);
209
+ textureCoordinates[k + 1] =
210
+ (textureCoordinates[k + 1] - minTexCoord.y) /
211
+ (maxTexCoord.y - minTexCoord.y);
212
+ }
213
+ }
214
+
215
+ const attributes = new GeometryAttributes.GeometryAttributes();
216
+
217
+ if (vertexFormat.position) {
218
+ const finalPositions = EllipseGeometryLibrary.EllipseGeometryLibrary.raisePositionsToHeight(
219
+ positions,
220
+ options,
221
+ extrude
222
+ );
223
+ attributes.position = new GeometryAttribute.GeometryAttribute({
224
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
225
+ componentsPerAttribute: 3,
226
+ values: finalPositions,
227
+ });
228
+ }
229
+
230
+ if (vertexFormat.st) {
231
+ attributes.st = new GeometryAttribute.GeometryAttribute({
232
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
233
+ componentsPerAttribute: 2,
234
+ values: textureCoordinates,
235
+ });
236
+ }
237
+
238
+ if (vertexFormat.normal) {
239
+ attributes.normal = new GeometryAttribute.GeometryAttribute({
240
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
241
+ componentsPerAttribute: 3,
242
+ values: normals,
243
+ });
244
+ }
245
+
246
+ if (vertexFormat.tangent) {
247
+ attributes.tangent = new GeometryAttribute.GeometryAttribute({
248
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
249
+ componentsPerAttribute: 3,
250
+ values: tangents,
251
+ });
252
+ }
253
+
254
+ if (vertexFormat.bitangent) {
255
+ attributes.bitangent = new GeometryAttribute.GeometryAttribute({
256
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
257
+ componentsPerAttribute: 3,
258
+ values: bitangents,
259
+ });
260
+ }
261
+
262
+ if (shadowVolume) {
263
+ attributes.extrudeDirection = new GeometryAttribute.GeometryAttribute({
264
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
265
+ componentsPerAttribute: 3,
266
+ values: extrudeNormals,
267
+ });
268
+ }
269
+
270
+ if (extrude && defaultValue.defined(options.offsetAttribute)) {
271
+ let offsetAttribute = new Uint8Array(size);
272
+ if (options.offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.TOP) {
273
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
274
+ } else {
275
+ const offsetValue =
276
+ options.offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE ? 0 : 1;
277
+ offsetAttribute = offsetAttribute.fill(offsetValue);
278
+ }
279
+
280
+ attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
281
+ componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
282
+ componentsPerAttribute: 1,
283
+ values: offsetAttribute,
284
+ });
285
+ }
286
+
287
+ return attributes;
288
+ }
289
+
290
+ function topIndices(numPts) {
291
+ // numTriangles in half = 3 + 8 + 12 + ... = -1 + 4 + (4 + 4) + (4 + 4 + 4) + ... = -1 + 4 * (1 + 2 + 3 + ...)
292
+ // = -1 + 4 * ((n * ( n + 1)) / 2)
293
+ // total triangles = 2 * numTrangles in half
294
+ // indices = total triangles * 3;
295
+ // Substitute numPts for n above
296
+
297
+ const indices = new Array(12 * (numPts * (numPts + 1)) - 6);
298
+ let indicesIndex = 0;
299
+ let prevIndex;
300
+ let numInterior;
301
+ let positionIndex;
302
+ let i;
303
+ let j;
304
+ // Indices triangles to the 'right' of the north vector
305
+
306
+ prevIndex = 0;
307
+ positionIndex = 1;
308
+ for (i = 0; i < 3; i++) {
309
+ indices[indicesIndex++] = positionIndex++;
310
+ indices[indicesIndex++] = prevIndex;
311
+ indices[indicesIndex++] = positionIndex;
312
+ }
313
+
314
+ for (i = 2; i < numPts + 1; ++i) {
315
+ positionIndex = i * (i + 1) - 1;
316
+ prevIndex = (i - 1) * i - 1;
317
+
318
+ indices[indicesIndex++] = positionIndex++;
319
+ indices[indicesIndex++] = prevIndex;
320
+ indices[indicesIndex++] = positionIndex;
321
+
322
+ numInterior = 2 * i;
323
+ for (j = 0; j < numInterior - 1; ++j) {
324
+ indices[indicesIndex++] = positionIndex;
325
+ indices[indicesIndex++] = prevIndex++;
326
+ indices[indicesIndex++] = prevIndex;
327
+
328
+ indices[indicesIndex++] = positionIndex++;
329
+ indices[indicesIndex++] = prevIndex;
330
+ indices[indicesIndex++] = positionIndex;
331
+ }
332
+
333
+ indices[indicesIndex++] = positionIndex++;
334
+ indices[indicesIndex++] = prevIndex;
335
+ indices[indicesIndex++] = positionIndex;
336
+ }
337
+
338
+ // Indices for center column of triangles
339
+ numInterior = numPts * 2;
340
+ ++positionIndex;
341
+ ++prevIndex;
342
+ for (i = 0; i < numInterior - 1; ++i) {
343
+ indices[indicesIndex++] = positionIndex;
344
+ indices[indicesIndex++] = prevIndex++;
345
+ indices[indicesIndex++] = prevIndex;
346
+
347
+ indices[indicesIndex++] = positionIndex++;
348
+ indices[indicesIndex++] = prevIndex;
349
+ indices[indicesIndex++] = positionIndex;
350
+ }
351
+
352
+ indices[indicesIndex++] = positionIndex;
353
+ indices[indicesIndex++] = prevIndex++;
354
+ indices[indicesIndex++] = prevIndex;
355
+
356
+ indices[indicesIndex++] = positionIndex++;
357
+ indices[indicesIndex++] = prevIndex++;
358
+ indices[indicesIndex++] = prevIndex;
359
+
360
+ // Reverse the process creating indices to the 'left' of the north vector
361
+ ++prevIndex;
362
+ for (i = numPts - 1; i > 1; --i) {
363
+ indices[indicesIndex++] = prevIndex++;
364
+ indices[indicesIndex++] = prevIndex;
365
+ indices[indicesIndex++] = positionIndex;
366
+
367
+ numInterior = 2 * i;
368
+ for (j = 0; j < numInterior - 1; ++j) {
369
+ indices[indicesIndex++] = positionIndex;
370
+ indices[indicesIndex++] = prevIndex++;
371
+ indices[indicesIndex++] = prevIndex;
372
+
373
+ indices[indicesIndex++] = positionIndex++;
374
+ indices[indicesIndex++] = prevIndex;
375
+ indices[indicesIndex++] = positionIndex;
376
+ }
377
+
378
+ indices[indicesIndex++] = prevIndex++;
379
+ indices[indicesIndex++] = prevIndex++;
380
+ indices[indicesIndex++] = positionIndex++;
381
+ }
382
+
383
+ for (i = 0; i < 3; i++) {
384
+ indices[indicesIndex++] = prevIndex++;
385
+ indices[indicesIndex++] = prevIndex;
386
+ indices[indicesIndex++] = positionIndex;
387
+ }
388
+ return indices;
389
+ }
390
+
391
+ let boundingSphereCenter = new Matrix3.Cartesian3();
392
+
393
+ function computeEllipse(options) {
394
+ const center = options.center;
395
+ boundingSphereCenter = Matrix3.Cartesian3.multiplyByScalar(
396
+ options.ellipsoid.geodeticSurfaceNormal(center, boundingSphereCenter),
397
+ options.height,
398
+ boundingSphereCenter
399
+ );
400
+ boundingSphereCenter = Matrix3.Cartesian3.add(
401
+ center,
402
+ boundingSphereCenter,
403
+ boundingSphereCenter
404
+ );
405
+ const boundingSphere = new Transforms.BoundingSphere(
406
+ boundingSphereCenter,
407
+ options.semiMajorAxis
408
+ );
409
+ const cep = EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions(
410
+ options,
411
+ true,
412
+ false
413
+ );
414
+ const positions = cep.positions;
415
+ const numPts = cep.numPts;
416
+ const attributes = computeTopBottomAttributes(positions, options, false);
417
+ let indices = topIndices(numPts);
418
+ indices = IndexDatatype.IndexDatatype.createTypedArray(positions.length / 3, indices);
419
+ return {
420
+ boundingSphere: boundingSphere,
421
+ attributes: attributes,
422
+ indices: indices,
423
+ };
424
+ }
425
+
426
+ function computeWallAttributes(positions, options) {
427
+ const vertexFormat = options.vertexFormat;
428
+ const center = options.center;
429
+ const semiMajorAxis = options.semiMajorAxis;
430
+ const semiMinorAxis = options.semiMinorAxis;
431
+ const ellipsoid = options.ellipsoid;
432
+ const height = options.height;
433
+ const extrudedHeight = options.extrudedHeight;
434
+ const stRotation = options.stRotation;
435
+ const size = (positions.length / 3) * 2;
436
+
437
+ const finalPositions = new Float64Array(size * 3);
438
+ const textureCoordinates = vertexFormat.st
439
+ ? new Float32Array(size * 2)
440
+ : undefined;
441
+ const normals = vertexFormat.normal ? new Float32Array(size * 3) : undefined;
442
+ const tangents = vertexFormat.tangent
443
+ ? new Float32Array(size * 3)
444
+ : undefined;
445
+ const bitangents = vertexFormat.bitangent
446
+ ? new Float32Array(size * 3)
447
+ : undefined;
448
+
449
+ const shadowVolume = options.shadowVolume;
450
+ const extrudeNormals = shadowVolume ? new Float32Array(size * 3) : undefined;
451
+
452
+ let textureCoordIndex = 0;
453
+
454
+ // Raise positions to a height above the ellipsoid and compute the
455
+ // texture coordinates, normals, tangents, and bitangents.
456
+ let normal = scratchNormal;
457
+ let tangent = scratchTangent;
458
+ let bitangent = scratchBitangent;
459
+
460
+ const projection = new Transforms.GeographicProjection(ellipsoid);
461
+ const projectedCenter = projection.project(
462
+ ellipsoid.cartesianToCartographic(center, scratchCartographic),
463
+ projectedCenterScratch
464
+ );
465
+
466
+ const geodeticNormal = ellipsoid.scaleToGeodeticSurface(
467
+ center,
468
+ scratchCartesian1
469
+ );
470
+ ellipsoid.geodeticSurfaceNormal(geodeticNormal, geodeticNormal);
471
+ const rotation = Transforms.Quaternion.fromAxisAngle(
472
+ geodeticNormal,
473
+ stRotation,
474
+ quaternionScratch
475
+ );
476
+ const textureMatrix = Matrix3.Matrix3.fromQuaternion(rotation, textureMatrixScratch);
477
+
478
+ const minTexCoord = Matrix2.Cartesian2.fromElements(
479
+ Number.POSITIVE_INFINITY,
480
+ Number.POSITIVE_INFINITY,
481
+ scratchMinTexCoord
482
+ );
483
+ const maxTexCoord = Matrix2.Cartesian2.fromElements(
484
+ Number.NEGATIVE_INFINITY,
485
+ Number.NEGATIVE_INFINITY,
486
+ scratchMaxTexCoord
487
+ );
488
+
489
+ let length = positions.length;
490
+ const stOffset = (length / 3) * 2;
491
+ for (let i = 0; i < length; i += 3) {
492
+ const i1 = i + 1;
493
+ const i2 = i + 2;
494
+ let position = Matrix3.Cartesian3.fromArray(positions, i, scratchCartesian1);
495
+ let extrudedPosition;
496
+
497
+ if (vertexFormat.st) {
498
+ const rotatedPoint = Matrix3.Matrix3.multiplyByVector(
499
+ textureMatrix,
500
+ position,
501
+ scratchCartesian2
502
+ );
503
+ const projectedPoint = projection.project(
504
+ ellipsoid.cartesianToCartographic(rotatedPoint, scratchCartographic),
505
+ scratchCartesian3
506
+ );
507
+ Matrix3.Cartesian3.subtract(projectedPoint, projectedCenter, projectedPoint);
508
+
509
+ texCoordScratch.x =
510
+ (projectedPoint.x + semiMajorAxis) / (2.0 * semiMajorAxis);
511
+ texCoordScratch.y =
512
+ (projectedPoint.y + semiMinorAxis) / (2.0 * semiMinorAxis);
513
+
514
+ minTexCoord.x = Math.min(texCoordScratch.x, minTexCoord.x);
515
+ minTexCoord.y = Math.min(texCoordScratch.y, minTexCoord.y);
516
+ maxTexCoord.x = Math.max(texCoordScratch.x, maxTexCoord.x);
517
+ maxTexCoord.y = Math.max(texCoordScratch.y, maxTexCoord.y);
518
+
519
+ textureCoordinates[textureCoordIndex + stOffset] = texCoordScratch.x;
520
+ textureCoordinates[textureCoordIndex + 1 + stOffset] = texCoordScratch.y;
521
+
522
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.x;
523
+ textureCoordinates[textureCoordIndex++] = texCoordScratch.y;
524
+ }
525
+
526
+ position = ellipsoid.scaleToGeodeticSurface(position, position);
527
+ extrudedPosition = Matrix3.Cartesian3.clone(position, scratchCartesian2);
528
+ normal = ellipsoid.geodeticSurfaceNormal(position, normal);
529
+
530
+ if (shadowVolume) {
531
+ extrudeNormals[i + length] = -normal.x;
532
+ extrudeNormals[i1 + length] = -normal.y;
533
+ extrudeNormals[i2 + length] = -normal.z;
534
+ }
535
+
536
+ let scaledNormal = Matrix3.Cartesian3.multiplyByScalar(
537
+ normal,
538
+ height,
539
+ scratchCartesian4
540
+ );
541
+ position = Matrix3.Cartesian3.add(position, scaledNormal, position);
542
+ scaledNormal = Matrix3.Cartesian3.multiplyByScalar(
543
+ normal,
544
+ extrudedHeight,
545
+ scaledNormal
546
+ );
547
+ extrudedPosition = Matrix3.Cartesian3.add(
548
+ extrudedPosition,
549
+ scaledNormal,
550
+ extrudedPosition
551
+ );
552
+
553
+ if (vertexFormat.position) {
554
+ finalPositions[i + length] = extrudedPosition.x;
555
+ finalPositions[i1 + length] = extrudedPosition.y;
556
+ finalPositions[i2 + length] = extrudedPosition.z;
557
+
558
+ finalPositions[i] = position.x;
559
+ finalPositions[i1] = position.y;
560
+ finalPositions[i2] = position.z;
561
+ }
562
+
563
+ if (vertexFormat.normal || vertexFormat.tangent || vertexFormat.bitangent) {
564
+ bitangent = Matrix3.Cartesian3.clone(normal, bitangent);
565
+ const next = Matrix3.Cartesian3.fromArray(
566
+ positions,
567
+ (i + 3) % length,
568
+ scratchCartesian4
569
+ );
570
+ Matrix3.Cartesian3.subtract(next, position, next);
571
+ const bottom = Matrix3.Cartesian3.subtract(
572
+ extrudedPosition,
573
+ position,
574
+ scratchCartesian3
575
+ );
576
+
577
+ normal = Matrix3.Cartesian3.normalize(
578
+ Matrix3.Cartesian3.cross(bottom, next, normal),
579
+ normal
580
+ );
581
+
582
+ if (vertexFormat.normal) {
583
+ normals[i] = normal.x;
584
+ normals[i1] = normal.y;
585
+ normals[i2] = normal.z;
586
+
587
+ normals[i + length] = normal.x;
588
+ normals[i1 + length] = normal.y;
589
+ normals[i2 + length] = normal.z;
590
+ }
591
+
592
+ if (vertexFormat.tangent) {
593
+ tangent = Matrix3.Cartesian3.normalize(
594
+ Matrix3.Cartesian3.cross(bitangent, normal, tangent),
595
+ tangent
596
+ );
597
+ tangents[i] = tangent.x;
598
+ tangents[i1] = tangent.y;
599
+ tangents[i2] = tangent.z;
600
+
601
+ tangents[i + length] = tangent.x;
602
+ tangents[i + 1 + length] = tangent.y;
603
+ tangents[i + 2 + length] = tangent.z;
604
+ }
605
+
606
+ if (vertexFormat.bitangent) {
607
+ bitangents[i] = bitangent.x;
608
+ bitangents[i1] = bitangent.y;
609
+ bitangents[i2] = bitangent.z;
610
+
611
+ bitangents[i + length] = bitangent.x;
612
+ bitangents[i1 + length] = bitangent.y;
613
+ bitangents[i2 + length] = bitangent.z;
614
+ }
615
+ }
616
+ }
617
+
618
+ if (vertexFormat.st) {
619
+ length = textureCoordinates.length;
620
+ for (let k = 0; k < length; k += 2) {
621
+ textureCoordinates[k] =
622
+ (textureCoordinates[k] - minTexCoord.x) /
623
+ (maxTexCoord.x - minTexCoord.x);
624
+ textureCoordinates[k + 1] =
625
+ (textureCoordinates[k + 1] - minTexCoord.y) /
626
+ (maxTexCoord.y - minTexCoord.y);
627
+ }
628
+ }
629
+
630
+ const attributes = new GeometryAttributes.GeometryAttributes();
631
+
632
+ if (vertexFormat.position) {
633
+ attributes.position = new GeometryAttribute.GeometryAttribute({
634
+ componentDatatype: ComponentDatatype.ComponentDatatype.DOUBLE,
635
+ componentsPerAttribute: 3,
636
+ values: finalPositions,
637
+ });
638
+ }
639
+
640
+ if (vertexFormat.st) {
641
+ attributes.st = new GeometryAttribute.GeometryAttribute({
642
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
643
+ componentsPerAttribute: 2,
644
+ values: textureCoordinates,
645
+ });
646
+ }
647
+
648
+ if (vertexFormat.normal) {
649
+ attributes.normal = new GeometryAttribute.GeometryAttribute({
650
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
651
+ componentsPerAttribute: 3,
652
+ values: normals,
653
+ });
654
+ }
655
+
656
+ if (vertexFormat.tangent) {
657
+ attributes.tangent = new GeometryAttribute.GeometryAttribute({
658
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
659
+ componentsPerAttribute: 3,
660
+ values: tangents,
661
+ });
662
+ }
663
+
664
+ if (vertexFormat.bitangent) {
665
+ attributes.bitangent = new GeometryAttribute.GeometryAttribute({
666
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
667
+ componentsPerAttribute: 3,
668
+ values: bitangents,
669
+ });
670
+ }
671
+
672
+ if (shadowVolume) {
673
+ attributes.extrudeDirection = new GeometryAttribute.GeometryAttribute({
674
+ componentDatatype: ComponentDatatype.ComponentDatatype.FLOAT,
675
+ componentsPerAttribute: 3,
676
+ values: extrudeNormals,
677
+ });
678
+ }
679
+
680
+ if (defaultValue.defined(options.offsetAttribute)) {
681
+ let offsetAttribute = new Uint8Array(size);
682
+ if (options.offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.TOP) {
683
+ offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
684
+ } else {
685
+ const offsetValue =
686
+ options.offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE ? 0 : 1;
687
+ offsetAttribute = offsetAttribute.fill(offsetValue);
688
+ }
689
+ attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
690
+ componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
691
+ componentsPerAttribute: 1,
692
+ values: offsetAttribute,
693
+ });
694
+ }
695
+
696
+ return attributes;
697
+ }
698
+
699
+ function computeWallIndices(positions) {
700
+ const length = positions.length / 3;
701
+ const indices = IndexDatatype.IndexDatatype.createTypedArray(length, length * 6);
702
+ let index = 0;
703
+ for (let i = 0; i < length; i++) {
704
+ const UL = i;
705
+ const LL = i + length;
706
+ const UR = (UL + 1) % length;
707
+ const LR = UR + length;
708
+ indices[index++] = UL;
709
+ indices[index++] = LL;
710
+ indices[index++] = UR;
711
+ indices[index++] = UR;
712
+ indices[index++] = LL;
713
+ indices[index++] = LR;
714
+ }
715
+
716
+ return indices;
717
+ }
718
+
719
+ const topBoundingSphere = new Transforms.BoundingSphere();
720
+ const bottomBoundingSphere = new Transforms.BoundingSphere();
721
+
722
+ function computeExtrudedEllipse(options) {
723
+ const center = options.center;
724
+ const ellipsoid = options.ellipsoid;
725
+ const semiMajorAxis = options.semiMajorAxis;
726
+ let scaledNormal = Matrix3.Cartesian3.multiplyByScalar(
727
+ ellipsoid.geodeticSurfaceNormal(center, scratchCartesian1),
728
+ options.height,
729
+ scratchCartesian1
730
+ );
731
+ topBoundingSphere.center = Matrix3.Cartesian3.add(
732
+ center,
733
+ scaledNormal,
734
+ topBoundingSphere.center
735
+ );
736
+ topBoundingSphere.radius = semiMajorAxis;
737
+
738
+ scaledNormal = Matrix3.Cartesian3.multiplyByScalar(
739
+ ellipsoid.geodeticSurfaceNormal(center, scaledNormal),
740
+ options.extrudedHeight,
741
+ scaledNormal
742
+ );
743
+ bottomBoundingSphere.center = Matrix3.Cartesian3.add(
744
+ center,
745
+ scaledNormal,
746
+ bottomBoundingSphere.center
747
+ );
748
+ bottomBoundingSphere.radius = semiMajorAxis;
749
+
750
+ const cep = EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions(
751
+ options,
752
+ true,
753
+ true
754
+ );
755
+ const positions = cep.positions;
756
+ const numPts = cep.numPts;
757
+ const outerPositions = cep.outerPositions;
758
+ const boundingSphere = Transforms.BoundingSphere.union(
759
+ topBoundingSphere,
760
+ bottomBoundingSphere
761
+ );
762
+ const topBottomAttributes = computeTopBottomAttributes(
763
+ positions,
764
+ options,
765
+ true
766
+ );
767
+ let indices = topIndices(numPts);
768
+ const length = indices.length;
769
+ indices.length = length * 2;
770
+ const posLength = positions.length / 3;
771
+ for (let i = 0; i < length; i += 3) {
772
+ indices[i + length] = indices[i + 2] + posLength;
773
+ indices[i + 1 + length] = indices[i + 1] + posLength;
774
+ indices[i + 2 + length] = indices[i] + posLength;
775
+ }
776
+
777
+ const topBottomIndices = IndexDatatype.IndexDatatype.createTypedArray(
778
+ (posLength * 2) / 3,
779
+ indices
780
+ );
781
+
782
+ const topBottomGeo = new GeometryAttribute.Geometry({
783
+ attributes: topBottomAttributes,
784
+ indices: topBottomIndices,
785
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
786
+ });
787
+
788
+ const wallAttributes = computeWallAttributes(outerPositions, options);
789
+ indices = computeWallIndices(outerPositions);
790
+ const wallIndices = IndexDatatype.IndexDatatype.createTypedArray(
791
+ (outerPositions.length * 2) / 3,
792
+ indices
793
+ );
794
+
795
+ const wallGeo = new GeometryAttribute.Geometry({
796
+ attributes: wallAttributes,
797
+ indices: wallIndices,
798
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
799
+ });
800
+
801
+ const geo = GeometryPipeline.GeometryPipeline.combineInstances([
802
+ new GeometryInstance.GeometryInstance({
803
+ geometry: topBottomGeo,
804
+ }),
805
+ new GeometryInstance.GeometryInstance({
806
+ geometry: wallGeo,
807
+ }),
808
+ ]);
809
+
810
+ return {
811
+ boundingSphere: boundingSphere,
812
+ attributes: geo[0].attributes,
813
+ indices: geo[0].indices,
814
+ };
815
+ }
816
+
817
+ function computeRectangle(
818
+ center,
819
+ semiMajorAxis,
820
+ semiMinorAxis,
821
+ rotation,
822
+ granularity,
823
+ ellipsoid,
824
+ result
825
+ ) {
826
+ const cep = EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions(
827
+ {
828
+ center: center,
829
+ semiMajorAxis: semiMajorAxis,
830
+ semiMinorAxis: semiMinorAxis,
831
+ rotation: rotation,
832
+ granularity: granularity,
833
+ },
834
+ false,
835
+ true
836
+ );
837
+ const positionsFlat = cep.outerPositions;
838
+ const positionsCount = positionsFlat.length / 3;
839
+ const positions = new Array(positionsCount);
840
+ for (let i = 0; i < positionsCount; ++i) {
841
+ positions[i] = Matrix3.Cartesian3.fromArray(positionsFlat, i * 3);
842
+ }
843
+ const rectangle = Matrix2.Rectangle.fromCartesianArray(positions, ellipsoid, result);
844
+ // Rectangle width goes beyond 180 degrees when the ellipse crosses a pole.
845
+ // When this happens, make the rectangle into a "circle" around the pole
846
+ if (rectangle.width > Math$1.CesiumMath.PI) {
847
+ rectangle.north =
848
+ rectangle.north > 0.0
849
+ ? Math$1.CesiumMath.PI_OVER_TWO - Math$1.CesiumMath.EPSILON7
850
+ : rectangle.north;
851
+ rectangle.south =
852
+ rectangle.south < 0.0
853
+ ? Math$1.CesiumMath.EPSILON7 - Math$1.CesiumMath.PI_OVER_TWO
854
+ : rectangle.south;
855
+ rectangle.east = Math$1.CesiumMath.PI;
856
+ rectangle.west = -Math$1.CesiumMath.PI;
857
+ }
858
+ return rectangle;
859
+ }
860
+
861
+ /**
862
+ * A description of an ellipse on an ellipsoid. Ellipse geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
863
+ *
864
+ * @alias EllipseGeometry
865
+ * @constructor
866
+ *
867
+ * @param {Object} options Object with the following properties:
868
+ * @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
869
+ * @param {Number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
870
+ * @param {Number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
871
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
872
+ * @param {Number} [options.height=0.0] The distance in meters between the ellipse and the ellipsoid surface.
873
+ * @param {Number} [options.extrudedHeight] The distance in meters between the ellipse's extruded face and the ellipsoid surface.
874
+ * @param {Number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
875
+ * @param {Number} [options.stRotation=0.0] The rotation of the texture coordinates counter-clockwise from north.
876
+ * @param {Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
877
+ * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
878
+ *
879
+ * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
880
+ * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
881
+ * @exception {DeveloperError} granularity must be greater than zero.
882
+ *
883
+ *
884
+ * @example
885
+ * // Create an ellipse.
886
+ * const ellipse = new Cesium.EllipseGeometry({
887
+ * center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
888
+ * semiMajorAxis : 500000.0,
889
+ * semiMinorAxis : 300000.0,
890
+ * rotation : Cesium.Math.toRadians(60.0)
891
+ * });
892
+ * const geometry = Cesium.EllipseGeometry.createGeometry(ellipse);
893
+ *
894
+ * @see EllipseGeometry.createGeometry
895
+ */
896
+ function EllipseGeometry(options) {
897
+ options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
898
+
899
+ const center = options.center;
900
+ const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
901
+ const semiMajorAxis = options.semiMajorAxis;
902
+ const semiMinorAxis = options.semiMinorAxis;
903
+ const granularity = defaultValue.defaultValue(
904
+ options.granularity,
905
+ Math$1.CesiumMath.RADIANS_PER_DEGREE
906
+ );
907
+ const vertexFormat = defaultValue.defaultValue(options.vertexFormat, VertexFormat.VertexFormat.DEFAULT);
908
+
909
+ //>>includeStart('debug', pragmas.debug);
910
+ Check.Check.defined("options.center", center);
911
+ Check.Check.typeOf.number("options.semiMajorAxis", semiMajorAxis);
912
+ Check.Check.typeOf.number("options.semiMinorAxis", semiMinorAxis);
913
+ if (semiMajorAxis < semiMinorAxis) {
914
+ throw new Check.DeveloperError(
915
+ "semiMajorAxis must be greater than or equal to the semiMinorAxis."
916
+ );
917
+ }
918
+ if (granularity <= 0.0) {
919
+ throw new Check.DeveloperError("granularity must be greater than zero.");
920
+ }
921
+ //>>includeEnd('debug');
922
+
923
+ const height = defaultValue.defaultValue(options.height, 0.0);
924
+ const extrudedHeight = defaultValue.defaultValue(options.extrudedHeight, height);
925
+
926
+ this._center = Matrix3.Cartesian3.clone(center);
927
+ this._semiMajorAxis = semiMajorAxis;
928
+ this._semiMinorAxis = semiMinorAxis;
929
+ this._ellipsoid = Matrix3.Ellipsoid.clone(ellipsoid);
930
+ this._rotation = defaultValue.defaultValue(options.rotation, 0.0);
931
+ this._stRotation = defaultValue.defaultValue(options.stRotation, 0.0);
932
+ this._height = Math.max(extrudedHeight, height);
933
+ this._granularity = granularity;
934
+ this._vertexFormat = VertexFormat.VertexFormat.clone(vertexFormat);
935
+ this._extrudedHeight = Math.min(extrudedHeight, height);
936
+ this._shadowVolume = defaultValue.defaultValue(options.shadowVolume, false);
937
+ this._workerName = "createEllipseGeometry";
938
+ this._offsetAttribute = options.offsetAttribute;
939
+
940
+ this._rectangle = undefined;
941
+ this._textureCoordinateRotationPoints = undefined;
942
+ }
943
+
944
+ /**
945
+ * The number of elements used to pack the object into an array.
946
+ * @type {Number}
947
+ */
948
+ EllipseGeometry.packedLength =
949
+ Matrix3.Cartesian3.packedLength +
950
+ Matrix3.Ellipsoid.packedLength +
951
+ VertexFormat.VertexFormat.packedLength +
952
+ 9;
953
+
954
+ /**
955
+ * Stores the provided instance into the provided array.
956
+ *
957
+ * @param {EllipseGeometry} value The value to pack.
958
+ * @param {Number[]} array The array to pack into.
959
+ * @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
960
+ *
961
+ * @returns {Number[]} The array that was packed into
962
+ */
963
+ EllipseGeometry.pack = function (value, array, startingIndex) {
964
+ //>>includeStart('debug', pragmas.debug);
965
+ Check.Check.defined("value", value);
966
+ Check.Check.defined("array", array);
967
+ //>>includeEnd('debug');
968
+
969
+ startingIndex = defaultValue.defaultValue(startingIndex, 0);
970
+
971
+ Matrix3.Cartesian3.pack(value._center, array, startingIndex);
972
+ startingIndex += Matrix3.Cartesian3.packedLength;
973
+
974
+ Matrix3.Ellipsoid.pack(value._ellipsoid, array, startingIndex);
975
+ startingIndex += Matrix3.Ellipsoid.packedLength;
976
+
977
+ VertexFormat.VertexFormat.pack(value._vertexFormat, array, startingIndex);
978
+ startingIndex += VertexFormat.VertexFormat.packedLength;
979
+
980
+ array[startingIndex++] = value._semiMajorAxis;
981
+ array[startingIndex++] = value._semiMinorAxis;
982
+ array[startingIndex++] = value._rotation;
983
+ array[startingIndex++] = value._stRotation;
984
+ array[startingIndex++] = value._height;
985
+ array[startingIndex++] = value._granularity;
986
+ array[startingIndex++] = value._extrudedHeight;
987
+ array[startingIndex++] = value._shadowVolume ? 1.0 : 0.0;
988
+ array[startingIndex] = defaultValue.defaultValue(value._offsetAttribute, -1);
989
+
990
+ return array;
991
+ };
992
+
993
+ const scratchCenter = new Matrix3.Cartesian3();
994
+ const scratchEllipsoid = new Matrix3.Ellipsoid();
995
+ const scratchVertexFormat = new VertexFormat.VertexFormat();
996
+ const scratchOptions = {
997
+ center: scratchCenter,
998
+ ellipsoid: scratchEllipsoid,
999
+ vertexFormat: scratchVertexFormat,
1000
+ semiMajorAxis: undefined,
1001
+ semiMinorAxis: undefined,
1002
+ rotation: undefined,
1003
+ stRotation: undefined,
1004
+ height: undefined,
1005
+ granularity: undefined,
1006
+ extrudedHeight: undefined,
1007
+ shadowVolume: undefined,
1008
+ offsetAttribute: undefined,
1009
+ };
1010
+
1011
+ /**
1012
+ * Retrieves an instance from a packed array.
1013
+ *
1014
+ * @param {Number[]} array The packed array.
1015
+ * @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
1016
+ * @param {EllipseGeometry} [result] The object into which to store the result.
1017
+ * @returns {EllipseGeometry} The modified result parameter or a new EllipseGeometry instance if one was not provided.
1018
+ */
1019
+ EllipseGeometry.unpack = function (array, startingIndex, result) {
1020
+ //>>includeStart('debug', pragmas.debug);
1021
+ Check.Check.defined("array", array);
1022
+ //>>includeEnd('debug');
1023
+
1024
+ startingIndex = defaultValue.defaultValue(startingIndex, 0);
1025
+
1026
+ const center = Matrix3.Cartesian3.unpack(array, startingIndex, scratchCenter);
1027
+ startingIndex += Matrix3.Cartesian3.packedLength;
1028
+
1029
+ const ellipsoid = Matrix3.Ellipsoid.unpack(array, startingIndex, scratchEllipsoid);
1030
+ startingIndex += Matrix3.Ellipsoid.packedLength;
1031
+
1032
+ const vertexFormat = VertexFormat.VertexFormat.unpack(
1033
+ array,
1034
+ startingIndex,
1035
+ scratchVertexFormat
1036
+ );
1037
+ startingIndex += VertexFormat.VertexFormat.packedLength;
1038
+
1039
+ const semiMajorAxis = array[startingIndex++];
1040
+ const semiMinorAxis = array[startingIndex++];
1041
+ const rotation = array[startingIndex++];
1042
+ const stRotation = array[startingIndex++];
1043
+ const height = array[startingIndex++];
1044
+ const granularity = array[startingIndex++];
1045
+ const extrudedHeight = array[startingIndex++];
1046
+ const shadowVolume = array[startingIndex++] === 1.0;
1047
+ const offsetAttribute = array[startingIndex];
1048
+
1049
+ if (!defaultValue.defined(result)) {
1050
+ scratchOptions.height = height;
1051
+ scratchOptions.extrudedHeight = extrudedHeight;
1052
+ scratchOptions.granularity = granularity;
1053
+ scratchOptions.stRotation = stRotation;
1054
+ scratchOptions.rotation = rotation;
1055
+ scratchOptions.semiMajorAxis = semiMajorAxis;
1056
+ scratchOptions.semiMinorAxis = semiMinorAxis;
1057
+ scratchOptions.shadowVolume = shadowVolume;
1058
+ scratchOptions.offsetAttribute =
1059
+ offsetAttribute === -1 ? undefined : offsetAttribute;
1060
+
1061
+ return new EllipseGeometry(scratchOptions);
1062
+ }
1063
+
1064
+ result._center = Matrix3.Cartesian3.clone(center, result._center);
1065
+ result._ellipsoid = Matrix3.Ellipsoid.clone(ellipsoid, result._ellipsoid);
1066
+ result._vertexFormat = VertexFormat.VertexFormat.clone(vertexFormat, result._vertexFormat);
1067
+ result._semiMajorAxis = semiMajorAxis;
1068
+ result._semiMinorAxis = semiMinorAxis;
1069
+ result._rotation = rotation;
1070
+ result._stRotation = stRotation;
1071
+ result._height = height;
1072
+ result._granularity = granularity;
1073
+ result._extrudedHeight = extrudedHeight;
1074
+ result._shadowVolume = shadowVolume;
1075
+ result._offsetAttribute =
1076
+ offsetAttribute === -1 ? undefined : offsetAttribute;
1077
+
1078
+ return result;
1079
+ };
1080
+
1081
+ /**
1082
+ * Computes the bounding rectangle based on the provided options
1083
+ *
1084
+ * @param {Object} options Object with the following properties:
1085
+ * @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
1086
+ * @param {Number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
1087
+ * @param {Number} options.semiMinorAxis The length of the ellipse's semi-minor axis in meters.
1088
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid the ellipse will be on.
1089
+ * @param {Number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
1090
+ * @param {Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
1091
+ * @param {Rectangle} [result] An object in which to store the result
1092
+ *
1093
+ * @returns {Rectangle} The result rectangle
1094
+ */
1095
+ EllipseGeometry.computeRectangle = function (options, result) {
1096
+ options = defaultValue.defaultValue(options, defaultValue.defaultValue.EMPTY_OBJECT);
1097
+
1098
+ const center = options.center;
1099
+ const ellipsoid = defaultValue.defaultValue(options.ellipsoid, Matrix3.Ellipsoid.WGS84);
1100
+ const semiMajorAxis = options.semiMajorAxis;
1101
+ const semiMinorAxis = options.semiMinorAxis;
1102
+ const granularity = defaultValue.defaultValue(
1103
+ options.granularity,
1104
+ Math$1.CesiumMath.RADIANS_PER_DEGREE
1105
+ );
1106
+ const rotation = defaultValue.defaultValue(options.rotation, 0.0);
1107
+
1108
+ //>>includeStart('debug', pragmas.debug);
1109
+ Check.Check.defined("options.center", center);
1110
+ Check.Check.typeOf.number("options.semiMajorAxis", semiMajorAxis);
1111
+ Check.Check.typeOf.number("options.semiMinorAxis", semiMinorAxis);
1112
+ if (semiMajorAxis < semiMinorAxis) {
1113
+ throw new Check.DeveloperError(
1114
+ "semiMajorAxis must be greater than or equal to the semiMinorAxis."
1115
+ );
1116
+ }
1117
+ if (granularity <= 0.0) {
1118
+ throw new Check.DeveloperError("granularity must be greater than zero.");
1119
+ }
1120
+ //>>includeEnd('debug');
1121
+
1122
+ return computeRectangle(
1123
+ center,
1124
+ semiMajorAxis,
1125
+ semiMinorAxis,
1126
+ rotation,
1127
+ granularity,
1128
+ ellipsoid,
1129
+ result
1130
+ );
1131
+ };
1132
+
1133
+ /**
1134
+ * Computes the geometric representation of a ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
1135
+ *
1136
+ * @param {EllipseGeometry} ellipseGeometry A description of the ellipse.
1137
+ * @returns {Geometry|undefined} The computed vertices and indices.
1138
+ */
1139
+ EllipseGeometry.createGeometry = function (ellipseGeometry) {
1140
+ if (
1141
+ ellipseGeometry._semiMajorAxis <= 0.0 ||
1142
+ ellipseGeometry._semiMinorAxis <= 0.0
1143
+ ) {
1144
+ return;
1145
+ }
1146
+
1147
+ const height = ellipseGeometry._height;
1148
+ const extrudedHeight = ellipseGeometry._extrudedHeight;
1149
+ const extrude = !Math$1.CesiumMath.equalsEpsilon(
1150
+ height,
1151
+ extrudedHeight,
1152
+ 0,
1153
+ Math$1.CesiumMath.EPSILON2
1154
+ );
1155
+
1156
+ ellipseGeometry._center = ellipseGeometry._ellipsoid.scaleToGeodeticSurface(
1157
+ ellipseGeometry._center,
1158
+ ellipseGeometry._center
1159
+ );
1160
+ const options = {
1161
+ center: ellipseGeometry._center,
1162
+ semiMajorAxis: ellipseGeometry._semiMajorAxis,
1163
+ semiMinorAxis: ellipseGeometry._semiMinorAxis,
1164
+ ellipsoid: ellipseGeometry._ellipsoid,
1165
+ rotation: ellipseGeometry._rotation,
1166
+ height: height,
1167
+ granularity: ellipseGeometry._granularity,
1168
+ vertexFormat: ellipseGeometry._vertexFormat,
1169
+ stRotation: ellipseGeometry._stRotation,
1170
+ };
1171
+ let geometry;
1172
+ if (extrude) {
1173
+ options.extrudedHeight = extrudedHeight;
1174
+ options.shadowVolume = ellipseGeometry._shadowVolume;
1175
+ options.offsetAttribute = ellipseGeometry._offsetAttribute;
1176
+ geometry = computeExtrudedEllipse(options);
1177
+ } else {
1178
+ geometry = computeEllipse(options);
1179
+
1180
+ if (defaultValue.defined(ellipseGeometry._offsetAttribute)) {
1181
+ const length = geometry.attributes.position.values.length;
1182
+ const offsetValue =
1183
+ ellipseGeometry._offsetAttribute === GeometryOffsetAttribute.GeometryOffsetAttribute.NONE
1184
+ ? 0
1185
+ : 1;
1186
+ const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
1187
+ geometry.attributes.applyOffset = new GeometryAttribute.GeometryAttribute({
1188
+ componentDatatype: ComponentDatatype.ComponentDatatype.UNSIGNED_BYTE,
1189
+ componentsPerAttribute: 1,
1190
+ values: applyOffset,
1191
+ });
1192
+ }
1193
+ }
1194
+
1195
+ return new GeometryAttribute.Geometry({
1196
+ attributes: geometry.attributes,
1197
+ indices: geometry.indices,
1198
+ primitiveType: GeometryAttribute.PrimitiveType.TRIANGLES,
1199
+ boundingSphere: geometry.boundingSphere,
1200
+ offsetAttribute: ellipseGeometry._offsetAttribute,
1201
+ });
1202
+ };
1203
+
1204
+ /**
1205
+ * @private
1206
+ */
1207
+ EllipseGeometry.createShadowVolume = function (
1208
+ ellipseGeometry,
1209
+ minHeightFunc,
1210
+ maxHeightFunc
1211
+ ) {
1212
+ const granularity = ellipseGeometry._granularity;
1213
+ const ellipsoid = ellipseGeometry._ellipsoid;
1214
+
1215
+ const minHeight = minHeightFunc(granularity, ellipsoid);
1216
+ const maxHeight = maxHeightFunc(granularity, ellipsoid);
1217
+
1218
+ return new EllipseGeometry({
1219
+ center: ellipseGeometry._center,
1220
+ semiMajorAxis: ellipseGeometry._semiMajorAxis,
1221
+ semiMinorAxis: ellipseGeometry._semiMinorAxis,
1222
+ ellipsoid: ellipsoid,
1223
+ rotation: ellipseGeometry._rotation,
1224
+ stRotation: ellipseGeometry._stRotation,
1225
+ granularity: granularity,
1226
+ extrudedHeight: minHeight,
1227
+ height: maxHeight,
1228
+ vertexFormat: VertexFormat.VertexFormat.POSITION_ONLY,
1229
+ shadowVolume: true,
1230
+ });
1231
+ };
1232
+
1233
+ function textureCoordinateRotationPoints(ellipseGeometry) {
1234
+ const stRotation = -ellipseGeometry._stRotation;
1235
+ if (stRotation === 0.0) {
1236
+ return [0, 0, 0, 1, 1, 0];
1237
+ }
1238
+
1239
+ const cep = EllipseGeometryLibrary.EllipseGeometryLibrary.computeEllipsePositions(
1240
+ {
1241
+ center: ellipseGeometry._center,
1242
+ semiMajorAxis: ellipseGeometry._semiMajorAxis,
1243
+ semiMinorAxis: ellipseGeometry._semiMinorAxis,
1244
+ rotation: ellipseGeometry._rotation,
1245
+ granularity: ellipseGeometry._granularity,
1246
+ },
1247
+ false,
1248
+ true
1249
+ );
1250
+ const positionsFlat = cep.outerPositions;
1251
+ const positionsCount = positionsFlat.length / 3;
1252
+ const positions = new Array(positionsCount);
1253
+ for (let i = 0; i < positionsCount; ++i) {
1254
+ positions[i] = Matrix3.Cartesian3.fromArray(positionsFlat, i * 3);
1255
+ }
1256
+
1257
+ const ellipsoid = ellipseGeometry._ellipsoid;
1258
+ const boundingRectangle = ellipseGeometry.rectangle;
1259
+ return GeometryAttribute.Geometry._textureCoordinateRotationPoints(
1260
+ positions,
1261
+ stRotation,
1262
+ ellipsoid,
1263
+ boundingRectangle
1264
+ );
1265
+ }
1266
+
1267
+ Object.defineProperties(EllipseGeometry.prototype, {
1268
+ /**
1269
+ * @private
1270
+ */
1271
+ rectangle: {
1272
+ get: function () {
1273
+ if (!defaultValue.defined(this._rectangle)) {
1274
+ this._rectangle = computeRectangle(
1275
+ this._center,
1276
+ this._semiMajorAxis,
1277
+ this._semiMinorAxis,
1278
+ this._rotation,
1279
+ this._granularity,
1280
+ this._ellipsoid
1281
+ );
1282
+ }
1283
+ return this._rectangle;
1284
+ },
1285
+ },
1286
+ /**
1287
+ * For remapping texture coordinates when rendering EllipseGeometries as GroundPrimitives.
1288
+ * @private
1289
+ */
1290
+ textureCoordinateRotationPoints: {
1291
+ get: function () {
1292
+ if (!defaultValue.defined(this._textureCoordinateRotationPoints)) {
1293
+ this._textureCoordinateRotationPoints = textureCoordinateRotationPoints(
1294
+ this
1295
+ );
1296
+ }
1297
+ return this._textureCoordinateRotationPoints;
1298
+ },
1299
+ },
1300
+ });
1301
+
1302
+ exports.EllipseGeometry = EllipseGeometry;
1303
+
1304
+ }));