@itwin/core-common 5.0.0-dev.35 → 5.0.0-dev.38

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 (351) hide show
  1. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  2. package/lib/cjs/AnalysisStyle.js.map +1 -1
  3. package/lib/cjs/Atmosphere.js.map +1 -1
  4. package/lib/cjs/AuthorizationClient.js.map +1 -1
  5. package/lib/cjs/BackendTypes.js.map +1 -1
  6. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/Base64EncodedString.js.map +1 -1
  9. package/lib/cjs/BlobReader.js.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  11. package/lib/cjs/Camera.js.map +1 -1
  12. package/lib/cjs/ChangedElements.js.map +1 -1
  13. package/lib/cjs/ChangedEntities.js.map +1 -1
  14. package/lib/cjs/ChangesetProps.js.map +1 -1
  15. package/lib/cjs/ClipStyle.js.map +1 -1
  16. package/lib/cjs/Code.js.map +1 -1
  17. package/lib/cjs/ColorByName.js.map +1 -1
  18. package/lib/cjs/ColorDef.js.map +1 -1
  19. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  20. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  21. package/lib/cjs/ContextRealityModel.js.map +1 -1
  22. package/lib/cjs/ContourDisplay.js.map +1 -1
  23. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  24. package/lib/cjs/ECSchemaProps.js.map +1 -1
  25. package/lib/cjs/ECSqlReader.js.map +1 -1
  26. package/lib/cjs/ECSqlTypes.js.map +1 -1
  27. package/lib/cjs/ElementMesh.js.map +1 -1
  28. package/lib/cjs/ElementProps.d.ts.map +1 -1
  29. package/lib/cjs/ElementProps.js +1 -1
  30. package/lib/cjs/ElementProps.js.map +1 -1
  31. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  32. package/lib/cjs/EntityProps.js.map +1 -1
  33. package/lib/cjs/EntityReference.js.map +1 -1
  34. package/lib/cjs/Environment.js.map +1 -1
  35. package/lib/cjs/FeatureIndex.js.map +1 -1
  36. package/lib/cjs/FeatureSymbology.js.map +1 -1
  37. package/lib/cjs/FeatureTable.js.map +1 -1
  38. package/lib/cjs/Fonts.js.map +1 -1
  39. package/lib/cjs/Frustum.js.map +1 -1
  40. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  41. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  42. package/lib/cjs/GeometryContainment.js.map +1 -1
  43. package/lib/cjs/GeometryParams.js.map +1 -1
  44. package/lib/cjs/GeometrySummary.js.map +1 -1
  45. package/lib/cjs/Gradient.js.map +1 -1
  46. package/lib/cjs/GraphicParams.js.map +1 -1
  47. package/lib/cjs/GroundPlane.js.map +1 -1
  48. package/lib/cjs/HSLColor.js.map +1 -1
  49. package/lib/cjs/HSVColor.js.map +1 -1
  50. package/lib/cjs/HiddenLine.js.map +1 -1
  51. package/lib/cjs/Hilite.js.map +1 -1
  52. package/lib/cjs/IModel.js.map +1 -1
  53. package/lib/cjs/IModelError.d.ts +0 -2
  54. package/lib/cjs/IModelError.d.ts.map +1 -1
  55. package/lib/cjs/IModelError.js +1 -8
  56. package/lib/cjs/IModelError.js.map +1 -1
  57. package/lib/cjs/IModelVersion.js.map +1 -1
  58. package/lib/cjs/ITwinError.js.map +1 -1
  59. package/lib/cjs/Image.js.map +1 -1
  60. package/lib/cjs/IpcAppProps.js.map +1 -1
  61. package/lib/cjs/LightSettings.js.map +1 -1
  62. package/lib/cjs/LinePixels.js.map +1 -1
  63. package/lib/cjs/Localization.js.map +1 -1
  64. package/lib/cjs/MapImagerySettings.js.map +1 -1
  65. package/lib/cjs/MapLayerSettings.js.map +1 -1
  66. package/lib/cjs/MassProperties.js.map +1 -1
  67. package/lib/cjs/MaterialProps.js.map +1 -1
  68. package/lib/cjs/ModelClipGroup.js.map +1 -1
  69. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  70. package/lib/cjs/ModelProps.js.map +1 -1
  71. package/lib/cjs/NativeAppProps.js.map +1 -1
  72. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  73. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  74. package/lib/cjs/PlanarClipMask.js.map +1 -1
  75. package/lib/cjs/QPoint.js.map +1 -1
  76. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  77. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  78. package/lib/cjs/Render.js.map +1 -1
  79. package/lib/cjs/RenderMaterial.js.map +1 -1
  80. package/lib/cjs/RenderTexture.js.map +1 -1
  81. package/lib/cjs/RgbColor.js.map +1 -1
  82. package/lib/cjs/RpcInterface.js +1 -1
  83. package/lib/cjs/RpcInterface.js.map +1 -1
  84. package/lib/cjs/RpcManager.js.map +1 -1
  85. package/lib/cjs/SessionProps.js.map +1 -1
  86. package/lib/cjs/SkyBox.js.map +1 -1
  87. package/lib/cjs/SolarCalculate.js.map +1 -1
  88. package/lib/cjs/SolarShadows.js.map +1 -1
  89. package/lib/cjs/SpatialClassification.js.map +1 -1
  90. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  91. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  92. package/lib/cjs/TerrainSettings.js.map +1 -1
  93. package/lib/cjs/TextureMapping.js.map +1 -1
  94. package/lib/cjs/TextureProps.js.map +1 -1
  95. package/lib/cjs/ThematicDisplay.js.map +1 -1
  96. package/lib/cjs/Thumbnail.js.map +1 -1
  97. package/lib/cjs/TileProps.js.map +1 -1
  98. package/lib/cjs/Tween.js.map +1 -1
  99. package/lib/cjs/TxnAction.js.map +1 -1
  100. package/lib/cjs/ViewDetails.js.map +1 -1
  101. package/lib/cjs/ViewFlags.js.map +1 -1
  102. package/lib/cjs/ViewProps.js.map +1 -1
  103. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  104. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  105. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  106. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  107. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  108. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  109. package/lib/cjs/core-common.js.map +1 -1
  110. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  111. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  112. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  113. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  114. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  115. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  116. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  117. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  118. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  119. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  120. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  121. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  122. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  123. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  124. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  125. package/lib/cjs/geometry/Placement.js.map +1 -1
  126. package/lib/cjs/geometry/Projection.js.map +1 -1
  127. package/lib/cjs/geometry/TextString.js.map +1 -1
  128. package/lib/cjs/internal/Snapping.js.map +1 -1
  129. package/lib/cjs/internal/cross-package.js.map +1 -1
  130. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  131. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  132. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  133. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  134. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  135. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  136. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  137. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  138. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  139. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  140. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  141. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  142. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +0 -3
  144. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  145. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  146. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  151. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  152. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  153. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  154. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  155. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  156. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  157. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  158. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  159. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  160. package/lib/cjs/rpc/web/RpcMultipart.js +3 -2
  161. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  162. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  163. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  164. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  165. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  166. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  167. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  168. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  169. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  170. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  171. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  172. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  173. package/lib/cjs/tile/TileIO.js.map +1 -1
  174. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  175. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  176. package/lib/esm/AmbientOcclusion.js.map +1 -1
  177. package/lib/esm/AnalysisStyle.js.map +1 -1
  178. package/lib/esm/Atmosphere.js.map +1 -1
  179. package/lib/esm/AuthorizationClient.js.map +1 -1
  180. package/lib/esm/BackendTypes.js.map +1 -1
  181. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  182. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  183. package/lib/esm/Base64EncodedString.js.map +1 -1
  184. package/lib/esm/BlobReader.js.map +1 -1
  185. package/lib/esm/BriefcaseTypes.js.map +1 -1
  186. package/lib/esm/Camera.js.map +1 -1
  187. package/lib/esm/ChangedElements.js.map +1 -1
  188. package/lib/esm/ChangedEntities.js.map +1 -1
  189. package/lib/esm/ChangesetProps.js.map +1 -1
  190. package/lib/esm/ClipStyle.js.map +1 -1
  191. package/lib/esm/Code.js.map +1 -1
  192. package/lib/esm/ColorByName.js.map +1 -1
  193. package/lib/esm/ColorDef.js.map +1 -1
  194. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  195. package/lib/esm/ConcurrentQuery.js.map +1 -1
  196. package/lib/esm/ContextRealityModel.js.map +1 -1
  197. package/lib/esm/ContourDisplay.js.map +1 -1
  198. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  199. package/lib/esm/ECSchemaProps.js.map +1 -1
  200. package/lib/esm/ECSqlReader.js.map +1 -1
  201. package/lib/esm/ECSqlTypes.js.map +1 -1
  202. package/lib/esm/ElementMesh.js.map +1 -1
  203. package/lib/esm/ElementProps.d.ts.map +1 -1
  204. package/lib/esm/ElementProps.js +2 -2
  205. package/lib/esm/ElementProps.js.map +1 -1
  206. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  207. package/lib/esm/EntityProps.js.map +1 -1
  208. package/lib/esm/EntityReference.js.map +1 -1
  209. package/lib/esm/Environment.js.map +1 -1
  210. package/lib/esm/FeatureIndex.js.map +1 -1
  211. package/lib/esm/FeatureSymbology.js.map +1 -1
  212. package/lib/esm/FeatureTable.js.map +1 -1
  213. package/lib/esm/Fonts.js.map +1 -1
  214. package/lib/esm/Frustum.js.map +1 -1
  215. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  216. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  217. package/lib/esm/GeometryContainment.js.map +1 -1
  218. package/lib/esm/GeometryParams.js.map +1 -1
  219. package/lib/esm/GeometrySummary.js.map +1 -1
  220. package/lib/esm/Gradient.js.map +1 -1
  221. package/lib/esm/GraphicParams.js.map +1 -1
  222. package/lib/esm/GroundPlane.js.map +1 -1
  223. package/lib/esm/HSLColor.js.map +1 -1
  224. package/lib/esm/HSVColor.js.map +1 -1
  225. package/lib/esm/HiddenLine.js.map +1 -1
  226. package/lib/esm/Hilite.js.map +1 -1
  227. package/lib/esm/IModel.js.map +1 -1
  228. package/lib/esm/IModelError.d.ts +0 -2
  229. package/lib/esm/IModelError.d.ts.map +1 -1
  230. package/lib/esm/IModelError.js +0 -1
  231. package/lib/esm/IModelError.js.map +1 -1
  232. package/lib/esm/IModelVersion.js.map +1 -1
  233. package/lib/esm/ITwinError.js.map +1 -1
  234. package/lib/esm/Image.js.map +1 -1
  235. package/lib/esm/IpcAppProps.js.map +1 -1
  236. package/lib/esm/LightSettings.js.map +1 -1
  237. package/lib/esm/LinePixels.js.map +1 -1
  238. package/lib/esm/Localization.js.map +1 -1
  239. package/lib/esm/MapImagerySettings.js.map +1 -1
  240. package/lib/esm/MapLayerSettings.js.map +1 -1
  241. package/lib/esm/MassProperties.js.map +1 -1
  242. package/lib/esm/MaterialProps.js.map +1 -1
  243. package/lib/esm/ModelClipGroup.js.map +1 -1
  244. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  245. package/lib/esm/ModelProps.js.map +1 -1
  246. package/lib/esm/NativeAppProps.js.map +1 -1
  247. package/lib/esm/OctEncodedNormal.js.map +1 -1
  248. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  249. package/lib/esm/PlanarClipMask.js.map +1 -1
  250. package/lib/esm/QPoint.js.map +1 -1
  251. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  252. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  253. package/lib/esm/Render.js.map +1 -1
  254. package/lib/esm/RenderMaterial.js.map +1 -1
  255. package/lib/esm/RenderTexture.js.map +1 -1
  256. package/lib/esm/RgbColor.js.map +1 -1
  257. package/lib/esm/RpcInterface.js +2 -2
  258. package/lib/esm/RpcInterface.js.map +1 -1
  259. package/lib/esm/RpcManager.js.map +1 -1
  260. package/lib/esm/SessionProps.js.map +1 -1
  261. package/lib/esm/SkyBox.js.map +1 -1
  262. package/lib/esm/SolarCalculate.js.map +1 -1
  263. package/lib/esm/SolarShadows.js.map +1 -1
  264. package/lib/esm/SpatialClassification.js.map +1 -1
  265. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  266. package/lib/esm/SubCategoryOverride.js.map +1 -1
  267. package/lib/esm/TerrainSettings.js.map +1 -1
  268. package/lib/esm/TextureMapping.js.map +1 -1
  269. package/lib/esm/TextureProps.js.map +1 -1
  270. package/lib/esm/ThematicDisplay.js.map +1 -1
  271. package/lib/esm/Thumbnail.js.map +1 -1
  272. package/lib/esm/TileProps.js.map +1 -1
  273. package/lib/esm/Tween.js.map +1 -1
  274. package/lib/esm/TxnAction.js.map +1 -1
  275. package/lib/esm/ViewDetails.js.map +1 -1
  276. package/lib/esm/ViewFlags.js.map +1 -1
  277. package/lib/esm/ViewProps.js.map +1 -1
  278. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  279. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  280. package/lib/esm/annotation/TextBlock.js.map +1 -1
  281. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  282. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  283. package/lib/esm/annotation/TextStyle.js.map +1 -1
  284. package/lib/esm/core-common.js.map +1 -1
  285. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  286. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  287. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  288. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  289. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  290. package/lib/esm/geometry/Cartographic.js.map +1 -1
  291. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  292. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  293. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  294. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  295. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  296. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  297. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  298. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  299. package/lib/esm/geometry/LineStyle.js.map +1 -1
  300. package/lib/esm/geometry/Placement.js.map +1 -1
  301. package/lib/esm/geometry/Projection.js.map +1 -1
  302. package/lib/esm/geometry/TextString.js.map +1 -1
  303. package/lib/esm/internal/Snapping.js.map +1 -1
  304. package/lib/esm/internal/cross-package.js.map +1 -1
  305. package/lib/esm/ipc/IpcSession.js.map +1 -1
  306. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  307. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  308. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  309. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  310. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  311. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  312. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  313. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  314. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  315. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  317. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  318. package/lib/esm/rpc/core/RpcMarshaling.d.ts +0 -3
  319. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  320. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  321. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  322. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  323. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  324. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  325. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  326. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  327. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  328. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  329. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  330. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  331. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  332. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  333. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  334. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  335. package/lib/esm/rpc/web/RpcMultipart.js +2 -1
  336. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  337. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  338. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  339. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  340. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  341. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  342. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  343. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  344. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  345. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  346. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  347. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  348. package/lib/esm/tile/TileIO.js.map +1 -1
  349. package/lib/esm/tile/TileMetadata.js.map +1 -1
  350. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  351. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAC7B,qDAAiD;AAEjD;;;;;;;;GAQG;AACH,MAAa,OAAO;IAKlB,YAAmB,YAAwB,mBAAI,CAAC,OAAO,EAAE,gBAA4B,mBAAI,CAAC,OAAO,EAAE,gBAA+B,8BAAa,CAAC,OAAO;QACrJ,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,IAAW,SAAS,KAAc,OAAO,CAAC,mBAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,mBAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa,KAAK,8BAAa,CAAC,OAAO,CAA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C;QACnB,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,8BAA8B,CAAC,CAAC;QAErF,KAAK,IAAI,YAAY,GAAG,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,EAAE,CAAC;YAC3E,IAAI,YAAY,GAAG,UAAU,CAAC,gBAAgB;gBAC5C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;YAElD,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACtD,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,UAAU,CAAC,OAAO,CAAC;YAC1C,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC;YAC5B,MAAM,MAAM,CAAC;QACf,CAAC;IACH,CAAC;IAEM,QAAQ,CAAC,MAA8B;QAC5C,OAAO;YACL,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;IAEM,kBAAkB,CAAC,YAAoB;QAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACzD,CAAC;IAEM,wBAAwB,CAAC,aAA4B,EAAE,SAAiB;QAC7E,IAAI,CAAC,SAAS,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,IAAI,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;IAC7F,CAAC;CACF;AAzFD,oEAyFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\r\n} from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"./GeometryParams\";\r\n\r\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\r\n * grouped with other such entities in a [[FeatureTable]].\r\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\r\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\r\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\r\n * [[GeometryClass]], so an individual element may produce more than one feature.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class Feature {\r\n public readonly elementId: Id64String;\r\n public readonly subCategoryId: Id64String;\r\n public readonly geometryClass: GeometryClass;\r\n\r\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\r\n this.elementId = elementId;\r\n this.subCategoryId = subCategoryId;\r\n this.geometryClass = geometryClass;\r\n }\r\n\r\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\r\n public get isUndefined(): boolean { return !this.isDefined; }\r\n\r\n /** Returns true if this feature is equivalent to the supplied feature. */\r\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\r\n\r\n /** Performs ordinal comparison of this feature with another.\r\n * @param rhs The feature to compare with.\r\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\r\n */\r\n public compare(rhs: Feature): number {\r\n if (this === rhs)\r\n return 0;\r\n\r\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.elementId, rhs.elementId);\r\n if (0 === cmp) {\r\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\r\n }\r\n }\r\n\r\n return cmp;\r\n }\r\n}\r\n\r\n/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].\r\n * @public\r\n */\r\nexport interface ModelFeature {\r\n modelId: Id64String;\r\n elementId: Id64String;\r\n subCategoryId: Id64String;\r\n geometryClass: GeometryClass;\r\n}\r\n\r\n/** @public */\r\nexport namespace ModelFeature {\r\n /** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.\r\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].\r\n */\r\n export function create(): ModelFeature {\r\n return {\r\n modelId: Id64.invalid,\r\n elementId: Id64.invalid,\r\n subCategoryId: Id64.invalid,\r\n geometryClass: GeometryClass.Primary,\r\n };\r\n }\r\n\r\n /** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */\r\n export function isDefined(feature: ModelFeature): boolean {\r\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\r\n }\r\n\r\n /** @alpha */\r\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\r\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\r\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\r\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\r\n result.geometryClass = packed.geometryClass;\r\n return result;\r\n }\r\n}\r\n\r\n/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.\r\n * @public\r\n */\r\nexport interface PackedFeature {\r\n modelId: Id64.Uint32Pair;\r\n elementId: Id64.Uint32Pair;\r\n subCategoryId: Id64.Uint32Pair;\r\n geometryClass: GeometryClass;\r\n /** @alpha */\r\n animationNodeId: number;\r\n}\r\n\r\n/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.\r\n * @public\r\n */\r\nexport interface PackedFeatureWithIndex extends PackedFeature {\r\n index: number;\r\n}\r\n\r\n/** @public */\r\nexport namespace PackedFeature {\r\n /** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.\r\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].\r\n */\r\n export function create(): PackedFeature {\r\n const pair = { upper: 0, lower: 0 };\r\n return {\r\n modelId: { ...pair },\r\n elementId: { ...pair },\r\n subCategoryId: { ...pair },\r\n geometryClass: GeometryClass.Primary,\r\n animationNodeId: 0,\r\n };\r\n }\r\n\r\n /** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.\r\n * This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].\r\n */\r\n export function createWithIndex(): PackedFeatureWithIndex {\r\n const result = create() as PackedFeatureWithIndex;\r\n result.index = 0;\r\n return result;\r\n }\r\n}\r\n\r\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\r\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\r\n * Classifier type.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum BatchType {\r\n /** This batch contains graphics derived from a model's visible geometry. */\r\n Primary,\r\n /**\r\n * This batch contains color volumes which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n VolumeClassifier,\r\n /**\r\n * This batch contains planar graphics which are used to classify a model's visible geometry.\r\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\r\n * to resymbolize the primary geometry.\r\n */\r\n PlanarClassifier,\r\n}\r\n\r\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\r\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\r\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\r\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\r\n * identifying the elements whose geometry appears within that tile.\r\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\r\n * @public\r\n */\r\nexport class FeatureTable extends IndexMap<Feature> {\r\n public readonly modelId: Id64String;\r\n public readonly type: BatchType;\r\n\r\n /** Construct an empty FeatureTable. */\r\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\r\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\r\n this.modelId = modelId;\r\n this.type = type;\r\n }\r\n\r\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\r\n public get maxFeatures(): number { return this._maximumSize; }\r\n /** @internal */\r\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\r\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\r\n public get isUniform(): boolean { return 1 === this.length; }\r\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\r\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\r\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\r\n\r\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\r\n public findFeature(index: number): Feature | undefined {\r\n for (const entry of this._array)\r\n if (entry.index === index)\r\n return entry.value;\r\n\r\n return undefined;\r\n }\r\n\r\n /** @internal */\r\n public insertWithIndex(feature: Feature, index: number): void {\r\n const bound = this.lowerBound(feature);\r\n assert(!bound.equal);\r\n assert(!this.isFull);\r\n const entry = new IndexedValue<Feature>(feature, index);\r\n this._array.splice(bound.index, 0, entry);\r\n }\r\n\r\n /** @internal */\r\n public getArray(): Array<IndexedValue<Feature>> { return this._array; }\r\n\r\n /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */\r\n public pack(): RenderFeatureTable {\r\n return PackedFeatureTable.pack(this);\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\r\n\r\n/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).\r\n * The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.\r\n * @see [[FeatureTable.pack]] to produce a RenderFeatureTable.\r\n * @public\r\n */\r\nexport interface RenderFeatureTable {\r\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\r\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\r\n * persistent models batched together.\r\n */\r\n readonly batchModelId: Id64String;\r\n /** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */\r\n readonly batchModelIdPair: Id64.Uint32Pair;\r\n /** The number of features in the table; equivalently, one more than the largest feature index. */\r\n readonly numFeatures: number;\r\n /** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */\r\n readonly byteLength: number;\r\n readonly type: BatchType;\r\n /** @alpha */\r\n animationNodeIds?: UintArray;\r\n\r\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\r\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\r\n\r\n /** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */\r\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\r\n\r\n /** Find the Id of the element associated with the feature at the specified index. */\r\n findElementId(featureIndex: number): Id64String | undefined;\r\n\r\n /** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.\r\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\r\n */\r\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\r\n\r\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\r\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\r\n\r\n /** Get an object that provides ordered iteration over all features.\r\n * @note The `output` object is reused (mutated in place) as the current value on each iteration.\r\n */\r\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\r\n\r\n /** @alpha */\r\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\r\n\r\n /** @alpha */\r\n getAnimationNodeId(featureIndex: number): number;\r\n\r\n /** Get the Id of the model associated with the feature at the specified index.\r\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\r\n * This is more efficient than [[getFeature]] for callers who are only interested in the model Id.\r\n */\r\n getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\r\n}\r\n\r\nconst scratchPackedFeature = PackedFeature.create();\r\n\r\nfunction populateAnimationNodeIds(table: RenderFeatureTable, computeNodeId: ComputeNodeId, maxNodeId: number): UintArray | undefined {\r\n assert(maxNodeId > 0);\r\n\r\n let nodeIds;\r\n const outputFeature = PackedFeature.createWithIndex();\r\n for (const feature of table.iterable(outputFeature)) {\r\n const nodeId = computeNodeId(feature);\r\n assert(nodeId <= maxNodeId);\r\n if (0 !== nodeId) {\r\n if (!nodeIds) {\r\n const size = table.numFeatures;\r\n nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\r\n }\r\n\r\n nodeIds[feature.index] = nodeId;\r\n }\r\n }\r\n\r\n return nodeIds;\r\n}\r\n\r\n/**\r\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\r\n * wherein each feature occupies 3 32-bit integers.\r\n * @internal\r\n */\r\nexport class PackedFeatureTable implements RenderFeatureTable {\r\n public readonly data: Uint32Array;\r\n public readonly batchModelId: Id64String;\r\n public readonly batchModelIdPair: Id64.Uint32Pair;\r\n public readonly numFeatures: number;\r\n public readonly anyDefined: boolean;\r\n public readonly type: BatchType;\r\n public animationNodeIds?: UintArray;\r\n\r\n public get byteLength(): number { return this.data.byteLength; }\r\n\r\n /** Construct a PackedFeatureTable from the packed binary data.\r\n * This is used internally when deserializing Tiles in iMdl format.\r\n * @internal\r\n */\r\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: UintArray) {\r\n this.data = data;\r\n this.batchModelId = modelId;\r\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\r\n this.numFeatures = numFeatures;\r\n this.type = type;\r\n this.animationNodeIds = animationNodeIds;\r\n\r\n switch (this.numFeatures) {\r\n case 0:\r\n this.anyDefined = false;\r\n break;\r\n case 1:\r\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\r\n break;\r\n default:\r\n this.anyDefined = true;\r\n break;\r\n }\r\n\r\n assert(this.data.length >= this._subCategoriesOffset);\r\n assert(undefined === this.animationNodeIds || this.animationNodeIds.length === this.numFeatures);\r\n }\r\n\r\n /** Create a packed feature table from a [[FeatureTable]]. */\r\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\r\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\r\n // the array cannot be resized after it is created.\r\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\r\n // back-end arrive within tiles already in the packed format.\r\n const subcategories = new Map<string, number>();\r\n for (const iv of featureTable.getArray()) {\r\n const found = subcategories.get(iv.value.subCategoryId.toString());\r\n if (undefined === found)\r\n subcategories.set(iv.value.subCategoryId, subcategories.size);\r\n }\r\n\r\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\r\n const subCategoriesOffset = 3 * featureTable.length;\r\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\r\n const uint32s = new Uint32Array(nUint32s);\r\n\r\n for (const iv of featureTable.getArray()) {\r\n const feature = iv.value;\r\n const index = iv.index * 3;\r\n\r\n let subCategoryIndex = subcategories.get(feature.subCategoryId)!;\r\n assert(undefined !== subCategoryIndex); // we inserted it above...\r\n subCategoryIndex |= (feature.geometryClass << 24);\r\n\r\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\r\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\r\n uint32s[index + 2] = subCategoryIndex;\r\n }\r\n\r\n subcategories.forEach((index: number, id: string, _map) => {\r\n const index32 = subCategoriesOffset + 2 * index;\r\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\r\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\r\n });\r\n\r\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\r\n }\r\n\r\n /** Retrieve the Feature associated with the specified index. */\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result, this.batchModelId);\r\n }\r\n\r\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n out = out ?? { lower: 0, upper: 0 };\r\n assert(featureIndex < this.numFeatures);\r\n const offset = 3 * featureIndex;\r\n out.lower = this.data[offset];\r\n out.upper = this.data[offset + 1];\r\n return out;\r\n }\r\n\r\n /** @internal */\r\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\r\n const index = 3 * featureIndex;\r\n let subCatIndex = this.data[index + 2];\r\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n return { lower: this.data[subCatIndex], upper: this.data[subCatIndex + 1] };\r\n }\r\n\r\n /** @internal */\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return undefined !== this.animationNodeIds && featureIndex < this.numFeatures ? this.animationNodeIds[featureIndex] : 0;\r\n }\r\n\r\n /** @internal */\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n assert(featureIndex < this.numFeatures);\r\n\r\n const index32 = 3 * featureIndex;\r\n result.elementId.lower = this.data[index32];\r\n result.elementId.upper = this.data[index32 + 1];\r\n\r\n const subCatIndexAndClass = this.data[index32 + 2];\r\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\r\n\r\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n result.subCategoryId.lower = this.data[subCatIndex];\r\n result.subCategoryId.upper = this.data[subCatIndex + 1];\r\n\r\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\r\n result.modelId.lower = this.batchModelIdPair.lower;\r\n result.modelId.upper = this.batchModelIdPair.upper;\r\n\r\n return result;\r\n }\r\n\r\n public getModelIdPair(_featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n out.lower = this.batchModelIdPair.lower;\r\n out.upper = this.batchModelIdPair.upper;\r\n return out;\r\n }\r\n\r\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n if (featureIndex >= this.numFeatures)\r\n return undefined;\r\n else\r\n return this.readId(3 * featureIndex);\r\n }\r\n\r\n /** Return true if this table contains exactly 1 feature. */\r\n public get isUniform(): boolean { return 1 === this.numFeatures; }\r\n\r\n /** If this table contains exactly 1 feature, return it. */\r\n public getUniform(result: ModelFeature): ModelFeature | undefined {\r\n return this.isUniform ? this.getFeature(0, result) : undefined;\r\n }\r\n\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\r\n\r\n /** Unpack the features into a [[FeatureTable]]. */\r\n public unpack(): FeatureTable {\r\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\r\n const feature = ModelFeature.create();\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getFeature(i, feature);\r\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\r\n }\r\n\r\n return table;\r\n }\r\n\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n assert(undefined === this.animationNodeIds);\r\n this.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getPackedFeature(i, output);\r\n output.index = i;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\r\n\r\n private readId(offset32: number): Id64String {\r\n return Id64.fromUint32Pair(this.data[offset32], this.data[offset32 + 1]);\r\n }\r\n}\r\n\r\ninterface PackedFeatureModelEntry {\r\n lastFeatureIndex: number;\r\n idLower: number;\r\n idUpper: number;\r\n}\r\n\r\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\r\n\r\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\r\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\r\n * The model table itself consists of one entry per model, where each entry looks like:\r\n * indexOfLastFeatureInModel: u32\r\n * modelId: u64\r\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\r\n * This lookup can be optimized using binary search.\r\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\r\n * @internal\r\n */\r\nexport class PackedFeatureModelTable {\r\n private readonly _data: Uint32Array;\r\n\r\n public constructor(data: Uint32Array) {\r\n this._data = data;\r\n assert(this._data.length % 3 === 0);\r\n }\r\n\r\n /** The number of models in the table. */\r\n public get length(): number {\r\n return this._data.length / 3;\r\n }\r\n\r\n public get byteLength(): number {\r\n return this._data.byteLength;\r\n }\r\n\r\n private getLastFeatureIndex(modelIndex: number): number {\r\n return this._data[modelIndex * 3];\r\n }\r\n\r\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\r\n if (modelIndex >= this.length) {\r\n result.idLower = result.idUpper = 0;\r\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\r\n return result;\r\n }\r\n\r\n const index = modelIndex * 3;\r\n result.lastFeatureIndex = this._data[index + 0];\r\n result.idLower = this._data[index + 1];\r\n result.idUpper = this._data[index + 2];\r\n return result;\r\n }\r\n\r\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\r\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n if (!result)\r\n result = { lower: 0, upper: 0 };\r\n else\r\n result.lower = result.upper = 0;\r\n\r\n let first = 0;\r\n const last = this.length;\r\n let count = last;\r\n while (count > 0) {\r\n const step = Math.floor(count / 2);\r\n const mid = first + step;\r\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\r\n if (featureIndex > lastFeatureIndex) {\r\n first = mid + 1;\r\n count -= step + 1;\r\n } else {\r\n count = step;\r\n }\r\n }\r\n\r\n if (first < last) {\r\n result.lower = this._data[first * 3 + 1];\r\n result.upper = this._data[first * 3 + 2];\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\r\n * @internal\r\n */\r\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\r\n private readonly _features: PackedFeatureTable;\r\n private readonly _models: PackedFeatureModelTable;\r\n\r\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\r\n this._features = features;\r\n this._models = models;\r\n }\r\n\r\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\r\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\r\n const featureData = data.subarray(0, modelTableOffset);\r\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\r\n\r\n const modelData = data.subarray(modelTableOffset);\r\n const models = new PackedFeatureModelTable(modelData);\r\n\r\n return new MultiModelPackedFeatureTable(features, models);\r\n }\r\n\r\n public get batchModelId() { return this._features.batchModelId; }\r\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\r\n public get numFeatures() { return this._features.numFeatures; }\r\n public get type() { return this._features.type; }\r\n public get animationNodeIds(): UintArray | undefined { return this._features.animationNodeIds; }\r\n public set animationNodeIds(ids: UintArray | undefined) { this._features.animationNodeIds = ids; }\r\n\r\n public get byteLength() {\r\n return this._features.byteLength + this._models.byteLength;\r\n }\r\n\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n this._features.getPackedFeature(featureIndex, result);\r\n this._models.getModelIdPair(featureIndex, result.modelId);\r\n return result;\r\n }\r\n\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result);\r\n }\r\n\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n return this._features.getElementIdPair(featureIndex, out);\r\n }\r\n\r\n public getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n this._models.getModelIdPair(featureIndex, out);\r\n return out;\r\n }\r\n\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n return this._features.findElementId(featureIndex);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\r\n let modelIndex = 0;\r\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\r\n\r\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\r\n if (featureIndex > modelEntry.lastFeatureIndex)\r\n this._models.getEntry(++modelIndex, modelEntry);\r\n\r\n this._features.getPackedFeature(featureIndex, output);\r\n output.modelId.lower = modelEntry.idLower;\r\n output.modelId.upper = modelEntry.idUpper;\r\n output.index = featureIndex;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return this._features.getAnimationNodeId(featureIndex);\r\n }\r\n\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n this._features.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FeatureTable.js","sourceRoot":"","sources":["../../src/FeatureTable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAE6B;AAC7B,qDAAiD;AAEjD;;;;;;;;GAQG;AACH,MAAa,OAAO;IAKlB,YAAmB,YAAwB,mBAAI,CAAC,OAAO,EAAE,gBAA4B,mBAAI,CAAC,OAAO,EAAE,gBAA+B,8BAAa,CAAC,OAAO;QACrJ,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,IAAW,SAAS,KAAc,OAAO,CAAC,mBAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAA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) 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 Rendering\n */\n\nimport {\n assert, compareNumbers, compareStrings, Id64, Id64String, IndexedValue, IndexMap, UintArray,\n} from \"@itwin/core-bentley\";\nimport { GeometryClass } from \"./GeometryParams\";\n\n/** Describes a discrete entity within a batched [RenderGraphic]($frontend) that can be\n * grouped with other such entities in a [[FeatureTable]].\n * Features roughly correlate to elements: a [Tile]($frontend)'s graphics combines geometry from every\n * [GeometricElement]($backend) that intersects the tile's volume, so each element produces at least one feature.\n * However, an element's geometry stream can contain geometry belonging to multiple different combinations of [SubCategory]($backend) and\n * [[GeometryClass]], so an individual element may produce more than one feature.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class Feature {\n public readonly elementId: Id64String;\n public readonly subCategoryId: Id64String;\n public readonly geometryClass: GeometryClass;\n\n public constructor(elementId: Id64String = Id64.invalid, subCategoryId: Id64String = Id64.invalid, geometryClass: GeometryClass = GeometryClass.Primary) {\n this.elementId = elementId;\n this.subCategoryId = subCategoryId;\n this.geometryClass = geometryClass;\n }\n\n public get isDefined(): boolean { return !Id64.isInvalid(this.elementId) || !Id64.isInvalid(this.subCategoryId) || this.geometryClass !== GeometryClass.Primary; }\n public get isUndefined(): boolean { return !this.isDefined; }\n\n /** Returns true if this feature is equivalent to the supplied feature. */\n public equals(other: Feature): boolean { return 0 === this.compare(other); }\n\n /** Performs ordinal comparison of this feature with another.\n * @param rhs The feature to compare with.\n * @returns zero if the features are equivalent, a negative value if this feature compares as \"less than\" `rhs`, or a positive value if this feature compares \"greater than\" `rhs`.\n */\n public compare(rhs: Feature): number {\n if (this === rhs)\n return 0;\n\n let cmp = compareNumbers(this.geometryClass, rhs.geometryClass);\n if (0 === cmp) {\n cmp = compareStrings(this.elementId, rhs.elementId);\n if (0 === cmp) {\n cmp = compareStrings(this.subCategoryId, rhs.subCategoryId);\n }\n }\n\n return cmp;\n }\n}\n\n/** A [[Feature]] with a modelId identifying the model containing the feature, obtained from a [[RenderFeatureTable]].\n * @public\n */\nexport interface ModelFeature {\n modelId: Id64String;\n elementId: Id64String;\n subCategoryId: Id64String;\n geometryClass: GeometryClass;\n}\n\n/** @public */\nexport namespace ModelFeature {\n /** Create a ModelFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.findFeature]] and [[RenderFeatureTable.getFeature]].\n */\n export function create(): ModelFeature {\n return {\n modelId: Id64.invalid,\n elementId: Id64.invalid,\n subCategoryId: Id64.invalid,\n geometryClass: GeometryClass.Primary,\n };\n }\n\n /** Returns `true` if any of `feature`'s properties differ from the defaults (invalid Ids and [[GeometryClass.Primary]]). */\n export function isDefined(feature: ModelFeature): boolean {\n return !Id64.isInvalid(feature.modelId) || !Id64.isInvalid(feature.elementId) || !Id64.isInvalid(feature.subCategoryId) || feature.geometryClass !== GeometryClass.Primary;\n }\n\n /** @alpha */\n export function unpack(packed: PackedFeature, result: ModelFeature, unpackedModelId?: Id64String): ModelFeature {\n result.modelId = unpackedModelId ?? Id64.fromUint32PairObject(packed.modelId);\n result.elementId = Id64.fromUint32PairObject(packed.elementId);\n result.subCategoryId = Id64.fromUint32PairObject(packed.subCategoryId);\n result.geometryClass = packed.geometryClass;\n return result;\n }\n}\n\n/** Represents a [[Feature]] within a [[RenderFeatureTable]]. This representation is optimized for use on the GPU.\n * @public\n */\nexport interface PackedFeature {\n modelId: Id64.Uint32Pair;\n elementId: Id64.Uint32Pair;\n subCategoryId: Id64.Uint32Pair;\n geometryClass: GeometryClass;\n /** @alpha */\n animationNodeId: number;\n}\n\n/** Represents a [[PackedFeature]] obtained from a [[RenderFeatureTable]], including the index of that feature within the table.\n * @public\n */\nexport interface PackedFeatureWithIndex extends PackedFeature {\n index: number;\n}\n\n/** @public */\nexport namespace PackedFeature {\n /** Create a PackedFeature of [[GeometryClass.Primary]] with all invalid Ids.\n * This is primarily useful for creating a `result` argument for [[RenderFeatureTable.getPackedFeature]].\n */\n export function create(): PackedFeature {\n const pair = { upper: 0, lower: 0 };\n return {\n modelId: { ...pair },\n elementId: { ...pair },\n subCategoryId: { ...pair },\n geometryClass: GeometryClass.Primary,\n animationNodeId: 0,\n };\n }\n\n /** Create a PackedFeatureWithIndex of [[GeometryClass.Primary]] with all invalid Ids and an index of zero.\n * This is primarily useful for creating a reusable `output` argument for [[RenderFeatureTable.iterable]].\n */\n export function createWithIndex(): PackedFeatureWithIndex {\n const result = create() as PackedFeatureWithIndex;\n result.index = 0;\n return result;\n }\n}\n\n/** Describes the type of a 'batch' of graphics representing multiple [[Feature]]s.\n * The most commonly-encountered batches are Tiles, which can be of either Primary or\n * Classifier type.\n * @public\n * @extensions\n */\nexport enum BatchType {\n /** This batch contains graphics derived from a model's visible geometry. */\n Primary,\n /**\n * This batch contains color volumes which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to the stencil buffer\n * to resymbolize the primary geometry.\n */\n VolumeClassifier,\n /**\n * This batch contains planar graphics which are used to classify a model's visible geometry.\n * The graphics themselves are not rendered to the screen; instead they are rendered to a texture buffer\n * to resymbolize the primary geometry.\n */\n PlanarClassifier,\n}\n\n/** Defines a look-up table for [[Feature]]s within a batched [RenderGraphic]($frontend). Consecutive 32-bit\n * indices are assigned to each unique Feature. Primitives within the RenderGraphic can\n * use per-vertex indices to specify the distribution of Features within the primitive. The appearance of individual\n * features can be customized using [[FeatureOverrides]]. Typically a [Tile]($frontend) will contain a feature table\n * identifying the elements whose geometry appears within that tile.\n * @see [[FeatureOverrides]] for customizing the appearance of individual features.\n * @public\n */\nexport class FeatureTable extends IndexMap<Feature> {\n public readonly modelId: Id64String;\n public readonly type: BatchType;\n\n /** Construct an empty FeatureTable. */\n public constructor(maxFeatures: number, modelId: Id64String = Id64.invalid, type: BatchType = BatchType.Primary) {\n super((lhs, rhs) => lhs.compare(rhs), maxFeatures);\n this.modelId = modelId;\n this.type = type;\n }\n\n /** Returns the maximum number of [[Feature]]s this FeatureTable can contain. */\n public get maxFeatures(): number { return this._maximumSize; }\n /** @internal */\n public get anyDefined(): boolean { return this.length > 1 || (1 === this.length && this._array[0].value.isDefined); }\n /** Returns true if this FeatureTable contains exactly one [[Feature]]. */\n public get isUniform(): boolean { return 1 === this.length; }\n /** If this FeatureTable contains exactly one [[Feature]], returns that Feature; otherwise returns undefined. */\n public get uniform(): Feature | undefined { return 1 === this.length ? this._array[0].value : undefined; }\n /** Returns true if this FeatureTable is associated with [[BatchType.VolumeClassifier]] geometry. */\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n /** Returns true if this FeatureTable is associated with [[BatchType.PlanarClassifier]] geometry. */\n public get isPlanarClassifier(): boolean { return BatchType.PlanarClassifier === this.type; }\n\n /** Returns the Feature corresponding to the specified index, or undefined if the index is not present. */\n public findFeature(index: number): Feature | undefined {\n for (const entry of this._array)\n if (entry.index === index)\n return entry.value;\n\n return undefined;\n }\n\n /** @internal */\n public insertWithIndex(feature: Feature, index: number): void {\n const bound = this.lowerBound(feature);\n assert(!bound.equal);\n assert(!this.isFull);\n const entry = new IndexedValue<Feature>(feature, index);\n this._array.splice(bound.index, 0, entry);\n }\n\n /** @internal */\n public getArray(): Array<IndexedValue<Feature>> { return this._array; }\n\n /** Convert this feature table to a representation that can be supplied to [RenderSystem.createBatch]($frontend). */\n public pack(): RenderFeatureTable {\n return PackedFeatureTable.pack(this);\n }\n}\n\n/** @alpha */\nexport type ComputeNodeId = (feature: PackedFeatureWithIndex) => number;\n\n/** Representation of a [[FeatureTable]] suitable for use with [RenderSystem.createBatch]($frontend).\n * The [[Feature]]s are represented as [[PackedFeature]]s. The feature table may contain features from multiple [Model]($backend)s.\n * @see [[FeatureTable.pack]] to produce a RenderFeatureTable.\n * @public\n */\nexport interface RenderFeatureTable {\n /** The \"model Id\" of the tile tree containing the tile from which this feature table originated.\n * It may be a transient Id if, for example, the tile tree represents a reality model or represents the geometry of multiple\n * persistent models batched together.\n */\n readonly batchModelId: Id64String;\n /** A split representation of [[batchModelId]], to avoid having to constantly having to parse the string. */\n readonly batchModelIdPair: Id64.Uint32Pair;\n /** The number of features in the table; equivalently, one more than the largest feature index. */\n readonly numFeatures: number;\n /** The number of bytes consumed by the feature table, strictly for diagnostic purposes. */\n readonly byteLength: number;\n readonly type: BatchType;\n /** @alpha */\n animationNodeIds?: UintArray;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getFeature(featureIndex: number, result: ModelFeature): ModelFeature;\n\n /** Find the feature at the specified index. Returns undefined if featureIndex >= [[numFeatures]]. */\n findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined;\n\n /** Find the Id of the element associated with the feature at the specified index. */\n findElementId(featureIndex: number): Id64String | undefined;\n\n /** Get the Id of the element associated with the feature at the specified index as a pair of 32-bit integers.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n */\n getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n\n /** Get the feature at the specified index. The caller is responsible for validating featureIndex less than numFeatures. */\n getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature;\n\n /** Get an object that provides ordered iteration over all features.\n * @note The `output` object is reused (mutated in place) as the current value on each iteration.\n */\n iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex>;\n\n /** @alpha */\n populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void;\n\n /** @alpha */\n getAnimationNodeId(featureIndex: number): number;\n\n /** Get the Id of the model associated with the feature at the specified index.\n * The caller is responsible for validating that `featureIndex` is less than [[numFeatures]].\n * This is more efficient than [[getFeature]] for callers who are only interested in the model Id.\n */\n getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair;\n}\n\nconst scratchPackedFeature = PackedFeature.create();\n\nfunction populateAnimationNodeIds(table: RenderFeatureTable, computeNodeId: ComputeNodeId, maxNodeId: number): UintArray | undefined {\n assert(maxNodeId > 0);\n\n let nodeIds;\n const outputFeature = PackedFeature.createWithIndex();\n for (const feature of table.iterable(outputFeature)) {\n const nodeId = computeNodeId(feature);\n assert(nodeId <= maxNodeId);\n if (0 !== nodeId) {\n if (!nodeIds) {\n const size = table.numFeatures;\n nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\n }\n\n nodeIds[feature.index] = nodeId;\n }\n }\n\n return nodeIds;\n}\n\n/**\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\n * wherein each feature occupies 3 32-bit integers.\n * @internal\n */\nexport class PackedFeatureTable implements RenderFeatureTable {\n public readonly data: Uint32Array;\n public readonly batchModelId: Id64String;\n public readonly batchModelIdPair: Id64.Uint32Pair;\n public readonly numFeatures: number;\n public readonly anyDefined: boolean;\n public readonly type: BatchType;\n public animationNodeIds?: UintArray;\n\n public get byteLength(): number { return this.data.byteLength; }\n\n /** Construct a PackedFeatureTable from the packed binary data.\n * This is used internally when deserializing Tiles in iMdl format.\n * @internal\n */\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: UintArray) {\n this.data = data;\n this.batchModelId = modelId;\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\n this.numFeatures = numFeatures;\n this.type = type;\n this.animationNodeIds = animationNodeIds;\n\n switch (this.numFeatures) {\n case 0:\n this.anyDefined = false;\n break;\n case 1:\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\n break;\n default:\n this.anyDefined = true;\n break;\n }\n\n assert(this.data.length >= this._subCategoriesOffset);\n assert(undefined === this.animationNodeIds || this.animationNodeIds.length === this.numFeatures);\n }\n\n /** Create a packed feature table from a [[FeatureTable]]. */\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\n // the array cannot be resized after it is created.\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\n // back-end arrive within tiles already in the packed format.\n const subcategories = new Map<string, number>();\n for (const iv of featureTable.getArray()) {\n const found = subcategories.get(iv.value.subCategoryId.toString());\n if (undefined === found)\n subcategories.set(iv.value.subCategoryId, subcategories.size);\n }\n\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\n const subCategoriesOffset = 3 * featureTable.length;\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\n const uint32s = new Uint32Array(nUint32s);\n\n for (const iv of featureTable.getArray()) {\n const feature = iv.value;\n const index = iv.index * 3;\n\n let subCategoryIndex = subcategories.get(feature.subCategoryId)!;\n assert(undefined !== subCategoryIndex); // we inserted it above...\n subCategoryIndex |= (feature.geometryClass << 24);\n\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\n uint32s[index + 2] = subCategoryIndex;\n }\n\n subcategories.forEach((index: number, id: string, _map) => {\n const index32 = subCategoriesOffset + 2 * index;\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\n });\n\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\n }\n\n /** Retrieve the Feature associated with the specified index. */\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\n return ModelFeature.unpack(packed, result, this.batchModelId);\n }\n\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\n }\n\n /** @internal */\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\n out = out ?? { lower: 0, upper: 0 };\n assert(featureIndex < this.numFeatures);\n const offset = 3 * featureIndex;\n out.lower = this.data[offset];\n out.upper = this.data[offset + 1];\n return out;\n }\n\n /** @internal */\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\n const index = 3 * featureIndex;\n let subCatIndex = this.data[index + 2];\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\n return { lower: this.data[subCatIndex], upper: this.data[subCatIndex + 1] };\n }\n\n /** @internal */\n public getAnimationNodeId(featureIndex: number): number {\n return undefined !== this.animationNodeIds && featureIndex < this.numFeatures ? this.animationNodeIds[featureIndex] : 0;\n }\n\n /** @internal */\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\n assert(featureIndex < this.numFeatures);\n\n const index32 = 3 * featureIndex;\n result.elementId.lower = this.data[index32];\n result.elementId.upper = this.data[index32 + 1];\n\n const subCatIndexAndClass = this.data[index32 + 2];\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\n\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\n result.subCategoryId.lower = this.data[subCatIndex];\n result.subCategoryId.upper = this.data[subCatIndex + 1];\n\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\n result.modelId.lower = this.batchModelIdPair.lower;\n result.modelId.upper = this.batchModelIdPair.upper;\n\n return result;\n }\n\n public getModelIdPair(_featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n out.lower = this.batchModelIdPair.lower;\n out.upper = this.batchModelIdPair.upper;\n return out;\n }\n\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\n public findElementId(featureIndex: number): Id64String | undefined {\n if (featureIndex >= this.numFeatures)\n return undefined;\n else\n return this.readId(3 * featureIndex);\n }\n\n /** Return true if this table contains exactly 1 feature. */\n public get isUniform(): boolean { return 1 === this.numFeatures; }\n\n /** If this table contains exactly 1 feature, return it. */\n public getUniform(result: ModelFeature): ModelFeature | undefined {\n return this.isUniform ? this.getFeature(0, result) : undefined;\n }\n\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\n\n /** Unpack the features into a [[FeatureTable]]. */\n public unpack(): FeatureTable {\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\n const feature = ModelFeature.create();\n for (let i = 0; i < this.numFeatures; i++) {\n this.getFeature(i, feature);\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\n }\n\n return table;\n }\n\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\n assert(undefined === this.animationNodeIds);\n this.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\n }\n\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\n for (let i = 0; i < this.numFeatures; i++) {\n this.getPackedFeature(i, output);\n output.index = i;\n yield output;\n }\n }\n\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\n return {\n [Symbol.iterator]: () => this.iterator(output),\n };\n }\n\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\n\n private readId(offset32: number): Id64String {\n return Id64.fromUint32Pair(this.data[offset32], this.data[offset32 + 1]);\n }\n}\n\ninterface PackedFeatureModelEntry {\n lastFeatureIndex: number;\n idLower: number;\n idUpper: number;\n}\n\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\n\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\n * The model table itself consists of one entry per model, where each entry looks like:\n * indexOfLastFeatureInModel: u32\n * modelId: u64\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\n * This lookup can be optimized using binary search.\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\n * @internal\n */\nexport class PackedFeatureModelTable {\n private readonly _data: Uint32Array;\n\n public constructor(data: Uint32Array) {\n this._data = data;\n assert(this._data.length % 3 === 0);\n }\n\n /** The number of models in the table. */\n public get length(): number {\n return this._data.length / 3;\n }\n\n public get byteLength(): number {\n return this._data.byteLength;\n }\n\n private getLastFeatureIndex(modelIndex: number): number {\n return this._data[modelIndex * 3];\n }\n\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\n if (modelIndex >= this.length) {\n result.idLower = result.idUpper = 0;\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\n return result;\n }\n\n const index = modelIndex * 3;\n result.lastFeatureIndex = this._data[index + 0];\n result.idLower = this._data[index + 1];\n result.idUpper = this._data[index + 2];\n return result;\n }\n\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\n if (!result)\n result = { lower: 0, upper: 0 };\n else\n result.lower = result.upper = 0;\n\n let first = 0;\n const last = this.length;\n let count = last;\n while (count > 0) {\n const step = Math.floor(count / 2);\n const mid = first + step;\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\n if (featureIndex > lastFeatureIndex) {\n first = mid + 1;\n count -= step + 1;\n } else {\n count = step;\n }\n }\n\n if (first < last) {\n result.lower = this._data[first * 3 + 1];\n result.upper = this._data[first * 3 + 2];\n }\n\n return result;\n }\n}\n\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\n * @internal\n */\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\n private readonly _features: PackedFeatureTable;\n private readonly _models: PackedFeatureModelTable;\n\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\n this._features = features;\n this._models = models;\n }\n\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\n const featureData = data.subarray(0, modelTableOffset);\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\n\n const modelData = data.subarray(modelTableOffset);\n const models = new PackedFeatureModelTable(modelData);\n\n return new MultiModelPackedFeatureTable(features, models);\n }\n\n public get batchModelId() { return this._features.batchModelId; }\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\n public get numFeatures() { return this._features.numFeatures; }\n public get type() { return this._features.type; }\n public get animationNodeIds(): UintArray | undefined { return this._features.animationNodeIds; }\n public set animationNodeIds(ids: UintArray | undefined) { this._features.animationNodeIds = ids; }\n\n public get byteLength() {\n return this._features.byteLength + this._models.byteLength;\n }\n\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\n this._features.getPackedFeature(featureIndex, result);\n this._models.getModelIdPair(featureIndex, result.modelId);\n return result;\n }\n\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\n return ModelFeature.unpack(packed, result);\n }\n\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\n }\n\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n return this._features.getElementIdPair(featureIndex, out);\n }\n\n public getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n this._models.getModelIdPair(featureIndex, out);\n return out;\n }\n\n public findElementId(featureIndex: number): Id64String | undefined {\n return this._features.findElementId(featureIndex);\n }\n\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\n let modelIndex = 0;\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\n\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\n if (featureIndex > modelEntry.lastFeatureIndex)\n this._models.getEntry(++modelIndex, modelEntry);\n\n this._features.getPackedFeature(featureIndex, output);\n output.modelId.lower = modelEntry.idLower;\n output.modelId.upper = modelEntry.idUpper;\n output.index = featureIndex;\n yield output;\n }\n }\n\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\n return {\n [Symbol.iterator]: () => this.iterator(output),\n };\n }\n\n public getAnimationNodeId(featureIndex: number): number {\n return this._features.getAnimationNodeId(featureIndex);\n }\n\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\n this._features.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,QAkBX;AAlBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,+CAAY,CAAA;IACZ;;;;OAIG;IACH,qCAAO,CAAA;IACP;;;OAGG;IACH,qCAAO,CAAA;AACT,CAAC,EAlBW,QAAQ,wBAAR,QAAQ,QAkBnB;AAyED;;;;;;;GAOG;AACH,MAAa,OAAO;IAElB,YAAY,KAAoB;QADhB,UAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEnD,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,iFAAiF;IAC1E,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE;gBAC/C,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzBD,0BAyBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\n/** The [FontFile]($backend) encodings understood by iTwin.js.\r\n * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FontType {\r\n /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.\r\n * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.\r\n * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.\r\n * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.\r\n */\r\n TrueType = 1,\r\n /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format\r\n * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in \"resource files\" with a \".rsc\" suffix.\r\n * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can\r\n * perform the conversion.\r\n */\r\n Rsc = 2,\r\n /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in\r\n * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a \".shx\" suffix.\r\n * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.\r\n */\r\n Shx = 3,\r\n}\r\n\r\n/** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].\r\n * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.\r\n * [[TextString]]s refer to fonts by the their `FontId`s.\r\n * A font Id of zero represents an invalid/non-existent font.\r\n * @see [IModelDbFonts]($backend) to work with font Ids.\r\n * @public\r\n * @extensions\r\n */\r\nexport type FontId = number;\r\n\r\n/** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).\r\n * @public\r\n */\r\nexport interface FontFamilyDescriptor {\r\n /** The encoding in which the font family's faces are stored. */\r\n type: FontType;\r\n /** The name of the family. */\r\n name: string;\r\n}\r\n\r\n/** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).\r\n * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.\r\n * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families\r\n * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.\r\n * @beta\r\n */\r\nexport interface FontFamilySelector {\r\n /** The encoding in which the font family's faces are stored. */\r\n type?: FontType;\r\n /** The name of the family. */\r\n name: string;\r\n}\r\n\r\n/** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.\r\n * @public\r\n */\r\nexport interface FontProps extends FontFamilyDescriptor {\r\n /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */\r\n id: FontId;\r\n}\r\n\r\n/** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).\r\n * Each face can be italicized, bolded, both, or neither.\r\n * Font faces are stored in [FontFile]($backend)s.\r\n * @beta\r\n */\r\nexport interface FontFace {\r\n /** The name of the font family to which this face belongs. */\r\n familyName: string;\r\n isBold: boolean;\r\n isItalic: boolean;\r\n}\r\n\r\n/** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.\r\n * Currently, no public APIs exist to create such fonts.\r\n * @alpha\r\n */\r\nexport interface RscFontEncodingProps {\r\n codePage?: number;\r\n degree?: number;\r\n plusMinus?: number;\r\n diameter?: number;\r\n}\r\n\r\n/** The properties of a FontMap\r\n * @public\r\n * @extensions\r\n * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend)\r\n */\r\nexport interface FontMapProps { fonts: FontProps[] }\r\n\r\n/**\r\n * A FontMap holds the set of font names available in an iModel.\r\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\r\n * This class maps FontIds to FontProps.\r\n * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.\r\n * @public\r\n * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend) instead.\r\n */\r\nexport class FontMap {\r\n public readonly fonts = new Map<FontId, FontProps>();\r\n constructor(props?: FontMapProps) { // eslint-disable-line @typescript-eslint/no-deprecated\r\n if (undefined !== props)\r\n this.addFonts(props.fonts);\r\n }\r\n public addFonts(fonts: FontProps[]) {\r\n fonts.forEach((font) => this.fonts.set(font.id, font));\r\n }\r\n public toJSON(): FontMapProps { // eslint-disable-line @typescript-eslint/no-deprecated\r\n const fonts: FontProps[] = [];\r\n this.fonts.forEach((font) => fonts.push(font));\r\n return { fonts };\r\n }\r\n /** look up a font by case insensitive name or number and return its FontProps */\r\n public getFont(arg: string | FontId): FontProps | undefined {\r\n if (typeof arg === \"number\")\r\n return this.fonts.get(arg);\r\n\r\n for (const font of this.fonts.values())\r\n if (font.name.toLowerCase() === arg.toLowerCase())\r\n return font;\r\n\r\n return undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,QAkBX;AAlBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,+CAAY,CAAA;IACZ;;;;OAIG;IACH,qCAAO,CAAA;IACP;;;OAGG;IACH,qCAAO,CAAA;AACT,CAAC,EAlBW,QAAQ,wBAAR,QAAQ,QAkBnB;AAyED;;;;;;;GAOG;AACH,MAAa,OAAO;IAElB,YAAY,KAAoB;QADhB,UAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEnD,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,iFAAiF;IAC1E,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE;gBAC/C,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzBD,0BAyBC","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 Symbology\n */\n\n/** The [FontFile]($backend) encodings understood by iTwin.js.\n * @see [this article]($docs/learning/backend/Fonts.md) to learn more about fonts in iModels.\n * @public\n * @extensions\n */\nexport enum FontType {\n /** [OpenType](https://en.wikipedia.org/wiki/OpenType) format, derived from and compatible with the earlier [TrueType](https://en.wikipedia.org/wiki/TrueType) format.\n * The vast majority of modern, scalable, aesthetically-pleasing fonts are delivered in this format.\n * OpenType files typically use one of the following suffixes: .ttf, .ttc, .otf, and .otc.\n * @see [FontFile.createFromTrueTypeFileName]($backend) to work with font files in this format.\n */\n TrueType = 1,\n /** [RSC](https://docs.bentley.com/LiveContent/web/MicroStation%20Help-v27/en/GUID-FC78484C-E42F-30BF-BF68-2B2C025AE040.html) is a simple font format\n * originating in [MicroStation](https://en.wikipedia.org/wiki/MicroStation). In MicroStation, they are defined in \"resource files\" with a \".rsc\" suffix.\n * In iModels, they are encoded in a binary format. Currently, no APIs exist to convert to this binary format, but some [connectors]($docs/learning/imodel-connectors.md) can\n * perform the conversion.\n */\n Rsc = 2,\n /** [SHX](https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-DE941DB5-7044-433C-AA68-2A9AE98A5713) is a simple font format originating in\n * [AutoCAD](https://en.wikipedia.org/wiki/AutoCAD). SHX fonts are generally distributed as files with a \".shx\" suffix.\n * @see [FontFile.createFromShxFontBlob]($backend) to work with font files in this format.\n */\n Shx = 3,\n}\n\n/** An unsigned integer uniquely identifying a [font family]($docs/learning/backend/Fonts.md) in the context of an [[IModel]].\n * The iModel stores a mapping between `FontId`s and [[FontFamilyDescriptor]]s.\n * [[TextString]]s refer to fonts by the their `FontId`s.\n * A font Id of zero represents an invalid/non-existent font.\n * @see [IModelDbFonts]($backend) to work with font Ids.\n * @public\n * @extensions\n */\nexport type FontId = number;\n\n/** Uniquely describes one or more [[FontFace]]s sharing the same name and type comprising a single [font family]($docs/learning/backend/Fonts.md).\n * @public\n */\nexport interface FontFamilyDescriptor {\n /** The encoding in which the font family's faces are stored. */\n type: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** A [[FontFamilyDescriptor]] in which the [[FontType]] is optional, used when querying [[FontId]]s via [IModelDbFonts.findId]($backend).\n * If a font type is provided, this selector exactly identifies a unique font family, just like [[FontFamilyDescriptor]] does.\n * If the type is omitted, then the selector refers to the first font family that matches the specified [[name]]. If multiple families\n * with the same name exist, then a TrueType font will be preferred over a RSC font, and a RSC font preferred over an SHX font.\n * @beta\n */\nexport interface FontFamilySelector {\n /** The encoding in which the font family's faces are stored. */\n type?: FontType;\n /** The name of the family. */\n name: string;\n}\n\n/** Represents a [[FontFamilyDescriptor]] stored in an iModel with a unique numeric Id.\n * @public\n */\nexport interface FontProps extends FontFamilyDescriptor {\n /** An integer that uniquely identifies this font family in the context of the iModel in which it is stored. */\n id: FontId;\n}\n\n/** A specific variation of the glyphs defined by a [font family]($docs/learning/backend/Fonts.md).\n * Each face can be italicized, bolded, both, or neither.\n * Font faces are stored in [FontFile]($backend)s.\n * @beta\n */\nexport interface FontFace {\n /** The name of the font family to which this face belongs. */\n familyName: string;\n isBold: boolean;\n isItalic: boolean;\n}\n\n/** Information about the encoding of a [[FontType.Rsc]] [FontFile]($backend), used when embedding such a font into an iModel.\n * Currently, no public APIs exist to create such fonts.\n * @alpha\n */\nexport interface RscFontEncodingProps {\n codePage?: number;\n degree?: number;\n plusMinus?: number;\n diameter?: number;\n}\n\n/** The properties of a FontMap\n * @public\n * @extensions\n * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend)\n */\nexport interface FontMapProps { fonts: FontProps[] }\n\n/**\n * A FontMap holds the set of font names available in an iModel.\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\n * This class maps FontIds to FontProps.\n * @note This API has never worked properly. Don't use it. Use [IModelDb.fonts]($backend) instead.\n * @public\n * @deprecated in 5.0.0. Use [IModelDb.fonts]($backend) instead.\n */\nexport class FontMap {\n public readonly fonts = new Map<FontId, FontProps>();\n constructor(props?: FontMapProps) { // eslint-disable-line @typescript-eslint/no-deprecated\n if (undefined !== props)\n this.addFonts(props.fonts);\n }\n public addFonts(fonts: FontProps[]) {\n fonts.forEach((font) => this.fonts.set(font.id, font));\n }\n public toJSON(): FontMapProps { // eslint-disable-line @typescript-eslint/no-deprecated\n const fonts: FontProps[] = [];\n this.fonts.forEach((font) => fonts.push(font));\n return { fonts };\n }\n /** look up a font by case insensitive name or number and return its FontProps */\n public getFont(arg: string | FontId): FontProps | undefined {\n if (typeof arg === \"number\")\n return this.fonts.get(arg);\n\n for (const font of this.fonts.values())\n if (font.name.toLowerCase() === arg.toLowerCase())\n return font;\n\n return undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Frustum.js","sourceRoot":"","sources":["../../src/Frustum.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAE8B;AAE9B;;;GAGG;AACH,IAAY,GA8BX;AA9BD,WAAY,GAAG;IACb,uBAAuB;IACvB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,oBAAoB;IACpB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,yBAAyB;IACzB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,sBAAsB;IACtB,6BAAQ,CAAA;IAER,gEAAgE;IAChE,iDAAkB,CAAA;IAClB,mDAAmB,CAA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AC,EAAE,aAAa,CAAC,CAAC;YACnG,IAAI,aAAa,CAAC,gBAAgB,EAAE;gBAClC,SAAS,CAAC,mBAAmB,CAAC,yBAAS,CAAC,uBAAuB,CAAC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC;QACpJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,mIAAmI;IAC5H,wBAAwB,CAAC,KAAmC;QACjE,MAAM,SAAS,GAAG,yBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QAClE,IAAI,SAAS,KAAK,UAAU;YAC1B,OAAO,SAAS,CAAC;QAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,UAAU,GAAG,IAAI,gCAAgB,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,IAAI,gCAAgB,EAAE,CAAC;QACzC,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAEzD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IACxE,CAAC;CACF;AA/PD,0BA+PC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport {\r\n AxisOrder, ClipPlane, ConvexClipPlaneSet, Geometry, GrowableXYZArray, LowAndHighXY, LowAndHighXYZ, Map4d, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Transform, Vector3d, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/** The 8 corners of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Npc {\r\n /** Left bottom rear */\r\n _000 = 0,\r\n /** Right bottom rear */\r\n _100 = 1,\r\n /** Left top rear */\r\n _010 = 2,\r\n /** Right top rear */\r\n _110 = 3,\r\n /** Left bottom front */\r\n _001 = 4,\r\n /** Right bottom front */\r\n _101 = 5,\r\n /** Left top front */\r\n _011 = 6,\r\n /** Right top front */\r\n _111 = 7,\r\n\r\n /* eslint-disable @typescript-eslint/no-duplicate-enum-values */\r\n LeftBottomRear = 0,\r\n RightBottomRear = 1,\r\n LeftTopRear = 2,\r\n RightTopRear = 3,\r\n LeftBottomFront = 4,\r\n RightBottomFront = 5,\r\n LeftTopFront = 6,\r\n RightTopFront = 7,\r\n /* eslint-enable @typescript-eslint/no-duplicate-enum-values */\r\n /** useful for sizing arrays */\r\n CORNER_COUNT = 8,\r\n}\r\n\r\n/** The 8 corners of an [[Npc]] Frustum.\r\n * @public\r\n */\r\nexport const NpcCorners = [ // eslint-disable-line @typescript-eslint/naming-convention\r\n new Point3d(0.0, 0.0, 0.0),\r\n new Point3d(1.0, 0.0, 0.0),\r\n new Point3d(0.0, 1.0, 0.0),\r\n new Point3d(1.0, 1.0, 0.0),\r\n new Point3d(0.0, 0.0, 1.0),\r\n new Point3d(1.0, 0.0, 1.0),\r\n new Point3d(0.0, 1.0, 1.0),\r\n new Point3d(1.0, 1.0, 1.0),\r\n];\r\nNpcCorners.forEach((corner) => Object.freeze(corner));\r\nObject.freeze(NpcCorners);\r\n\r\n/** The center point of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n */\r\nexport const NpcCenter = new Point3d(.5, .5, .5); // eslint-disable-line @typescript-eslint/naming-convention\r\nObject.freeze(NpcCenter);\r\n\r\n/** The region of physical (3d) space that appears in a view. It forms the field-of-view of a camera.\r\n * It is stored as 8 points, in [[Npc]] order, that must define a truncated pyramid.\r\n * @public\r\n */\r\nexport class Frustum {\r\n /** Array of the 8 points of this Frustum. */\r\n public readonly points: Point3d[] = [];\r\n /** Constructor for Frustum. Members are initialized to the Npc cube. */\r\n public constructor() {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i] = NpcCorners[i].clone();\r\n }\r\n\r\n /** Initialize this Frustum to the 8 corners of the NPC cube. */\r\n public initNpc() {\r\n for (let i = 0; i < 8; ++i)\r\n Point3d.createFrom(NpcCorners[i], this.points[i]);\r\n\r\n return this;\r\n }\r\n\r\n /** Get a corner Point from this Frustum. */\r\n public getCorner(i: number) { return this.points[i]; }\r\n /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */\r\n public getCenter(): Point3d {\r\n return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear));\r\n }\r\n\r\n /** Get the distance between two corners of this Frustum. */\r\n public distance(corner1: number, corner2: number): number {\r\n return this.getCorner(corner1).distance(this.getCorner(corner2));\r\n }\r\n\r\n /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */\r\n public getFraction(): number {\r\n return Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0);\r\n }\r\n\r\n /** Multiply all the points of this Frustum by a Transform, in place. */\r\n public multiply(trans: Transform): void {\r\n trans.multiplyPoint3dArrayInPlace(this.points);\r\n }\r\n\r\n /** Offset all of the points of this Frustum by a vector. */\r\n public translate(offset: XYAndZ): void {\r\n for (const pt of this.points)\r\n pt.plus(offset, pt);\r\n }\r\n\r\n /** Transform all the points of this Frustum and return the result in another Frustum. */\r\n public transformBy(trans: Transform, result?: Frustum): Frustum {\r\n result = result ? result : new Frustum();\r\n trans.multiplyPoint3dArray(this.points, result.points);\r\n return result;\r\n }\r\n\r\n /** Calculate a bounding range from the 8 points in this Frustum. */\r\n public toRange(range?: Range3d): Range3d {\r\n return Range3d.createArray(this.points, range);\r\n }\r\n\r\n /** Make a copy of this Frustum.\r\n * @param result Optional Frustum for copy. If undefined allocate a new Frustum.\r\n */\r\n public clone(result?: Frustum): Frustum {\r\n result = result ? result : new Frustum();\r\n result.setFrom(this);\r\n return result;\r\n }\r\n\r\n /** Set the points of this Frustum to be copies of the points in another Frustum. */\r\n public setFrom(other: Frustum) { this.setFromCorners(other.points); }\r\n /** Set the points of this frustum from array of corner points in NPC order. */\r\n public setFromCorners(corners: Point3d[]) {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i].setFrom(corners[i]);\r\n }\r\n\r\n /** Scale this Frustum, in place, about its center by a scale factor. */\r\n public scaleAboutCenter(scale: number): void {\r\n const orig = this.clone();\r\n const f = 0.5 * (1.0 + scale);\r\n orig.points[Npc._111].interpolate(f, orig.points[Npc._000], this.points[Npc._000]);\r\n orig.points[Npc._011].interpolate(f, orig.points[Npc._100], this.points[Npc._100]);\r\n orig.points[Npc._101].interpolate(f, orig.points[Npc._010], this.points[Npc._010]);\r\n orig.points[Npc._001].interpolate(f, orig.points[Npc._110], this.points[Npc._110]);\r\n orig.points[Npc._110].interpolate(f, orig.points[Npc._001], this.points[Npc._001]);\r\n orig.points[Npc._010].interpolate(f, orig.points[Npc._101], this.points[Npc._101]);\r\n orig.points[Npc._100].interpolate(f, orig.points[Npc._011], this.points[Npc._011]);\r\n orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);\r\n }\r\n /** The point at the center of the front face of this frustum */\r\n public get frontCenter() {\r\n return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront));\r\n }\r\n\r\n /** The point at the center of the rear face of this frustum */\r\n public get rearCenter() {\r\n return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear));\r\n }\r\n\r\n /** Scale this frustum's XY (viewing) plane about its center */\r\n public scaleXYAboutCenter(scale: number) {\r\n const frontCenter = this.frontCenter, rearCenter = this.rearCenter;\r\n frontCenter.interpolate(scale, this.points[Npc.LeftTopFront], this.points[Npc.LeftTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightTopFront], this.points[Npc.RightTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.LeftBottomFront], this.points[Npc.LeftBottomFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightBottomFront], this.points[Npc.RightBottomFront]);\r\n\r\n rearCenter.interpolate(scale, this.points[Npc.LeftTopRear], this.points[Npc.LeftTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightTopRear], this.points[Npc.RightTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.LeftBottomRear], this.points[Npc.LeftBottomRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightBottomRear], this.points[Npc.RightBottomRear]);\r\n }\r\n\r\n /** Create a Map4d that converts world coordinates to/from [[Npc]] coordinates of this Frustum. */\r\n public toMap4d(): Map4d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n return Map4d.createVectorFrustum(org, xVec, yVec, zVec, this.getFraction());\r\n }\r\n\r\n /** Get the rotation matrix to the frame of this frustum. This is equivalent to the view rotation matrix. */\r\n public getRotation(result?: Matrix3d): Matrix3d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const matrix = Matrix3d.createRigidFromColumns(xVec, yVec, AxisOrder.XYZ, result);\r\n if (matrix)\r\n matrix.transposeInPlace();\r\n return matrix;\r\n }\r\n\r\n /** Get the eye point - undefined if parallel projection */\r\n public getEyePoint(result?: Point3d): Point3d | undefined {\r\n const fraction = this.getFraction();\r\n\r\n if (Math.abs(fraction - 1) < 1E-8)\r\n return undefined; // Parallel.\r\n\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n\r\n return org.plusScaled(zVec, 1 / (1 - fraction), result);\r\n }\r\n\r\n /** Invalidate this Frustum by setting all 8 points to zero. */\r\n public invalidate(): void {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i].set(0, 0, 0);\r\n }\r\n\r\n /** Return true if this Frustum is equal to another Frustum */\r\n public equals(rhs: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isExactEqual(rhs.points[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.\r\n * @see [[equals]], [XYZ.isAlmostEqual]($geometry)\r\n */\r\n public isSame(other: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isAlmostEqual(other.points[i]))\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** Initialize this Frustum from a Range */\r\n public initFromRange(range: LowAndHighXYZ | LowAndHighXY): void {\r\n const getZ = (arg: any): number => arg.z !== undefined ? arg.z : 0;\r\n const pts = this.points;\r\n pts[0].x = pts[2].x = pts[4].x = pts[6].x = range.low.x;\r\n pts[1].x = pts[3].x = pts[5].x = pts[7].x = range.high.x;\r\n pts[0].y = pts[1].y = pts[4].y = pts[5].y = range.low.y;\r\n pts[2].y = pts[3].y = pts[6].y = pts[7].y = range.high.y;\r\n pts[0].z = pts[1].z = pts[2].z = pts[3].z = getZ(range.low);\r\n pts[4].z = pts[5].z = pts[6].z = pts[7].z = getZ(range.high);\r\n }\r\n\r\n /** Create a new Frustum from a Range3d */\r\n public static fromRange(range: LowAndHighXYZ | LowAndHighXY, out?: Frustum): Frustum {\r\n const frustum = undefined !== out ? out : new Frustum();\r\n frustum.initFromRange(range);\r\n return frustum;\r\n }\r\n\r\n /** Return true if this Frustum has a mirror (is not in the correct order.) */\r\n public get hasMirror(): boolean {\r\n const pts = this.points;\r\n const u = pts[Npc._000].vectorTo(pts[Npc._001]);\r\n const v = pts[Npc._000].vectorTo(pts[Npc._010]);\r\n const w = pts[Npc._000].vectorTo(pts[Npc._100]);\r\n return (u.tripleProduct(v, w) > 0);\r\n }\r\n /** Make sure the frustum point order does not include mirroring. If so, reverse the order. */\r\n public fixPointOrder(): void {\r\n if (!this.hasMirror)\r\n return;\r\n\r\n // frustum has mirroring, reverse points\r\n const pts = this.points;\r\n for (let i = 0; i < 8; i += 2) {\r\n const tmpPoint = pts[i];\r\n pts[i] = pts[i + 1];\r\n pts[i + 1] = tmpPoint;\r\n }\r\n }\r\n\r\n /** Get a convex set of clipping planes bounding the region contained by this Frustum. */\r\n public getRangePlanes(clipFront: boolean, clipBack: boolean, expandPlaneDistance: number): ConvexClipPlaneSet {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n const scratchNormal = Vector3d.create();\r\n Vector3d.createCrossProductToPoints(this.points[5], this.points[3], this.points[1], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[1]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[2], this.points[4], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[3], this.points[6], this.points[2], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[2]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[4], this.points[1], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n\r\n if (clipBack) {\r\n Vector3d.createCrossProductToPoints(this.points[1], this.points[2], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n }\r\n if (clipFront) {\r\n Vector3d.createCrossProductToPoints(this.points[6], this.points[5], this.points[4], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[4]) - expandPlaneDistance));\r\n }\r\n return convexSet;\r\n }\r\n\r\n /** Get a (convex) polygon that represents the intersection of this frustum with a plane, or undefined if no intersection exists */\r\n public getIntersectionWithPlane(plane: Plane3dByOriginAndUnitNormal): Point3d[] | undefined {\r\n const clipPlane = ClipPlane.createPlane(plane);\r\n const loopPoints = clipPlane.intersectRange(this.toRange(), true);\r\n if (undefined === loopPoints)\r\n return undefined;\r\n\r\n const convexSet = this.getRangePlanes(false, false, 0);\r\n const workPoints = new GrowableXYZArray();\r\n const outPoints = new GrowableXYZArray();\r\n convexSet.polygonClip(loopPoints, outPoints, workPoints);\r\n\r\n return outPoints.length < 4 ? undefined : outPoints.getPoint3dArray();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Frustum.js","sourceRoot":"","sources":["../../src/Frustum.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAE8B;AAE9B;;;GAGG;AACH,IAAY,GA8BX;AA9BD,WAAY,GAAG;IACb,uBAAuB;IACvB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,oBAAoB;IACpB,6BAAQ,CAAA;IACR,qBAAqB;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C,CAAC,CAAC;QACpJ,CAAC;QACD,IAAI,SAAS,EAAE,CAAC;YACd,wBAAQ,CAAC,0BAA0B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;YACnG,IAAI,aAAa,CAAC,gBAAgB,EAAE;gBAClC,SAAS,CAAC,mBAAmB,CAAC,yBAAS,CAAC,uBAAuB,CAAC,aAAa,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC;QACpJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,mIAAmI;IAC5H,wBAAwB,CAAC,KAAmC;QACjE,MAAM,SAAS,GAAG,yBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;QAClE,IAAI,SAAS,KAAK,UAAU;YAC1B,OAAO,SAAS,CAAC;QAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACvD,MAAM,UAAU,GAAG,IAAI,gCAAgB,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,IAAI,gCAAgB,EAAE,CAAC;QACzC,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAEzD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IACxE,CAAC;CACF;AA/PD,0BA+PC","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 Views\n */\n\nimport {\n AxisOrder, ClipPlane, ConvexClipPlaneSet, Geometry, GrowableXYZArray, LowAndHighXY, LowAndHighXYZ, Map4d, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Transform, Vector3d, XYAndZ,\n} from \"@itwin/core-geometry\";\n\n/** The 8 corners of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\n * @public\n * @extensions\n */\nexport enum Npc {\n /** Left bottom rear */\n _000 = 0,\n /** Right bottom rear */\n _100 = 1,\n /** Left top rear */\n _010 = 2,\n /** Right top rear */\n _110 = 3,\n /** Left bottom front */\n _001 = 4,\n /** Right bottom front */\n _101 = 5,\n /** Left top front */\n _011 = 6,\n /** Right top front */\n _111 = 7,\n\n /* eslint-disable @typescript-eslint/no-duplicate-enum-values */\n LeftBottomRear = 0,\n RightBottomRear = 1,\n LeftTopRear = 2,\n RightTopRear = 3,\n LeftBottomFront = 4,\n RightBottomFront = 5,\n LeftTopFront = 6,\n RightTopFront = 7,\n /* eslint-enable @typescript-eslint/no-duplicate-enum-values */\n /** useful for sizing arrays */\n CORNER_COUNT = 8,\n}\n\n/** The 8 corners of an [[Npc]] Frustum.\n * @public\n */\nexport const NpcCorners = [ // eslint-disable-line @typescript-eslint/naming-convention\n new Point3d(0.0, 0.0, 0.0),\n new Point3d(1.0, 0.0, 0.0),\n new Point3d(0.0, 1.0, 0.0),\n new Point3d(1.0, 1.0, 0.0),\n new Point3d(0.0, 0.0, 1.0),\n new Point3d(1.0, 0.0, 1.0),\n new Point3d(0.0, 1.0, 1.0),\n new Point3d(1.0, 1.0, 1.0),\n];\nNpcCorners.forEach((corner) => Object.freeze(corner));\nObject.freeze(NpcCorners);\n\n/** The center point of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\n * @public\n */\nexport const NpcCenter = new Point3d(.5, .5, .5); // eslint-disable-line @typescript-eslint/naming-convention\nObject.freeze(NpcCenter);\n\n/** The region of physical (3d) space that appears in a view. It forms the field-of-view of a camera.\n * It is stored as 8 points, in [[Npc]] order, that must define a truncated pyramid.\n * @public\n */\nexport class Frustum {\n /** Array of the 8 points of this Frustum. */\n public readonly points: Point3d[] = [];\n /** Constructor for Frustum. Members are initialized to the Npc cube. */\n public constructor() {\n for (let i = 0; i < 8; ++i)\n this.points[i] = NpcCorners[i].clone();\n }\n\n /** Initialize this Frustum to the 8 corners of the NPC cube. */\n public initNpc() {\n for (let i = 0; i < 8; ++i)\n Point3d.createFrom(NpcCorners[i], this.points[i]);\n\n return this;\n }\n\n /** Get a corner Point from this Frustum. */\n public getCorner(i: number) { return this.points[i]; }\n /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */\n public getCenter(): Point3d {\n return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear));\n }\n\n /** Get the distance between two corners of this Frustum. */\n public distance(corner1: number, corner2: number): number {\n return this.getCorner(corner1).distance(this.getCorner(corner2));\n }\n\n /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */\n public getFraction(): number {\n return Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0);\n }\n\n /** Multiply all the points of this Frustum by a Transform, in place. */\n public multiply(trans: Transform): void {\n trans.multiplyPoint3dArrayInPlace(this.points);\n }\n\n /** Offset all of the points of this Frustum by a vector. */\n public translate(offset: XYAndZ): void {\n for (const pt of this.points)\n pt.plus(offset, pt);\n }\n\n /** Transform all the points of this Frustum and return the result in another Frustum. */\n public transformBy(trans: Transform, result?: Frustum): Frustum {\n result = result ? result : new Frustum();\n trans.multiplyPoint3dArray(this.points, result.points);\n return result;\n }\n\n /** Calculate a bounding range from the 8 points in this Frustum. */\n public toRange(range?: Range3d): Range3d {\n return Range3d.createArray(this.points, range);\n }\n\n /** Make a copy of this Frustum.\n * @param result Optional Frustum for copy. If undefined allocate a new Frustum.\n */\n public clone(result?: Frustum): Frustum {\n result = result ? result : new Frustum();\n result.setFrom(this);\n return result;\n }\n\n /** Set the points of this Frustum to be copies of the points in another Frustum. */\n public setFrom(other: Frustum) { this.setFromCorners(other.points); }\n /** Set the points of this frustum from array of corner points in NPC order. */\n public setFromCorners(corners: Point3d[]) {\n for (let i = 0; i < 8; ++i)\n this.points[i].setFrom(corners[i]);\n }\n\n /** Scale this Frustum, in place, about its center by a scale factor. */\n public scaleAboutCenter(scale: number): void {\n const orig = this.clone();\n const f = 0.5 * (1.0 + scale);\n orig.points[Npc._111].interpolate(f, orig.points[Npc._000], this.points[Npc._000]);\n orig.points[Npc._011].interpolate(f, orig.points[Npc._100], this.points[Npc._100]);\n orig.points[Npc._101].interpolate(f, orig.points[Npc._010], this.points[Npc._010]);\n orig.points[Npc._001].interpolate(f, orig.points[Npc._110], this.points[Npc._110]);\n orig.points[Npc._110].interpolate(f, orig.points[Npc._001], this.points[Npc._001]);\n orig.points[Npc._010].interpolate(f, orig.points[Npc._101], this.points[Npc._101]);\n orig.points[Npc._100].interpolate(f, orig.points[Npc._011], this.points[Npc._011]);\n orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);\n }\n /** The point at the center of the front face of this frustum */\n public get frontCenter() {\n return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront));\n }\n\n /** The point at the center of the rear face of this frustum */\n public get rearCenter() {\n return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear));\n }\n\n /** Scale this frustum's XY (viewing) plane about its center */\n public scaleXYAboutCenter(scale: number) {\n const frontCenter = this.frontCenter, rearCenter = this.rearCenter;\n frontCenter.interpolate(scale, this.points[Npc.LeftTopFront], this.points[Npc.LeftTopFront]);\n frontCenter.interpolate(scale, this.points[Npc.RightTopFront], this.points[Npc.RightTopFront]);\n frontCenter.interpolate(scale, this.points[Npc.LeftBottomFront], this.points[Npc.LeftBottomFront]);\n frontCenter.interpolate(scale, this.points[Npc.RightBottomFront], this.points[Npc.RightBottomFront]);\n\n rearCenter.interpolate(scale, this.points[Npc.LeftTopRear], this.points[Npc.LeftTopRear]);\n rearCenter.interpolate(scale, this.points[Npc.RightTopRear], this.points[Npc.RightTopRear]);\n rearCenter.interpolate(scale, this.points[Npc.LeftBottomRear], this.points[Npc.LeftBottomRear]);\n rearCenter.interpolate(scale, this.points[Npc.RightBottomRear], this.points[Npc.RightBottomRear]);\n }\n\n /** Create a Map4d that converts world coordinates to/from [[Npc]] coordinates of this Frustum. */\n public toMap4d(): Map4d | undefined {\n const org = this.getCorner(Npc.LeftBottomRear);\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\n return Map4d.createVectorFrustum(org, xVec, yVec, zVec, this.getFraction());\n }\n\n /** Get the rotation matrix to the frame of this frustum. This is equivalent to the view rotation matrix. */\n public getRotation(result?: Matrix3d): Matrix3d | undefined {\n const org = this.getCorner(Npc.LeftBottomRear);\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\n const matrix = Matrix3d.createRigidFromColumns(xVec, yVec, AxisOrder.XYZ, result);\n if (matrix)\n matrix.transposeInPlace();\n return matrix;\n }\n\n /** Get the eye point - undefined if parallel projection */\n public getEyePoint(result?: Point3d): Point3d | undefined {\n const fraction = this.getFraction();\n\n if (Math.abs(fraction - 1) < 1E-8)\n return undefined; // Parallel.\n\n const org = this.getCorner(Npc.LeftBottomRear);\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\n\n return org.plusScaled(zVec, 1 / (1 - fraction), result);\n }\n\n /** Invalidate this Frustum by setting all 8 points to zero. */\n public invalidate(): void {\n for (let i = 0; i < 8; ++i)\n this.points[i].set(0, 0, 0);\n }\n\n /** Return true if this Frustum is equal to another Frustum */\n public equals(rhs: Frustum): boolean {\n for (let i = 0; i < 8; ++i) {\n if (!this.points[i].isExactEqual(rhs.points[i]))\n return false;\n }\n return true;\n }\n /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.\n * @see [[equals]], [XYZ.isAlmostEqual]($geometry)\n */\n public isSame(other: Frustum): boolean {\n for (let i = 0; i < 8; ++i) {\n if (!this.points[i].isAlmostEqual(other.points[i]))\n return false;\n }\n\n return true;\n }\n\n /** Initialize this Frustum from a Range */\n public initFromRange(range: LowAndHighXYZ | LowAndHighXY): void {\n const getZ = (arg: any): number => arg.z !== undefined ? arg.z : 0;\n const pts = this.points;\n pts[0].x = pts[2].x = pts[4].x = pts[6].x = range.low.x;\n pts[1].x = pts[3].x = pts[5].x = pts[7].x = range.high.x;\n pts[0].y = pts[1].y = pts[4].y = pts[5].y = range.low.y;\n pts[2].y = pts[3].y = pts[6].y = pts[7].y = range.high.y;\n pts[0].z = pts[1].z = pts[2].z = pts[3].z = getZ(range.low);\n pts[4].z = pts[5].z = pts[6].z = pts[7].z = getZ(range.high);\n }\n\n /** Create a new Frustum from a Range3d */\n public static fromRange(range: LowAndHighXYZ | LowAndHighXY, out?: Frustum): Frustum {\n const frustum = undefined !== out ? out : new Frustum();\n frustum.initFromRange(range);\n return frustum;\n }\n\n /** Return true if this Frustum has a mirror (is not in the correct order.) */\n public get hasMirror(): boolean {\n const pts = this.points;\n const u = pts[Npc._000].vectorTo(pts[Npc._001]);\n const v = pts[Npc._000].vectorTo(pts[Npc._010]);\n const w = pts[Npc._000].vectorTo(pts[Npc._100]);\n return (u.tripleProduct(v, w) > 0);\n }\n /** Make sure the frustum point order does not include mirroring. If so, reverse the order. */\n public fixPointOrder(): void {\n if (!this.hasMirror)\n return;\n\n // frustum has mirroring, reverse points\n const pts = this.points;\n for (let i = 0; i < 8; i += 2) {\n const tmpPoint = pts[i];\n pts[i] = pts[i + 1];\n pts[i + 1] = tmpPoint;\n }\n }\n\n /** Get a convex set of clipping planes bounding the region contained by this Frustum. */\n public getRangePlanes(clipFront: boolean, clipBack: boolean, expandPlaneDistance: number): ConvexClipPlaneSet {\n const convexSet = ConvexClipPlaneSet.createEmpty();\n const scratchNormal = Vector3d.create();\n Vector3d.createCrossProductToPoints(this.points[5], this.points[3], this.points[1], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[1]) - expandPlaneDistance));\n Vector3d.createCrossProductToPoints(this.points[2], this.points[4], this.points[0], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\n Vector3d.createCrossProductToPoints(this.points[3], this.points[6], this.points[2], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[2]) - expandPlaneDistance));\n Vector3d.createCrossProductToPoints(this.points[4], this.points[1], this.points[0], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\n\n if (clipBack) {\n Vector3d.createCrossProductToPoints(this.points[1], this.points[2], this.points[0], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\n }\n if (clipFront) {\n Vector3d.createCrossProductToPoints(this.points[6], this.points[5], this.points[4], scratchNormal);\n if (scratchNormal.normalizeInPlace())\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[4]) - expandPlaneDistance));\n }\n return convexSet;\n }\n\n /** Get a (convex) polygon that represents the intersection of this frustum with a plane, or undefined if no intersection exists */\n public getIntersectionWithPlane(plane: Plane3dByOriginAndUnitNormal): Point3d[] | undefined {\n const clipPlane = ClipPlane.createPlane(plane);\n const loopPoints = clipPlane.intersectRange(this.toRange(), true);\n if (undefined === loopPoints)\n return undefined;\n\n const convexSet = this.getRangePlanes(false, false, 0);\n const workPoints = new GrowableXYZArray();\n const outPoints = new GrowableXYZArray();\n convexSet.polygonClip(loopPoints, outPoints, workPoints);\n\n return outPoints.length < 4 ? undefined : outPoints.getPoint3dArray();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GenericInstanceFilter.js","sourceRoot":"","sources":["../../src/GenericInstanceFilter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4EH,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,8BAA8B,CAkC9C;AAlCD,WAAiB,8BAA8B;IAc7C,gKAAgK;IAChK,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAQ,KAAgD,CAAC,CAAC,KAAK,SAAS,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAChJ,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,mFAAmF;IACnF,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAO,SAAS,CAAC,KAAK,CAAC,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAC/F,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,uFAAuF;IACvF,SAAgB,aAAa,CAAC,KAA4C;QACxE,OAAQ,KAAoD,KAAK,SAAS,IAAK,KAAoD,CAAC,SAAS,KAAK,SAAS,CAAC;IAC9J,CAAC;IAFe,4CAAa,gBAE5B,CAAA;AASH,CAAC,EAlCgB,8BAA8B,8CAA9B,8BAA8B,QAkC9C;AAsFD,YAAY;AACZ,IAAiB,qBAAqB,CAQrC;AARD,WAAiB,qBAAqB;IACpC;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,GAA+D;QAC/F,OAAQ,GAAsC,CAAC,KAAK,KAAK,SAAS,CAAC;IACrE,CAAC;IAFe,uCAAiB,oBAEhC,CAAA;AACH,CAAC,EARgB,qBAAqB,qCAArB,qBAAqB,QAQrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utils\r\n */\r\n\r\n/**\r\n * Generic instance filter that has all the necessary information to build filtering query.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilter {\r\n /** Single filter rule or multiple rules joined by logical operator. */\r\n rules: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup;\r\n /**\r\n * Information about related instances that has access to the properties used in filter.\r\n * These can be used to create `JOIN` clause when building `ECSQL` query. Each related property\r\n * used in rule will have [[GenericInstanceFilterRule.sourceAlias]] that matches [[GenericInstanceFilterRelatedInstanceDescription.alias]].\r\n * If more than one property of the same related instance is used, they will share the same alias.\r\n */\r\n relatedInstances: GenericInstanceFilterRelatedInstanceDescription[];\r\n /**\r\n * List of class names whose properties are used in rules. Might be used to find common base class when building\r\n * filter for instances of different classes.\r\n */\r\n propertyClassNames: string[];\r\n /**\r\n * List of class names which will be used for additionally only querying instances of specific classes.\r\n */\r\n filteredClassNames?: string[];\r\n}\r\n\r\n/**\r\n * Type definition that describes operators supported by [[GenericInstanceFilterRule]].\r\n * @note `like` operator should be handled as a contains operator - it matches all strings that contain a given string.\r\n * @beta\r\n */\r\nexport type GenericInstanceFilterRuleOperator =\r\n | \"is-equal\"\r\n | \"is-not-equal\"\r\n | \"is-null\"\r\n | \"is-not-null\"\r\n | \"is-true\"\r\n | \"is-false\"\r\n | \"less\"\r\n | \"less-or-equal\"\r\n | \"greater\"\r\n | \"greater-or-equal\"\r\n | \"like\";\r\n\r\n/**\r\n * Type definition that describes numeric values of [[GenericInstanceFilterRule]].\r\n * @beta\r\n */\r\ninterface GenericInstanceFilterRuleNumericValue {\r\n displayValue: string;\r\n rawValue: number;\r\n /**\r\n * Rounding error that should be taken into consideration when comparing numeric values. This is useful\r\n * when numeric display value is rounded and displayed with less precision than actual value.\r\n *\r\n * Example: entered value is 0.12 but it should match values like 0.12345. In that case `roundingError` can be set to `0.005` and comparison should be done in `0.115` to `0.125` range.\r\n */\r\n roundingError?: number;\r\n}\r\n\r\n/**\r\n * Type definition that describes non-numeric values of [[GenericInstanceFilterRule]].\r\n * @beta\r\n */\r\ninterface GenericInstanceFilterRuleNonNumericValue {\r\n displayValue: string;\r\n rawValue: Exclude<GenericInstanceFilterRuleValue.Values, number>;\r\n}\r\n\r\n/**\r\n * Type definition that describes value of [[GenericInstanceFilterRule]].\r\n * @beta\r\n */\r\nexport type GenericInstanceFilterRuleValue = GenericInstanceFilterRuleNumericValue | GenericInstanceFilterRuleNonNumericValue;\r\n\r\n/** @beta */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace GenericInstanceFilterRuleValue {\r\n export interface Point2d {\r\n x: number;\r\n y: number;\r\n }\r\n export interface Point3d {\r\n x: number;\r\n y: number;\r\n z: number;\r\n }\r\n export interface InstanceKey {\r\n id: string;\r\n className: string;\r\n }\r\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point2d]] like. Returns `true` for `Point2d` and [[GenericInstanceFilterRuleValue.Point3d]]. */\r\n export function isPoint2d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point2d {\r\n return (value as GenericInstanceFilterRuleValue.Point2d).x !== undefined && (value as GenericInstanceFilterRuleValue.Point2d).y !== undefined;\r\n }\r\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point3d]] like. */\r\n export function isPoint3d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point3d {\r\n return isPoint2d(value) && (value as GenericInstanceFilterRuleValue.Point3d).z !== undefined;\r\n }\r\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.InstanceKey]] like. */\r\n export function isInstanceKey(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.InstanceKey {\r\n return (value as GenericInstanceFilterRuleValue.InstanceKey) !== undefined && (value as GenericInstanceFilterRuleValue.InstanceKey).className !== undefined;\r\n }\r\n export type Values =\r\n | string\r\n | number\r\n | boolean\r\n | Date\r\n | GenericInstanceFilterRuleValue.Point2d\r\n | GenericInstanceFilterRuleValue.Point3d\r\n | GenericInstanceFilterRuleValue.InstanceKey;\r\n}\r\n\r\n/**\r\n * Defines single filter rule.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRule {\r\n /**\r\n * Alias of the source to access this property. For related properties `sourceAlias` should match\r\n * [[GenericInstanceFilterRelatedInstanceDescription.alias]] of one [[GenericInstanceFilter.relatedInstances]].\r\n */\r\n sourceAlias: string;\r\n /**\r\n * Property name for accessing property value.\r\n */\r\n propertyName: string;\r\n /**\r\n * Comparison operator that should be used to compare property value.\r\n */\r\n operator: GenericInstanceFilterRuleOperator;\r\n /**\r\n * Value to which property values is compared to. For unary operators value is `undefined`.\r\n */\r\n value?: GenericInstanceFilterRuleValue;\r\n /**\r\n * Type name of the property.\r\n */\r\n propertyTypeName: string;\r\n}\r\n\r\n/**\r\n * Type definition that describes operators supported by [[GenericInstanceFilterRuleGroup]].\r\n * @beta\r\n */\r\nexport type GenericInstanceFilterRuleGroupOperator = \"and\" | \"or\";\r\n\r\n/**\r\n * Group of filter rules joined by logical operator.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRuleGroup {\r\n /**\r\n * Operator that should be used to join rules.\r\n */\r\n operator: GenericInstanceFilterRuleGroupOperator;\r\n /**\r\n * List of rules or rule groups that should be joined by `operator`.\r\n */\r\n rules: Array<GenericInstanceFilterRule | GenericInstanceFilterRuleGroup>;\r\n}\r\n\r\n/**\r\n * Describes related instance whose property was used in the filter.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRelatedInstanceDescription {\r\n /**\r\n * Describes path that should be used to reach related instance from the source.\r\n */\r\n path: GenericInstanceFilterRelationshipStep[];\r\n /**\r\n * Related instance alias. This alias match [[GenericInstanceFilterRule.sourceAlias]] in all filter rules where\r\n * properties of this related instance is used.\r\n */\r\n alias: string;\r\n}\r\n\r\n/**\r\n * Describes single step between source class and target class.\r\n * @beta\r\n */\r\nexport interface GenericInstanceFilterRelationshipStep {\r\n /** Full class name of the source class, e.g. `BisCore:Element`. */\r\n sourceClassName: string;\r\n /** Full class name of the target class, e.g. `BisCore:Element`. */\r\n targetClassName: string;\r\n /** Full class name of the relationship class that should be used to move from source to target, e.g. `BisCore:ElementOwnsChildElements`. */\r\n relationshipClassName: string;\r\n /**\r\n * A flag that describes if this step follows relationship class in forward or backward direction.\r\n * If the step follows relationship in forward direction then `sourceClassName` matches relationship's source class and `targetClassName` matches relationship's target class.\r\n * Otherwise, `sourceClassName` matches relationship's target class and `targetClassName` matches relationship's source class.\r\n */\r\n isForwardRelationship: boolean;\r\n}\r\n\r\n/** @beta */\r\nexport namespace GenericInstanceFilter {\r\n /**\r\n * Function that checks if supplied object is [[GenericInstanceFilterRuleGroup]].\r\n * @beta\r\n */\r\n export function isFilterRuleGroup(obj: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup): obj is GenericInstanceFilterRuleGroup {\r\n return (obj as GenericInstanceFilterRuleGroup).rules !== undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GenericInstanceFilter.js","sourceRoot":"","sources":["../../src/GenericInstanceFilter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA4EH,YAAY;AACZ,2DAA2D;AAC3D,IAAiB,8BAA8B,CAkC9C;AAlCD,WAAiB,8BAA8B;IAc7C,gKAAgK;IAChK,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAQ,KAAgD,CAAC,CAAC,KAAK,SAAS,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAChJ,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,mFAAmF;IACnF,SAAgB,SAAS,CAAC,KAA4C;QACpE,OAAO,SAAS,CAAC,KAAK,CAAC,IAAK,KAAgD,CAAC,CAAC,KAAK,SAAS,CAAC;IAC/F,CAAC;IAFe,wCAAS,YAExB,CAAA;IACD,uFAAuF;IACvF,SAAgB,aAAa,CAAC,KAA4C;QACxE,OAAQ,KAAoD,KAAK,SAAS,IAAK,KAAoD,CAAC,SAAS,KAAK,SAAS,CAAC;IAC9J,CAAC;IAFe,4CAAa,gBAE5B,CAAA;AASH,CAAC,EAlCgB,8BAA8B,8CAA9B,8BAA8B,QAkC9C;AAsFD,YAAY;AACZ,IAAiB,qBAAqB,CAQrC;AARD,WAAiB,qBAAqB;IACpC;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,GAA+D;QAC/F,OAAQ,GAAsC,CAAC,KAAK,KAAK,SAAS,CAAC;IACrE,CAAC;IAFe,uCAAiB,oBAEhC,CAAA;AACH,CAAC,EARgB,qBAAqB,qCAArB,qBAAqB,QAQrC","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 Utils\n */\n\n/**\n * Generic instance filter that has all the necessary information to build filtering query.\n * @beta\n */\nexport interface GenericInstanceFilter {\n /** Single filter rule or multiple rules joined by logical operator. */\n rules: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup;\n /**\n * Information about related instances that has access to the properties used in filter.\n * These can be used to create `JOIN` clause when building `ECSQL` query. Each related property\n * used in rule will have [[GenericInstanceFilterRule.sourceAlias]] that matches [[GenericInstanceFilterRelatedInstanceDescription.alias]].\n * If more than one property of the same related instance is used, they will share the same alias.\n */\n relatedInstances: GenericInstanceFilterRelatedInstanceDescription[];\n /**\n * List of class names whose properties are used in rules. Might be used to find common base class when building\n * filter for instances of different classes.\n */\n propertyClassNames: string[];\n /**\n * List of class names which will be used for additionally only querying instances of specific classes.\n */\n filteredClassNames?: string[];\n}\n\n/**\n * Type definition that describes operators supported by [[GenericInstanceFilterRule]].\n * @note `like` operator should be handled as a contains operator - it matches all strings that contain a given string.\n * @beta\n */\nexport type GenericInstanceFilterRuleOperator =\n | \"is-equal\"\n | \"is-not-equal\"\n | \"is-null\"\n | \"is-not-null\"\n | \"is-true\"\n | \"is-false\"\n | \"less\"\n | \"less-or-equal\"\n | \"greater\"\n | \"greater-or-equal\"\n | \"like\";\n\n/**\n * Type definition that describes numeric values of [[GenericInstanceFilterRule]].\n * @beta\n */\ninterface GenericInstanceFilterRuleNumericValue {\n displayValue: string;\n rawValue: number;\n /**\n * Rounding error that should be taken into consideration when comparing numeric values. This is useful\n * when numeric display value is rounded and displayed with less precision than actual value.\n *\n * Example: entered value is 0.12 but it should match values like 0.12345. In that case `roundingError` can be set to `0.005` and comparison should be done in `0.115` to `0.125` range.\n */\n roundingError?: number;\n}\n\n/**\n * Type definition that describes non-numeric values of [[GenericInstanceFilterRule]].\n * @beta\n */\ninterface GenericInstanceFilterRuleNonNumericValue {\n displayValue: string;\n rawValue: Exclude<GenericInstanceFilterRuleValue.Values, number>;\n}\n\n/**\n * Type definition that describes value of [[GenericInstanceFilterRule]].\n * @beta\n */\nexport type GenericInstanceFilterRuleValue = GenericInstanceFilterRuleNumericValue | GenericInstanceFilterRuleNonNumericValue;\n\n/** @beta */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace GenericInstanceFilterRuleValue {\n export interface Point2d {\n x: number;\n y: number;\n }\n export interface Point3d {\n x: number;\n y: number;\n z: number;\n }\n export interface InstanceKey {\n id: string;\n className: string;\n }\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point2d]] like. Returns `true` for `Point2d` and [[GenericInstanceFilterRuleValue.Point3d]]. */\n export function isPoint2d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point2d {\n return (value as GenericInstanceFilterRuleValue.Point2d).x !== undefined && (value as GenericInstanceFilterRuleValue.Point2d).y !== undefined;\n }\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.Point3d]] like. */\n export function isPoint3d(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.Point3d {\n return isPoint2d(value) && (value as GenericInstanceFilterRuleValue.Point3d).z !== undefined;\n }\n /** Checks if supplied value is [[GenericInstanceFilterRuleValue.InstanceKey]] like. */\n export function isInstanceKey(value: GenericInstanceFilterRuleValue.Values): value is GenericInstanceFilterRuleValue.InstanceKey {\n return (value as GenericInstanceFilterRuleValue.InstanceKey) !== undefined && (value as GenericInstanceFilterRuleValue.InstanceKey).className !== undefined;\n }\n export type Values =\n | string\n | number\n | boolean\n | Date\n | GenericInstanceFilterRuleValue.Point2d\n | GenericInstanceFilterRuleValue.Point3d\n | GenericInstanceFilterRuleValue.InstanceKey;\n}\n\n/**\n * Defines single filter rule.\n * @beta\n */\nexport interface GenericInstanceFilterRule {\n /**\n * Alias of the source to access this property. For related properties `sourceAlias` should match\n * [[GenericInstanceFilterRelatedInstanceDescription.alias]] of one [[GenericInstanceFilter.relatedInstances]].\n */\n sourceAlias: string;\n /**\n * Property name for accessing property value.\n */\n propertyName: string;\n /**\n * Comparison operator that should be used to compare property value.\n */\n operator: GenericInstanceFilterRuleOperator;\n /**\n * Value to which property values is compared to. For unary operators value is `undefined`.\n */\n value?: GenericInstanceFilterRuleValue;\n /**\n * Type name of the property.\n */\n propertyTypeName: string;\n}\n\n/**\n * Type definition that describes operators supported by [[GenericInstanceFilterRuleGroup]].\n * @beta\n */\nexport type GenericInstanceFilterRuleGroupOperator = \"and\" | \"or\";\n\n/**\n * Group of filter rules joined by logical operator.\n * @beta\n */\nexport interface GenericInstanceFilterRuleGroup {\n /**\n * Operator that should be used to join rules.\n */\n operator: GenericInstanceFilterRuleGroupOperator;\n /**\n * List of rules or rule groups that should be joined by `operator`.\n */\n rules: Array<GenericInstanceFilterRule | GenericInstanceFilterRuleGroup>;\n}\n\n/**\n * Describes related instance whose property was used in the filter.\n * @beta\n */\nexport interface GenericInstanceFilterRelatedInstanceDescription {\n /**\n * Describes path that should be used to reach related instance from the source.\n */\n path: GenericInstanceFilterRelationshipStep[];\n /**\n * Related instance alias. This alias match [[GenericInstanceFilterRule.sourceAlias]] in all filter rules where\n * properties of this related instance is used.\n */\n alias: string;\n}\n\n/**\n * Describes single step between source class and target class.\n * @beta\n */\nexport interface GenericInstanceFilterRelationshipStep {\n /** Full class name of the source class, e.g. `BisCore:Element`. */\n sourceClassName: string;\n /** Full class name of the target class, e.g. `BisCore:Element`. */\n targetClassName: string;\n /** Full class name of the relationship class that should be used to move from source to target, e.g. `BisCore:ElementOwnsChildElements`. */\n relationshipClassName: string;\n /**\n * A flag that describes if this step follows relationship class in forward or backward direction.\n * If the step follows relationship in forward direction then `sourceClassName` matches relationship's source class and `targetClassName` matches relationship's target class.\n * Otherwise, `sourceClassName` matches relationship's target class and `targetClassName` matches relationship's source class.\n */\n isForwardRelationship: boolean;\n}\n\n/** @beta */\nexport namespace GenericInstanceFilter {\n /**\n * Function that checks if supplied object is [[GenericInstanceFilterRuleGroup]].\n * @beta\n */\n export function isFilterRuleGroup(obj: GenericInstanceFilterRule | GenericInstanceFilterRuleGroup): obj is GenericInstanceFilterRuleGroup {\n return (obj as GenericInstanceFilterRuleGroup).rules !== undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8DH,sDAaC;AAzED,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA0CX;AA1CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;OAGG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA1CW,cAAc,8BAAd,cAAc,QA0CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\r\n\r\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\r\nimport { XYZProps } from \"@itwin/core-geometry\";\r\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\r\n\r\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\r\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\r\n * @see [[GeoConverter]] to perform coordinate conversions.\r\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum GeoCoordStatus {\r\n /** Indicates successful coordinate conversion. */\r\n Success = 0,\r\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\r\n NoGCSDefined = 100,\r\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\r\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\r\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\r\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\r\n * of global imagery or other low accuracy context data is not essential far from the project.\r\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\r\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\r\n * can be performed to verify used geolocation parameters.\r\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\r\n * elements.\r\n */\r\n OutOfUsefulRange = 1,\r\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\r\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\r\n * East or West of the projection central meridian.\r\n * The values returned may or may not be valid and should be discarded.\r\n */\r\n OutOfMathematicalDomain = 2,\r\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\r\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\r\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\r\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\r\n */\r\n NoDatumConverter = 25,\r\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\r\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\r\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\r\n * This status should be somehow reported so actions can be performed to provide the missing information.\r\n */\r\n VerticalDatumConvertError = 26,\r\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\r\n CSMapError = 4096,\r\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\r\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\r\n * At the completion of the conversion promise no coordinates should have this status.\r\n */\r\n Pending = -41556,\r\n}\r\n\r\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\r\n * @public\r\n */\r\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\r\n switch (s) {\r\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\r\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\r\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\r\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\r\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\r\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\r\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\r\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending;\r\n default:\r\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\r\n }\r\n}\r\n\r\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\r\n * @beta\r\n */\r\nexport interface IModelCoordinatesRequestProps {\r\n source: string;\r\n geoCoords: XYZProps[];\r\n}\r\n\r\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\r\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\r\n * @public\r\n */\r\nexport interface PointWithStatus {\r\n /** A JSON representation of the converted point. */\r\n p: XYZProps;\r\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\r\n s: GeoCoordStatus;\r\n}\r\n\r\n/** @beta */\r\nexport interface IModelCoordinatesResponseProps {\r\n iModelCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesRequestProps {\r\n target: string;\r\n iModelCoords: XYZProps[];\r\n}\r\n\r\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\r\n * @beta\r\n */\r\nexport interface GeoCoordinatesResponseProps {\r\n geoCoords: PointWithStatus[];\r\n fromCache: number; // the number that were read from the cache rather than calculated.\r\n}\r\n\r\n/** Information required to interpret or complete a Geographic CRS in the specified format.\r\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretRequestProps {\r\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\r\n format: \"WKT\" | \"JSON\";\r\n /** The geographic CRS definition in the format specified in the format property.\r\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\r\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\r\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\r\n * default value.\r\n */\r\n geographicCRSDef: string;\r\n}\r\n\r\n/** Information returned from a request to interpret or complete a Geographic CRS\r\n * @beta\r\n */\r\nexport interface GeographicCRSInterpretResponseProps {\r\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\r\n * Any value other than zero is to be considered a hard error and no valid result will\r\n * be returned in the geographicCRS property.\r\n */\r\n status: number;\r\n /** The property that receives the interpreted geographic CRS if the process was successful. */\r\n geographicCRS?: GeographicCRSProps;\r\n}\r\n"]}
1
+ {"version":3,"file":"GeoCoordinateServices.js","sourceRoot":"","sources":["../../src/GeoCoordinateServices.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8DH,sDAaC;AAzED,qDAAqD;AAErD,sDAAuD;AAIvD;;;;;;GAMG;AACH,IAAY,cA0CX;AA1CD,WAAY,cAAc;IACxB,kDAAkD;IAClD,yDAAW,CAAA;IACX,sIAAsI;IACtI,qEAAkB,CAAA;IAClB;;;;;;;;;;OAUG;IACH,2EAAoB,CAAA;IACpB;;;;OAIG;IACH,yFAA2B,CAAA;IAC3B;;;;OAIG;IACH,4EAAqB,CAAA;IACrB;;;;OAIG;IACH,8FAA8B,CAAA;IAC9B,sGAAsG;IACtG,kEAAiB,CAAA;IACjB;;;OAGG;IACH,8DAAgB,CAAA;AAClB,CAAC,EA1CW,cAAc,8BAAd,cAAc,QA0CzB;AAED;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAiB;IACrD,QAAQ,CAAC,EAAE,CAAC;QACV,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D,KAAK,cAAc,CAAC,YAAY,CAAC,CAAC,OAAO,+BAAgB,CAAC,aAAa,CAAC;QACxE,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,uBAAuB,CAAC,CAAC,OAAO,+BAAgB,CAAC,uBAAuB,CAAC;QAC7F,KAAK,cAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,+BAAgB,CAAC,gBAAgB,CAAC;QAC/E,KAAK,cAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,+BAAgB,CAAC,yBAAyB,CAAC;QACjG,KAAK,cAAc,CAAC,UAAU,CAAC,CAAC,OAAO,+BAAgB,CAAC,UAAU,CAAC;QACnE,KAAK,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,+BAAgB,CAAC,OAAO,CAAC;QAC7D;YACE,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACpF,CAAC;AACH,CAAC","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 iModels\n */\n\n// cspell:ignore NGVD, NAVD, COMPD_CS, PROJCS, GEOGCS\n\nimport { GeoServiceStatus } from \"@itwin/core-bentley\";\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\n\n/** This enumeration lists all possible status as returned from a coordinate conversion to or from a\n * [[GeographicCRS]] and either another [[GeographicCRS]] or a [[GeodeticDatum]].\n * @see [[GeoConverter]] to perform coordinate conversions.\n * @see [[PointWithStatus]] for the result of a coordinate conversion, including its status code.\n * @public\n * @extensions\n */\nexport enum GeoCoordStatus {\n /** Indicates successful coordinate conversion. */\n Success = 0,\n /** Indicates that the source or target of the conversion is not defined, usually the iModel Geographic Coordinate Reference System.*/\n NoGCSDefined = 100,\n /** This value indicates that the conversion was performed outside of the normal use of application of either Geographic Coordinate Reference Systems.\n * This return value can often be treated as a warning in specific cases. For example, global imagery extent spans the whole globe and\n * may extend far beyond the normal area of the iModel project extents and the extent of normal use of its Geographic Coordinate Reference System.\n * In such cases this value can be considered a warning as accuracy and precision is not expected in this specific case and approximate localization\n * of global imagery or other low accuracy context data is not essential far from the project.\n * If this status is returned for high accuracy data then it indicates that either Geographic Coordinate Reference Systems were inappropriately selected\n * for the iModel or other geolocated data. If this is the case the status should be somehow reported so action\n * can be performed to verify used geolocation parameters.\n * In either case the returned coordinates are to be considered valid though they may be inaccurate or result in some unexpected distortion of graphical\n * elements.\n */\n OutOfUsefulRange = 1,\n /** Indicates a hard error where conversions were requested outside of the area of the mathematical capacity of the conversion process for either\n * Geographic Coordinate Reference Systems involved. An example could be to attempt a conversion involving a Transverse Mercator more than 60 degrees\n * East or West of the projection central meridian.\n * The values returned may or may not be valid and should be discarded.\n */\n OutOfMathematicalDomain = 2,\n /** Indicates that datum transformation between the two Geographic Coordinate Reference Systems could not be performed.\n * This error is usually the result of a datum transformation path requiring use of latitude/longitude grid shift files that could not be obtained\n * or installed. In this case the latitude/longitude transformation is bypassed but the remainder of the conversion process is completed.\n * This error can be ignored for low accuracy data but should be somehow reported so actions can be performed to provide the missing files.\n */\n NoDatumConverter = 25,\n /** Indicates that a problem occurred during vertical datum conversion. This may the result of the inability to access the\n * Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).\n * The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.\n * This status should be somehow reported so actions can be performed to provide the missing information.\n */\n VerticalDatumConvertError = 26,\n /** General inner conversion engine error. Coordinates returned are invalid and should be discarded */\n CSMapError = 4096,\n /** This temporary status is used to mark coordinates for which the conversion has not yet been processed by the backend\n * as opposed to other coordinate conversions that may have been resolved otherwise (typically a cache).\n * At the completion of the conversion promise no coordinates should have this status.\n */\n Pending = -41556,\n}\n\n/** Maps a GeoCoordStatus to the equivalent GeoServiceStatus.\n * @public\n */\nexport function mapToGeoServiceStatus(s: GeoCoordStatus): GeoServiceStatus {\n switch (s) {\n case GeoCoordStatus.Success: return GeoServiceStatus.Success;\n case GeoCoordStatus.NoGCSDefined: return GeoServiceStatus.NoGeoLocation;\n case GeoCoordStatus.OutOfUsefulRange: return GeoServiceStatus.OutOfUsefulRange;\n case GeoCoordStatus.OutOfMathematicalDomain: return GeoServiceStatus.OutOfMathematicalDomain;\n case GeoCoordStatus.NoDatumConverter: return GeoServiceStatus.NoDatumConverter;\n case GeoCoordStatus.VerticalDatumConvertError: return GeoServiceStatus.VerticalDatumConvertError;\n case GeoCoordStatus.CSMapError: return GeoServiceStatus.CSMapError;\n case GeoCoordStatus.Pending: return GeoServiceStatus.Pending;\n default:\n throw new Error(\"GeoCoordStatus -> GeoServiceStatus - Missing enum conversion\");\n }\n}\n\n/** Information required to request conversion of an array of Geographic coordinates (Longitude/Latitude) to iModel coordinates\n * @beta\n */\nexport interface IModelCoordinatesRequestProps {\n source: string;\n geoCoords: XYZProps[];\n}\n\n/** A point converted to iModel coordinates to geographic coordinates or vice-versa by a [[GeoConverter]].\n * The status [[s]] indicates the converted point [[p]]'s degree of accuracy.\n * @public\n */\nexport interface PointWithStatus {\n /** A JSON representation of the converted point. */\n p: XYZProps;\n /** A status code indicating the degree of accuracy with the point [[p]] was converted. */\n s: GeoCoordStatus;\n}\n\n/** @beta */\nexport interface IModelCoordinatesResponseProps {\n iModelCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to request conversion of an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesRequestProps {\n target: string;\n iModelCoords: XYZProps[];\n}\n\n/** Information returned from a request to convert an array of iModel coordinates to Geographic Coordinates (longitude and latitude)\n * @beta\n */\nexport interface GeoCoordinatesResponseProps {\n geoCoords: PointWithStatus[];\n fromCache: number; // the number that were read from the cache rather than calculated.\n}\n\n/** Information required to interpret or complete a Geographic CRS in the specified format.\n * The only currently supported formats are JSON (for completion) and WKT (OGC Well Known Text)\n * @beta\n */\nexport interface GeographicCRSInterpretRequestProps {\n /** The format of the geographic CRS definition provided in the geographicCRSDef property. */\n format: \"WKT\" | \"JSON\";\n /** The geographic CRS definition in the format specified in the format property.\n * Note that when the WKT is used the WKT fragment provided can start with a COMPD_CS clause\n * which should then contain both the horizontal CRS definition as well as the vertical CRS specification.\n * WKT fragments starting with PROJCS or GEOGCS are also supported but the vertical CRS will be assigned a\n * default value.\n */\n geographicCRSDef: string;\n}\n\n/** Information returned from a request to interpret or complete a Geographic CRS\n * @beta\n */\nexport interface GeographicCRSInterpretResponseProps {\n /** The result status of the interpret operation. A value of zero indicates successful interpretation.\n * Any value other than zero is to be considered a hard error and no valid result will\n * be returned in the geographicCRS property.\n */\n status: number;\n /** The property that receives the interpreted geographic CRS if the process was successful. */\n geographicCRS?: GeographicCRSProps;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryContainment.js","sourceRoot":"","sources":["../../src/GeometryContainment.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { BentleyStatus, Id64Array } from \"@itwin/core-bentley\";\r\nimport { ViewFlagProps } from \"./ViewFlags\";\r\nimport { ClipPlaneContainment, ClipVectorProps } from \"@itwin/core-geometry\";\r\n\r\n/** Information required to request clip containment status for elements from the front end to the back end.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryContainmentRequestProps {\r\n candidates: Id64Array;\r\n clip: ClipVectorProps;\r\n allowOverlaps?: boolean;\r\n viewFlags?: ViewFlagProps;\r\n offSubCategories?: Id64Array;\r\n}\r\n\r\n/** Information returned from the back end to the front end holding the result of the geometry containment query.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GeometryContainmentResponseProps {\r\n status: BentleyStatus;\r\n candidatesContainment?: ClipPlaneContainment[]; // status for candidate array entry at the same index.\r\n numInside?: number;\r\n numOutside?: number;\r\n numOverlap?: number;\r\n}\r\n"]}
1
+ {"version":3,"file":"GeometryContainment.js","sourceRoot":"","sources":["../../src/GeometryContainment.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Geometry\n */\n\nimport { BentleyStatus, Id64Array } from \"@itwin/core-bentley\";\nimport { ViewFlagProps } from \"./ViewFlags\";\nimport { ClipPlaneContainment, ClipVectorProps } from \"@itwin/core-geometry\";\n\n/** Information required to request clip containment status for elements from the front end to the back end.\n * @public\n * @extensions\n */\nexport interface GeometryContainmentRequestProps {\n candidates: Id64Array;\n clip: ClipVectorProps;\n allowOverlaps?: boolean;\n viewFlags?: ViewFlagProps;\n offSubCategories?: Id64Array;\n}\n\n/** Information returned from the back end to the front end holding the result of the geometry containment query.\n * @public\n * @extensions\n */\nexport interface GeometryContainmentResponseProps {\n status: BentleyStatus;\n candidatesContainment?: ClipPlaneContainment[]; // status for candidate array entry at the same index.\n numInside?: number;\n numOutside?: number;\n numOverlap?: number;\n}\n"]}