@itwin/core-frontend 5.11.0-dev.9 → 5.11.0

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 (429) hide show
  1. package/CHANGELOG.md +32 -1
  2. package/lib/cjs/AccuDraw.d.ts +2 -0
  3. package/lib/cjs/AccuDraw.d.ts.map +1 -1
  4. package/lib/cjs/AccuDraw.js +9 -1
  5. package/lib/cjs/AccuDraw.js.map +1 -1
  6. package/lib/cjs/BingLocation.d.ts +4 -0
  7. package/lib/cjs/BingLocation.d.ts.map +1 -1
  8. package/lib/cjs/BingLocation.js +6 -1
  9. package/lib/cjs/BingLocation.js.map +1 -1
  10. package/lib/cjs/CesiumAccessClient.d.ts +52 -0
  11. package/lib/cjs/CesiumAccessClient.d.ts.map +1 -0
  12. package/lib/cjs/CesiumAccessClient.js +10 -0
  13. package/lib/cjs/CesiumAccessClient.js.map +1 -0
  14. package/lib/cjs/DisplayStyleState.js +2 -2
  15. package/lib/cjs/DisplayStyleState.js.map +1 -1
  16. package/lib/cjs/GeoProviders.d.ts +45 -0
  17. package/lib/cjs/GeoProviders.d.ts.map +1 -0
  18. package/lib/cjs/GeoProviders.js +49 -0
  19. package/lib/cjs/GeoProviders.js.map +1 -0
  20. package/lib/cjs/GraphicalEditingScope.d.ts +22 -1
  21. package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
  22. package/lib/cjs/GraphicalEditingScope.js +27 -1
  23. package/lib/cjs/GraphicalEditingScope.js.map +1 -1
  24. package/lib/cjs/HitDetail.d.ts +1 -1
  25. package/lib/cjs/HitDetail.d.ts.map +1 -1
  26. package/lib/cjs/HitDetail.js +10 -7
  27. package/lib/cjs/HitDetail.js.map +1 -1
  28. package/lib/cjs/IModelApp.d.ts +33 -0
  29. package/lib/cjs/IModelApp.d.ts.map +1 -1
  30. package/lib/cjs/IModelApp.js +33 -0
  31. package/lib/cjs/IModelApp.js.map +1 -1
  32. package/lib/cjs/IModelConnection.d.ts +9 -9
  33. package/lib/cjs/IModelConnection.d.ts.map +1 -1
  34. package/lib/cjs/IModelConnection.js +21 -14
  35. package/lib/cjs/IModelConnection.js.map +1 -1
  36. package/lib/cjs/IpcApp.d.ts +1 -1
  37. package/lib/cjs/IpcApp.js +1 -1
  38. package/lib/cjs/IpcApp.js.map +1 -1
  39. package/lib/cjs/NativeApp.d.ts.map +1 -1
  40. package/lib/cjs/NativeApp.js +1 -3
  41. package/lib/cjs/NativeApp.js.map +1 -1
  42. package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.d.ts +1 -1
  43. package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.d.ts.map +1 -1
  44. package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js +23 -5
  45. package/lib/cjs/RealityDataSourceCesiumIonAssetImpl.js.map +1 -1
  46. package/lib/cjs/SelectionSet.d.ts +7 -7
  47. package/lib/cjs/SelectionSet.js +3 -3
  48. package/lib/cjs/SelectionSet.js.map +1 -1
  49. package/lib/cjs/SubCategoriesCache.d.ts +15 -3
  50. package/lib/cjs/SubCategoriesCache.d.ts.map +1 -1
  51. package/lib/cjs/SubCategoriesCache.js +98 -26
  52. package/lib/cjs/SubCategoriesCache.js.map +1 -1
  53. package/lib/cjs/ViewGlobalLocation.d.ts +1 -1
  54. package/lib/cjs/ViewGlobalLocation.d.ts.map +1 -1
  55. package/lib/cjs/ViewGlobalLocation.js +3 -6
  56. package/lib/cjs/ViewGlobalLocation.js.map +1 -1
  57. package/lib/cjs/ViewState.d.ts +1 -1
  58. package/lib/cjs/ViewState.js +1 -1
  59. package/lib/cjs/ViewState.js.map +1 -1
  60. package/lib/cjs/Viewport.d.ts +5 -4
  61. package/lib/cjs/Viewport.d.ts.map +1 -1
  62. package/lib/cjs/Viewport.js +16 -4
  63. package/lib/cjs/Viewport.js.map +1 -1
  64. package/lib/cjs/core-frontend.d.ts +3 -0
  65. package/lib/cjs/core-frontend.d.ts.map +1 -1
  66. package/lib/cjs/core-frontend.js +4 -0
  67. package/lib/cjs/core-frontend.js.map +1 -1
  68. package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
  69. package/lib/cjs/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
  70. package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js +1 -1
  71. package/lib/cjs/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
  72. package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts +2 -2
  73. package/lib/cjs/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
  74. package/lib/cjs/internal/render/webgl/AttributeBuffers.js +2 -2
  75. package/lib/cjs/internal/render/webgl/AttributeBuffers.js.map +1 -1
  76. package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts +1 -1
  77. package/lib/cjs/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
  78. package/lib/cjs/internal/render/webgl/ClippingProgram.js +1 -1
  79. package/lib/cjs/internal/render/webgl/ClippingProgram.js.map +1 -1
  80. package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts +2 -2
  81. package/lib/cjs/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
  82. package/lib/cjs/internal/render/webgl/ShaderProgram.js +2 -2
  83. package/lib/cjs/internal/render/webgl/ShaderProgram.js.map +1 -1
  84. package/lib/cjs/internal/render/webgl/Technique.d.ts +3 -3
  85. package/lib/cjs/internal/render/webgl/Technique.d.ts.map +1 -1
  86. package/lib/cjs/internal/render/webgl/Technique.js +3 -3
  87. package/lib/cjs/internal/render/webgl/Technique.js.map +1 -1
  88. package/lib/cjs/internal/tile/DynamicIModelTile.d.ts +3 -3
  89. package/lib/cjs/internal/tile/DynamicIModelTile.d.ts.map +1 -1
  90. package/lib/cjs/internal/tile/DynamicIModelTile.js +26 -6
  91. package/lib/cjs/internal/tile/DynamicIModelTile.js.map +1 -1
  92. package/lib/cjs/internal/tile/IModelTileTree.d.ts.map +1 -1
  93. package/lib/cjs/internal/tile/IModelTileTree.js +4 -2
  94. package/lib/cjs/internal/tile/IModelTileTree.js.map +1 -1
  95. package/lib/cjs/internal/tile/RealityModelTileTree.d.ts +1 -1
  96. package/lib/cjs/internal/tile/RealityModelTileTree.d.ts.map +1 -1
  97. package/lib/cjs/internal/tile/RealityModelTileTree.js +7 -3
  98. package/lib/cjs/internal/tile/RealityModelTileTree.js.map +1 -1
  99. package/lib/cjs/internal/tile/RealityTileLoader.d.ts +22 -0
  100. package/lib/cjs/internal/tile/RealityTileLoader.d.ts.map +1 -1
  101. package/lib/cjs/internal/tile/RealityTileLoader.js +53 -5
  102. package/lib/cjs/internal/tile/RealityTileLoader.js.map +1 -1
  103. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
  104. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  105. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
  106. package/lib/cjs/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  107. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -1
  108. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
  109. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -1
  110. package/lib/cjs/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  111. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
  112. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
  113. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
  114. package/lib/cjs/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  115. package/lib/cjs/properties/AngleDescription.d.ts +2 -1
  116. package/lib/cjs/properties/AngleDescription.d.ts.map +1 -1
  117. package/lib/cjs/properties/AngleDescription.js +4 -1
  118. package/lib/cjs/properties/AngleDescription.js.map +1 -1
  119. package/lib/cjs/properties/FormattedQuantityDescription.d.ts +29 -1
  120. package/lib/cjs/properties/FormattedQuantityDescription.d.ts.map +1 -1
  121. package/lib/cjs/properties/FormattedQuantityDescription.js +35 -0
  122. package/lib/cjs/properties/FormattedQuantityDescription.js.map +1 -1
  123. package/lib/cjs/properties/LengthDescription.d.ts +6 -3
  124. package/lib/cjs/properties/LengthDescription.d.ts.map +1 -1
  125. package/lib/cjs/properties/LengthDescription.js +12 -3
  126. package/lib/cjs/properties/LengthDescription.js.map +1 -1
  127. package/lib/cjs/render/Decorations.d.ts +1 -1
  128. package/lib/cjs/render/Decorations.d.ts.map +1 -1
  129. package/lib/cjs/render/Decorations.js +1 -1
  130. package/lib/cjs/render/Decorations.js.map +1 -1
  131. package/lib/cjs/render/GraphicBranch.d.ts +1 -1
  132. package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
  133. package/lib/cjs/render/GraphicBranch.js +1 -1
  134. package/lib/cjs/render/GraphicBranch.js.map +1 -1
  135. package/lib/cjs/render/RenderSystem.d.ts +2 -2
  136. package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
  137. package/lib/cjs/render/RenderSystem.js +1 -1
  138. package/lib/cjs/render/RenderSystem.js.map +1 -1
  139. package/lib/cjs/render/ScreenSpaceEffectBuilder.d.ts +1 -1
  140. package/lib/cjs/render/ScreenSpaceEffectBuilder.js.map +1 -1
  141. package/lib/cjs/request/Request.d.ts +2 -2
  142. package/lib/cjs/request/Request.js.map +1 -1
  143. package/lib/cjs/tile/RealityTile.d.ts +5 -0
  144. package/lib/cjs/tile/RealityTile.d.ts.map +1 -1
  145. package/lib/cjs/tile/RealityTile.js +4 -0
  146. package/lib/cjs/tile/RealityTile.js.map +1 -1
  147. package/lib/cjs/tile/Tile.d.ts +1 -1
  148. package/lib/cjs/tile/Tile.d.ts.map +1 -1
  149. package/lib/cjs/tile/Tile.js +1 -1
  150. package/lib/cjs/tile/Tile.js.map +1 -1
  151. package/lib/cjs/tile/TileAdmin.d.ts +23 -1
  152. package/lib/cjs/tile/TileAdmin.d.ts.map +1 -1
  153. package/lib/cjs/tile/TileAdmin.js +17 -1
  154. package/lib/cjs/tile/TileAdmin.js.map +1 -1
  155. package/lib/cjs/tile/TileTree.d.ts +1 -1
  156. package/lib/cjs/tile/TileTree.d.ts.map +1 -1
  157. package/lib/cjs/tile/TileTree.js +1 -1
  158. package/lib/cjs/tile/TileTree.js.map +1 -1
  159. package/lib/cjs/tile/TileTreeReference.d.ts +1 -1
  160. package/lib/cjs/tile/TileTreeReference.d.ts.map +1 -1
  161. package/lib/cjs/tile/TileTreeReference.js +1 -1
  162. package/lib/cjs/tile/TileTreeReference.js.map +1 -1
  163. package/lib/cjs/tile/map/BingElevation.d.ts +16 -4
  164. package/lib/cjs/tile/map/BingElevation.d.ts.map +1 -1
  165. package/lib/cjs/tile/map/BingElevation.js +18 -8
  166. package/lib/cjs/tile/map/BingElevation.js.map +1 -1
  167. package/lib/cjs/tile/map/CesiumTerrainProvider.d.ts +16 -1
  168. package/lib/cjs/tile/map/CesiumTerrainProvider.d.ts.map +1 -1
  169. package/lib/cjs/tile/map/CesiumTerrainProvider.js +58 -18
  170. package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
  171. package/lib/cjs/tile/map/ImageryTileTree.d.ts +2 -2
  172. package/lib/cjs/tile/map/ImageryTileTree.d.ts.map +1 -1
  173. package/lib/cjs/tile/map/ImageryTileTree.js +2 -2
  174. package/lib/cjs/tile/map/ImageryTileTree.js.map +1 -1
  175. package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts +6 -1
  176. package/lib/cjs/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
  177. package/lib/cjs/tile/map/MapLayerFormatRegistry.js.map +1 -1
  178. package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts +1 -0
  179. package/lib/cjs/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
  180. package/lib/cjs/tile/map/MapLayerImageryFormats.js +3 -0
  181. package/lib/cjs/tile/map/MapLayerImageryFormats.js.map +1 -1
  182. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts +1 -1
  183. package/lib/cjs/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  184. package/lib/cjs/tile/map/MapLayerImageryProvider.js +1 -1
  185. package/lib/cjs/tile/map/MapLayerImageryProvider.js.map +1 -1
  186. package/lib/cjs/tile/map/MapTileTree.d.ts +1 -1
  187. package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
  188. package/lib/cjs/tile/map/MapTileTree.js +20 -9
  189. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  190. package/lib/cjs/tile/map/TerrainMeshProvider.d.ts +7 -1
  191. package/lib/cjs/tile/map/TerrainMeshProvider.d.ts.map +1 -1
  192. package/lib/cjs/tile/map/TerrainMeshProvider.js +1 -1
  193. package/lib/cjs/tile/map/TerrainMeshProvider.js.map +1 -1
  194. package/lib/cjs/tools/AccuDrawShortcutTool.d.ts +29 -0
  195. package/lib/cjs/tools/AccuDrawShortcutTool.d.ts.map +1 -0
  196. package/lib/cjs/tools/AccuDrawShortcutTool.js +139 -0
  197. package/lib/cjs/tools/AccuDrawShortcutTool.js.map +1 -0
  198. package/lib/cjs/tools/AccuDrawTool.d.ts +13 -68
  199. package/lib/cjs/tools/AccuDrawTool.d.ts.map +1 -1
  200. package/lib/cjs/tools/AccuDrawTool.js +103 -129
  201. package/lib/cjs/tools/AccuDrawTool.js.map +1 -1
  202. package/lib/cjs/tools/SetupCameraTools.d.ts +89 -0
  203. package/lib/cjs/tools/SetupCameraTools.d.ts.map +1 -0
  204. package/lib/cjs/tools/SetupCameraTools.js +444 -0
  205. package/lib/cjs/tools/SetupCameraTools.js.map +1 -0
  206. package/lib/cjs/tools/ToolAdmin.d.ts +5 -2
  207. package/lib/cjs/tools/ToolAdmin.d.ts.map +1 -1
  208. package/lib/cjs/tools/ToolAdmin.js +30 -7
  209. package/lib/cjs/tools/ToolAdmin.js.map +1 -1
  210. package/lib/cjs/tools/ViewTool.d.ts +1 -81
  211. package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
  212. package/lib/cjs/tools/ViewTool.js +13 -410
  213. package/lib/cjs/tools/ViewTool.js.map +1 -1
  214. package/lib/esm/AccuDraw.d.ts +2 -0
  215. package/lib/esm/AccuDraw.d.ts.map +1 -1
  216. package/lib/esm/AccuDraw.js +9 -1
  217. package/lib/esm/AccuDraw.js.map +1 -1
  218. package/lib/esm/BingLocation.d.ts +4 -0
  219. package/lib/esm/BingLocation.d.ts.map +1 -1
  220. package/lib/esm/BingLocation.js +6 -1
  221. package/lib/esm/BingLocation.js.map +1 -1
  222. package/lib/esm/CesiumAccessClient.d.ts +52 -0
  223. package/lib/esm/CesiumAccessClient.d.ts.map +1 -0
  224. package/lib/esm/CesiumAccessClient.js +9 -0
  225. package/lib/esm/CesiumAccessClient.js.map +1 -0
  226. package/lib/esm/DisplayStyleState.js +2 -2
  227. package/lib/esm/DisplayStyleState.js.map +1 -1
  228. package/lib/esm/GeoProviders.d.ts +45 -0
  229. package/lib/esm/GeoProviders.d.ts.map +1 -0
  230. package/lib/esm/GeoProviders.js +45 -0
  231. package/lib/esm/GeoProviders.js.map +1 -0
  232. package/lib/esm/GraphicalEditingScope.d.ts +22 -1
  233. package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
  234. package/lib/esm/GraphicalEditingScope.js +27 -1
  235. package/lib/esm/GraphicalEditingScope.js.map +1 -1
  236. package/lib/esm/HitDetail.d.ts +1 -1
  237. package/lib/esm/HitDetail.d.ts.map +1 -1
  238. package/lib/esm/HitDetail.js +11 -8
  239. package/lib/esm/HitDetail.js.map +1 -1
  240. package/lib/esm/IModelApp.d.ts +33 -0
  241. package/lib/esm/IModelApp.d.ts.map +1 -1
  242. package/lib/esm/IModelApp.js +34 -1
  243. package/lib/esm/IModelApp.js.map +1 -1
  244. package/lib/esm/IModelConnection.d.ts +9 -9
  245. package/lib/esm/IModelConnection.d.ts.map +1 -1
  246. package/lib/esm/IModelConnection.js +21 -14
  247. package/lib/esm/IModelConnection.js.map +1 -1
  248. package/lib/esm/IpcApp.d.ts +1 -1
  249. package/lib/esm/IpcApp.js +1 -1
  250. package/lib/esm/IpcApp.js.map +1 -1
  251. package/lib/esm/NativeApp.d.ts.map +1 -1
  252. package/lib/esm/NativeApp.js +1 -3
  253. package/lib/esm/NativeApp.js.map +1 -1
  254. package/lib/esm/RealityDataSourceCesiumIonAssetImpl.d.ts +1 -1
  255. package/lib/esm/RealityDataSourceCesiumIonAssetImpl.d.ts.map +1 -1
  256. package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js +24 -6
  257. package/lib/esm/RealityDataSourceCesiumIonAssetImpl.js.map +1 -1
  258. package/lib/esm/SelectionSet.d.ts +7 -7
  259. package/lib/esm/SelectionSet.js +3 -3
  260. package/lib/esm/SelectionSet.js.map +1 -1
  261. package/lib/esm/SubCategoriesCache.d.ts +15 -3
  262. package/lib/esm/SubCategoriesCache.d.ts.map +1 -1
  263. package/lib/esm/SubCategoriesCache.js +99 -27
  264. package/lib/esm/SubCategoriesCache.js.map +1 -1
  265. package/lib/esm/ViewGlobalLocation.d.ts +1 -1
  266. package/lib/esm/ViewGlobalLocation.d.ts.map +1 -1
  267. package/lib/esm/ViewGlobalLocation.js +3 -6
  268. package/lib/esm/ViewGlobalLocation.js.map +1 -1
  269. package/lib/esm/ViewState.d.ts +1 -1
  270. package/lib/esm/ViewState.js +1 -1
  271. package/lib/esm/ViewState.js.map +1 -1
  272. package/lib/esm/Viewport.d.ts +5 -4
  273. package/lib/esm/Viewport.d.ts.map +1 -1
  274. package/lib/esm/Viewport.js +16 -4
  275. package/lib/esm/Viewport.js.map +1 -1
  276. package/lib/esm/core-frontend.d.ts +3 -0
  277. package/lib/esm/core-frontend.d.ts.map +1 -1
  278. package/lib/esm/core-frontend.js +6 -1
  279. package/lib/esm/core-frontend.js.map +1 -1
  280. package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts +1 -1
  281. package/lib/esm/internal/render/webgl/AtmosphereUniforms.d.ts.map +1 -1
  282. package/lib/esm/internal/render/webgl/AtmosphereUniforms.js +1 -1
  283. package/lib/esm/internal/render/webgl/AtmosphereUniforms.js.map +1 -1
  284. package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts +2 -2
  285. package/lib/esm/internal/render/webgl/AttributeBuffers.d.ts.map +1 -1
  286. package/lib/esm/internal/render/webgl/AttributeBuffers.js +2 -2
  287. package/lib/esm/internal/render/webgl/AttributeBuffers.js.map +1 -1
  288. package/lib/esm/internal/render/webgl/ClippingProgram.d.ts +1 -1
  289. package/lib/esm/internal/render/webgl/ClippingProgram.d.ts.map +1 -1
  290. package/lib/esm/internal/render/webgl/ClippingProgram.js +1 -1
  291. package/lib/esm/internal/render/webgl/ClippingProgram.js.map +1 -1
  292. package/lib/esm/internal/render/webgl/ShaderProgram.d.ts +2 -2
  293. package/lib/esm/internal/render/webgl/ShaderProgram.d.ts.map +1 -1
  294. package/lib/esm/internal/render/webgl/ShaderProgram.js +2 -2
  295. package/lib/esm/internal/render/webgl/ShaderProgram.js.map +1 -1
  296. package/lib/esm/internal/render/webgl/Technique.d.ts +3 -3
  297. package/lib/esm/internal/render/webgl/Technique.d.ts.map +1 -1
  298. package/lib/esm/internal/render/webgl/Technique.js +3 -3
  299. package/lib/esm/internal/render/webgl/Technique.js.map +1 -1
  300. package/lib/esm/internal/tile/DynamicIModelTile.d.ts +3 -3
  301. package/lib/esm/internal/tile/DynamicIModelTile.d.ts.map +1 -1
  302. package/lib/esm/internal/tile/DynamicIModelTile.js +26 -6
  303. package/lib/esm/internal/tile/DynamicIModelTile.js.map +1 -1
  304. package/lib/esm/internal/tile/IModelTileTree.d.ts.map +1 -1
  305. package/lib/esm/internal/tile/IModelTileTree.js +4 -2
  306. package/lib/esm/internal/tile/IModelTileTree.js.map +1 -1
  307. package/lib/esm/internal/tile/RealityModelTileTree.d.ts +1 -1
  308. package/lib/esm/internal/tile/RealityModelTileTree.d.ts.map +1 -1
  309. package/lib/esm/internal/tile/RealityModelTileTree.js +7 -3
  310. package/lib/esm/internal/tile/RealityModelTileTree.js.map +1 -1
  311. package/lib/esm/internal/tile/RealityTileLoader.d.ts +22 -0
  312. package/lib/esm/internal/tile/RealityTileLoader.d.ts.map +1 -1
  313. package/lib/esm/internal/tile/RealityTileLoader.js +54 -6
  314. package/lib/esm/internal/tile/RealityTileLoader.js.map +1 -1
  315. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts +1 -1
  316. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.d.ts.map +1 -1
  317. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js +1 -1
  318. package/lib/esm/internal/tile/map/ImageryProviders/ArcGISMapLayerImageryProvider.js.map +1 -1
  319. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts +2 -1
  320. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.d.ts.map +1 -1
  321. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js +2 -1
  322. package/lib/esm/internal/tile/map/ImageryProviders/BingImageryProvider.js.map +1 -1
  323. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts +1 -1
  324. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.d.ts.map +1 -1
  325. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js +1 -1
  326. package/lib/esm/internal/tile/map/ImageryProviders/MapBoxLayerImageryProvider.js.map +1 -1
  327. package/lib/esm/properties/AngleDescription.d.ts +2 -1
  328. package/lib/esm/properties/AngleDescription.d.ts.map +1 -1
  329. package/lib/esm/properties/AngleDescription.js +4 -1
  330. package/lib/esm/properties/AngleDescription.js.map +1 -1
  331. package/lib/esm/properties/FormattedQuantityDescription.d.ts +29 -1
  332. package/lib/esm/properties/FormattedQuantityDescription.d.ts.map +1 -1
  333. package/lib/esm/properties/FormattedQuantityDescription.js +35 -1
  334. package/lib/esm/properties/FormattedQuantityDescription.js.map +1 -1
  335. package/lib/esm/properties/LengthDescription.d.ts +6 -3
  336. package/lib/esm/properties/LengthDescription.d.ts.map +1 -1
  337. package/lib/esm/properties/LengthDescription.js +12 -3
  338. package/lib/esm/properties/LengthDescription.js.map +1 -1
  339. package/lib/esm/render/Decorations.d.ts +1 -1
  340. package/lib/esm/render/Decorations.d.ts.map +1 -1
  341. package/lib/esm/render/Decorations.js +1 -1
  342. package/lib/esm/render/Decorations.js.map +1 -1
  343. package/lib/esm/render/GraphicBranch.d.ts +1 -1
  344. package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
  345. package/lib/esm/render/GraphicBranch.js +1 -1
  346. package/lib/esm/render/GraphicBranch.js.map +1 -1
  347. package/lib/esm/render/RenderSystem.d.ts +2 -2
  348. package/lib/esm/render/RenderSystem.d.ts.map +1 -1
  349. package/lib/esm/render/RenderSystem.js +1 -1
  350. package/lib/esm/render/RenderSystem.js.map +1 -1
  351. package/lib/esm/render/ScreenSpaceEffectBuilder.d.ts +1 -1
  352. package/lib/esm/render/ScreenSpaceEffectBuilder.js.map +1 -1
  353. package/lib/esm/request/Request.d.ts +2 -2
  354. package/lib/esm/request/Request.js.map +1 -1
  355. package/lib/esm/tile/RealityTile.d.ts +5 -0
  356. package/lib/esm/tile/RealityTile.d.ts.map +1 -1
  357. package/lib/esm/tile/RealityTile.js +4 -0
  358. package/lib/esm/tile/RealityTile.js.map +1 -1
  359. package/lib/esm/tile/Tile.d.ts +1 -1
  360. package/lib/esm/tile/Tile.d.ts.map +1 -1
  361. package/lib/esm/tile/Tile.js +1 -1
  362. package/lib/esm/tile/Tile.js.map +1 -1
  363. package/lib/esm/tile/TileAdmin.d.ts +23 -1
  364. package/lib/esm/tile/TileAdmin.d.ts.map +1 -1
  365. package/lib/esm/tile/TileAdmin.js +17 -1
  366. package/lib/esm/tile/TileAdmin.js.map +1 -1
  367. package/lib/esm/tile/TileTree.d.ts +1 -1
  368. package/lib/esm/tile/TileTree.d.ts.map +1 -1
  369. package/lib/esm/tile/TileTree.js +1 -1
  370. package/lib/esm/tile/TileTree.js.map +1 -1
  371. package/lib/esm/tile/TileTreeReference.d.ts +1 -1
  372. package/lib/esm/tile/TileTreeReference.d.ts.map +1 -1
  373. package/lib/esm/tile/TileTreeReference.js +1 -1
  374. package/lib/esm/tile/TileTreeReference.js.map +1 -1
  375. package/lib/esm/tile/map/BingElevation.d.ts +16 -4
  376. package/lib/esm/tile/map/BingElevation.d.ts.map +1 -1
  377. package/lib/esm/tile/map/BingElevation.js +18 -8
  378. package/lib/esm/tile/map/BingElevation.js.map +1 -1
  379. package/lib/esm/tile/map/CesiumTerrainProvider.d.ts +16 -1
  380. package/lib/esm/tile/map/CesiumTerrainProvider.d.ts.map +1 -1
  381. package/lib/esm/tile/map/CesiumTerrainProvider.js +56 -18
  382. package/lib/esm/tile/map/CesiumTerrainProvider.js.map +1 -1
  383. package/lib/esm/tile/map/ImageryTileTree.d.ts +2 -2
  384. package/lib/esm/tile/map/ImageryTileTree.d.ts.map +1 -1
  385. package/lib/esm/tile/map/ImageryTileTree.js +2 -2
  386. package/lib/esm/tile/map/ImageryTileTree.js.map +1 -1
  387. package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts +6 -1
  388. package/lib/esm/tile/map/MapLayerFormatRegistry.d.ts.map +1 -1
  389. package/lib/esm/tile/map/MapLayerFormatRegistry.js.map +1 -1
  390. package/lib/esm/tile/map/MapLayerImageryFormats.d.ts +1 -0
  391. package/lib/esm/tile/map/MapLayerImageryFormats.d.ts.map +1 -1
  392. package/lib/esm/tile/map/MapLayerImageryFormats.js +3 -0
  393. package/lib/esm/tile/map/MapLayerImageryFormats.js.map +1 -1
  394. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts +1 -1
  395. package/lib/esm/tile/map/MapLayerImageryProvider.d.ts.map +1 -1
  396. package/lib/esm/tile/map/MapLayerImageryProvider.js +1 -1
  397. package/lib/esm/tile/map/MapLayerImageryProvider.js.map +1 -1
  398. package/lib/esm/tile/map/MapTileTree.d.ts +1 -1
  399. package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
  400. package/lib/esm/tile/map/MapTileTree.js +21 -10
  401. package/lib/esm/tile/map/MapTileTree.js.map +1 -1
  402. package/lib/esm/tile/map/TerrainMeshProvider.d.ts +7 -1
  403. package/lib/esm/tile/map/TerrainMeshProvider.d.ts.map +1 -1
  404. package/lib/esm/tile/map/TerrainMeshProvider.js +1 -1
  405. package/lib/esm/tile/map/TerrainMeshProvider.js.map +1 -1
  406. package/lib/esm/tools/AccuDrawShortcutTool.d.ts +29 -0
  407. package/lib/esm/tools/AccuDrawShortcutTool.d.ts.map +1 -0
  408. package/lib/esm/tools/AccuDrawShortcutTool.js +134 -0
  409. package/lib/esm/tools/AccuDrawShortcutTool.js.map +1 -0
  410. package/lib/esm/tools/AccuDrawTool.d.ts +13 -68
  411. package/lib/esm/tools/AccuDrawTool.d.ts.map +1 -1
  412. package/lib/esm/tools/AccuDrawTool.js +102 -128
  413. package/lib/esm/tools/AccuDrawTool.js.map +1 -1
  414. package/lib/esm/tools/SetupCameraTools.d.ts +89 -0
  415. package/lib/esm/tools/SetupCameraTools.d.ts.map +1 -0
  416. package/lib/esm/tools/SetupCameraTools.js +439 -0
  417. package/lib/esm/tools/SetupCameraTools.js.map +1 -0
  418. package/lib/esm/tools/ToolAdmin.d.ts +5 -2
  419. package/lib/esm/tools/ToolAdmin.d.ts.map +1 -1
  420. package/lib/esm/tools/ToolAdmin.js +30 -7
  421. package/lib/esm/tools/ToolAdmin.js.map +1 -1
  422. package/lib/esm/tools/ViewTool.d.ts +1 -81
  423. package/lib/esm/tools/ViewTool.d.ts.map +1 -1
  424. package/lib/esm/tools/ViewTool.js +14 -409
  425. package/lib/esm/tools/ViewTool.js.map +1 -1
  426. package/lib/public/locales/en/iModelJs.json +2 -1
  427. package/lib/public/scripts/parse-imdl-worker.js +1 -1
  428. package/lib/workers/webpack/parse-imdl-worker.js +1 -1
  429. package/package.json +24 -23
@@ -1 +1 @@
1
- {"version":3,"file":"TileTree.js","sourceRoot":"","sources":["../../../src/tile/TileTree.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,WAAW,EAAE,OAAO,EAAc,MAAM,qBAAqB,CAAC;AAGnF,OAAO,EAAE,oCAAoC,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC;;;;GAIG;AACH,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,0DAA0D;IAC1D,qEAAS,CAAA;IACT,uDAAuD;IACvD,iEAAO,CAAA;IACP,kDAAkD;IAClD,+DAAM,CAAA;IACN,+CAA+C;IAC/C,mEAAQ,CAAA;AACV,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAgB,QAAQ;IACpB,WAAW,GAAG,KAAK,CAAC;IAC5B,gBAAgB;IACN,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IAC5C,gBAAgB;IACN,WAAW,CAAoB;IACzB,MAAM,CAAmB;IACzC,yFAAyF;IACzE,eAAe,CAAY;IAC3C,2FAA2F;IAC3E,EAAE,CAAS;IAC3B;;;OAGG;IACa,OAAO,CAAa;IACpC,qIAAqI;IACrH,cAAc,CAAa;IAC3C,gBAAgB;IAChB,IAAW,YAAY,KAAuB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACzD,aAAa,CAAmB;IACjD,0FAA0F;IAC1E,YAAY,CAAuB;IAYnD,kGAAkG;IAClG,IAAW,kBAAkB;QAC3B,OAAO,KAAK,CAAC;IACf,CAAC;IAWD,mDAAmD;IACnD,IAAW,IAAI,KAAc,OAAO,CAAC,IAAI,CAAC,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CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QACjE,MAAM,MAAM,GAAG,KAAK,CAAC,eAAe,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QACjD,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrD,MAAM,QAAQ,GAAG,MAAM,oCAAoC,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACjF,QAAQ,GAAG,QAAQ,EAAE,OAAO,EAAE,CAAC;QACjC,CAAC;QACD,IAAI,CAAC,QAAQ;YACX,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QAErD,OAAO,QAAQ,CAAC,0BAA0B,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACI,mBAAmB,CAAC,UAAiC;IAC5D,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,wBAAwB,CAAC,QAAyC,IAAkB,CAAC;IAClG;;;;OAIG;IACI,0BAA0B,KAAU,CAAC;CAC7C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { BeDuration, BeTimePoint, dispose, Id64String } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FrustumPlanes, RenderSchedule, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { calculateEcefToDbTransformAtLocation } from \"../BackgroundMapGeometry\";\nimport { IModelApp } from \"../IModelApp\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { LayerTileTreeHandler, Tile, TileDrawArgs, TileGeometryCollector, TileLoadPriority, TileTreeParams } from \"./internal\";\n\n/** Describes the current state of a [[TileTree]]. TileTrees are loaded asynchronously and may be unloaded after a period of disuse.\n * @see [[TileTreeOwner]].\n * @public\n * @extensions\n */\nexport enum TileTreeLoadStatus {\n /** No attempt to load the tile tree has yet been made. */\n NotLoaded,\n /** The tile tree is in the process of being loaded. */\n Loading,\n /** The tile tree has been successfully loaded. */\n Loaded,\n /** An attempt to load the tile tree failed. */\n NotFound,\n}\n\n/** A hierarchical level-of-detail tree of [3d Tiles](https://github.com/CesiumGS/3d-tiles) to be rendered in a [[Viewport]].\n * Tile trees originate from a variety of sources:\n * - Each [[GeometricModelState]] can supply its graphics as a tile tree;\n * - A [[DisplayStyleState]]'s map settings or reality models;\n * - [ViewAttachment]($backend)s in a [[SheetModelState]];\n * - [[TiledGraphicsProvider]]s associated with a viewport.\n *\n * The same TileTree can be displayed in any number of viewports using multiple [[TileTreeReference]]s.\n * A TileTree's lifetime is managed by a [[TileTreeOwner]].\n *\n * @note Some methods carry a warning that they should **not** be overridden by subclasses; typically a protected method exists that can be\n * overridden instead to customize the behavior. For example, [[selectTiles]] should not be overridden; instead, override the[[_selectTiles]] method\n * that it calls.\n * @public\n * @extensions\n */\nexport abstract class TileTree {\n private _isDisposed = false;\n /** @internal */\n protected _lastSelected = BeTimePoint.now();\n /** @internal */\n protected _clipVolume?: RenderClipVolume;\n public readonly iModel: IModelConnection;\n /** Transform from this tile tree's coordinate space to the iModel's coordinate space. */\n public readonly iModelTransform: Transform;\n /** Uniquely identifies this tree among all other tile trees associated with the iModel. */\n public readonly id: string;\n /** A 64-bit identifier for this tile tree, unique within the context of its [[IModelConnection]].\n * For a tile tree associated with a [[GeometricModelState]], this is the Id of the model. Other types of tile trees\n * typically use a transient Id obtained from [[IModelConnection.transientIds]].\n */\n public readonly modelId: Id64String;\n /** The length of time after which tiles belonging to this tree are considered elegible for disposal if they are no longer in use. */\n public readonly expirationTime: BeDuration;\n /** @internal */\n public get loadPriority(): TileLoadPriority { return this._loadPriority; }\n private readonly _loadPriority: TileLoadPriority;\n /** Optional tight bounding box around the entire contents of all of this tree's tiles. */\n public readonly contentRange?: ElementAlignedBox3d;\n\n /** The lowest-resolution tile in this tree. */\n public abstract get rootTile(): Tile;\n /** True if this tile tree contains 3d graphics. */\n public abstract get is3d(): boolean;\n /** Returns the maximum depth of this tree, if any. */\n public abstract get maxDepth(): number | undefined;\n\n /** The overrides that should be applied to the view's [ViewFlags]($common) when this tile tree is drawn. Can be overridden by individual [[TileTreeReference]]s. */\n public abstract get viewFlagOverrides(): ViewFlagOverrides;\n\n /** True if this tile tree has no bounds - e.g., a tile tree representing a globe is unbounded. */\n public get isContentUnbounded(): boolean {\n return false;\n }\n\n /** Implement this method to select tiles of appropriate resolution. */\n protected abstract _selectTiles(args: TileDrawArgs): Tile[];\n\n /** Produce graphics of appropriate resolution to be drawn in a [[Viewport]]. */\n public abstract draw(args: TileDrawArgs): void;\n\n /** Discard tiles and/or tile contents, presumably based on a least-recently-used and/or least-likely-to-be-needed criterion. */\n public abstract prune(): void;\n\n /** True if this tile tree contains 2d graphics. */\n public get is2d(): boolean { return !this.is3d; }\n /** @internal */\n public get isPointCloud(): boolean { return false; }\n /** @internal */\n public get clipVolume(): RenderClipVolume | undefined { return this._clipVolume; }\n\n /** The volume of space occupied by this tile tree. */\n public get range(): ElementAlignedBox3d { return this.rootTile.range; }\n /** The most recent time at which tiles [[selectTiles]] was called. */\n public get lastSelectedTime(): BeTimePoint { return this._lastSelected; }\n /** True if a tile and its child tiles should not be drawn simultaneously.\n * Default: true.\n */\n public get parentsAndChildrenExclusive(): boolean { return true; }\n\n /** @internal */\n public get layerHandler(): LayerTileTreeHandler | undefined { return undefined; }\n\n /** Constructor */\n protected constructor(params: TileTreeParams) {\n this._lastSelected = BeTimePoint.now();\n this.iModel = params.iModel;\n this.iModelTransform = params.location;\n this._clipVolume = params.clipVolume;\n this.modelId = params.modelId;\n this.id = params.id;\n this.contentRange = params.contentRange;\n\n const admin = IModelApp.tileAdmin;\n this._loadPriority = params.priority;\n this.expirationTime = params.expirationTime ?? admin.tileExpirationTime;\n }\n\n /** Selects tiles of appropriate resolution for some purpose like drawing to the screen, producing a shadow map, etc.\n * @note Do **not** override this method. Implement [[_selectTiles]].\n */\n public selectTiles(args: TileDrawArgs): Tile[] {\n this._lastSelected = BeTimePoint.now();\n const tiles = this._selectTiles(args);\n IModelApp.tileAdmin.addTilesForUser(args.context.viewport, tiles, args.readyTiles, args.touchedTiles);\n args.processSelectedTiles(tiles);\n return tiles;\n }\n\n /** True if [[dispose]] has been called on this tile tree. */\n public get isDisposed(): boolean { return this._isDisposed; }\n\n /** Dispose of this tree and any resources owned by it. This is typically invoked by a [[TileTreeOwner]]. */\n public [Symbol.dispose](): void {\n if (this.isDisposed)\n return;\n\n this._isDisposed = true;\n dispose(this.rootTile);\n }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n /** @internal */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n this.rootTile.collectStatistics(stats);\n }\n\n /** Returns the number of [[Tile]]s currently in memory belonging to this tree, primarily for debugging. */\n public countTiles(): number {\n return 1 + this.rootTile.countDescendants();\n }\n\n /** @internal */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, location: Transform, frustumPlanes?: FrustumPlanes): void {\n this.rootTile.extendRangeForContent(range, matrix, location, frustumPlanes);\n }\n\n /**\n * Return the transform from the tile tree's coordinate space to [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates.\n * If a geographic coordinate system is present then this transform will be calculated at the tile tree center.\n * @beta\n */\n public async getEcefTransform(): Promise<Transform | undefined> {\n if (!this.iModel.ecefLocation)\n return undefined;\n\n let dbToEcef: Transform | undefined;\n const range = this.contentRange ? this.contentRange : this.range;\n const center = range.localXYZToWorld(.5, .5, .5);\n if (center) {\n this.iModelTransform.multiplyPoint3d(center, center);\n const ecefToDb = await calculateEcefToDbTransformAtLocation(center, this.iModel);\n dbToEcef = ecefToDb?.inverse();\n }\n if (!dbToEcef)\n dbToEcef = this.iModel.ecefLocation.getTransform();\n\n return dbToEcef.multiplyTransformTransform(this.iModelTransform);\n }\n\n /** Populate [[TileGeometryCollector.polyfaces]] with geometry obtained from this tile tree's tiles satisfying the collector's criteria.\n * The base implementation does nothing.\n * @see [[TileTreeReference.createGeometryTreeReference]] to attempt to create a TileTree that can collect geometry.\n * @beta\n */\n public collectTileGeometry(_collector: TileGeometryCollector): void {\n }\n\n /**\n * Invoked when a schedule script is edited.\n * Override to handle updates for affected elements or timelines.\n *\n * @internal\n */\n public async onScheduleEditingChanged(_changes: RenderSchedule.EditingChanges[]): Promise<void> {}\n /**\n * Invoked when a schedule script is committed during editing.\n * Override in specific tile tree types to handle the change.\n * @internal\n */\n public onScheduleEditingCommitted(): void {}\n}\n\n"]}
1
+ {"version":3,"file":"TileTree.js","sourceRoot":"","sources":["../../../src/tile/TileTree.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAc,WAAW,EAAE,OAAO,EAAc,MAAM,qBAAqB,CAAC;AAGnF,OAAO,EAAE,oCAAoC,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMzC;;;;GAIG;AACH,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,0DAA0D;IAC1D,qEAAS,CAAA;IACT,uDAAuD;IACvD,iEAAO,CAAA;IACP,kDAAkD;IAClD,+DAAM,CAAA;IACN,+CAA+C;IAC/C,mEAAQ,CAAA;AACV,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAgB,QAAQ;IACpB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AK,CAAC,wBAAwB,CAAC,QAAyC,IAAkB,CAAC;IAClG;;;;OAIG;IACI,0BAA0B,KAAU,CAAC;CAC7C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { BeDuration, BeTimePoint, dispose, Id64String } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FrustumPlanes, RenderSchedule, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { calculateEcefToDbTransformAtLocation } from \"../BackgroundMapGeometry\";\nimport { IModelApp } from \"../IModelApp\";\nimport { IModelConnection } from \"../IModelConnection\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { LayerTileTreeHandler, Tile, TileDrawArgs, TileGeometryCollector, TileLoadPriority, TileTreeParams } from \"./internal\";\n\n/** Describes the current state of a [[TileTree]]. TileTrees are loaded asynchronously and may be unloaded after a period of disuse.\n * @see [[TileTreeOwner]].\n * @public\n * @extensions\n */\nexport enum TileTreeLoadStatus {\n /** No attempt to load the tile tree has yet been made. */\n NotLoaded,\n /** The tile tree is in the process of being loaded. */\n Loading,\n /** The tile tree has been successfully loaded. */\n Loaded,\n /** An attempt to load the tile tree failed. */\n NotFound,\n}\n\n/** A hierarchical level-of-detail tree of [3d Tiles](https://github.com/CesiumGS/3d-tiles) to be rendered in a [[Viewport]].\n * Tile trees originate from a variety of sources:\n * - Each [[GeometricModelState]] can supply its graphics as a tile tree;\n * - A [[DisplayStyleState]]'s map settings or reality models;\n * - [ViewAttachment]($backend)s in a [[SheetModelState]];\n * - [[TiledGraphicsProvider]]s associated with a viewport.\n *\n * The same TileTree can be displayed in any number of viewports using multiple [[TileTreeReference]]s.\n * A TileTree's lifetime is managed by a [[TileTreeOwner]].\n *\n * @note Some methods carry a warning that they should **not** be overridden by subclasses; typically a protected method exists that can be\n * overridden instead to customize the behavior. For example, [[selectTiles]] should not be overridden; instead, override the[[_selectTiles]] method\n * that it calls.\n * @public\n * @extensions\n */\nexport abstract class TileTree {\n private _isDisposed = false;\n /** @internal */\n protected _lastSelected = BeTimePoint.now();\n /** @internal */\n protected _clipVolume?: RenderClipVolume;\n public readonly iModel: IModelConnection;\n /** Transform from this tile tree's coordinate space to the iModel's coordinate space. */\n public readonly iModelTransform: Transform;\n /** Uniquely identifies this tree among all other tile trees associated with the iModel. */\n public readonly id: string;\n /** A 64-bit identifier for this tile tree, unique within the context of its [[IModelConnection]].\n * For a tile tree associated with a [[GeometricModelState]], this is the Id of the model. Other types of tile trees\n * typically use a transient Id obtained from [[IModelConnection.transientIds]].\n */\n public readonly modelId: Id64String;\n /** The length of time after which tiles belonging to this tree are considered elegible for disposal if they are no longer in use. */\n public readonly expirationTime: BeDuration;\n /** @internal */\n public get loadPriority(): TileLoadPriority { return this._loadPriority; }\n private readonly _loadPriority: TileLoadPriority;\n /** Optional tight bounding box around the entire contents of all of this tree's tiles. */\n public readonly contentRange?: ElementAlignedBox3d;\n\n /** The lowest-resolution tile in this tree. */\n public abstract get rootTile(): Tile;\n /** True if this tile tree contains 3d graphics. */\n public abstract get is3d(): boolean;\n /** Returns the maximum depth of this tree, if any. */\n public abstract get maxDepth(): number | undefined;\n\n /** The overrides that should be applied to the view's [ViewFlags]($common) when this tile tree is drawn. Can be overridden by individual [[TileTreeReference]]s. */\n public abstract get viewFlagOverrides(): ViewFlagOverrides;\n\n /** True if this tile tree has no bounds - e.g., a tile tree representing a globe is unbounded. */\n public get isContentUnbounded(): boolean {\n return false;\n }\n\n /** Implement this method to select tiles of appropriate resolution. */\n protected abstract _selectTiles(args: TileDrawArgs): Tile[];\n\n /** Produce graphics of appropriate resolution to be drawn in a [[Viewport]]. */\n public abstract draw(args: TileDrawArgs): void;\n\n /** Discard tiles and/or tile contents, presumably based on a least-recently-used and/or least-likely-to-be-needed criterion. */\n public abstract prune(): void;\n\n /** True if this tile tree contains 2d graphics. */\n public get is2d(): boolean { return !this.is3d; }\n /** @internal */\n public get isPointCloud(): boolean { return false; }\n /** @internal */\n public get clipVolume(): RenderClipVolume | undefined { return this._clipVolume; }\n\n /** The volume of space occupied by this tile tree. */\n public get range(): ElementAlignedBox3d { return this.rootTile.range; }\n /** The most recent time at which tiles [[selectTiles]] was called. */\n public get lastSelectedTime(): BeTimePoint { return this._lastSelected; }\n /** True if a tile and its child tiles should not be drawn simultaneously.\n * Default: true.\n */\n public get parentsAndChildrenExclusive(): boolean { return true; }\n\n /** @internal */\n public get layerHandler(): LayerTileTreeHandler | undefined { return undefined; }\n\n /** Constructor */\n protected constructor(params: TileTreeParams) {\n this._lastSelected = BeTimePoint.now();\n this.iModel = params.iModel;\n this.iModelTransform = params.location;\n this._clipVolume = params.clipVolume;\n this.modelId = params.modelId;\n this.id = params.id;\n this.contentRange = params.contentRange;\n\n const admin = IModelApp.tileAdmin;\n this._loadPriority = params.priority;\n this.expirationTime = params.expirationTime ?? admin.tileExpirationTime;\n }\n\n /** Selects tiles of appropriate resolution for some purpose like drawing to the screen, producing a shadow map, etc.\n * @note Do **not** override this method. Implement [[_selectTiles]].\n */\n public selectTiles(args: TileDrawArgs): Tile[] {\n this._lastSelected = BeTimePoint.now();\n const tiles = this._selectTiles(args);\n IModelApp.tileAdmin.addTilesForUser(args.context.viewport, tiles, args.readyTiles, args.touchedTiles);\n args.processSelectedTiles(tiles);\n return tiles;\n }\n\n /** True if [[dispose]] has been called on this tile tree. */\n public get isDisposed(): boolean { return this._isDisposed; }\n\n /** Dispose of this tree and any resources owned by it. This is typically invoked by a [[TileTreeOwner]]. */\n public [Symbol.dispose](): void {\n if (this.isDisposed)\n return;\n\n this._isDisposed = true;\n dispose(this.rootTile);\n }\n\n /** @deprecated in 5.0 - might be removed in next major version. Use [Symbol.dispose] instead. */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n /** @internal */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n this.rootTile.collectStatistics(stats);\n }\n\n /** Returns the number of [[Tile]]s currently in memory belonging to this tree, primarily for debugging. */\n public countTiles(): number {\n return 1 + this.rootTile.countDescendants();\n }\n\n /** @internal */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, location: Transform, frustumPlanes?: FrustumPlanes): void {\n this.rootTile.extendRangeForContent(range, matrix, location, frustumPlanes);\n }\n\n /**\n * Return the transform from the tile tree's coordinate space to [ECEF](https://en.wikipedia.org/wiki/ECEF) (Earth Centered Earth Fixed) coordinates.\n * If a geographic coordinate system is present then this transform will be calculated at the tile tree center.\n * @beta\n */\n public async getEcefTransform(): Promise<Transform | undefined> {\n if (!this.iModel.ecefLocation)\n return undefined;\n\n let dbToEcef: Transform | undefined;\n const range = this.contentRange ? this.contentRange : this.range;\n const center = range.localXYZToWorld(.5, .5, .5);\n if (center) {\n this.iModelTransform.multiplyPoint3d(center, center);\n const ecefToDb = await calculateEcefToDbTransformAtLocation(center, this.iModel);\n dbToEcef = ecefToDb?.inverse();\n }\n if (!dbToEcef)\n dbToEcef = this.iModel.ecefLocation.getTransform();\n\n return dbToEcef.multiplyTransformTransform(this.iModelTransform);\n }\n\n /** Populate [[TileGeometryCollector.polyfaces]] with geometry obtained from this tile tree's tiles satisfying the collector's criteria.\n * The base implementation does nothing.\n * @see [[TileTreeReference.createGeometryTreeReference]] to attempt to create a TileTree that can collect geometry.\n * @beta\n */\n public collectTileGeometry(_collector: TileGeometryCollector): void {\n }\n\n /**\n * Invoked when a schedule script is edited.\n * Override to handle updates for affected elements or timelines.\n *\n * @internal\n */\n public async onScheduleEditingChanged(_changes: RenderSchedule.EditingChanges[]): Promise<void> {}\n /**\n * Invoked when a schedule script is committed during editing.\n * Override in specific tile tree types to handle the change.\n * @internal\n */\n public onScheduleEditingCommitted(): void {}\n}\n\n"]}
@@ -133,7 +133,7 @@ export declare abstract class TileTreeReference {
133
133
  * @beta
134
134
  */
135
135
  get planarClipMaskPriority(): number;
136
- /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */
136
+ /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
137
137
  addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void;
138
138
  /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.
139
139
  * @beta
@@ -1 +1 @@
1
- {"version":3,"file":"TileTreeReference.d.ts","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,aAAa,EAAE,UAAU,EAA0B,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC1J,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EACL,oBAAoB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,YAAY,EAAE,qBAAqB,EAAE,QAAQ,EAAsB,aAAa,EACzM,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,oBAAY,eAAe;IACzB,wDAAwD;IACxD,aAAa,IAAI;IACjB,2CAA2C;IAC3C,KAAK,IAAI;IACT,+CAA+C;IAC/C,OAAO,IAAI;CACZ;AAED;;;;;;;;;;GAUG;AACH,8BAAsB,iBAAiB;IACrC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B;IACT,gBAAgB,CAAC,eAAe,EAAE,OAAO,GAAG,IAAI;IAEvD,6GAA6G;IAC7G,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,iKAAiK;IACjK,IAAW,QAAQ,IAAI,OAAO,CAAkB;IAEhD;;;OAGG;IACH,IAAW,sBAAsB,IAAI,MAAM,CAA+C;IAE1F,kGAAkG;IAC3F,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI;IAExE;;MAEE;IACW,eAAe,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxF;;;OAGG;IACH,SAAS,CAAC,4BAA4B,CAAC,QAAQ,CAAC,EAAE,gCAAgC,GAAG,yBAAyB,GAAG,SAAS;IAI1H;OACG;IACI,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAExE;OACG;IACH,SAAS,CAAC,oBAAoB,CAAC,SAAS,EAAE,qBAAqB,GAAG,IAAI;IAatE;;;;OAIG;IACI,2BAA2B,CAAC,OAAO,CAAC,EAAE,gCAAgC,GAAG,yBAAyB,GAAG,SAAS;IAWrH;;;;;;;;;;;;;;OAcG;WACW,uBAAuB,CAAC,IAAI,EAAE,yBAAyB,GAAG,iBAAiB;CAG1F;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B"}
@@ -220,7 +220,7 @@ export class TileTreeReference /* implements RenderMemory.Consumer */ {
220
220
  * @beta
221
221
  */
222
222
  get planarClipMaskPriority() { return PlanarClipMaskPriority.DesignModel; }
223
- /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */
223
+ /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
224
224
  addLogoCards(_cards, _vp) { }
225
225
  /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.
226
226
  * @beta
@@ -1 +1 @@
1
- {"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAqB,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA6E,sBAAsB,EAAqB,MAAM,oBAAoB,CAAC;AAO1J,OAAO,EACmH,YAAY,EAAmC,kBAAkB,EAAiB,kCAAkC,GAC7O,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wDAAwD;IACxD,uEAAiB,CAAA;IACjB,2CAA2C;IAC3C,uDAAS,CAAA;IACT,+CAA+C;IAC/C,2DAAW,CAAA;AACb,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,iBAAiB,CAAC,sCAAsC;IAI5E;;OAEG;IACI,iBAAiB,CAAW;IAEnC;;OAEG;IACI,cAAc,KAAI,CAAC;IAE1B;;;OAGG;IACI,iBAAiB,CAAC,KAA2B;QAClD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QACrC,IAAI,SAAS,KAAK,IAAI;YACpB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,qFAAqF;IAC9E,UAAU,CAAC,OAAqB;QACrC,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,SAAS,KAAK,IAAI;YACpB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,0IAA0I;IACnI,IAAI,CAAC,IAAkB;QAC5B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CA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;OAIG;IACI,2BAA2B,CAAC,OAA0C;QAC3E,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,0KAA0K;YAC1K,MAAM,GAAG,GAAG,IAAiC,CAAC;YAC9C,GAAG,CAAC,iBAAiB,GAAG,OAAO,EAAE,iBAAiB,CAAC;YACnD,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,MAAM,CAAC,uBAAuB,CAAC,IAA+B;QACnE,OAAO,kCAAkC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { HitDetail } from \"../HitDetail\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\nimport { ScreenViewport } from \"../Viewport\";\nimport {\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, RenderGraphicTileTreeArgs, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner, tileTreeReferenceFromRenderGraphic,\n} from \"./internal\";\n\n/** Describes the type of graphics produced by a [[TileTreeReference]].\n * @public\n * @extensions\n */\nexport enum TileGraphicType {\n /** Rendered behind all other geometry without depth. */\n BackgroundMap = 0,\n /** Rendered with normal scene graphics. */\n Scene = 1,\n /** Rendered in front of all other geometry. */\n Overlay = 2,\n}\n\n/** A reference to a [[TileTree]] suitable for drawing within a [[Viewport]]. The reference does not *own* its tile tree - it merely refers to it by\n * way of the tree's [[TileTreeOwner]].\n * The specific [[TileTree]] referenced by this object may change based on the current state of the Viewport in which it is drawn - for example,\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\n * Multiple TileTreeReferences can refer to the same TileTree with different parameters and logic - for example, the same background map tiles can be displayed in two viewports with\n * differing levels of transparency.\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\n /** The owner of the currently-referenced [[TileTree]]. Do not store a direct reference to it, because it may change or become disposed at any time. */\n public abstract get treeOwner(): TileTreeOwner;\n\n /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.\n * @internal\n */\n public reprojectGeometry?: boolean;\n\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\n * @internal\n */\n public resetTreeOwner() {}\n\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\n * Override this and call super if you have such auxiliary trees.\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\n */\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n trees.add(tree);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\n public addToScene(context: SceneContext): void {\n const args = this.createDrawArgs(context);\n if (undefined !== args)\n this.draw(args);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\n public draw(args: TileDrawArgs): void {\n args.tree.draw(args);\n }\n\n /** Return a tooltip describing the hit, or `undefined` if no tooltip can be supplied.\n * If you override this method, make sure to check that `hit` represents an entity belonging to your tile tree, e.g., by checking `hit.modelId` and `hit.sourceId`.\n * If you *don't* override this method, override [[canSupplyToolTip]] to return false.\n * Callers who want to obtain a tooltip should prefer [[getToolTipPromise]].\n */\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\n\n /** Return whether this TileTreeReference can supply a tooltip describing the entity represented by the specified hit.\n * [[getToolTipPromise]] calls [[getToolTip]] if and only if `canSupplyToolTip` returns `true`.\n * If your tile tree never supplies tooltips, override this to return `false`.\n */\n public canSupplyToolTip(_hit: HitDetail): boolean {\n return true;\n }\n\n /** Obtain a tooltip describing the specified `hit`, or `undefined` if this tile tree reference cannot supply a tooltip for the hit. */\n public getToolTipPromise(hit: HitDetail): Promise<HTMLElement | string | undefined> | undefined {\n return this.canSupplyToolTip(hit) ? this.getToolTip(hit).catch(() => undefined) : undefined;\n }\n\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\n * @alpha\n */\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\n\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\n * @note This is currently only invoked for background maps and TiledGraphicsProviders - others have no decorations, but if they did implement this it would not be called.\n */\n public decorate(_context: DecorateContext): void { }\n\n /** Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents.\n * Override this function if a reference's range should not be included in the fit range, or a range different from its tile tree's range should be used.\n */\n public unionFitRange(union: Range3d): void {\n const contentRange = this.computeWorldContentRange();\n if (!contentRange.isNull)\n union.extendRange(contentRange);\n }\n\n /** Record graphics memory consumed by this tile tree reference. */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n tree.collectStatistics(stats);\n }\n\n /** Return true if the tile tree is fully loaded and ready to draw.\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\n * @public\n */\n public get isLoadingComplete(): boolean {\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.NotLoaded:\n case TileTreeLoadStatus.Loading:\n return false;\n case TileTreeLoadStatus.NotFound:\n return true; // we tried, and failed, to load.\n case TileTreeLoadStatus.Loaded:\n return this._isLoadingComplete;\n }\n }\n\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\n * @public\n */\n protected get _isLoadingComplete(): boolean {\n return true;\n }\n\n /** Create context for drawing the tile tree, if it is ready for drawing.\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\n * Returns undefined if, e.g., the tile tree is not yet loaded.\n */\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\n const tree = this.treeOwner.load();\n if (undefined === tree)\n return undefined;\n\n return new TileDrawArgs({\n context,\n tree,\n now: BeTimePoint.now(),\n location: this.computeTransform(tree),\n viewFlagOverrides: this.getViewFlagOverrides(tree),\n clipVolume: this.getClipVolume(tree),\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\n symbologyOverrides: this.getSymbologyOverrides(tree),\n appearanceProvider: this.getAppearanceProvider(tree),\n hiddenLineSettings: this.getHiddenLineSettings(tree),\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\n groupNodeId: this.getGroupNodeId(tree),\n transformFromIModel: this.getTransformFromIModel(),\n });\n }\n\n /** @beta */\n public getTransformFromIModel(): Transform | undefined { return undefined; }\n\n /** @internal */\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n /** @internal */\n protected getGroupNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\n * @returns undefined if the TileTree is not yet loaded.\n */\n public getLocation(): Transform | undefined {\n const tree = this.treeOwner.load();\n return undefined !== tree ? this.computeTransform(tree) : undefined;\n }\n\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\n protected computeTransform(tree: TileTree): Transform {\n return tree.iModelTransform.clone();\n }\n\n /** Compute the range of this tile tree's contents in world coordinates.\n * @returns The content range in world coodinates, or a null range if the tile tree is not loaded or has a null content range.\n */\n public computeWorldContentRange(): ElementAlignedBox3d {\n const range = new Range3d();\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\n\n return range;\n }\n\n /** Return the clip volume applied to this reference's tile tree, if any. */\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\n return tree.clipVolume;\n }\n\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\n return tree.viewFlagOverrides;\n }\n\n /** Return overrides that *replace* any defined for the view. */\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\n return undefined;\n }\n\n /** Return a provider that can supplement the view's symbology overrides. */\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\n return undefined;\n }\n\n /** Return hidden line settings to replace those defined for the view. */\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\n return undefined;\n }\n\n /* Extend range to include transformed range of this tile tree.\n * @internal\n */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\n const tree = this.treeOwner.tileTree;\n if (undefined === tree)\n return;\n\n const location = this.computeTransform(tree);\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\n }\n\n /** @internal */\n public getTerrainHeight(_terrainHeights: Range1d): void { }\n\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\n public get castsShadows(): boolean {\n return true;\n }\n\n /** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */\n public get isGlobal(): boolean { return false; }\n\n /** The [PlanarClipMaskPriority]($common) of this tile tree used to determine which tile trees contribute to a clip mask when\n * using [PlanarClipMaskMode.Priority]($common).\n * @beta\n */\n public get planarClipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\n\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\n\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.\n * @beta\n */\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards, vp));\n }\n\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * Return `undefined` if geometry collection is not supported.\n * @see [[createGeometryTreeReference]].\n */\n protected _createGeometryTreeReference(_options?: GeometryTileTreeReferenceOptions): GeometryTileTreeReference | undefined {\n return undefined;\n }\n\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n */\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\n\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\n */\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\n const tree = this.treeOwner.load();\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.Loaded:\n assert(undefined !== tree);\n tree.collectTileGeometry(collector);\n break;\n case TileTreeLoadStatus.Loading:\n collector.markLoading();\n break;\n }\n }\n\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\n * undefined if geometry collection is not supported.\n * Currently, only terrain and reality model tiles support geometry collection.\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\n */\n public createGeometryTreeReference(options?: GeometryTileTreeReferenceOptions): GeometryTileTreeReference | undefined {\n if (this.collectTileGeometry) {\n // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.\n const ref = this as GeometryTileTreeReference;\n ref.reprojectGeometry = options?.reprojectGeometry;\n return ref;\n }\n\n return this._createGeometryTreeReference(options);\n }\n\n /** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].\n * The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:\n * ```ts\n * [[include:TileTreeReference_createFromRenderGraphic]]\n *```\n * Or, it can be used as a [[DynamicSpatialClassifier]] to contextualize a reality model, like so:\n * ```ts\n * [[include:TileTreeReference_DynamicClassifier]]\n * ```\n * It can also be used to mask out portions of the background map or terrain via [PlanarClipMaskSettings]($common), as shown below:\n * ```ts\n * [[include:TileTreeReference_DynamicClipMask]]\n * ```\n * @beta\n */\n public static createFromRenderGraphic(args: RenderGraphicTileTreeArgs): TileTreeReference {\n return tileTreeReferenceFromRenderGraphic(args);\n }\n}\n\n/** Options for creating a [[GeometryTileTreeReference]].\n * @public\n */\nexport interface GeometryTileTreeReferenceOptions {\n /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.\n * Currently only applies to point clouds, reality meshes, and terrain.\n * @beta\n */\n reprojectGeometry?: boolean;\n}\n"]}
1
+ {"version":3,"file":"TileTreeReference.js","sourceRoot":"","sources":["../../../src/tile/TileTreeReference.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAqB,OAAO,EAAa,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAA6E,sBAAsB,EAAqB,MAAM,oBAAoB,CAAC;AAO1J,OAAO,EACmH,YAAY,EAAmC,kBAAkB,EAAiB,kCAAkC,GAC7O,MAAM,YAAY,CAAC;AAEpB;;;GAGG;AACH,MAAM,CAAN,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,wDAAwD;I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AC,MAAwB,EAAE,GAAmB,IAAU,CAAC;IAE5E;;MAEE;IACK,KAAK,CAAC,eAAe,CAAC,KAAuB,EAAE,EAAkB;QACtE,4DAA4D;QAC5D,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;IAED;;;OAGG;IACO,4BAA4B,CAAC,QAA2C;QAChF,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;OACG;IACI,mBAAmB,CAA8C;IAExE;OACG;IACO,oBAAoB,CAAC,SAAgC;QAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACnC,QAAQ,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;YAClC,KAAK,kBAAkB,CAAC,MAAM;gBAC5B,MAAM,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;gBAC3B,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,kBAAkB,CAAC,OAAO;gBAC7B,SAAS,CAAC,WAAW,EAAE,CAAC;gBACxB,MAAM;QACV,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,2BAA2B,CAAC,OAA0C;QAC3E,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC7B,0KAA0K;YAC1K,MAAM,GAAG,GAAG,IAAiC,CAAC;YAC9C,GAAG,CAAC,iBAAiB,GAAG,OAAO,EAAE,iBAAiB,CAAC;YACnD,OAAO,GAAG,CAAC;QACb,CAAC;QAED,OAAO,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,MAAM,CAAC,uBAAuB,CAAC,IAA+B;QACnE,OAAO,kCAAkC,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Tiles\n */\n\nimport { assert, BeTimePoint } from \"@itwin/core-bentley\";\nimport { Matrix4d, Range1d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ElementAlignedBox3d, FeatureAppearanceProvider, FrustumPlanes, HiddenLine, PlanarClipMaskPriority, ViewFlagOverrides } from \"@itwin/core-common\";\nimport { HitDetail } from \"../HitDetail\";\nimport { FeatureSymbology } from \"../render/FeatureSymbology\";\nimport { RenderClipVolume } from \"../render/RenderClipVolume\";\nimport { RenderMemory } from \"../render/RenderMemory\";\nimport { DecorateContext, SceneContext } from \"../ViewContext\";\nimport { ScreenViewport } from \"../Viewport\";\nimport {\n DisclosedTileTreeSet, GeometryTileTreeReference, MapFeatureInfoOptions, MapLayerFeatureInfo, RenderGraphicTileTreeArgs, TileDrawArgs, TileGeometryCollector, TileTree, TileTreeLoadStatus, TileTreeOwner, tileTreeReferenceFromRenderGraphic,\n} from \"./internal\";\n\n/** Describes the type of graphics produced by a [[TileTreeReference]].\n * @public\n * @extensions\n */\nexport enum TileGraphicType {\n /** Rendered behind all other geometry without depth. */\n BackgroundMap = 0,\n /** Rendered with normal scene graphics. */\n Scene = 1,\n /** Rendered in front of all other geometry. */\n Overlay = 2,\n}\n\n/** A reference to a [[TileTree]] suitable for drawing within a [[Viewport]]. The reference does not *own* its tile tree - it merely refers to it by\n * way of the tree's [[TileTreeOwner]].\n * The specific [[TileTree]] referenced by this object may change based on the current state of the Viewport in which it is drawn - for example,\n * as a result of changing the RenderMode, or animation settings, or classification settings, etc.\n * A reference to a TileTree is typically associated with a [[ViewState]], a [[DisplayStyleState]], or a [[Viewport]].\n * Multiple TileTreeReferences can refer to the same TileTree with different parameters and logic - for example, the same background map tiles can be displayed in two viewports with\n * differing levels of transparency.\n * @see [[TiledGraphicsProvider]] to supply custom [[TileTreeReference]]s to be drawn within a [[Viewport]].\n * @public\n * @extensions\n */\nexport abstract class TileTreeReference /* implements RenderMemory.Consumer */ {\n /** The owner of the currently-referenced [[TileTree]]. Do not store a direct reference to it, because it may change or become disposed at any time. */\n public abstract get treeOwner(): TileTreeOwner;\n\n /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.\n * @internal\n */\n public reprojectGeometry?: boolean;\n\n /** Force a new tree owner / tile tree to be created for the current tile tree reference\n * @internal\n */\n public resetTreeOwner() {}\n\n /** Disclose *all* TileTrees use by this reference. This may include things like map tiles used for draping on terrain.\n * Override this and call super if you have such auxiliary trees.\n * @note Any tree *NOT* disclosed becomes a candidate for *purging* (being unloaded from memory along with all of its tiles and graphics).\n */\n public discloseTileTrees(trees: DisclosedTileTreeSet): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n trees.add(tree);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[draw]]. */\n public addToScene(context: SceneContext): void {\n const args = this.createDrawArgs(context);\n if (undefined !== args)\n this.draw(args);\n }\n\n /** Adds this reference's graphics to the scene. By default this invokes [[TileTree.draw]] on the referenced TileTree, if it is loaded. */\n public draw(args: TileDrawArgs): void {\n args.tree.draw(args);\n }\n\n /** Return a tooltip describing the hit, or `undefined` if no tooltip can be supplied.\n * If you override this method, make sure to check that `hit` represents an entity belonging to your tile tree, e.g., by checking `hit.modelId` and `hit.sourceId`.\n * If you *don't* override this method, override [[canSupplyToolTip]] to return false.\n * Callers who want to obtain a tooltip should prefer [[getToolTipPromise]].\n */\n public async getToolTip(_hit: HitDetail): Promise<HTMLElement | string | undefined> { return undefined; }\n\n /** Return whether this TileTreeReference can supply a tooltip describing the entity represented by the specified hit.\n * [[getToolTipPromise]] calls [[getToolTip]] if and only if `canSupplyToolTip` returns `true`.\n * If your tile tree never supplies tooltips, override this to return `false`.\n */\n public canSupplyToolTip(_hit: HitDetail): boolean {\n return true;\n }\n\n /** Obtain a tooltip describing the specified `hit`, or `undefined` if this tile tree reference cannot supply a tooltip for the hit. */\n public getToolTipPromise(hit: HitDetail): Promise<HTMLElement | string | undefined> | undefined {\n return this.canSupplyToolTip(hit) ? this.getToolTip(hit).catch(() => undefined) : undefined;\n }\n\n /** Optionally return a MapLayerFeatureInfo object describing the hit.].\n * @alpha\n */\n public async getMapFeatureInfo(_hit: HitDetail, _options?: MapFeatureInfoOptions): Promise<MapLayerFeatureInfo[] | undefined> { return undefined; }\n\n /** Optionally add any decorations specific to this reference. For example, map tile trees may add a logo image and/or copyright attributions.\n * @note This is currently only invoked for background maps and TiledGraphicsProviders - others have no decorations, but if they did implement this it would not be called.\n */\n public decorate(_context: DecorateContext): void { }\n\n /** Unions this reference's range with the supplied range to help compute a volume in world space for fitting a viewport to its contents.\n * Override this function if a reference's range should not be included in the fit range, or a range different from its tile tree's range should be used.\n */\n public unionFitRange(union: Range3d): void {\n const contentRange = this.computeWorldContentRange();\n if (!contentRange.isNull)\n union.extendRange(contentRange);\n }\n\n /** Record graphics memory consumed by this tile tree reference. */\n public collectStatistics(stats: RenderMemory.Statistics): void {\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree)\n tree.collectStatistics(stats);\n }\n\n /** Return true if the tile tree is fully loaded and ready to draw.\n * The default implementation returns true if the tile tree loading process completed (whether it resulted in success or failure).\n * @note Do *not* override this property - override [[_isLoadingComplete]] instead..\n * @public\n */\n public get isLoadingComplete(): boolean {\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.NotLoaded:\n case TileTreeLoadStatus.Loading:\n return false;\n case TileTreeLoadStatus.NotFound:\n return true; // we tried, and failed, to load.\n case TileTreeLoadStatus.Loaded:\n return this._isLoadingComplete;\n }\n }\n\n /** Override if additional asynchronous loading is required after the tile tree is successfully loaded, to indicate when that loading has completed.\n * @public\n */\n protected get _isLoadingComplete(): boolean {\n return true;\n }\n\n /** Create context for drawing the tile tree, if it is ready for drawing.\n * TileTreeReferences can override individual portions of the context, e.g. apply their own transform.\n * Returns undefined if, e.g., the tile tree is not yet loaded.\n */\n public createDrawArgs(context: SceneContext): TileDrawArgs | undefined {\n const tree = this.treeOwner.load();\n if (undefined === tree)\n return undefined;\n\n return new TileDrawArgs({\n context,\n tree,\n now: BeTimePoint.now(),\n location: this.computeTransform(tree),\n viewFlagOverrides: this.getViewFlagOverrides(tree),\n clipVolume: this.getClipVolume(tree),\n parentsAndChildrenExclusive: tree.parentsAndChildrenExclusive,\n symbologyOverrides: this.getSymbologyOverrides(tree),\n appearanceProvider: this.getAppearanceProvider(tree),\n hiddenLineSettings: this.getHiddenLineSettings(tree),\n animationTransformNodeId: this.getAnimationTransformNodeId(tree),\n groupNodeId: this.getGroupNodeId(tree),\n transformFromIModel: this.getTransformFromIModel(),\n });\n }\n\n /** @beta */\n public getTransformFromIModel(): Transform | undefined { return undefined; }\n\n /** @internal */\n protected getAnimationTransformNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n /** @internal */\n protected getGroupNodeId(_tree: TileTree): number | undefined {\n return undefined;\n }\n\n /** Supply transform from this tile tree reference's location to iModel coordinate space.\n * @returns undefined if the TileTree is not yet loaded.\n */\n public getLocation(): Transform | undefined {\n const tree = this.treeOwner.load();\n return undefined !== tree ? this.computeTransform(tree) : undefined;\n }\n\n /** Compute a transform from this tile tree reference's coordinate space to the [[IModelConnection]]'s coordinate space. */\n protected computeTransform(tree: TileTree): Transform {\n return tree.iModelTransform.clone();\n }\n\n /** Compute the range of this tile tree's contents in world coordinates.\n * @returns The content range in world coodinates, or a null range if the tile tree is not loaded or has a null content range.\n */\n public computeWorldContentRange(): ElementAlignedBox3d {\n const range = new Range3d();\n const tree = this.treeOwner.tileTree;\n if (undefined !== tree && !tree.rootTile.contentRange.isNull)\n this.computeTransform(tree).multiplyRange(tree.rootTile.contentRange, range);\n\n return range;\n }\n\n /** Return the clip volume applied to this reference's tile tree, if any. */\n protected getClipVolume(tree: TileTree): RenderClipVolume | undefined {\n return tree.clipVolume;\n }\n\n /** Supply overrides that should be applied to the [[ViewState]]'s [ViewFlags]($common) when drawing this tile tree reference. */\n protected getViewFlagOverrides(tree: TileTree): ViewFlagOverrides {\n return tree.viewFlagOverrides;\n }\n\n /** Return overrides that *replace* any defined for the view. */\n protected getSymbologyOverrides(_tree: TileTree): FeatureSymbology.Overrides | undefined {\n return undefined;\n }\n\n /** Return a provider that can supplement the view's symbology overrides. */\n protected getAppearanceProvider(_tree: TileTree): FeatureAppearanceProvider | undefined {\n return undefined;\n }\n\n /** Return hidden line settings to replace those defined for the view. */\n protected getHiddenLineSettings(_tree: TileTree): HiddenLine.Settings | undefined {\n return undefined;\n }\n\n /* Extend range to include transformed range of this tile tree.\n * @internal\n */\n public accumulateTransformedRange(range: Range3d, matrix: Matrix4d, frustumPlanes?: FrustumPlanes) {\n const tree = this.treeOwner.tileTree;\n if (undefined === tree)\n return;\n\n const location = this.computeTransform(tree);\n tree.accumulateTransformedRange(range, matrix, location, frustumPlanes);\n }\n\n /** @internal */\n public getTerrainHeight(_terrainHeights: Range1d): void { }\n\n /** Return whether the geometry exposed by this tile tree reference should cast shadows on other geometry. */\n public get castsShadows(): boolean {\n return true;\n }\n\n /** Return whether this reference has global coverage. Mapping data is global and some non-primary models such as the OSM building layer have global coverage */\n public get isGlobal(): boolean { return false; }\n\n /** The [PlanarClipMaskPriority]($common) of this tile tree used to determine which tile trees contribute to a clip mask when\n * using [PlanarClipMaskMode.Priority]($common).\n * @beta\n */\n public get planarClipMaskPriority(): number { return PlanarClipMaskPriority.DesignModel; }\n\n /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */\n public addLogoCards(_cards: HTMLTableElement, _vp: ScreenViewport): void { }\n\n /** Add attribution logo cards for the tile tree source logo cards to the viewport's logo div.\n * @beta\n */\n public async addAttributions(cards: HTMLTableElement, vp: ScreenViewport): Promise<void> {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return Promise.resolve(this.addLogoCards(cards, vp));\n }\n\n /** Create a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n * Return `undefined` if geometry collection is not supported.\n * @see [[createGeometryTreeReference]].\n */\n protected _createGeometryTreeReference(_options?: GeometryTileTreeReferenceOptions): GeometryTileTreeReference | undefined {\n return undefined;\n }\n\n /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].\n */\n public collectTileGeometry?: (collector: TileGeometryCollector) => void;\n\n /** A function that can be assigned to [[collectTileGeometry]] to enable geometry collection for references to tile trees that support geometry collection.\n */\n protected _collectTileGeometry(collector: TileGeometryCollector): void {\n const tree = this.treeOwner.load();\n switch (this.treeOwner.loadStatus) {\n case TileTreeLoadStatus.Loaded:\n assert(undefined !== tree);\n tree.collectTileGeometry(collector);\n break;\n case TileTreeLoadStatus.Loading:\n collector.markLoading();\n break;\n }\n }\n\n /** Obtain a tile tree reference equivalent to this one that also supplies an implementation of [[GeometryTileTreeReference.collectTileGeometry]], or\n * undefined if geometry collection is not supported.\n * Currently, only terrain and reality model tiles support geometry collection.\n * @note Do not override this method - override [[_createGeometryTreeReference]] instead.\n */\n public createGeometryTreeReference(options?: GeometryTileTreeReferenceOptions): GeometryTileTreeReference | undefined {\n if (this.collectTileGeometry) {\n // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.\n const ref = this as GeometryTileTreeReference;\n ref.reprojectGeometry = options?.reprojectGeometry;\n return ref;\n }\n\n return this._createGeometryTreeReference(options);\n }\n\n /** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].\n * The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:\n * ```ts\n * [[include:TileTreeReference_createFromRenderGraphic]]\n *```\n * Or, it can be used as a [[DynamicSpatialClassifier]] to contextualize a reality model, like so:\n * ```ts\n * [[include:TileTreeReference_DynamicClassifier]]\n * ```\n * It can also be used to mask out portions of the background map or terrain via [PlanarClipMaskSettings]($common), as shown below:\n * ```ts\n * [[include:TileTreeReference_DynamicClipMask]]\n * ```\n * @beta\n */\n public static createFromRenderGraphic(args: RenderGraphicTileTreeArgs): TileTreeReference {\n return tileTreeReferenceFromRenderGraphic(args);\n }\n}\n\n/** Options for creating a [[GeometryTileTreeReference]].\n * @public\n */\nexport interface GeometryTileTreeReferenceOptions {\n /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.\n * Currently only applies to point clouds, reality meshes, and terrain.\n * @beta\n */\n reprojectGeometry?: boolean;\n}\n"]}
@@ -6,6 +6,9 @@ import { Point3d, Range1d, Range2d } from "@itwin/core-geometry";
6
6
  * passed to [[IModelApp.startup]].
7
7
  * @public
8
8
  * @extensions
9
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Provide an [[ElevationProvider]] and [[GeoidProvider]] implementation via [[IModelAppOptions.geospatialProviders]].
10
+ * @note This class structurally satisfies both [[ElevationProvider]] and [[GeoidProvider]] but does not use an explicit
11
+ * `implements` clause because api-extractor forbids `@public` classes from referencing `@beta` interfaces (ae-incompatible-release-tags).
9
12
  */
10
13
  export declare class BingElevationProvider {
11
14
  private _heightRangeRequestTemplate;
@@ -17,25 +20,34 @@ export declare class BingElevationProvider {
17
20
  * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then the sea level height id returned using the Earth Gravitational Model 2008 (EGM2008 2.5’).
18
21
  * @public
19
22
  */
20
- getHeight(carto: Cartographic, geodetic?: boolean): Promise<any>;
23
+ getHeight(carto: Cartographic, geodetic?: boolean): Promise<number>;
21
24
  /** Returns 256 elevations in the specified range - 16 rows and 16 columns.
22
25
  * The elevations are ordered starting with the southwest corner, then proceeding west to east and south to north.
23
26
  * @beta
24
27
  */
25
28
  getHeights(range: Range2d): Promise<number[] | undefined>;
26
- /** @internal */
29
+ /** Return the offset from geodetic height to sea level height at the given cartographic location.
30
+ * @note Satisfies [[GeoidProvider]] structurally.
31
+ * @internal
32
+ */
33
+ getGeodeticToSeaLevelOffset(carto: Cartographic): Promise<number>;
34
+ /** @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use the Cartographic overload instead.
35
+ * @internal
36
+ */
27
37
  getGeodeticToSeaLevelOffset(point: Point3d, iModel: IModelConnection): Promise<number>;
28
38
  /** Get the height (altitude) at a given iModel coordinate. The height is geodetic (WGS84 ellipsoid)
29
- * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then sea level height is returned using the Earth Gravitational Model 2008 (EGM2008 2.5).
30
- *
39
+ * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then sea level height is returned using the Earth Gravitational Model 2008 (EGM2008 2.5').
40
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use [[ElevationProvider.getHeight]] via [[IModelApp.elevationProvider]] instead.
31
41
  * @public
32
42
  */
33
43
  getHeightValue(point: Point3d, iModel: IModelConnection, geodetic?: boolean): Promise<number>;
34
44
  /** Get the height (altitude) range for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).
45
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use standalone [[getHeightRange]] function instead.
35
46
  * @public
36
47
  */
37
48
  getHeightRange(iModel: IModelConnection): Promise<Range1d>;
38
49
  /** Get the average height (altitude) for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).
50
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use standalone [[getHeightAverage]] function instead.
39
51
  * @public
40
52
  */
41
53
  getHeightAverage(iModel: IModelConnection): Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"BingElevation.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/BingElevation.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIjE;;;;;GAKG;AACH,qBAAa,qBAA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M,EAAE,GAAG,SAAS,CAAC;IAYtE;;;OAGG;IACU,2BAA2B,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9E;;OAEG;IACU,2BAA2B,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAiBnG;;;;OAIG;IACU,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,UAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAIvG;;;OAGG;IACU,cAAc,CAAC,MAAM,EAAE,gBAAgB;IAepD;;;OAGG;IACU,gBAAgB,CAAC,MAAM,EAAE,gBAAgB;CAiBvD"}
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { request } from "../../request/Request";
9
9
  import { IModelApp } from "../../IModelApp";
10
+ import { Cartographic } from "@itwin/core-common";
10
11
  import { Range1d, Range2d } from "@itwin/core-geometry";
11
12
  // cspell:ignore atae qdng uyzv auje sealevel
12
13
  /** Provides an interface to the [Bing Maps elevation services](https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/).
@@ -14,6 +15,9 @@ import { Range1d, Range2d } from "@itwin/core-geometry";
14
15
  * passed to [[IModelApp.startup]].
15
16
  * @public
16
17
  * @extensions
18
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Provide an [[ElevationProvider]] and [[GeoidProvider]] implementation via [[IModelAppOptions.geospatialProviders]].
19
+ * @note This class structurally satisfies both [[ElevationProvider]] and [[GeoidProvider]] but does not use an explicit
20
+ * `implements` clause because api-extractor forbids `@public` classes from referencing `@beta` interfaces (ae-incompatible-release-tags).
17
21
  */
18
22
  export class BingElevationProvider {
19
23
  _heightRangeRequestTemplate;
@@ -22,8 +26,9 @@ export class BingElevationProvider {
22
26
  /** @public */
23
27
  constructor() {
24
28
  let bingKey = "";
29
+ // eslint-disable-next-line @typescript-eslint/no-deprecated -- this deprecated class reads from the deprecated BingMaps key by design
25
30
  if (IModelApp.mapLayerFormatRegistry.configOptions.BingMaps)
26
- bingKey = IModelApp.mapLayerFormatRegistry.configOptions.BingMaps.value;
31
+ bingKey = IModelApp.mapLayerFormatRegistry.configOptions.BingMaps.value; // eslint-disable-line @typescript-eslint/no-deprecated
27
32
  this._heightRangeRequestTemplate =
28
33
  "https://dev.virtualearth.net/REST/v1/Elevation/Bounds?bounds={boundingBox}&rows=16&cols=16&heights=ellipsoid&key={BingMapsAPIKey}"
29
34
  .replace("{BingMapsAPIKey}", bingKey);
@@ -67,11 +72,14 @@ export class BingElevationProvider {
67
72
  return undefined;
68
73
  }
69
74
  }
70
- /** @internal */
71
- async getGeodeticToSeaLevelOffset(point, iModel) {
72
- const carto = iModel.spatialToCartographicFromEcef(point);
73
- if (carto === undefined)
74
- return 0.0;
75
+ async getGeodeticToSeaLevelOffset(pointOrCarto, iModel) {
76
+ let carto;
77
+ if (pointOrCarto instanceof Cartographic) {
78
+ carto = pointOrCarto;
79
+ }
80
+ else {
81
+ carto = iModel.spatialToCartographicFromEcef(pointOrCarto);
82
+ }
75
83
  const requestUrl = this._seaLevelOffsetRequestTemplate.replace("{points}", `${carto.latitudeDegrees},${carto.longitudeDegrees}`);
76
84
  try {
77
85
  const tileResponseBody = await request(requestUrl, "json");
@@ -82,14 +90,15 @@ export class BingElevationProvider {
82
90
  }
83
91
  }
84
92
  /** Get the height (altitude) at a given iModel coordinate. The height is geodetic (WGS84 ellipsoid)
85
- * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then sea level height is returned using the Earth Gravitational Model 2008 (EGM2008 2.5).
86
- *
93
+ * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then sea level height is returned using the Earth Gravitational Model 2008 (EGM2008 2.5').
94
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use [[ElevationProvider.getHeight]] via [[IModelApp.elevationProvider]] instead.
87
95
  * @public
88
96
  */
89
97
  async getHeightValue(point, iModel, geodetic = true) {
90
98
  return this.getHeight(iModel.spatialToCartographicFromEcef(point), geodetic);
91
99
  }
92
100
  /** Get the height (altitude) range for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).
101
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use standalone [[getHeightRange]] function instead.
93
102
  * @public
94
103
  */
95
104
  async getHeightRange(iModel) {
@@ -105,6 +114,7 @@ export class BingElevationProvider {
105
114
  return heights ? Range1d.createArray(heights) : Range1d.createNull();
106
115
  }
107
116
  /** Get the average height (altitude) for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).
117
+ * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use standalone [[getHeightAverage]] function instead.
108
118
  * @public
109
119
  */
110
120
  async getHeightAverage(iModel) {
@@ -1 +1 @@
1
- {"version":3,"file":"BingElevation.js","sourceRoot":"","sources":["../../../../src/tile/map/BingElevation.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAW,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEjE,6CAA6C;AAE7C;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IACxB,2BAA2B,CAAS;IACpC,8BAA8B,CAAS;IACvC,0BAA0B,CAAS;IAE3C,cAAc;IACd;QACE,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,IAAI,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,QAAQ;YACzD,OAAO,GAAG,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC;QAE1E,IAAI,CAAC,2BAA2B;YAC9B,mIAAmI;iBAChI,OAAO,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,8BAA8B;YACjC,8FAA8F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MAAM,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACrC,MAAM,KAAK,GAAG,MAAM,CAAC,6BAA6B,CAAC,MAAM,CAAC,CAAC;YAC3D,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QACpD,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;IACvE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,gBAAgB,CAAC,MAAwB;QACpD,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QAC1C,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,CAAC;YACrD,MAAM,KAAK,GAAG,MAAM,CAAC,6BAA6B,CAAC,MAAM,CAAC,CAAC;YAC3D,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM;YAC7B,OAAO,CAAC,CAAC;QAEX,IAAI,KAAK,GAAG,GAAG,CAAC;QAChB,KAAK,MAAM,MAAM,IAAI,OAAO;YAC1B,KAAK,IAAI,MAAM,CAAC;QAElB,OAAO,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tiles\n */\nimport { request } from \"../../request/Request\";\nimport { IModelApp } from \"../../IModelApp\";\nimport { IModelConnection } from \"../../IModelConnection\";\nimport { Cartographic } from \"@itwin/core-common\";\nimport { Point3d, Range1d, Range2d } from \"@itwin/core-geometry\";\n\n// cspell:ignore atae qdng uyzv auje sealevel\n\n/** Provides an interface to the [Bing Maps elevation services](https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/).\n * Use of these services requires an API key to be supplied via [[MapLayerOptions.BingMaps]] in the [[IModelAppOptions.mapLayerOptions]]\n * passed to [[IModelApp.startup]].\n * @public\n * @extensions\n */\nexport class BingElevationProvider {\n private _heightRangeRequestTemplate: string;\n private _seaLevelOffsetRequestTemplate: string;\n private _heightListRequestTemplate: string;\n\n /** @public */\n constructor() {\n let bingKey = \"\";\n if (IModelApp.mapLayerFormatRegistry.configOptions.BingMaps)\n bingKey = IModelApp.mapLayerFormatRegistry.configOptions.BingMaps.value;\n\n this._heightRangeRequestTemplate =\n \"https://dev.virtualearth.net/REST/v1/Elevation/Bounds?bounds={boundingBox}&rows=16&cols=16&heights=ellipsoid&key={BingMapsAPIKey}\"\n .replace(\"{BingMapsAPIKey}\", bingKey);\n this._seaLevelOffsetRequestTemplate =\n \"https://dev.virtualearth.net/REST/v1/Elevation/SeaLevel?points={points}&key={BingMapsAPIKey}\"\n .replace(\"{BingMapsAPIKey}\", bingKey);\n this._heightListRequestTemplate =\n \"https://dev.virtualearth.net/REST/v1/Elevation/List?points={points}&heights={heights}&key={BingMapsAPIKey}\"\n .replace(\"{BingMapsAPIKey}\", bingKey);\n }\n\n /** Return the height (altitude) at a given cartographic location.\n * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then the sea level height id returned using the Earth Gravitational Model 2008 (EGM2008 2.5’).\n * @public\n */\n public async getHeight(carto: Cartographic, geodetic = true) {\n if (undefined === carto)\n return 0.0;\n\n const requestUrl =\n this._heightListRequestTemplate\n .replace(\"{points}\", `${carto.latitudeDegrees},${carto.longitudeDegrees}`)\n .replace(\"{heights}\", geodetic ? \"ellipsoid\" : \"sealevel\");\n\n try {\n const tileResponseBody = await request(requestUrl, \"json\");\n return tileResponseBody.resourceSets[0].resources[0].elevations[0];\n } catch {\n return 0.0;\n }\n }\n\n /** Returns 256 elevations in the specified range - 16 rows and 16 columns.\n * The elevations are ordered starting with the southwest corner, then proceeding west to east and south to north.\n * @beta\n */\n public async getHeights(range: Range2d): Promise<number[] | undefined> {\n const boundingBox = `${range.low.y},${range.low.x},${range.high.y},${range.high.x}`;\n const requestUrl = this._heightRangeRequestTemplate.replace(\"{boundingBox}\", boundingBox);\n\n try {\n const tileResponseBody = await request(requestUrl, \"json\");\n return tileResponseBody.resourceSets[0].resources[0].elevations;\n } catch {\n return undefined;\n }\n }\n\n /** @internal */\n public async getGeodeticToSeaLevelOffset(point: Point3d, iModel: IModelConnection): Promise<number> {\n const carto = iModel.spatialToCartographicFromEcef(point);\n if (carto === undefined)\n return 0.0;\n\n const requestUrl = this._seaLevelOffsetRequestTemplate.replace(\"{points}\", `${carto.latitudeDegrees},${carto.longitudeDegrees}`);\n try {\n const tileResponseBody = await request(requestUrl, \"json\");\n return tileResponseBody.resourceSets[0].resources[0].offsets[0];\n } catch {\n return 0.0;\n }\n }\n /** Get the height (altitude) at a given iModel coordinate. The height is geodetic (WGS84 ellipsoid)\n * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then sea level height is returned using the Earth Gravitational Model 2008 (EGM2008 2.5’).\n *\n * @public\n */\n public async getHeightValue(point: Point3d, iModel: IModelConnection, geodetic = true): Promise<number> {\n return this.getHeight(iModel.spatialToCartographicFromEcef(point), geodetic);\n }\n\n /** Get the height (altitude) range for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).\n * @public\n */\n public async getHeightRange(iModel: IModelConnection) {\n const latLongRange = Range2d.createNull();\n const range = iModel.projectExtents.clone();\n\n // Expand for project surroundings.\n range.expandInPlace(1000);\n for (const corner of range.corners()) {\n const carto = iModel.spatialToCartographicFromEcef(corner);\n latLongRange.extendXY(carto.longitudeDegrees, carto.latitudeDegrees);\n }\n\n const heights = await this.getHeights(latLongRange);\n return heights ? Range1d.createArray(heights) : Range1d.createNull();\n }\n\n /** Get the average height (altitude) for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).\n * @public\n */\n public async getHeightAverage(iModel: IModelConnection) {\n const latLongRange = Range2d.createNull();\n for (const corner of iModel.projectExtents.corners()) {\n const carto = iModel.spatialToCartographicFromEcef(corner);\n latLongRange.extendXY(carto.longitudeDegrees, carto.latitudeDegrees);\n }\n\n const heights = await this.getHeights(latLongRange);\n if (!heights || !heights.length)\n return 0;\n\n let total = 0.0;\n for (const height of heights)\n total += height;\n\n return total / heights.length;\n }\n}\n"]}
1
+ {"version":3,"file":"BingElevation.js","sourceRoot":"","sources":["../../../../src/tile/map/BingElevation.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAW,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEjE,6CAA6C;AAE7C;;;;;;;;GAQG;AACH,MAAM,OAAO,qBAAqB;IACxB,2BAA2B,CAAS;IACpC,8BAA8B,CAAS;IACvC,0BAA0B,CAAS;IAE3C,cAAc;IACd;QACE,IAAI,OAAO,GAAG,EAAE,CAAC;QACjB,sIAAsI;QACtI,IAAI,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,QAAQ;YACzD,OAAO,GAAG,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,uDAAuD;QAElI,IAAI,CAAC,2BAA2B;YAC9B,mIAAmI;iBAChI,OAAO,CAA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CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module Tiles\n */\nimport { request } from \"../../request/Request\";\nimport { IModelApp } from \"../../IModelApp\";\nimport { IModelConnection } from \"../../IModelConnection\";\nimport { Cartographic } from \"@itwin/core-common\";\nimport { Point3d, Range1d, Range2d } from \"@itwin/core-geometry\";\n\n// cspell:ignore atae qdng uyzv auje sealevel\n\n/** Provides an interface to the [Bing Maps elevation services](https://docs.microsoft.com/en-us/bingmaps/rest-services/elevations/).\n * Use of these services requires an API key to be supplied via [[MapLayerOptions.BingMaps]] in the [[IModelAppOptions.mapLayerOptions]]\n * passed to [[IModelApp.startup]].\n * @public\n * @extensions\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Provide an [[ElevationProvider]] and [[GeoidProvider]] implementation via [[IModelAppOptions.geospatialProviders]].\n * @note This class structurally satisfies both [[ElevationProvider]] and [[GeoidProvider]] but does not use an explicit\n * `implements` clause because api-extractor forbids `@public` classes from referencing `@beta` interfaces (ae-incompatible-release-tags).\n */\nexport class BingElevationProvider {\n private _heightRangeRequestTemplate: string;\n private _seaLevelOffsetRequestTemplate: string;\n private _heightListRequestTemplate: string;\n\n /** @public */\n constructor() {\n let bingKey = \"\";\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- this deprecated class reads from the deprecated BingMaps key by design\n if (IModelApp.mapLayerFormatRegistry.configOptions.BingMaps)\n bingKey = IModelApp.mapLayerFormatRegistry.configOptions.BingMaps.value; // eslint-disable-line @typescript-eslint/no-deprecated\n\n this._heightRangeRequestTemplate =\n \"https://dev.virtualearth.net/REST/v1/Elevation/Bounds?bounds={boundingBox}&rows=16&cols=16&heights=ellipsoid&key={BingMapsAPIKey}\"\n .replace(\"{BingMapsAPIKey}\", bingKey);\n this._seaLevelOffsetRequestTemplate =\n \"https://dev.virtualearth.net/REST/v1/Elevation/SeaLevel?points={points}&key={BingMapsAPIKey}\"\n .replace(\"{BingMapsAPIKey}\", bingKey);\n this._heightListRequestTemplate =\n \"https://dev.virtualearth.net/REST/v1/Elevation/List?points={points}&heights={heights}&key={BingMapsAPIKey}\"\n .replace(\"{BingMapsAPIKey}\", bingKey);\n }\n\n /** Return the height (altitude) at a given cartographic location.\n * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then the sea level height id returned using the Earth Gravitational Model 2008 (EGM2008 2.5’).\n * @public\n */\n public async getHeight(carto: Cartographic, geodetic = true): Promise<number> {\n if (undefined === carto)\n return 0.0;\n\n const requestUrl =\n this._heightListRequestTemplate\n .replace(\"{points}\", `${carto.latitudeDegrees},${carto.longitudeDegrees}`)\n .replace(\"{heights}\", geodetic ? \"ellipsoid\" : \"sealevel\");\n\n try {\n const tileResponseBody = await request(requestUrl, \"json\");\n return tileResponseBody.resourceSets[0].resources[0].elevations[0];\n } catch {\n return 0.0;\n }\n }\n\n /** Returns 256 elevations in the specified range - 16 rows and 16 columns.\n * The elevations are ordered starting with the southwest corner, then proceeding west to east and south to north.\n * @beta\n */\n public async getHeights(range: Range2d): Promise<number[] | undefined> {\n const boundingBox = `${range.low.y},${range.low.x},${range.high.y},${range.high.x}`;\n const requestUrl = this._heightRangeRequestTemplate.replace(\"{boundingBox}\", boundingBox);\n\n try {\n const tileResponseBody = await request(requestUrl, \"json\");\n return tileResponseBody.resourceSets[0].resources[0].elevations;\n } catch {\n return undefined;\n }\n }\n\n /** Return the offset from geodetic height to sea level height at the given cartographic location.\n * @note Satisfies [[GeoidProvider]] structurally.\n * @internal\n */\n public async getGeodeticToSeaLevelOffset(carto: Cartographic): Promise<number>;\n /** @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use the Cartographic overload instead.\n * @internal\n */\n public async getGeodeticToSeaLevelOffset(point: Point3d, iModel: IModelConnection): Promise<number>;\n public async getGeodeticToSeaLevelOffset(pointOrCarto: Point3d | Cartographic, iModel?: IModelConnection): Promise<number> {\n let carto: Cartographic;\n if (pointOrCarto instanceof Cartographic) {\n carto = pointOrCarto;\n } else {\n carto = iModel!.spatialToCartographicFromEcef(pointOrCarto);\n }\n\n const requestUrl = this._seaLevelOffsetRequestTemplate.replace(\"{points}\", `${carto.latitudeDegrees},${carto.longitudeDegrees}`);\n try {\n const tileResponseBody = await request(requestUrl, \"json\");\n return tileResponseBody.resourceSets[0].resources[0].offsets[0];\n } catch {\n return 0.0;\n }\n }\n /** Get the height (altitude) at a given iModel coordinate. The height is geodetic (WGS84 ellipsoid)\n * If geodetic is true (the default) then height is returned in the Ellipsoidal WGS84 datum. If geodetic is false then sea level height is returned using the Earth Gravitational Model 2008 (EGM2008 2.5').\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use [[ElevationProvider.getHeight]] via [[IModelApp.elevationProvider]] instead.\n * @public\n */\n public async getHeightValue(point: Point3d, iModel: IModelConnection, geodetic = true): Promise<number> {\n return this.getHeight(iModel.spatialToCartographicFromEcef(point), geodetic);\n }\n\n /** Get the height (altitude) range for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use standalone [[getHeightRange]] function instead.\n * @public\n */\n public async getHeightRange(iModel: IModelConnection) {\n const latLongRange = Range2d.createNull();\n const range = iModel.projectExtents.clone();\n\n // Expand for project surroundings.\n range.expandInPlace(1000);\n for (const corner of range.corners()) {\n const carto = iModel.spatialToCartographicFromEcef(corner);\n latLongRange.extendXY(carto.longitudeDegrees, carto.latitudeDegrees);\n }\n\n const heights = await this.getHeights(latLongRange);\n return heights ? Range1d.createArray(heights) : Range1d.createNull();\n }\n\n /** Get the average height (altitude) for a given iModel project extents. The height values are geodetic (WGS84 ellipsoid).\n * @deprecated in 5.11.0 - will not be removed until after 2027-07-03. Use standalone [[getHeightAverage]] function instead.\n * @public\n */\n public async getHeightAverage(iModel: IModelConnection) {\n const latLongRange = Range2d.createNull();\n for (const corner of iModel.projectExtents.corners()) {\n const carto = iModel.spatialToCartographicFromEcef(corner);\n latLongRange.extendXY(carto.longitudeDegrees, carto.latitudeDegrees);\n }\n\n const heights = await this.getHeights(latLongRange);\n if (!heights || !heights.length)\n return 0;\n\n let total = 0.0;\n for (const height of heights)\n total += height;\n\n return total / heights.length;\n }\n}\n"]}
@@ -1,10 +1,25 @@
1
+ /** @packageDocumentation
2
+ * @module Tiles
3
+ */
4
+ import { BeDuration } from "@itwin/core-bentley";
5
+ import { CesiumAccessClient } from "../../CesiumAccessClient";
1
6
  import { TerrainMeshProvider, TerrainMeshProviderOptions } from "../internal";
2
- /** Return the URL for a Cesium ion asset from its asset ID and request Key.
7
+ /** Return the URL for a Cesium Ion asset from its asset ID and request Key.
3
8
  * @public
4
9
  */
5
10
  export declare function getCesiumAssetUrl(osmAssetId: number, requestKey: string): string;
6
11
  /** @internal */
7
12
  export declare function getCesiumOSMBuildingsUrl(): string | undefined;
13
+ /** Returns the registered [[CesiumAccessClient]], or a default [[CesiumIonClient]] if none is registered.
14
+ * @internal
15
+ */
16
+ export declare function getCesiumAccessClient(): CesiumAccessClient;
17
+ /** Compute when to next re-resolve a Cesium access token. Honors the endpoint's `expiresAt` when it is a valid
18
+ * future time, but guards against an invalid (NaN) date - which would otherwise disable refresh entirely - and
19
+ * against a past/imminent expiry that would re-resolve the endpoint on essentially every tile read.
20
+ * @internal
21
+ */
22
+ export declare function computeCesiumTokenTimeoutInterval(expiresAt: Date | undefined): BeDuration;
8
23
  /** @internal */
9
24
  export declare function getCesiumAccessTokenAndEndpointUrl(assetId: string, requestKey?: string): Promise<{
10
25
  token?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CesiumTerrainProvider.d.ts","sourceRoot":"","sources":["../../../../src/tile/map/CesiumTerrainProvider.ts"],"names":[],"mappings":"AAgBA,OAAO,EACwF,mBAAmB,EAChH,0BAA0B,EAC3B,MAAM,aAAa,CAAC;AAUrB;;GAEG;AACH,wBAAgB,i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,MAAM,CAAA;CAAE,CAAC,CAqBxI;AAaD,gBAAgB;AAChB,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAsDzH"}
@@ -21,7 +21,7 @@ var QuantizedMeshExtensionIds;
21
21
  QuantizedMeshExtensionIds[QuantizedMeshExtensionIds["WaterMask"] = 2] = "WaterMask";
22
22
  QuantizedMeshExtensionIds[QuantizedMeshExtensionIds["Metadata"] = 4] = "Metadata";
23
23
  })(QuantizedMeshExtensionIds || (QuantizedMeshExtensionIds = {}));
24
- /** Return the URL for a Cesium ion asset from its asset ID and request Key.
24
+ /** Return the URL for a Cesium Ion asset from its asset ID and request Key.
25
25
  * @public
26
26
  */
27
27
  export function getCesiumAssetUrl(osmAssetId, requestKey) {
@@ -29,10 +29,30 @@ export function getCesiumAssetUrl(osmAssetId, requestKey) {
29
29
  }
30
30
  /** @internal */
31
31
  export function getCesiumOSMBuildingsUrl() {
32
- const key = IModelApp.tileAdmin.cesiumIonKey;
33
- if (undefined === key)
32
+ if (!IModelApp.tileAdmin.canAccessCesium)
34
33
  return undefined;
35
- return getCesiumAssetUrl(+CesiumIonAssetId.OSMBuildings, key);
34
+ return getCesiumAssetUrl(+CesiumIonAssetId.OSMBuildings, "");
35
+ }
36
+ /** Returns the registered [[CesiumAccessClient]], or a default [[CesiumIonClient]] if none is registered.
37
+ * @internal
38
+ */
39
+ export function getCesiumAccessClient() {
40
+ return IModelApp.tileAdmin.cesiumAccess ?? new CesiumIonClient();
41
+ }
42
+ const cesiumTokenTimeoutInterval = BeDuration.fromSeconds(60 * 30); // Request a new access token every 30 minutes...
43
+ const cesiumMinTokenTimeoutInterval = BeDuration.fromSeconds(60); // ...but never re-resolve more often than once per minute.
44
+ /** Compute when to next re-resolve a Cesium access token. Honors the endpoint's `expiresAt` when it is a valid
45
+ * future time, but guards against an invalid (NaN) date - which would otherwise disable refresh entirely - and
46
+ * against a past/imminent expiry that would re-resolve the endpoint on essentially every tile read.
47
+ * @internal
48
+ */
49
+ export function computeCesiumTokenTimeoutInterval(expiresAt) {
50
+ if (undefined === expiresAt)
51
+ return cesiumTokenTimeoutInterval;
52
+ const remainingMs = expiresAt.getTime() - Date.now();
53
+ if (!Number.isFinite(remainingMs))
54
+ return cesiumTokenTimeoutInterval;
55
+ return BeDuration.fromMilliseconds(Math.max(remainingMs, cesiumMinTokenTimeoutInterval.milliseconds));
36
56
  }
37
57
  /** @internal */
38
58
  export async function getCesiumAccessTokenAndEndpointUrl(assetId, requestKey) {
@@ -66,15 +86,19 @@ function notifyTerrainError(detailedDescription) {
66
86
  }
67
87
  /** @internal */
68
88
  export async function getCesiumTerrainProvider(opts) {
69
- const accessTokenAndEndpointUrl = await getCesiumAccessTokenAndEndpointUrl(opts.dataSource || CesiumTerrainAssetId.Default);
70
- if (!accessTokenAndEndpointUrl.token || !accessTokenAndEndpointUrl.url) {
89
+ const assetId = opts.dataSource || CesiumTerrainAssetId.Default;
90
+ const client = getCesiumAccessClient();
91
+ const endpoint = await client.getAssetEndpoint(assetId, opts.iTwinId);
92
+ if (!endpoint) {
71
93
  notifyTerrainError(IModelApp.localization.getLocalizedString(`iModelJs:BackgroundMap.MissingCesiumToken`));
72
94
  return undefined;
73
95
  }
96
+ // Resource paths (layer.json, tiles) are appended directly to the base URL, so ensure it ends with a slash.
97
+ const baseUrl = endpoint.url.endsWith("/") ? endpoint.url : `${endpoint.url}/`;
74
98
  let layers;
75
99
  try {
76
- const layerRequestOptions = { headers: { authorization: `Bearer ${accessTokenAndEndpointUrl.token}` } };
77
- const layerUrl = `${accessTokenAndEndpointUrl.url}layer.json`;
100
+ const layerRequestOptions = { headers: { authorization: `Bearer ${endpoint.accessToken}` } };
101
+ const layerUrl = `${baseUrl}layer.json`;
78
102
  layers = await request(layerUrl, "json", layerRequestOptions);
79
103
  }
80
104
  catch {
@@ -103,12 +127,12 @@ export async function getCesiumTerrainProvider(opts) {
103
127
  }
104
128
  }
105
129
  }
106
- let tileUrlTemplate = accessTokenAndEndpointUrl.url + layers.tiles[0].replace("{version}", layers.version);
130
+ let tileUrlTemplate = baseUrl + layers.tiles[0].replace("{version}", layers.version);
107
131
  if (opts.wantNormals)
108
132
  tileUrlTemplate = tileUrlTemplate.replace("?", "?extensions=octvertexnormals-watermask-metadata&");
109
133
  const maxDepth = JsonUtils.asInt(layers.maxzoom, 19);
110
134
  // TBD -- When we have an API extract the heights for the project from the terrain tiles - for use temporary Bing elevation.
111
- return new CesiumTerrainProvider(opts, accessTokenAndEndpointUrl.token, tileUrlTemplate, maxDepth, tilingScheme, tileAvailability, layers.metadataAvailability);
135
+ return new CesiumTerrainProvider(opts, endpoint.accessToken, endpoint.expiresAt, tileUrlTemplate, maxDepth, tilingScheme, tileAvailability, layers.metadataAvailability);
112
136
  }
113
137
  function zigZagDecode(value) {
114
138
  return (value >> 1) ^ (-(value & 1));
@@ -143,19 +167,19 @@ class CesiumTerrainProvider extends TerrainMeshProvider {
143
167
  _metaDataAvailableLevel;
144
168
  _exaggeration;
145
169
  _assetId;
170
+ _iTwinId;
146
171
  static _scratchQPoint2d = QPoint2d.fromScalars(0, 0);
147
172
  static _scratchPoint2d = Point2d.createZero();
148
173
  static _scratchPoint = Point3d.createZero();
149
174
  static _scratchNormal = Vector3d.createZero();
150
175
  static _scratchHeightRange = Range1d.createNull();
151
- static _tokenTimeoutInterval = BeDuration.fromSeconds(60 * 30); // Request a new access token every 30 minutes...
152
176
  _tokenTimeOut;
153
177
  forceTileLoad(tile) {
154
178
  // Force loading of the metadata availability tiles as these are required for determining the availability of descendants.
155
179
  const mapTile = tile;
156
180
  return undefined !== this._metaDataAvailableLevel && mapTile.quadId.level === this._metaDataAvailableLevel && !mapTile.everLoaded;
157
181
  }
158
- constructor(opts, accessToken, tileUrlTemplate, maxDepth, tilingScheme, tileAvailability, metaDataAvailableLevel) {
182
+ constructor(opts, accessToken, expiresAt, tileUrlTemplate, maxDepth, tilingScheme, tileAvailability, metaDataAvailableLevel) {
159
183
  super();
160
184
  this._wantSkirts = opts.wantSkirts;
161
185
  this._exaggeration = opts.exaggeration;
@@ -166,9 +190,10 @@ class CesiumTerrainProvider extends TerrainMeshProvider {
166
190
  this._tileAvailability = tileAvailability;
167
191
  this._metaDataAvailableLevel = metaDataAvailableLevel;
168
192
  this._assetId = opts.dataSource || CesiumTerrainAssetId.Default;
169
- this._tokenTimeOut = BeTimePoint.now().plus(CesiumTerrainProvider._tokenTimeoutInterval);
193
+ this._iTwinId = opts.iTwinId;
194
+ this._tokenTimeOut = BeTimePoint.now().plus(computeCesiumTokenTimeoutInterval(expiresAt));
170
195
  }
171
- /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [addAttributions] instead. */
196
+ /** @deprecated in 5.0 - might be removed in next major version. Use [addAttributions] instead. */
172
197
  addLogoCards(cards) {
173
198
  if (cards.dataset.cesiumIonLogoCard)
174
199
  return;
@@ -212,11 +237,12 @@ class CesiumTerrainProvider extends TerrainMeshProvider {
212
237
  // ###TODO why does he update the access token when reading the mesh instead of when requesting it?
213
238
  // This function only returns undefined if it fails to acquire token - but it doesn't need the token...
214
239
  if (BeTimePoint.now().milliseconds > this._tokenTimeOut.milliseconds) {
215
- const accessTokenAndEndpointUrl = await getCesiumAccessTokenAndEndpointUrl(this._assetId);
216
- if (!accessTokenAndEndpointUrl.token || args.isCanceled())
240
+ const client = getCesiumAccessClient();
241
+ const endpoint = await client.getAssetEndpoint(this._assetId, this._iTwinId);
242
+ if (!endpoint || args.isCanceled())
217
243
  return undefined;
218
- this._accessToken = accessTokenAndEndpointUrl.token;
219
- this._tokenTimeOut = BeTimePoint.now().plus(CesiumTerrainProvider._tokenTimeoutInterval);
244
+ this._accessToken = endpoint.accessToken;
245
+ this._tokenTimeOut = BeTimePoint.now().plus(computeCesiumTokenTimeoutInterval(endpoint.expiresAt));
220
246
  }
221
247
  const { data, tile } = args;
222
248
  assert(data instanceof Uint8Array);
@@ -403,4 +429,16 @@ class CesiumTerrainProvider extends TerrainMeshProvider {
403
429
  return undefined === heightRange ? parentRange : heightRange;
404
430
  }
405
431
  }
432
+ /** Default [[CesiumAccessClient]] that authenticates directly with Cesium Ion using [[TileAdmin.cesiumIonKey]].
433
+ * This is used when no custom [[CesiumAccessClient]] is registered via [[TileAdmin.Props.cesiumAccess]].
434
+ * @internal
435
+ */
436
+ class CesiumIonClient {
437
+ async getAssetEndpoint(assetId, _iTwinId) {
438
+ const result = await getCesiumAccessTokenAndEndpointUrl(assetId);
439
+ if (!result.token || !result.url)
440
+ return undefined;
441
+ return { accessToken: result.token, url: result.url };
442
+ }
443
+ }
406
444
  //# sourceMappingURL=CesiumTerrainProvider.js.map