@itwin/core-common 5.0.0-dev.9 → 5.0.0-dev.92

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 (806) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/lib/cjs/AmbientOcclusion.js +17 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.d.ts +0 -3
  5. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  6. package/lib/cjs/AnalysisStyle.js +20 -4
  7. package/lib/cjs/AnalysisStyle.js.map +1 -1
  8. package/lib/cjs/Atmosphere.js +39 -21
  9. package/lib/cjs/Atmosphere.js.map +1 -1
  10. package/lib/cjs/AuthorizationClient.js.map +1 -1
  11. package/lib/cjs/BackgroundMapProvider.js +4 -0
  12. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  13. package/lib/cjs/BackgroundMapSettings.js +19 -0
  14. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  15. package/lib/cjs/Base64EncodedString.js.map +1 -1
  16. package/lib/cjs/BlobReader.js +8 -6
  17. package/lib/cjs/BlobReader.js.map +1 -1
  18. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  19. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  20. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  21. package/lib/cjs/Camera.js +3 -0
  22. package/lib/cjs/Camera.js.map +1 -1
  23. package/lib/cjs/ChangedElements.js.map +1 -1
  24. package/lib/cjs/ChangedEntities.js.map +1 -1
  25. package/lib/cjs/ChangesetProps.d.ts +1 -1
  26. package/lib/cjs/ChangesetProps.js.map +1 -1
  27. package/lib/cjs/ClipStyle.js +31 -5
  28. package/lib/cjs/ClipStyle.js.map +1 -1
  29. package/lib/cjs/Code.d.ts +0 -5
  30. package/lib/cjs/Code.d.ts.map +1 -1
  31. package/lib/cjs/Code.js +16 -11
  32. package/lib/cjs/Code.js.map +1 -1
  33. package/lib/cjs/ColorByName.js.map +1 -1
  34. package/lib/cjs/ColorDef.js +11 -10
  35. package/lib/cjs/ColorDef.js.map +1 -1
  36. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  37. package/lib/cjs/ConcurrentQuery.d.ts +37 -1
  38. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  39. package/lib/cjs/ConcurrentQuery.js +16 -3
  40. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  41. package/lib/cjs/ContextRealityModel.js +53 -27
  42. package/lib/cjs/ContextRealityModel.js.map +1 -1
  43. package/lib/cjs/ContourDisplay.js +40 -5
  44. package/lib/cjs/ContourDisplay.js.map +1 -1
  45. package/lib/cjs/DisplayStyleSettings.js +95 -63
  46. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  47. package/lib/cjs/ECSchemaProps.js.map +1 -1
  48. package/lib/cjs/ECSqlReader.d.ts +2 -0
  49. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  50. package/lib/cjs/ECSqlReader.js +56 -50
  51. package/lib/cjs/ECSqlReader.js.map +1 -1
  52. package/lib/cjs/ECSqlTypes.js.map +1 -1
  53. package/lib/cjs/ElementMesh.js.map +1 -1
  54. package/lib/cjs/ElementProps.d.ts.map +1 -1
  55. package/lib/cjs/ElementProps.js +7 -3
  56. package/lib/cjs/ElementProps.js.map +1 -1
  57. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  58. package/lib/cjs/EntityProps.d.ts +25 -2
  59. package/lib/cjs/EntityProps.d.ts.map +1 -1
  60. package/lib/cjs/EntityProps.js +39 -0
  61. package/lib/cjs/EntityProps.js.map +1 -1
  62. package/lib/cjs/EntityReference.js.map +1 -1
  63. package/lib/cjs/Environment.js +25 -2
  64. package/lib/cjs/Environment.js.map +1 -1
  65. package/lib/cjs/FeatureIndex.js +15 -6
  66. package/lib/cjs/FeatureIndex.js.map +1 -1
  67. package/lib/cjs/FeatureSymbology.d.ts +25 -73
  68. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  69. package/lib/cjs/FeatureSymbology.js +88 -103
  70. package/lib/cjs/FeatureSymbology.js.map +1 -1
  71. package/lib/cjs/FeatureTable.d.ts +6 -108
  72. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  73. package/lib/cjs/FeatureTable.js +13 -329
  74. package/lib/cjs/FeatureTable.js.map +1 -1
  75. package/lib/cjs/Fonts.d.ts +68 -10
  76. package/lib/cjs/Fonts.d.ts.map +1 -1
  77. package/lib/cjs/Fonts.js +19 -4
  78. package/lib/cjs/Fonts.js.map +1 -1
  79. package/lib/cjs/Frustum.js +2 -2
  80. package/lib/cjs/Frustum.js.map +1 -1
  81. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  82. package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
  83. package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
  84. package/lib/cjs/GeoCoordinateServices.js +2 -1
  85. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  86. package/lib/cjs/GeometryContainment.js.map +1 -1
  87. package/lib/cjs/GeometryParams.js +58 -0
  88. package/lib/cjs/GeometryParams.js.map +1 -1
  89. package/lib/cjs/GeometrySummary.js.map +1 -1
  90. package/lib/cjs/Gradient.d.ts +3 -4
  91. package/lib/cjs/Gradient.d.ts.map +1 -1
  92. package/lib/cjs/Gradient.js +21 -19
  93. package/lib/cjs/Gradient.js.map +1 -1
  94. package/lib/cjs/GraphicParams.js +14 -12
  95. package/lib/cjs/GraphicParams.js.map +1 -1
  96. package/lib/cjs/GroundPlane.js +8 -2
  97. package/lib/cjs/GroundPlane.js.map +1 -1
  98. package/lib/cjs/HSLColor.js +6 -0
  99. package/lib/cjs/HSLColor.js.map +1 -1
  100. package/lib/cjs/HSVColor.js +6 -0
  101. package/lib/cjs/HSVColor.js.map +1 -1
  102. package/lib/cjs/HiddenLine.d.ts +17 -18
  103. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  104. package/lib/cjs/HiddenLine.js +24 -5
  105. package/lib/cjs/HiddenLine.js.map +1 -1
  106. package/lib/cjs/Hilite.js +10 -0
  107. package/lib/cjs/Hilite.js.map +1 -1
  108. package/lib/cjs/IModel.d.ts +3 -12
  109. package/lib/cjs/IModel.d.ts.map +1 -1
  110. package/lib/cjs/IModel.js +47 -23
  111. package/lib/cjs/IModel.js.map +1 -1
  112. package/lib/cjs/IModelError.d.ts +0 -2
  113. package/lib/cjs/IModelError.d.ts.map +1 -1
  114. package/lib/cjs/IModelError.js +3 -8
  115. package/lib/cjs/IModelError.js.map +1 -1
  116. package/lib/cjs/IModelVersion.js +4 -0
  117. package/lib/cjs/IModelVersion.js.map +1 -1
  118. package/lib/cjs/ITwinError.d.ts +63 -27
  119. package/lib/cjs/ITwinError.d.ts.map +1 -1
  120. package/lib/cjs/ITwinError.js +93 -45
  121. package/lib/cjs/ITwinError.js.map +1 -1
  122. package/lib/cjs/Image.d.ts +22 -8
  123. package/lib/cjs/Image.d.ts.map +1 -1
  124. package/lib/cjs/Image.js +20 -4
  125. package/lib/cjs/Image.js.map +1 -1
  126. package/lib/cjs/IpcAppProps.d.ts +2 -0
  127. package/lib/cjs/IpcAppProps.d.ts.map +1 -1
  128. package/lib/cjs/IpcAppProps.js.map +1 -1
  129. package/lib/cjs/LightSettings.js +39 -1
  130. package/lib/cjs/LightSettings.js.map +1 -1
  131. package/lib/cjs/LinePixels.js.map +1 -1
  132. package/lib/cjs/Localization.d.ts +0 -10
  133. package/lib/cjs/Localization.d.ts.map +1 -1
  134. package/lib/cjs/Localization.js +0 -1
  135. package/lib/cjs/Localization.js.map +1 -1
  136. package/lib/cjs/MapImagerySettings.js +3 -2
  137. package/lib/cjs/MapImagerySettings.js.map +1 -1
  138. package/lib/cjs/MapLayerSettings.d.ts +38 -1
  139. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  140. package/lib/cjs/MapLayerSettings.js +71 -4
  141. package/lib/cjs/MapLayerSettings.js.map +1 -1
  142. package/lib/cjs/MassProperties.d.ts +2 -0
  143. package/lib/cjs/MassProperties.d.ts.map +1 -1
  144. package/lib/cjs/MassProperties.js.map +1 -1
  145. package/lib/cjs/MaterialProps.js.map +1 -1
  146. package/lib/cjs/ModelClipGroup.js +6 -0
  147. package/lib/cjs/ModelClipGroup.js.map +1 -1
  148. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  149. package/lib/cjs/ModelProps.js.map +1 -1
  150. package/lib/cjs/NativeAppProps.js.map +1 -1
  151. package/lib/cjs/OctEncodedNormal.js +4 -0
  152. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  153. package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
  154. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  155. package/lib/cjs/PlanProjectionSettings.js +8 -1
  156. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  157. package/lib/cjs/PlanarClipMask.d.ts +0 -12
  158. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  159. package/lib/cjs/PlanarClipMask.js +24 -2
  160. package/lib/cjs/PlanarClipMask.js.map +1 -1
  161. package/lib/cjs/QPoint.d.ts +5 -5
  162. package/lib/cjs/QPoint.d.ts.map +1 -1
  163. package/lib/cjs/QPoint.js +37 -29
  164. package/lib/cjs/QPoint.js.map +1 -1
  165. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  166. package/lib/cjs/RealityModelDisplaySettings.js +81 -4
  167. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  168. package/lib/cjs/RenderMaterial.d.ts +0 -43
  169. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  170. package/lib/cjs/RenderMaterial.js +6 -51
  171. package/lib/cjs/RenderMaterial.js.map +1 -1
  172. package/lib/cjs/RenderPolyline.d.ts +36 -0
  173. package/lib/cjs/RenderPolyline.d.ts.map +1 -0
  174. package/lib/cjs/RenderPolyline.js +26 -0
  175. package/lib/cjs/RenderPolyline.js.map +1 -0
  176. package/lib/cjs/RenderSchedule.d.ts +1 -2
  177. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  178. package/lib/cjs/RenderSchedule.js +138 -11
  179. package/lib/cjs/RenderSchedule.js.map +1 -1
  180. package/lib/cjs/RenderTexture.d.ts +5 -23
  181. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  182. package/lib/cjs/RenderTexture.js +13 -16
  183. package/lib/cjs/RenderTexture.js.map +1 -1
  184. package/lib/cjs/RgbColor.js +3 -0
  185. package/lib/cjs/RgbColor.js.map +1 -1
  186. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  187. package/lib/cjs/RpcInterface.js +7 -1
  188. package/lib/cjs/RpcInterface.js.map +1 -1
  189. package/lib/cjs/RpcManager.js.map +1 -1
  190. package/lib/cjs/SessionProps.js.map +1 -1
  191. package/lib/cjs/SkyBox.js +17 -4
  192. package/lib/cjs/SkyBox.js.map +1 -1
  193. package/lib/cjs/SolarCalculate.js.map +1 -1
  194. package/lib/cjs/SolarShadows.js +5 -1
  195. package/lib/cjs/SolarShadows.js.map +1 -1
  196. package/lib/cjs/SpatialClassification.js +19 -1
  197. package/lib/cjs/SpatialClassification.js.map +1 -1
  198. package/lib/cjs/SubCategoryAppearance.js +35 -1
  199. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  200. package/lib/cjs/SubCategoryOverride.js +16 -2
  201. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  202. package/lib/cjs/TerrainSettings.d.ts +0 -7
  203. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  204. package/lib/cjs/TerrainSettings.js +19 -0
  205. package/lib/cjs/TerrainSettings.js.map +1 -1
  206. package/lib/cjs/TextureMapping.d.ts +17 -14
  207. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  208. package/lib/cjs/TextureMapping.js +47 -19
  209. package/lib/cjs/TextureMapping.js.map +1 -1
  210. package/lib/cjs/TextureProps.js.map +1 -1
  211. package/lib/cjs/ThematicDisplay.js +53 -2
  212. package/lib/cjs/ThematicDisplay.js.map +1 -1
  213. package/lib/cjs/Thumbnail.d.ts +1 -1
  214. package/lib/cjs/Thumbnail.js.map +1 -1
  215. package/lib/cjs/TileProps.js.map +1 -1
  216. package/lib/cjs/Tween.js +28 -19
  217. package/lib/cjs/Tween.js.map +1 -1
  218. package/lib/cjs/TxnAction.js.map +1 -1
  219. package/lib/cjs/ViewDetails.js +10 -6
  220. package/lib/cjs/ViewDetails.js.map +1 -1
  221. package/lib/cjs/ViewFlags.d.ts +1 -3
  222. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  223. package/lib/cjs/ViewFlags.js +86 -5
  224. package/lib/cjs/ViewFlags.js.map +1 -1
  225. package/lib/cjs/ViewProps.d.ts +2 -6
  226. package/lib/cjs/ViewProps.d.ts.map +1 -1
  227. package/lib/cjs/ViewProps.js.map +1 -1
  228. package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
  229. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  230. package/lib/cjs/annotation/TextAnnotation.d.ts +3 -2
  231. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  232. package/lib/cjs/annotation/TextAnnotation.js +13 -2
  233. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  234. package/lib/cjs/annotation/TextBlock.d.ts +17 -0
  235. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  236. package/lib/cjs/annotation/TextBlock.js +41 -6
  237. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  238. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  239. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  240. package/lib/cjs/annotation/TextStyle.js +65 -19
  241. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  242. package/lib/cjs/core-common.d.ts +1 -2
  243. package/lib/cjs/core-common.d.ts.map +1 -1
  244. package/lib/cjs/core-common.js +1 -2
  245. package/lib/cjs/core-common.js.map +1 -1
  246. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  247. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  248. package/lib/cjs/geometry/AdditionalTransform.js +12 -0
  249. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  250. package/lib/cjs/geometry/AreaPattern.js +17 -0
  251. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  252. package/lib/cjs/geometry/BoundingSphere.js +4 -0
  253. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  254. package/lib/cjs/geometry/Cartographic.js +23 -20
  255. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  256. package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
  257. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  258. package/lib/cjs/geometry/ElementGeometry.js +26 -8
  259. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  260. package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
  261. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  262. package/lib/cjs/geometry/FrustumPlanes.js +1 -0
  263. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  264. package/lib/cjs/geometry/GeodeticDatum.js +100 -0
  265. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  266. package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
  267. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  268. package/lib/cjs/geometry/GeometryStream.js +19 -6
  269. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  270. package/lib/cjs/geometry/ImageGraphic.js +10 -0
  271. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  272. package/lib/cjs/geometry/LineStyle.js +14 -0
  273. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  274. package/lib/cjs/geometry/Placement.js +6 -0
  275. package/lib/cjs/geometry/Placement.js.map +1 -1
  276. package/lib/cjs/geometry/Projection.js +75 -0
  277. package/lib/cjs/geometry/Projection.js.map +1 -1
  278. package/lib/cjs/geometry/TextString.js +18 -0
  279. package/lib/cjs/geometry/TextString.js.map +1 -1
  280. package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  281. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
  282. package/lib/cjs/internal/BackendTypes.js.map +1 -0
  283. package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
  284. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
  285. package/lib/cjs/internal/PackedFeatureTable.js +359 -0
  286. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
  287. package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
  288. package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
  289. package/lib/cjs/internal/RenderMaterialParams.js +68 -0
  290. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
  291. package/lib/cjs/internal/RenderMesh.d.ts +52 -0
  292. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
  293. package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
  294. package/lib/cjs/internal/RenderMesh.js.map +1 -0
  295. package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
  296. package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
  297. package/lib/cjs/internal/RenderTextureParams.js +37 -0
  298. package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
  299. package/lib/cjs/internal/Snapping.js.map +1 -1
  300. package/lib/cjs/internal/cross-package.d.ts +5 -0
  301. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  302. package/lib/cjs/internal/cross-package.js +16 -0
  303. package/lib/cjs/internal/cross-package.js.map +1 -1
  304. package/lib/cjs/ipc/IpcSession.js +1 -0
  305. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  306. package/lib/cjs/ipc/IpcSocket.d.ts +3 -0
  307. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  308. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  309. package/lib/cjs/ipc/IpcWebSocket.js +7 -6
  310. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  311. package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
  312. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  313. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  314. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  315. package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
  316. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  317. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  318. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  319. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  320. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  321. package/lib/cjs/rpc/TestRpcManager.js +1 -4
  322. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  323. package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
  324. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  325. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  326. package/lib/cjs/rpc/core/RpcControl.js +29 -38
  327. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  328. package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
  329. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  330. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
  331. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  332. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  333. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  334. package/lib/cjs/rpc/core/RpcOperation.js +29 -31
  335. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  336. package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
  337. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  338. package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
  339. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  340. package/lib/cjs/rpc/core/RpcPush.js +15 -8
  341. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  342. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  343. package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
  344. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  345. package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
  346. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  347. package/lib/cjs/rpc/core/RpcRequest.js +51 -29
  348. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  349. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  350. package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
  351. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  352. package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
  353. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  354. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
  355. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  356. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  357. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  358. package/lib/cjs/rpc/web/OpenAPI.js +2 -0
  359. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  360. package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
  361. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  362. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  363. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  364. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
  365. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  366. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
  367. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  368. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  369. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  370. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
  371. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  372. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  373. package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
  374. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  375. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  376. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  377. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
  378. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  379. package/lib/cjs/tile/B3dmTileIO.js +7 -0
  380. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  381. package/lib/cjs/tile/CompositeTileIO.js +3 -0
  382. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  383. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  384. package/lib/cjs/tile/GltfTileIO.js +4 -3
  385. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  386. package/lib/cjs/tile/I3dmTileIO.js +8 -0
  387. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  388. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  389. package/lib/cjs/tile/IModelTileIO.js +26 -3
  390. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  391. package/lib/cjs/tile/PntsTileIO.js +5 -0
  392. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  393. package/lib/cjs/tile/TileIO.js +2 -0
  394. package/lib/cjs/tile/TileIO.js.map +1 -1
  395. package/lib/cjs/tile/TileMetadata.js +9 -1
  396. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  397. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  398. package/lib/esm/AmbientOcclusion.js +17 -9
  399. package/lib/esm/AmbientOcclusion.js.map +1 -1
  400. package/lib/esm/AnalysisStyle.d.ts +0 -3
  401. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  402. package/lib/esm/AnalysisStyle.js +20 -4
  403. package/lib/esm/AnalysisStyle.js.map +1 -1
  404. package/lib/esm/Atmosphere.js +39 -21
  405. package/lib/esm/Atmosphere.js.map +1 -1
  406. package/lib/esm/AuthorizationClient.js.map +1 -1
  407. package/lib/esm/BackgroundMapProvider.js +4 -0
  408. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  409. package/lib/esm/BackgroundMapSettings.js +19 -0
  410. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  411. package/lib/esm/Base64EncodedString.js.map +1 -1
  412. package/lib/esm/BlobReader.js +8 -6
  413. package/lib/esm/BlobReader.js.map +1 -1
  414. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  415. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  416. package/lib/esm/BriefcaseTypes.js.map +1 -1
  417. package/lib/esm/Camera.js +3 -0
  418. package/lib/esm/Camera.js.map +1 -1
  419. package/lib/esm/ChangedElements.js.map +1 -1
  420. package/lib/esm/ChangedEntities.js.map +1 -1
  421. package/lib/esm/ChangesetProps.d.ts +1 -1
  422. package/lib/esm/ChangesetProps.js.map +1 -1
  423. package/lib/esm/ClipStyle.js +31 -5
  424. package/lib/esm/ClipStyle.js.map +1 -1
  425. package/lib/esm/Code.d.ts +0 -5
  426. package/lib/esm/Code.d.ts.map +1 -1
  427. package/lib/esm/Code.js +16 -11
  428. package/lib/esm/Code.js.map +1 -1
  429. package/lib/esm/ColorByName.js.map +1 -1
  430. package/lib/esm/ColorDef.js +11 -10
  431. package/lib/esm/ColorDef.js.map +1 -1
  432. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  433. package/lib/esm/ConcurrentQuery.d.ts +37 -1
  434. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  435. package/lib/esm/ConcurrentQuery.js +16 -3
  436. package/lib/esm/ConcurrentQuery.js.map +1 -1
  437. package/lib/esm/ContextRealityModel.js +53 -27
  438. package/lib/esm/ContextRealityModel.js.map +1 -1
  439. package/lib/esm/ContourDisplay.js +40 -5
  440. package/lib/esm/ContourDisplay.js.map +1 -1
  441. package/lib/esm/DisplayStyleSettings.js +95 -63
  442. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  443. package/lib/esm/ECSchemaProps.js.map +1 -1
  444. package/lib/esm/ECSqlReader.d.ts +2 -0
  445. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  446. package/lib/esm/ECSqlReader.js +56 -50
  447. package/lib/esm/ECSqlReader.js.map +1 -1
  448. package/lib/esm/ECSqlTypes.js.map +1 -1
  449. package/lib/esm/ElementMesh.js.map +1 -1
  450. package/lib/esm/ElementProps.d.ts.map +1 -1
  451. package/lib/esm/ElementProps.js +8 -4
  452. package/lib/esm/ElementProps.js.map +1 -1
  453. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  454. package/lib/esm/EntityProps.d.ts +25 -2
  455. package/lib/esm/EntityProps.d.ts.map +1 -1
  456. package/lib/esm/EntityProps.js +39 -0
  457. package/lib/esm/EntityProps.js.map +1 -1
  458. package/lib/esm/EntityReference.js.map +1 -1
  459. package/lib/esm/Environment.js +25 -2
  460. package/lib/esm/Environment.js.map +1 -1
  461. package/lib/esm/FeatureIndex.js +15 -6
  462. package/lib/esm/FeatureIndex.js.map +1 -1
  463. package/lib/esm/FeatureSymbology.d.ts +25 -73
  464. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  465. package/lib/esm/FeatureSymbology.js +88 -103
  466. package/lib/esm/FeatureSymbology.js.map +1 -1
  467. package/lib/esm/FeatureTable.d.ts +6 -108
  468. package/lib/esm/FeatureTable.d.ts.map +1 -1
  469. package/lib/esm/FeatureTable.js +11 -324
  470. package/lib/esm/FeatureTable.js.map +1 -1
  471. package/lib/esm/Fonts.d.ts +68 -10
  472. package/lib/esm/Fonts.d.ts.map +1 -1
  473. package/lib/esm/Fonts.js +19 -4
  474. package/lib/esm/Fonts.js.map +1 -1
  475. package/lib/esm/Frustum.js +2 -2
  476. package/lib/esm/Frustum.js.map +1 -1
  477. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  478. package/lib/esm/GeoCoordinateServices.d.ts +1 -0
  479. package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
  480. package/lib/esm/GeoCoordinateServices.js +2 -1
  481. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  482. package/lib/esm/GeometryContainment.js.map +1 -1
  483. package/lib/esm/GeometryParams.js +58 -0
  484. package/lib/esm/GeometryParams.js.map +1 -1
  485. package/lib/esm/GeometrySummary.js.map +1 -1
  486. package/lib/esm/Gradient.d.ts +3 -4
  487. package/lib/esm/Gradient.d.ts.map +1 -1
  488. package/lib/esm/Gradient.js +21 -19
  489. package/lib/esm/Gradient.js.map +1 -1
  490. package/lib/esm/GraphicParams.js +14 -12
  491. package/lib/esm/GraphicParams.js.map +1 -1
  492. package/lib/esm/GroundPlane.js +8 -2
  493. package/lib/esm/GroundPlane.js.map +1 -1
  494. package/lib/esm/HSLColor.js +6 -0
  495. package/lib/esm/HSLColor.js.map +1 -1
  496. package/lib/esm/HSVColor.js +6 -0
  497. package/lib/esm/HSVColor.js.map +1 -1
  498. package/lib/esm/HiddenLine.d.ts +17 -18
  499. package/lib/esm/HiddenLine.d.ts.map +1 -1
  500. package/lib/esm/HiddenLine.js +24 -5
  501. package/lib/esm/HiddenLine.js.map +1 -1
  502. package/lib/esm/Hilite.js +10 -0
  503. package/lib/esm/Hilite.js.map +1 -1
  504. package/lib/esm/IModel.d.ts +3 -12
  505. package/lib/esm/IModel.d.ts.map +1 -1
  506. package/lib/esm/IModel.js +47 -23
  507. package/lib/esm/IModel.js.map +1 -1
  508. package/lib/esm/IModelError.d.ts +0 -2
  509. package/lib/esm/IModelError.d.ts.map +1 -1
  510. package/lib/esm/IModelError.js +2 -1
  511. package/lib/esm/IModelError.js.map +1 -1
  512. package/lib/esm/IModelVersion.js +4 -0
  513. package/lib/esm/IModelVersion.js.map +1 -1
  514. package/lib/esm/ITwinError.d.ts +63 -27
  515. package/lib/esm/ITwinError.d.ts.map +1 -1
  516. package/lib/esm/ITwinError.js +87 -44
  517. package/lib/esm/ITwinError.js.map +1 -1
  518. package/lib/esm/Image.d.ts +22 -8
  519. package/lib/esm/Image.d.ts.map +1 -1
  520. package/lib/esm/Image.js +19 -4
  521. package/lib/esm/Image.js.map +1 -1
  522. package/lib/esm/IpcAppProps.d.ts +2 -0
  523. package/lib/esm/IpcAppProps.d.ts.map +1 -1
  524. package/lib/esm/IpcAppProps.js.map +1 -1
  525. package/lib/esm/LightSettings.js +39 -1
  526. package/lib/esm/LightSettings.js.map +1 -1
  527. package/lib/esm/LinePixels.js.map +1 -1
  528. package/lib/esm/Localization.d.ts +0 -10
  529. package/lib/esm/Localization.d.ts.map +1 -1
  530. package/lib/esm/Localization.js +0 -1
  531. package/lib/esm/Localization.js.map +1 -1
  532. package/lib/esm/MapImagerySettings.js +3 -2
  533. package/lib/esm/MapImagerySettings.js.map +1 -1
  534. package/lib/esm/MapLayerSettings.d.ts +38 -1
  535. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  536. package/lib/esm/MapLayerSettings.js +70 -3
  537. package/lib/esm/MapLayerSettings.js.map +1 -1
  538. package/lib/esm/MassProperties.d.ts +2 -0
  539. package/lib/esm/MassProperties.d.ts.map +1 -1
  540. package/lib/esm/MassProperties.js.map +1 -1
  541. package/lib/esm/MaterialProps.js.map +1 -1
  542. package/lib/esm/ModelClipGroup.js +6 -0
  543. package/lib/esm/ModelClipGroup.js.map +1 -1
  544. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  545. package/lib/esm/ModelProps.js.map +1 -1
  546. package/lib/esm/NativeAppProps.js.map +1 -1
  547. package/lib/esm/OctEncodedNormal.js +4 -0
  548. package/lib/esm/OctEncodedNormal.js.map +1 -1
  549. package/lib/esm/PlanProjectionSettings.d.ts +1 -2
  550. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  551. package/lib/esm/PlanProjectionSettings.js +8 -1
  552. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  553. package/lib/esm/PlanarClipMask.d.ts +0 -12
  554. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  555. package/lib/esm/PlanarClipMask.js +24 -2
  556. package/lib/esm/PlanarClipMask.js.map +1 -1
  557. package/lib/esm/QPoint.d.ts +5 -5
  558. package/lib/esm/QPoint.d.ts.map +1 -1
  559. package/lib/esm/QPoint.js +37 -29
  560. package/lib/esm/QPoint.js.map +1 -1
  561. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  562. package/lib/esm/RealityModelDisplaySettings.js +81 -4
  563. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  564. package/lib/esm/RenderMaterial.d.ts +0 -43
  565. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  566. package/lib/esm/RenderMaterial.js +6 -51
  567. package/lib/esm/RenderMaterial.js.map +1 -1
  568. package/lib/esm/RenderPolyline.d.ts +36 -0
  569. package/lib/esm/RenderPolyline.d.ts.map +1 -0
  570. package/lib/esm/RenderPolyline.js +23 -0
  571. package/lib/esm/RenderPolyline.js.map +1 -0
  572. package/lib/esm/RenderSchedule.d.ts +1 -2
  573. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  574. package/lib/esm/RenderSchedule.js +138 -11
  575. package/lib/esm/RenderSchedule.js.map +1 -1
  576. package/lib/esm/RenderTexture.d.ts +5 -23
  577. package/lib/esm/RenderTexture.d.ts.map +1 -1
  578. package/lib/esm/RenderTexture.js +13 -16
  579. package/lib/esm/RenderTexture.js.map +1 -1
  580. package/lib/esm/RgbColor.js +3 -0
  581. package/lib/esm/RgbColor.js.map +1 -1
  582. package/lib/esm/RpcInterface.d.ts.map +1 -1
  583. package/lib/esm/RpcInterface.js +8 -2
  584. package/lib/esm/RpcInterface.js.map +1 -1
  585. package/lib/esm/RpcManager.js.map +1 -1
  586. package/lib/esm/SessionProps.js.map +1 -1
  587. package/lib/esm/SkyBox.js +17 -4
  588. package/lib/esm/SkyBox.js.map +1 -1
  589. package/lib/esm/SolarCalculate.js.map +1 -1
  590. package/lib/esm/SolarShadows.js +5 -1
  591. package/lib/esm/SolarShadows.js.map +1 -1
  592. package/lib/esm/SpatialClassification.js +19 -1
  593. package/lib/esm/SpatialClassification.js.map +1 -1
  594. package/lib/esm/SubCategoryAppearance.js +35 -1
  595. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  596. package/lib/esm/SubCategoryOverride.js +16 -2
  597. package/lib/esm/SubCategoryOverride.js.map +1 -1
  598. package/lib/esm/TerrainSettings.d.ts +0 -7
  599. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  600. package/lib/esm/TerrainSettings.js +19 -0
  601. package/lib/esm/TerrainSettings.js.map +1 -1
  602. package/lib/esm/TextureMapping.d.ts +17 -14
  603. package/lib/esm/TextureMapping.d.ts.map +1 -1
  604. package/lib/esm/TextureMapping.js +47 -19
  605. package/lib/esm/TextureMapping.js.map +1 -1
  606. package/lib/esm/TextureProps.js.map +1 -1
  607. package/lib/esm/ThematicDisplay.js +53 -2
  608. package/lib/esm/ThematicDisplay.js.map +1 -1
  609. package/lib/esm/Thumbnail.d.ts +1 -1
  610. package/lib/esm/Thumbnail.js.map +1 -1
  611. package/lib/esm/TileProps.js.map +1 -1
  612. package/lib/esm/Tween.js +28 -19
  613. package/lib/esm/Tween.js.map +1 -1
  614. package/lib/esm/TxnAction.js.map +1 -1
  615. package/lib/esm/ViewDetails.js +10 -6
  616. package/lib/esm/ViewDetails.js.map +1 -1
  617. package/lib/esm/ViewFlags.d.ts +1 -3
  618. package/lib/esm/ViewFlags.d.ts.map +1 -1
  619. package/lib/esm/ViewFlags.js +86 -5
  620. package/lib/esm/ViewFlags.js.map +1 -1
  621. package/lib/esm/ViewProps.d.ts +2 -6
  622. package/lib/esm/ViewProps.d.ts.map +1 -1
  623. package/lib/esm/ViewProps.js.map +1 -1
  624. package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
  625. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  626. package/lib/esm/annotation/TextAnnotation.d.ts +3 -2
  627. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  628. package/lib/esm/annotation/TextAnnotation.js +13 -2
  629. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  630. package/lib/esm/annotation/TextBlock.d.ts +17 -0
  631. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  632. package/lib/esm/annotation/TextBlock.js +41 -6
  633. package/lib/esm/annotation/TextBlock.js.map +1 -1
  634. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  635. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  636. package/lib/esm/annotation/TextStyle.js +65 -19
  637. package/lib/esm/annotation/TextStyle.js.map +1 -1
  638. package/lib/esm/core-common.d.ts +1 -2
  639. package/lib/esm/core-common.d.ts.map +1 -1
  640. package/lib/esm/core-common.js +1 -2
  641. package/lib/esm/core-common.js.map +1 -1
  642. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  643. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  644. package/lib/esm/geometry/AdditionalTransform.js +12 -0
  645. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  646. package/lib/esm/geometry/AreaPattern.js +17 -0
  647. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  648. package/lib/esm/geometry/BoundingSphere.js +4 -0
  649. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  650. package/lib/esm/geometry/Cartographic.js +23 -20
  651. package/lib/esm/geometry/Cartographic.js.map +1 -1
  652. package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
  653. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  654. package/lib/esm/geometry/ElementGeometry.js +26 -8
  655. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  656. package/lib/esm/geometry/ElementGeometryFB.js +54 -108
  657. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  658. package/lib/esm/geometry/FrustumPlanes.js +1 -0
  659. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  660. package/lib/esm/geometry/GeodeticDatum.js +100 -0
  661. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  662. package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
  663. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  664. package/lib/esm/geometry/GeometryStream.js +19 -6
  665. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  666. package/lib/esm/geometry/ImageGraphic.js +10 -0
  667. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  668. package/lib/esm/geometry/LineStyle.js +14 -0
  669. package/lib/esm/geometry/LineStyle.js.map +1 -1
  670. package/lib/esm/geometry/Placement.js +6 -0
  671. package/lib/esm/geometry/Placement.js.map +1 -1
  672. package/lib/esm/geometry/Projection.js +75 -0
  673. package/lib/esm/geometry/Projection.js.map +1 -1
  674. package/lib/esm/geometry/TextString.js +18 -0
  675. package/lib/esm/geometry/TextString.js.map +1 -1
  676. package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  677. package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
  678. package/lib/esm/internal/BackendTypes.js.map +1 -0
  679. package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
  680. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
  681. package/lib/esm/internal/PackedFeatureTable.js +352 -0
  682. package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
  683. package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
  684. package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
  685. package/lib/esm/internal/RenderMaterialParams.js +64 -0
  686. package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
  687. package/lib/esm/internal/RenderMesh.d.ts +52 -0
  688. package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
  689. package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
  690. package/lib/esm/internal/RenderMesh.js.map +1 -0
  691. package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
  692. package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
  693. package/lib/esm/internal/RenderTextureParams.js +33 -0
  694. package/lib/esm/internal/RenderTextureParams.js.map +1 -0
  695. package/lib/esm/internal/Snapping.js.map +1 -1
  696. package/lib/esm/internal/cross-package.d.ts +5 -0
  697. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  698. package/lib/esm/internal/cross-package.js +4 -1
  699. package/lib/esm/internal/cross-package.js.map +1 -1
  700. package/lib/esm/ipc/IpcSession.js +1 -0
  701. package/lib/esm/ipc/IpcSession.js.map +1 -1
  702. package/lib/esm/ipc/IpcSocket.d.ts +3 -0
  703. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  704. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  705. package/lib/esm/ipc/IpcWebSocket.js +7 -6
  706. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  707. package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
  708. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  709. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  710. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  711. package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
  712. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  713. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  714. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  715. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  716. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  717. package/lib/esm/rpc/TestRpcManager.js +1 -4
  718. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  719. package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
  720. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  721. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  722. package/lib/esm/rpc/core/RpcControl.js +29 -38
  723. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  724. package/lib/esm/rpc/core/RpcInvocation.js +19 -13
  725. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  726. package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
  727. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  728. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  729. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  730. package/lib/esm/rpc/core/RpcOperation.js +29 -31
  731. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  732. package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
  733. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  734. package/lib/esm/rpc/core/RpcProtocol.js +32 -30
  735. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  736. package/lib/esm/rpc/core/RpcPush.js +15 -8
  737. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  738. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  739. package/lib/esm/rpc/core/RpcRegistry.js +10 -9
  740. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  741. package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
  742. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  743. package/lib/esm/rpc/core/RpcRequest.js +51 -29
  744. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  745. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  746. package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
  747. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  748. package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
  749. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  750. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
  751. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  752. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  753. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  754. package/lib/esm/rpc/web/OpenAPI.js +2 -0
  755. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  756. package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
  757. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  758. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  759. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  760. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
  761. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  762. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
  763. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  764. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  765. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  766. package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
  767. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  768. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  769. package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
  770. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  771. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  772. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  773. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
  774. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  775. package/lib/esm/tile/B3dmTileIO.js +7 -0
  776. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  777. package/lib/esm/tile/CompositeTileIO.js +3 -0
  778. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  779. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  780. package/lib/esm/tile/GltfTileIO.js +4 -3
  781. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  782. package/lib/esm/tile/I3dmTileIO.js +8 -0
  783. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  784. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  785. package/lib/esm/tile/IModelTileIO.js +26 -3
  786. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  787. package/lib/esm/tile/PntsTileIO.js +5 -0
  788. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  789. package/lib/esm/tile/TileIO.js +2 -0
  790. package/lib/esm/tile/TileIO.js.map +1 -1
  791. package/lib/esm/tile/TileMetadata.js +9 -1
  792. package/lib/esm/tile/TileMetadata.js.map +1 -1
  793. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  794. package/package.json +14 -14
  795. package/lib/cjs/BackendTypes.d.ts.map +0 -1
  796. package/lib/cjs/BackendTypes.js.map +0 -1
  797. package/lib/cjs/Render.d.ts +0 -85
  798. package/lib/cjs/Render.d.ts.map +0 -1
  799. package/lib/cjs/Render.js.map +0 -1
  800. package/lib/esm/BackendTypes.d.ts.map +0 -1
  801. package/lib/esm/BackendTypes.js.map +0 -1
  802. package/lib/esm/Render.d.ts +0 -85
  803. package/lib/esm/Render.d.ts.map +0 -1
  804. package/lib/esm/Render.js.map +0 -1
  805. /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
  806. /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
package/lib/esm/QPoint.js CHANGED
@@ -27,7 +27,7 @@ export var Quantization;
27
27
  return 0.0 === extent ? extent : rangeScale / extent;
28
28
  }
29
29
  Quantization.computeScale = computeScale;
30
- /** @internal */
30
+ /** Returns true if the quantized value `qpos` fits within the specified range. */
31
31
  function isInRange(qpos, rangeScale = Quantization.rangeScale16) {
32
32
  return qpos >= 0.0 && qpos < rangeScale + 1.0;
33
33
  }
@@ -39,7 +39,7 @@ export var Quantization;
39
39
  return Math.floor(Math.max(0.0, Math.min(rangeScale, 0.5 + (pos - origin) * scale)));
40
40
  }
41
41
  Quantization.quantize = quantize;
42
- /** @internal */
42
+ /** Returns true if the value `pos` can be quantized to the specified range. */
43
43
  function isQuantizable(pos, origin, scale, rangeScale = Quantization.rangeScale16) {
44
44
  return isInRange(quantize(pos, origin, scale, rangeScale));
45
45
  }
@@ -51,7 +51,7 @@ export var Quantization;
51
51
  return 0.0 === scale ? origin : origin + qpos / scale;
52
52
  }
53
53
  Quantization.unquantize = unquantize;
54
- /** @internal */
54
+ /** Returns true if `qpos` is a valid quantized 16-bit value. */
55
55
  function isQuantized(qpos) {
56
56
  return isInRange(qpos) && qpos === Math.floor(qpos);
57
57
  }
@@ -64,13 +64,11 @@ export var Quantization;
64
64
  * @extensions
65
65
  */
66
66
  export class QParams2d {
67
- constructor(ox = 0, oy = 0, sx = 0, sy = 0) {
68
- /** The origin of the quantization range. */
69
- this.origin = new Point2d();
70
- /** The scale applied to coordinates to quantize them. */
71
- this.scale = new Point2d();
72
- this.setFrom(ox, oy, sx, sy);
73
- }
67
+ /** The origin of the quantization range. */
68
+ origin = new Point2d();
69
+ /** The scale applied to coordinates to quantize them. */
70
+ scale = new Point2d();
71
+ constructor(ox = 0, oy = 0, sx = 0, sy = 0) { this.setFrom(ox, oy, sx, sy); }
74
72
  setFrom(ox, oy, sx, sy) {
75
73
  this.origin.x = ox;
76
74
  this.origin.y = oy;
@@ -123,7 +121,7 @@ export class QParams2d {
123
121
  static fromOriginAndScale(originX, originY, scaleX, scaleY) {
124
122
  return new QParams2d(originX, originY, scaleX, scaleY);
125
123
  }
126
- /** @internal */
124
+ /** The diagonal of the unquantized range represented by these parameters. */
127
125
  get rangeDiagonal() {
128
126
  return Vector2d.createFrom({ x: 0 === this.scale.x ? 0 : Quantization.rangeScale16 / this.scale.x, y: 0 === this.scale.y ? 0 : Quantization.rangeScale16 / this.scale.y });
129
127
  }
@@ -151,6 +149,8 @@ export class QParams2d {
151
149
  * @extensions
152
150
  */
153
151
  export class QPoint2d {
152
+ _x = 0;
153
+ _y = 0;
154
154
  /** The quantized x component. */
155
155
  get x() { return this._x; }
156
156
  set x(x) {
@@ -164,10 +164,7 @@ export class QPoint2d {
164
164
  this._y = y;
165
165
  }
166
166
  /** Construct with `x` and `y` initialized to zero. */
167
- constructor() {
168
- this._x = 0;
169
- this._y = 0;
170
- }
167
+ constructor() { }
171
168
  /** Initialize this point by quantizing the supplied { x, y } using the specified params */
172
169
  init(pos, params) {
173
170
  this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);
@@ -262,13 +259,15 @@ export var QPoint2dBuffer;
262
259
  * @extensions
263
260
  */
264
261
  export class QPoint2dList {
262
+ /** Parameters used to quantize the points. */
263
+ params;
264
+ _list = new Array();
265
265
  /** The list of quantized points. */
266
266
  get list() {
267
267
  return this._list;
268
268
  }
269
269
  /** Construct an empty list set up to use the supplied quantization parameters. */
270
270
  constructor(params) {
271
- this._list = new Array();
272
271
  this.params = params.clone();
273
272
  }
274
273
  /** Removes all points from the list. */
@@ -355,11 +354,11 @@ export class QPoint2dList {
355
354
  * @extensions
356
355
  */
357
356
  export class QParams3d {
357
+ /** The origin of the quantization range. */
358
+ origin = new Point3d();
359
+ /** The scale applied to coordinates to quantize them. */
360
+ scale = new Point3d();
358
361
  constructor(ox = 0, oy = 0, oz = 0, sx = 0, sy = 0, sz = 0) {
359
- /** The origin of the quantization range. */
360
- this.origin = new Point3d();
361
- /** The scale applied to coordinates to quantize them. */
362
- this.scale = new Point3d();
363
362
  this.setFrom(ox, oy, oz, sx, sy, sz);
364
363
  }
365
364
  setFrom(ox, oy, oz, sx, sy, sz) {
@@ -430,7 +429,7 @@ export class QParams3d {
430
429
  static fromZeroToOne(rangeScale = Quantization.rangeScale16) {
431
430
  return QParams3d.fromRange(Range3d.createArray([Point3d.create(0, 0, 0), Point3d.create(1, 1, 1)]), undefined, rangeScale);
432
431
  }
433
- /** @internal */
432
+ /** The diagonal of the unquantized range represented by these parameters. */
434
433
  get rangeDiagonal() {
435
434
  return Vector3d.createFrom({
436
435
  x: this.scale.x === 0 ? 0 : Quantization.rangeScale16 / this.scale.x,
@@ -469,6 +468,9 @@ export class QParams3d {
469
468
  * @extensions
470
469
  */
471
470
  export class QPoint3d {
471
+ _x = 0;
472
+ _y = 0;
473
+ _z = 0;
472
474
  /** The quantized x component. */
473
475
  get x() { return this._x; }
474
476
  set x(x) {
@@ -488,11 +490,7 @@ export class QPoint3d {
488
490
  this._z = z;
489
491
  }
490
492
  /** Construct with all components initialized to zero. */
491
- constructor() {
492
- this._x = 0;
493
- this._y = 0;
494
- this._z = 0;
495
- }
493
+ constructor() { }
496
494
  /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */
497
495
  init(pos, params) {
498
496
  this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);
@@ -616,6 +614,9 @@ export var QPoint3dBuffer;
616
614
  * @extensions
617
615
  */
618
616
  export class QPoint3dList {
617
+ /** Parameters used to quantize the points. */
618
+ params;
619
+ _list = [];
619
620
  /** The list of quantized points. */
620
621
  get list() {
621
622
  return this._list;
@@ -624,7 +625,6 @@ export class QPoint3dList {
624
625
  * @param params The quantization parameters. If omitted, a null range will be used.
625
626
  */
626
627
  constructor(params) {
627
- this._list = [];
628
628
  this.params = params ? params.clone() : QParams3d.fromRange(Range3d.createNull());
629
629
  }
630
630
  /** Construct a QPoint3dList containing all points in the supplied list, quantized to the range of those points.
@@ -726,9 +726,13 @@ export class QPoint3dList {
726
726
  * @extensions
727
727
  */
728
728
  export class QPoint2dBufferBuilder {
729
+ _scratchQPoint2d = new QPoint2d();
730
+ /** The parameters used to quantize the points in the [[buffer]]. */
731
+ params;
732
+ /** The buffer that holds the points. */
733
+ buffer;
729
734
  /** Construct a new buffer with a [[length]] of zero. */
730
735
  constructor(options) {
731
- this._scratchQPoint2d = new QPoint2d();
732
736
  this.params = QParams2d.fromRange(options.range);
733
737
  const initialCapacity = options.initialCapacity ?? 0;
734
738
  this.buffer = new Uint16ArrayBuilder({
@@ -782,9 +786,13 @@ export class QPoint2dBufferBuilder {
782
786
  * @extensions
783
787
  */
784
788
  export class QPoint3dBufferBuilder {
789
+ _scratchQPoint3d = new QPoint3d();
790
+ /** The parameters used to quantize the points in the [[buffer]]. */
791
+ params;
792
+ /** The buffer that holds the points. */
793
+ buffer;
785
794
  /** Construct a new buffer with a [[length]] of zero. */
786
795
  constructor(options) {
787
- this._scratchQPoint3d = new QPoint3d();
788
796
  this.params = QParams3d.fromRange(options.range);
789
797
  const initialCapacity = options.initialCapacity ?? 0;
790
798
  this.buffer = new Uint16ArrayBuilder({
@@ -1 +1 @@
1
- {"version":3,"file":"QPoint.js","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GACvD,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,KAAW,YAAY,CAqC5B;AArCD,WAAiB,YAAY;IACd,yBAAY,GAAG,MAAM,CAAC;IACtB,wBAAW,GAAG,IAAI,CAAC;IAEhC,8FAA8F;IAC9F,SAAgB,YAAY,CAAC,MAAc,EAAE,UAAU,GAAG,aAAA,YAAY;QACpE,OAAO,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,GAAG,MAAM,CAAC;IACvD,CAAC;IAFe,yBAAY,eAE3B,CAAA;IAED,gBAAgB;IAChB,SAAgB,SAAS,CAAC,IAAY,EAAE,UAAU,GAAG,aAAA,YAAY;QAC/D,OAAO,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,UAAU,GAA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C,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,wDAAwD;IACxD,IAAW,MAAM;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACtB,OAAO,GAAG,GAAG,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,UAAkB,EAAE,MAAiB;QAC9C,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,UAAkB,EAAE,MAAgB;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrF,CAAC;IAED,wGAAwG;IACjG,MAAM;QACX,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;SACnC,CAAC;IACJ,CAAC;CACF","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 { assert, Uint16ArrayBuilder } from \"@itwin/core-bentley\";\r\nimport {\r\n Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d, XAndY, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/**\r\n * Provides facilities for quantizing floating point values within a specified range into 16-bit unsigned integers.\r\n * This is a lossy compression technique.\r\n * Given a floating point range [min, max], a floating point value `x` within that range is quantized by subtracting\r\n * `min`, scaling the result according to `max`, and truncating the result to an integer.\r\n * Therefore min quantizes to 0, max to 0xffff, (min+max)/2 to 0x7fff, and so on.\r\n * These routines are chiefly used by classes like [[QPoint2d]] and [[QPoint3d]] to reduce the space required to store\r\n * coordinate values for [RenderGraphic]($frontend)s.\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Quantization {\r\n export const rangeScale16 = 0xffff;\r\n export const rangeScale8 = 0xff;\r\n\r\n /** Compute the scale factor required to quantize `extent` to `rangeScale` discrete values. */\r\n export function computeScale(extent: number, rangeScale = rangeScale16): number {\r\n return 0.0 === extent ? extent : rangeScale / extent;\r\n }\r\n\r\n /** @internal */\r\n export function isInRange(qpos: number, rangeScale = rangeScale16): boolean {\r\n return qpos >= 0.0 && qpos < rangeScale + 1.0;\r\n }\r\n\r\n /** Return `pos` quantized to the range [`origin`, `origin + rangeScale`].\r\n * @see [[Quantization.unquantize]] for the inverse operation.\r\n */\r\n export function quantize(pos: number, origin: number, scale: number, rangeScale = rangeScale16): number {\r\n return Math.floor(Math.max(0.0, Math.min(rangeScale, 0.5 + (pos - origin) * scale)));\r\n }\r\n\r\n /** @internal */\r\n export function isQuantizable(pos: number, origin: number, scale: number, rangeScale = rangeScale16) {\r\n return isInRange(quantize(pos, origin, scale, rangeScale));\r\n }\r\n\r\n /** Give `qpos` quantized to the range [`origin`, `origin + rangeScale`], return the unquantized value.\r\n * @see [[Quantization.quantize]] for the inverse operation.\r\n */\r\n export function unquantize(qpos: number, origin: number, scale: number): number {\r\n return 0.0 === scale ? origin : origin + qpos / scale;\r\n }\r\n\r\n /** @internal */\r\n export function isQuantized(qpos: number) {\r\n return isInRange(qpos) && qpos === Math.floor(qpos);\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport interface QParams2dProps {\r\n origin: XAndY;\r\n scale: XAndY;\r\n}\r\n\r\n/** Parameters used for [[Quantization]] of 2d points such that the `x` and `y` components are each quantized to 16-bit unsigned integers.\r\n * @see [[QPoint2d]] for the quantized representation of a [Point2d]($core-geometry).\r\n * @see [[QPoint2dList]] for a list of [[QPoint2d]]s quantized using a [[QParams2d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport class QParams2d {\r\n /** The origin of the quantization range. */\r\n public readonly origin = new Point2d();\r\n /** The scale applied to coordinates to quantize them. */\r\n public readonly scale = new Point2d();\r\n\r\n private constructor(ox = 0, oy = 0, sx = 0, sy = 0) { this.setFrom(ox, oy, sx, sy); }\r\n\r\n private setFrom(ox: number, oy: number, sx: number, sy: number) {\r\n this.origin.x = ox;\r\n this.origin.y = oy;\r\n this.scale.x = sx;\r\n this.scale.y = sy;\r\n }\r\n\r\n /** Set [[origin]] and [[scale]] from `src`. */\r\n public copyFrom(src: QParams2d): void {\r\n this.setFrom(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\r\n }\r\n\r\n /** Create a copy of these params.\r\n * @param out If supplied, these QParams2d will be modified and returned; otherwise a new QParams2d object will be created and returned.\r\n */\r\n public clone(out?: QParams2d): QParams2d {\r\n const result = undefined !== out ? out : new QParams2d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /** Initialize these parameters to support quantization of values within the specified range. */\r\n public setFromRange(range: Range2d, rangeScale = Quantization.rangeScale16) {\r\n if (!range.isNull) {\r\n this.setFrom(range.low.x, range.low.y, Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale));\r\n } else {\r\n this.origin.x = this.origin.y = this.scale.x = this.scale.y = 0;\r\n }\r\n }\r\n\r\n /** Create parameters to support quantization of values within the specified range. */\r\n public static fromRange(range: Range2d, out?: QParams2d, rangeScale = Quantization.rangeScale16) {\r\n const params = undefined !== out ? out : new QParams2d();\r\n params.setFromRange(range, rangeScale);\r\n return params;\r\n }\r\n\r\n /** Return the unquantized point for the input `x` and `y` components. If `out` is supplied, it will be modified to hold the result and returned. */\r\n public unquantize(x: number, y: number, out?: Point2d): Point2d {\r\n out = out ?? new Point2d();\r\n out.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\r\n out.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\r\n return out;\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0], appropriate for normalized 2d vectors. */\r\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\r\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(-1, -1), Point2d.create(1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** Create parameters supporting quantization of values within the range [0.0, 1.0]. */\r\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\r\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(0, 0), Point2d.create(1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** Create parameters from origin and scale components */\r\n public static fromOriginAndScale(originX: number, originY: number, scaleX: number, scaleY: number) {\r\n return new QParams2d(originX, originY, scaleX, scaleY);\r\n }\r\n\r\n /** @internal */\r\n public get rangeDiagonal(): Vector2d {\r\n return Vector2d.createFrom({ x: 0 === this.scale.x ? 0 : Quantization.rangeScale16 / this.scale.x, y: 0 === this.scale.y ? 0 : Quantization.rangeScale16 / this.scale.y });\r\n }\r\n\r\n /** Return true if the point point is quantizable using these parameters. */\r\n public isQuantizable(point: Point2d) {\r\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y);\r\n }\r\n\r\n /** @alpha */\r\n public toJSON(): QParams2dProps {\r\n return {\r\n origin: { x: this.origin.x, y: this.origin.y },\r\n scale: { x: this.scale.x, y: this.scale.y },\r\n };\r\n }\r\n\r\n /** @alpha */\r\n public static fromJSON(src: QParams2dProps): QParams2d {\r\n return this.fromOriginAndScale(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\r\n }\r\n}\r\n\r\n/** Represents a [Point2d]($core-geometry) compressed such that each component `x` and `y` is quantized to the 16-bit integer range [0, 0xffff].\r\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\r\n * @see [[QParams2d]] to define quantization parameters for a range of points.\r\n * @see [[QPoint2dList]] for a list of points all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint2d {\r\n private _x: number = 0;\r\n private _y: number = 0;\r\n\r\n /** The quantized x component. */\r\n public get x() { return this._x; }\r\n public set x(x: number) {\r\n assert(Quantization.isQuantized(x));\r\n this._x = x;\r\n }\r\n\r\n /** The quantized y component. */\r\n public get y() { return this._y; }\r\n public set y(y: number) {\r\n assert(Quantization.isQuantized(y));\r\n this._y = y;\r\n }\r\n\r\n /** Construct with `x` and `y` initialized to zero. */\r\n public constructor() { }\r\n\r\n /** Initialize this point by quantizing the supplied { x, y } using the specified params */\r\n public init(pos: XAndY, params: QParams2d) {\r\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\r\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\r\n }\r\n\r\n /** Create a quantized point from the supplied Point2d using the specified params */\r\n public static create(pos: Point2d, params: QParams2d) {\r\n const qpt = new QPoint2d();\r\n qpt.init(pos, params);\r\n return qpt;\r\n }\r\n\r\n /** Initialize `x` and `y` from `src`. */\r\n public copyFrom(src: QPoint2d) {\r\n this.x = src.x;\r\n this.y = src.y;\r\n }\r\n\r\n /** Create a copy of this point.\r\n * @param out If supplied, it will be modified in-place and returned; otherwise a new QPoint2d will be allocated and returned.\r\n */\r\n public clone(out?: QPoint2d) {\r\n const result = undefined !== out ? out : new QPoint2d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /**\r\n * Set the x and y components directly.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n */\r\n public setFromScalars(x: number, y: number) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n\r\n /**\r\n * Create a QPoint2d directly from x and y components.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n */\r\n public static fromScalars(x: number, y: number) {\r\n const pt = new QPoint2d();\r\n pt.setFromScalars(x, y);\r\n return pt;\r\n }\r\n\r\n /** Return a Point2d unquantized according to the supplied `params`. If `out` is supplied, it will be modified in-place and returned. */\r\n public unquantize(params: QParams2d, out?: Point2d): Point2d {\r\n const pt: Point2d = undefined !== out ? out : new Point2d();\r\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\r\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\r\n return pt;\r\n }\r\n}\r\n\r\n/** A compact representation of a list of [[QPoint2d]]s stored in a `Uint16Array`\r\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.uvs]($frontend).\r\n * @see [[QPoint3dBuffer]] for 3d points.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface QPoint2dBuffer {\r\n /** The parameters used to quantize the [[points]]. */\r\n params: QParams2d;\r\n /** The [[QPoint2d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 2; the number of points in the array is half the array's length.\r\n * To obtain the `n`th point, use `QPoint2d.fromScalars(buffer.points[n * 2], buffer.points[n * 2 + 1])`.\r\n */\r\n points: Uint16Array;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace QPoint2dBuffer {\r\n const scratchQPoint2d = new QPoint2d();\r\n\r\n /** Extracts the point at the specified index from a buffer.\r\n * @param points The buffer in which each consecutive pair of integers is a 2d quantized point.\r\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [[QPoint2d]] to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint2d): QPoint2d {\r\n const index = pointIndex * 2;\r\n const x = points[index + 0];\r\n const y = points[index + 1];\r\n if (undefined === x || undefined === y)\r\n throw new Error(\"Index out of range\");\r\n\r\n result = result ?? new QPoint2d();\r\n result.setFromScalars(x, y);\r\n return result;\r\n }\r\n\r\n /** Extracts and unquantizes the point at the specified index from a buffer.\r\n * @param buffer The array of points and the quantization parameters.\r\n * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [Point2d]($core-geometry) to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function unquantizePoint(buffer: QPoint2dBuffer, pointIndex: number, result?: Point2d): Point2d {\r\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint2d);\r\n return qpt.unquantize(buffer.params, result);\r\n }\r\n}\r\n\r\n/** A list of [[QPoint2d]]s all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint2dList {\r\n /** Parameters used to quantize the points. */\r\n public readonly params: QParams2d;\r\n private readonly _list = new Array<QPoint2d>();\r\n\r\n /** The list of quantized points. */\r\n public get list(): ReadonlyArray<QPoint2d> {\r\n return this._list;\r\n }\r\n\r\n /** Construct an empty list set up to use the supplied quantization parameters. */\r\n public constructor(params: QParams2d) {\r\n this.params = params.clone();\r\n }\r\n\r\n /** Removes all points from the list. */\r\n public clear() {\r\n this._list.length = 0;\r\n }\r\n\r\n /** Removes all points from the list and change the quantization parameters. */\r\n public reset(params: QParams2d) {\r\n this.clear();\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Quantizes the supplied Point2d to this list's range and appends it to the list. */\r\n public add(pt: Point2d) {\r\n this._list.push(QPoint2d.create(pt, this.params));\r\n }\r\n\r\n /** Adds a previously-quantized point to this list. */\r\n public push(qpt: QPoint2d) {\r\n this._list.push(qpt.clone());\r\n }\r\n\r\n /** The number of points in the list. */\r\n public get length() {\r\n return this._list.length;\r\n }\r\n\r\n /** Returns the unquantized value of the point at the specified index in the list. */\r\n public unquantize(index: number, out?: Point2d): Point2d {\r\n assert(index < this.length);\r\n if (index < this.length) {\r\n return this._list[index].unquantize(this.params, out);\r\n } else {\r\n return undefined !== out ? out : new Point2d();\r\n }\r\n }\r\n\r\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\r\n * @note The loss of precision is compounded each time the points are requantized to a new range.\r\n */\r\n public requantize(params: QParams2d) {\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = this.unquantize(i);\r\n this._list[i].init(pt, params);\r\n }\r\n\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Extracts the current contents of the list as a Uint16Array such that the first element of the array corresponds to the first point's `x` component,\r\n * the second to the first point's `y` component, and so on.\r\n */\r\n public toTypedArray(): Uint16Array {\r\n const array = new Uint16Array(this.length * 2);\r\n const pts = this._list;\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = pts[i];\r\n array[i * 2] = pt.x;\r\n array[i * 2 + 1] = pt.y;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n /** Create from a Uint16Array laid out such that `array[0]` corresponds to the first point's `x` component, `array[1]` to the first point's `y` component, and so on. */\r\n public fromTypedArray(range: Range2d, array: Uint16Array) {\r\n this.params.setFromRange(range);\r\n this._list.length = array.length / 2;\r\n for (let i = 0, j = 0; i < this.list.length; i++)\r\n this._list[i] = QPoint2d.fromScalars(array[j++], array[j++]);\r\n }\r\n\r\n /** Construct a QPoint2dList containing all points in the supplied list, quantized to the range of those points. */\r\n public static fromPoints(points: Point2d[], out?: QPoint2dList) {\r\n let qPoints;\r\n const qParams = QParams2d.fromRange(Range2d.createArray(points));\r\n if (out) {\r\n qPoints = out;\r\n qPoints.reset(qParams);\r\n } else {\r\n qPoints = new QPoint2dList(qParams);\r\n }\r\n\r\n for (const point of points)\r\n qPoints.add(point);\r\n\r\n return qPoints;\r\n }\r\n}\r\n\r\n/** @alpha */\r\nexport interface QParams3dProps {\r\n origin: XYAndZ;\r\n scale: XYAndZ;\r\n}\r\n\r\n/** Parameters used for [[Quantization]] of 3d points such that the `x`, `y`, and `z` components are each quantized to 16-bit unsigned integers.\r\n * @see [[QPoint3d]] for the quantized representation of a [Point3d]($core-geometry).\r\n * @see [[QPoint3dList]] for a list of [[QPoint3d]]s quantized using a [[QParams3d]].\r\n * @public\r\n * @extensions\r\n */\r\nexport class QParams3d {\r\n /** The origin of the quantization range. */\r\n public readonly origin = new Point3d();\r\n /** The scale applied to coordinates to quantize them. */\r\n public readonly scale = new Point3d();\r\n\r\n private constructor(ox = 0, oy = 0, oz = 0, sx = 0, sy = 0, sz = 0) {\r\n this.setFrom(ox, oy, oz, sx, sy, sz);\r\n }\r\n\r\n private setFrom(ox: number, oy: number, oz: number, sx: number, sy: number, sz: number) {\r\n this.origin.x = ox;\r\n this.origin.y = oy;\r\n this.origin.z = oz;\r\n this.scale.x = sx;\r\n this.scale.y = sy;\r\n this.scale.z = sz;\r\n }\r\n\r\n /** Set `x`, `y`, and `z` from `src. */\r\n public copyFrom(src: QParams3d): void {\r\n this.setFrom(src.origin.x, src.origin.y, src.origin.z, src.scale.x, src.scale.y, src.scale.z);\r\n }\r\n\r\n /** Create a copy of these parameters.\r\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\r\n */\r\n public clone(out?: QParams3d): QParams3d {\r\n const result = undefined !== out ? out : new QParams3d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /** Initialize from origin and scale */\r\n public setFromOriginAndScale(origin: Point3d, scale: Point3d) {\r\n this.setFrom(origin.x, origin.y, origin.z, scale.x, scale.y, scale.z);\r\n }\r\n\r\n /** Initialize these parameters to support quantization of values within the specified range. */\r\n public setFromRange(range: Range3d, rangeScale = Quantization.rangeScale16) {\r\n if (!range.isNull) {\r\n this.setFrom(range.low.x, range.low.y, range.low.z,\r\n Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale), Quantization.computeScale(range.high.z - range.low.z, rangeScale));\r\n } else {\r\n this.origin.x = this.origin.y = this.origin.z = 0;\r\n this.scale.x = this.scale.y = this.scale.z = 0;\r\n }\r\n }\r\n\r\n /** Return the unquantized point for the input components.\r\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new Point3d.\r\n */\r\n public unquantize(x: number, y: number, z: number, out?: Point3d): Point3d {\r\n const pt: Point3d = undefined !== out ? out : new Point3d();\r\n pt.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\r\n pt.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\r\n pt.z = Quantization.unquantize(z, this.origin.z, this.scale.z);\r\n return pt;\r\n }\r\n\r\n /** Creates parameters to support quantization of values within the specified range.\r\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\r\n */\r\n public static fromRange(range: Range3d, out?: QParams3d, rangeScale = Quantization.rangeScale16): QParams3d {\r\n const params = undefined !== out ? out : new QParams3d();\r\n params.setFromRange(range, rangeScale);\r\n return params;\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0].\r\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\r\n */\r\n public static fromOriginAndScale(origin: Point3d, scale: Point3d, out?: QParams3d): QParams3d {\r\n const params = undefined !== out ? out : new QParams3d();\r\n params.setFromOriginAndScale(origin, scale);\r\n return params;\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0]. */\r\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\r\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(-1, -1, -1), Point3d.create(1, 1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** Creates parameters supporting quantization of values within the range [0.0, 1.0]. */\r\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\r\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(0, 0, 0), Point3d.create(1, 1, 1)]), undefined, rangeScale);\r\n }\r\n\r\n /** @internal */\r\n public get rangeDiagonal(): Vector3d {\r\n return Vector3d.createFrom({\r\n x: this.scale.x === 0 ? 0 : Quantization.rangeScale16 / this.scale.x,\r\n y: this.scale.y === 0 ? 0 : Quantization.rangeScale16 / this.scale.y,\r\n z: this.scale.z === 0 ? 0 : Quantization.rangeScale16 / this.scale.z,\r\n });\r\n }\r\n\r\n /** Return true if the point point is quantizable using these parameters. */\r\n public isQuantizable(point: Point3d) {\r\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y) && Quantization.isQuantizable(point.z, this.origin.z, this.scale.z);\r\n }\r\n\r\n /** Compute the range to which these parameters quantize. */\r\n public computeRange(out?: Range3d): Range3d {\r\n const range = Range3d.createNull(out);\r\n range.extendPoint(this.origin);\r\n range.extendPoint(this.origin.plus(this.rangeDiagonal));\r\n return range;\r\n }\r\n\r\n /** @alpha */\r\n public toJSON(): QParams3dProps {\r\n return {\r\n origin: { x: this.origin.x, y: this.origin.y, z: this.origin.z },\r\n scale: { x: this.scale.x, y: this.scale.y, z: this.scale.z },\r\n };\r\n }\r\n\r\n /** @alpha */\r\n public static fromJSON(src: QParams3dProps, out?: QParams3d): QParams3d {\r\n return this.fromOriginAndScale(Point3d.fromJSON(src.origin), Point3d.fromJSON(src.scale), out);\r\n }\r\n}\r\n\r\n/** Represents a [Point3d]($core-geometry) compressed such that each component `x`, `y`, and `z` is quantized to the 16-bit integer range [0, 0xffff].\r\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\r\n * @see [[QParams3d]] to define quantization parameters for a range of points.\r\n * @see [[QPoint3dList]] for a list of points all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint3d {\r\n private _x: number = 0;\r\n private _y: number = 0;\r\n private _z: number = 0;\r\n\r\n /** The quantized x component. */\r\n public get x() { return this._x; }\r\n public set x(x: number) {\r\n assert(Quantization.isQuantized(x));\r\n this._x = x;\r\n }\r\n\r\n /** The quantized y component. */\r\n public get y() { return this._y; }\r\n public set y(y: number) {\r\n assert(Quantization.isQuantized(y));\r\n this._y = y;\r\n }\r\n\r\n /** The quantized z component. */\r\n public get z() { return this._z; }\r\n public set z(z: number) {\r\n assert(Quantization.isQuantized(z));\r\n this._z = z;\r\n }\r\n\r\n /** Construct with all components initialized to zero. */\r\n public constructor() { }\r\n\r\n /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */\r\n public init(pos: XYAndZ, params: QParams3d): void {\r\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\r\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\r\n this.z = Quantization.quantize(pos.z, params.origin.z, params.scale.z);\r\n }\r\n\r\n /** Creates a quantized point from the supplied Point3d using the specified params */\r\n public static create(pos: Point3d, params: QParams3d): QPoint3d {\r\n const qpt = new QPoint3d();\r\n qpt.init(pos, params);\r\n return qpt;\r\n }\r\n\r\n /** Set this points components from `src`. */\r\n public copyFrom(src: QPoint3d): void {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n }\r\n\r\n /** Create a copy of this point.\r\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\r\n */\r\n public clone(out?: QPoint3d): QPoint3d {\r\n const result = undefined !== out ? out : new QPoint3d();\r\n result.copyFrom(this);\r\n return result;\r\n }\r\n\r\n /**\r\n * Sets the x, y, and z components directly.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n * @param z Must be an integer in the range [0, 0xffff]\r\n */\r\n public setFromScalars(x: number, y: number, z: number) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n }\r\n\r\n /**\r\n * Creates a QPoint3d directly from x, y, and z components.\r\n * @param x Must be an integer in the range [0, 0xffff]\r\n * @param y Must be an integer in the range [0, 0xffff]\r\n * @param z Must be an integer in the range [0, 0xffff]\r\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\r\n */\r\n public static fromScalars(x: number, y: number, z: number, out?: QPoint3d): QPoint3d {\r\n const pt = undefined === out ? new QPoint3d() : out;\r\n pt.setFromScalars(x, y, z);\r\n return pt;\r\n }\r\n\r\n /** Returns a Point3d unquantized according to the supplied params.\r\n * If `out` is supplied, it will be modified in-place instead of allocating a new Point3d.\r\n */\r\n public unquantize(params: QParams3d, out?: Point3d): Point3d {\r\n const pt: Point3d = undefined !== out ? out : new Point3d();\r\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\r\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\r\n pt.z = Quantization.unquantize(this.z, params.origin.z, params.scale.z);\r\n return pt;\r\n }\r\n\r\n /** Return true if this point's components are identical to the other point's components. */\r\n public equals(other: QPoint3d): boolean {\r\n return this.x === other.x && this.y === other.y && this.z === other.z;\r\n }\r\n\r\n /** Perform ordinal comparison to another point. The function returns:\r\n * - Zero if this point is identical to `rhs`; or\r\n * - A number less than zero if this point is ordered before `rhs`; or\r\n * - A number greater than zero if this point is ordered after `rhs`.\r\n * @see [OrderedComparator]($core-bentley).\r\n */\r\n public compare(rhs: QPoint3d): number {\r\n let diff = this.x - rhs.x;\r\n if (0 === diff) {\r\n diff = this.y - rhs.y;\r\n if (0 === diff) {\r\n diff = this.z - rhs.z;\r\n }\r\n }\r\n\r\n return diff;\r\n }\r\n}\r\n\r\n/** A compact representation of a list of [[QPoint3d]]s stored in a `Uint16Array`.\r\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.positions]($frontend).\r\n * @public\r\n * @extensions\r\n */\r\nexport interface QPoint3dBuffer {\r\n /** The parameters used to quantize the [[points]]. */\r\n params: QParams3d;\r\n /** The [[QPoint3d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 3; the number of points in the array is half the array's length.\r\n * To obtain the `n`th point, use `QPoint3d.fromScalars(buffer.points[n * 3], buffer.points[n * 3 + 1], buffer.points[n * 3 + 2])`.\r\n */\r\n points: Uint16Array;\r\n}\r\n\r\n/** @public\r\n * @extensions\r\n */\r\nexport namespace QPoint3dBuffer {\r\n const scratchQPoint3d = new QPoint3d();\r\n\r\n /** Extracts the point at the specified index from a buffer.\r\n * @param points The buffer in which each consecutive pair of integers is a 3d quantized point.\r\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [[QPoint3d]] to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint3d): QPoint3d {\r\n const index = pointIndex * 3;\r\n const x = points[index + 0];\r\n const y = points[index + 1];\r\n const z = points[index + 2];\r\n if (undefined === x || undefined === y || undefined === z)\r\n throw new Error(\"Index out of range\");\r\n\r\n result = result ?? new QPoint3d();\r\n result.setFromScalars(x, y, z);\r\n return result;\r\n }\r\n\r\n /** Extracts and unquantizes the point at the specified index from a buffer.\r\n * @param buffer The array of points and the quantization parameters.\r\n * @param buffer The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\r\n * @param result If supplied, a preallocated [Point3d]($core-geometry) to initialize with the result and return.\r\n * @returns The point at `pointIndex`.\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n export function unquantizePoint(buffer: QPoint3dBuffer, pointIndex: number, result?: Point3d): Point3d {\r\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint3d);\r\n return qpt.unquantize(buffer.params, result);\r\n }\r\n}\r\n\r\n/** A list of [[QPoint3d]]s all quantized to the same range.\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint3dList {\r\n /** Parameters used to quantize the points. */\r\n public readonly params: QParams3d;\r\n private readonly _list: QPoint3d[] = [];\r\n\r\n /** The list of quantized points. */\r\n public get list(): ReadonlyArray<QPoint3d> {\r\n return this._list;\r\n }\r\n\r\n /** Construct an empty list set up to quantize to the supplied range.\r\n * @param params The quantization parameters. If omitted, a null range will be used.\r\n */\r\n public constructor(params?: QParams3d) {\r\n this.params = params ? params.clone() : QParams3d.fromRange(Range3d.createNull());\r\n }\r\n\r\n /** Construct a QPoint3dList containing all points in the supplied list, quantized to the range of those points.\r\n * @param points The points to quantize and add to the list.\r\n * @param out If supplied, it will be cleared, its parameters recomputed, and the points will be added to it; otherwise, a new QPoint3dList will be created and returned.\r\n */\r\n public static fromPoints(points: Point3d[], out?: QPoint3dList): QPoint3dList {\r\n let qPoints;\r\n const qParams = QParams3d.fromRange(Range3d.createArray(points));\r\n if (out) {\r\n qPoints = out;\r\n qPoints.reset(qParams);\r\n } else {\r\n qPoints = new QPoint3dList(qParams);\r\n }\r\n\r\n for (const point of points)\r\n qPoints.add(point);\r\n\r\n return qPoints;\r\n }\r\n\r\n /** Removes all points from the list. */\r\n public clear() {\r\n this._list.length = 0;\r\n }\r\n\r\n /** Clears out the contents of the list and changes the quantization parameters. */\r\n public reset(params: QParams3d) {\r\n this.clear();\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Quantizes the supplied Point3d to this list's range and appends it to the list. */\r\n public add(pt: Point3d) {\r\n this._list.push(QPoint3d.create(pt, this.params));\r\n }\r\n\r\n /** Adds a previously-quantized point to this list. */\r\n public push(qpt: QPoint3d) {\r\n this._list.push(qpt.clone());\r\n }\r\n\r\n /** The number of points in the list. */\r\n public get length() {\r\n return this._list.length;\r\n }\r\n\r\n /** Returns the unquantized value of the point at the specified index in the list. */\r\n public unquantize(index: number, out?: Point3d): Point3d {\r\n assert(index < this.length);\r\n if (index < this.length) {\r\n return this._list[index].unquantize(this.params, out);\r\n } else {\r\n return undefined !== out ? out : new Point3d();\r\n }\r\n }\r\n\r\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\r\n * @note The loss of precision is compounded each time the points are requantized to a new range.\r\n */\r\n public requantize(params: QParams3d): void {\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = this.unquantize(i);\r\n this._list[i].init(pt, params);\r\n }\r\n\r\n this.params.copyFrom(params);\r\n }\r\n\r\n /** Extracts the current contents of the list as a Uint16Array such that the first 3 elements contain the first point's x, y, and z components,\r\n * the second three elements contain the second point's components, and so on.\r\n */\r\n public toTypedArray(): Uint16Array {\r\n const array = new Uint16Array(this.length * 3);\r\n const pts = this._list;\r\n for (let i = 0; i < this.length; i++) {\r\n const pt = pts[i];\r\n array[i * 3 + 0] = pt.x;\r\n array[i * 3 + 1] = pt.y;\r\n array[i * 3 + 2] = pt.z;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n /** Reinitialize from a Uint16Array in which the first three elements specify the x, y, and z components of the first point, the second three elements specify the components\r\n * of the second point, and so on.\r\n */\r\n public fromTypedArray(range: Range3d, array: Uint16Array): void {\r\n this.params.setFromRange(range);\r\n this._list.length = array.length / 3;\r\n for (let i = 0, j = 0; i < this.list.length; i++)\r\n this._list[i] = QPoint3d.fromScalars(array[j++], array[j++], array[j++]);\r\n }\r\n\r\n /** Construct a list containing all points in the supplied list, quantized using the supplied parameters. */\r\n public static createFrom(points: Point3d[], params: QParams3d): QPoint3dList {\r\n const list = new QPoint3dList(params);\r\n for (const point of points)\r\n list.add(point);\r\n\r\n return list;\r\n }\r\n\r\n /** An iterator over the points in the list. */\r\n public [Symbol.iterator]() {\r\n return this.list[Symbol.iterator]();\r\n }\r\n}\r\n\r\n/** Options used to construct a [[QPoint2dBufferBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\ninterface QPoint2dBufferBuilderOptions {\r\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\r\n range: Range2d;\r\n /** The number of points for which to allocate space.\r\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\r\n */\r\n initialCapacity?: number;\r\n /** Multiplier used to compute new capacity when resizing the buffer.\r\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\r\n */\r\n growthFactor?: number;\r\n}\r\n\r\n/** Constructs a [[QPoint2dBuffer]] using a [Uint16ArrayBuilder]($bentley).\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint2dBufferBuilder {\r\n private readonly _scratchQPoint2d = new QPoint2d();\r\n\r\n /** The parameters used to quantize the points in the [[buffer]]. */\r\n public readonly params: QParams2d;\r\n /** The buffer that holds the points. */\r\n public readonly buffer: Uint16ArrayBuilder;\r\n\r\n /** Construct a new buffer with a [[length]] of zero. */\r\n public constructor(options: QPoint2dBufferBuilderOptions) {\r\n this.params = QParams2d.fromRange(options.range);\r\n const initialCapacity = options.initialCapacity ?? 0;\r\n this.buffer = new Uint16ArrayBuilder({\r\n growthFactor: options.growthFactor,\r\n initialCapacity: 2 * initialCapacity,\r\n });\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public pushXY(x: number, y: number): void {\r\n this.buffer.push(x);\r\n this.buffer.push(y);\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public push(pt: XAndY): void {\r\n this.pushXY(pt.x, pt.y);\r\n }\r\n\r\n /** The number of points currently in the [[buffer]]. */\r\n public get length(): number {\r\n const len = this.buffer.length;\r\n assert(len % 2 === 0);\r\n return len / 2;\r\n }\r\n\r\n /** Returns the quantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [[QPoint2d]] to initialize with the result and return.\r\n * @returns The quantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public get(pointIndex: number, result?: QPoint2d): QPoint2d {\r\n return QPoint2dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\r\n }\r\n\r\n /** Returns the unquantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [Point2d]($core-geometry) to initialize with the result and return.\r\n * @returns The unquantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public unquantize(pointIndex: number, result?: Point2d): Point2d {\r\n return this.get(pointIndex, this._scratchQPoint2d).unquantize(this.params, result);\r\n }\r\n\r\n /** Obtain a [[QPoint2dBuffer]] containing all of the points that have been appended by this builder. */\r\n public finish(): QPoint2dBuffer {\r\n return {\r\n params: this.params,\r\n points: this.buffer.toTypedArray(),\r\n };\r\n }\r\n}\r\n\r\n/** Options used to construct a [[QPoint3dBufferBuilder]].\r\n * @public\r\n * @extensions\r\n */\r\ninterface QPoint3dBufferBuilderOptions {\r\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\r\n range: Range3d;\r\n /** The number of points for which to allocate space.\r\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\r\n */\r\n initialCapacity?: number;\r\n /** Multiplier used to compute new capacity when resizing the buffer.\r\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\r\n */\r\n growthFactor?: number;\r\n}\r\n\r\n/** Constructs a [[QPoint3dBuffer]] using a [Uint16ArrayBuilder]($bentley).\r\n * @public\r\n * @extensions\r\n */\r\nexport class QPoint3dBufferBuilder {\r\n private readonly _scratchQPoint3d = new QPoint3d();\r\n\r\n /** The parameters used to quantize the points in the [[buffer]]. */\r\n public readonly params: QParams3d;\r\n /** The buffer that holds the points. */\r\n public readonly buffer: Uint16ArrayBuilder;\r\n\r\n /** Construct a new buffer with a [[length]] of zero. */\r\n public constructor(options: QPoint3dBufferBuilderOptions) {\r\n this.params = QParams3d.fromRange(options.range);\r\n const initialCapacity = options.initialCapacity ?? 0;\r\n this.buffer = new Uint16ArrayBuilder({\r\n growthFactor: options.growthFactor,\r\n initialCapacity: 3 * initialCapacity,\r\n });\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public pushXYZ(x: number, y: number, z: number): void {\r\n this.buffer.push(x);\r\n this.buffer.push(y);\r\n this.buffer.push(z);\r\n }\r\n\r\n /** Append a point with the specified quantized coordinates. */\r\n public push(pt: XYAndZ): void {\r\n this.pushXYZ(pt.x, pt.y, pt.z);\r\n }\r\n\r\n /** The number of points currently in the [[buffer]]. */\r\n public get length(): number {\r\n const len = this.buffer.length;\r\n assert(len % 3 === 0);\r\n return len / 3;\r\n }\r\n\r\n /** Returns the quantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [[QPoint3d]] to initialize with the result and return.\r\n * @returns The quantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public get(pointIndex: number, result?: QPoint3d): QPoint3d {\r\n return QPoint3dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\r\n }\r\n\r\n /** Returns the unquantized point at the specified index in [[buffer]].\r\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\r\n * @param result If supplied, a [Point3d]($core-geometry) to initialize with the result and return.\r\n * @returns The unquantized point at the specified index in [[buffer]].\r\n * @throws Error if `pointIndex` is out of bounds.\r\n */\r\n public unquantize(pointIndex: number, result?: Point3d): Point3d {\r\n return this.get(pointIndex, this._scratchQPoint3d).unquantize(this.params, result);\r\n }\r\n\r\n /** Obtain a [[QPoint3dBuffer]] containing all of the points that have been appended by this builder. */\r\n public finish(): QPoint3dBuffer {\r\n return {\r\n params: this.params,\r\n points: this.buffer.toTypedArray(),\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"QPoint.js","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GACvD,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,KAAW,YAAY,CAqC5B;AArCD,WAAiB,YAAY;IACd,yBAAY,GAAG,MAAM,CAAC;IACtB,wBAAW,GAAG,IAAI,CAAC;IAEhC,8FAA8F;IAC9F,SAAgB,YAAY,CAAC,MAAc,EAAE,UAAU,GAAG,aAAA,YAAY;QACpE,OAAO,GAAG,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,GAAG,MAAM,CAAC;IACvD,CAAC;IAFe,yBAAY,eAE3B,CAAA;IAED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C;IAED,+DAA+D;IACxD,OAAO,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;QAC5C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;IAED,+DAA+D;IACxD,IAAI,CAAC,EAAU;QACpB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,wDAAwD;IACxD,IAAW,MAAM;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QAC/B,MAAM,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACtB,OAAO,GAAG,GAAG,CAAC,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACI,GAAG,CAAC,UAAkB,EAAE,MAAiB;QAC9C,OAAO,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAClF,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,UAAkB,EAAE,MAAgB;QACpD,OAAO,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrF,CAAC;IAED,wGAAwG;IACjG,MAAM;QACX,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;SACnC,CAAC;IACJ,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { assert, Uint16ArrayBuilder } from \"@itwin/core-bentley\";\nimport {\n Point2d, Point3d, Range2d, Range3d, Vector2d, Vector3d, XAndY, XYAndZ,\n} from \"@itwin/core-geometry\";\n\n/**\n * Provides facilities for quantizing floating point values within a specified range into 16-bit unsigned integers.\n * This is a lossy compression technique.\n * Given a floating point range [min, max], a floating point value `x` within that range is quantized by subtracting\n * `min`, scaling the result according to `max`, and truncating the result to an integer.\n * Therefore min quantizes to 0, max to 0xffff, (min+max)/2 to 0x7fff, and so on.\n * These routines are chiefly used by classes like [[QPoint2d]] and [[QPoint3d]] to reduce the space required to store\n * coordinate values for [RenderGraphic]($frontend)s.\n * @public\n * @extensions\n */\nexport namespace Quantization {\n export const rangeScale16 = 0xffff;\n export const rangeScale8 = 0xff;\n\n /** Compute the scale factor required to quantize `extent` to `rangeScale` discrete values. */\n export function computeScale(extent: number, rangeScale = rangeScale16): number {\n return 0.0 === extent ? extent : rangeScale / extent;\n }\n\n /** Returns true if the quantized value `qpos` fits within the specified range. */\n export function isInRange(qpos: number, rangeScale = rangeScale16): boolean {\n return qpos >= 0.0 && qpos < rangeScale + 1.0;\n }\n\n /** Return `pos` quantized to the range [`origin`, `origin + rangeScale`].\n * @see [[Quantization.unquantize]] for the inverse operation.\n */\n export function quantize(pos: number, origin: number, scale: number, rangeScale = rangeScale16): number {\n return Math.floor(Math.max(0.0, Math.min(rangeScale, 0.5 + (pos - origin) * scale)));\n }\n\n /** Returns true if the value `pos` can be quantized to the specified range. */\n export function isQuantizable(pos: number, origin: number, scale: number, rangeScale = rangeScale16) {\n return isInRange(quantize(pos, origin, scale, rangeScale));\n }\n\n /** Give `qpos` quantized to the range [`origin`, `origin + rangeScale`], return the unquantized value.\n * @see [[Quantization.quantize]] for the inverse operation.\n */\n export function unquantize(qpos: number, origin: number, scale: number): number {\n return 0.0 === scale ? origin : origin + qpos / scale;\n }\n\n /** Returns true if `qpos` is a valid quantized 16-bit value. */\n export function isQuantized(qpos: number) {\n return isInRange(qpos) && qpos === Math.floor(qpos);\n }\n}\n\n/** @alpha */\nexport interface QParams2dProps {\n origin: XAndY;\n scale: XAndY;\n}\n\n/** Parameters used for [[Quantization]] of 2d points such that the `x` and `y` components are each quantized to 16-bit unsigned integers.\n * @see [[QPoint2d]] for the quantized representation of a [Point2d]($core-geometry).\n * @see [[QPoint2dList]] for a list of [[QPoint2d]]s quantized using a [[QParams2d]].\n * @public\n * @extensions\n */\nexport class QParams2d {\n /** The origin of the quantization range. */\n public readonly origin = new Point2d();\n /** The scale applied to coordinates to quantize them. */\n public readonly scale = new Point2d();\n\n private constructor(ox = 0, oy = 0, sx = 0, sy = 0) { this.setFrom(ox, oy, sx, sy); }\n\n private setFrom(ox: number, oy: number, sx: number, sy: number) {\n this.origin.x = ox;\n this.origin.y = oy;\n this.scale.x = sx;\n this.scale.y = sy;\n }\n\n /** Set [[origin]] and [[scale]] from `src`. */\n public copyFrom(src: QParams2d): void {\n this.setFrom(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\n }\n\n /** Create a copy of these params.\n * @param out If supplied, these QParams2d will be modified and returned; otherwise a new QParams2d object will be created and returned.\n */\n public clone(out?: QParams2d): QParams2d {\n const result = undefined !== out ? out : new QParams2d();\n result.copyFrom(this);\n return result;\n }\n\n /** Initialize these parameters to support quantization of values within the specified range. */\n public setFromRange(range: Range2d, rangeScale = Quantization.rangeScale16) {\n if (!range.isNull) {\n this.setFrom(range.low.x, range.low.y, Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale));\n } else {\n this.origin.x = this.origin.y = this.scale.x = this.scale.y = 0;\n }\n }\n\n /** Create parameters to support quantization of values within the specified range. */\n public static fromRange(range: Range2d, out?: QParams2d, rangeScale = Quantization.rangeScale16) {\n const params = undefined !== out ? out : new QParams2d();\n params.setFromRange(range, rangeScale);\n return params;\n }\n\n /** Return the unquantized point for the input `x` and `y` components. If `out` is supplied, it will be modified to hold the result and returned. */\n public unquantize(x: number, y: number, out?: Point2d): Point2d {\n out = out ?? new Point2d();\n out.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\n out.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\n return out;\n }\n\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0], appropriate for normalized 2d vectors. */\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(-1, -1), Point2d.create(1, 1)]), undefined, rangeScale);\n }\n\n /** Create parameters supporting quantization of values within the range [0.0, 1.0]. */\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\n return QParams2d.fromRange(Range2d.createArray([Point2d.create(0, 0), Point2d.create(1, 1)]), undefined, rangeScale);\n }\n\n /** Create parameters from origin and scale components */\n public static fromOriginAndScale(originX: number, originY: number, scaleX: number, scaleY: number) {\n return new QParams2d(originX, originY, scaleX, scaleY);\n }\n\n /** The diagonal of the unquantized range represented by these parameters. */\n public get rangeDiagonal(): Vector2d {\n return Vector2d.createFrom({ x: 0 === this.scale.x ? 0 : Quantization.rangeScale16 / this.scale.x, y: 0 === this.scale.y ? 0 : Quantization.rangeScale16 / this.scale.y });\n }\n\n /** Return true if the point point is quantizable using these parameters. */\n public isQuantizable(point: Point2d) {\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y);\n }\n\n /** @alpha */\n public toJSON(): QParams2dProps {\n return {\n origin: { x: this.origin.x, y: this.origin.y },\n scale: { x: this.scale.x, y: this.scale.y },\n };\n }\n\n /** @alpha */\n public static fromJSON(src: QParams2dProps): QParams2d {\n return this.fromOriginAndScale(src.origin.x, src.origin.y, src.scale.x, src.scale.y);\n }\n}\n\n/** Represents a [Point2d]($core-geometry) compressed such that each component `x` and `y` is quantized to the 16-bit integer range [0, 0xffff].\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\n * @see [[QParams2d]] to define quantization parameters for a range of points.\n * @see [[QPoint2dList]] for a list of points all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint2d {\n private _x: number = 0;\n private _y: number = 0;\n\n /** The quantized x component. */\n public get x() { return this._x; }\n public set x(x: number) {\n assert(Quantization.isQuantized(x));\n this._x = x;\n }\n\n /** The quantized y component. */\n public get y() { return this._y; }\n public set y(y: number) {\n assert(Quantization.isQuantized(y));\n this._y = y;\n }\n\n /** Construct with `x` and `y` initialized to zero. */\n public constructor() { }\n\n /** Initialize this point by quantizing the supplied { x, y } using the specified params */\n public init(pos: XAndY, params: QParams2d) {\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\n }\n\n /** Create a quantized point from the supplied Point2d using the specified params */\n public static create(pos: Point2d, params: QParams2d) {\n const qpt = new QPoint2d();\n qpt.init(pos, params);\n return qpt;\n }\n\n /** Initialize `x` and `y` from `src`. */\n public copyFrom(src: QPoint2d) {\n this.x = src.x;\n this.y = src.y;\n }\n\n /** Create a copy of this point.\n * @param out If supplied, it will be modified in-place and returned; otherwise a new QPoint2d will be allocated and returned.\n */\n public clone(out?: QPoint2d) {\n const result = undefined !== out ? out : new QPoint2d();\n result.copyFrom(this);\n return result;\n }\n\n /**\n * Set the x and y components directly.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n */\n public setFromScalars(x: number, y: number) {\n this.x = x;\n this.y = y;\n }\n\n /**\n * Create a QPoint2d directly from x and y components.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n */\n public static fromScalars(x: number, y: number) {\n const pt = new QPoint2d();\n pt.setFromScalars(x, y);\n return pt;\n }\n\n /** Return a Point2d unquantized according to the supplied `params`. If `out` is supplied, it will be modified in-place and returned. */\n public unquantize(params: QParams2d, out?: Point2d): Point2d {\n const pt: Point2d = undefined !== out ? out : new Point2d();\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\n return pt;\n }\n}\n\n/** A compact representation of a list of [[QPoint2d]]s stored in a `Uint16Array`\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.uvs]($frontend).\n * @see [[QPoint3dBuffer]] for 3d points.\n * @public\n * @extensions\n */\nexport interface QPoint2dBuffer {\n /** The parameters used to quantize the [[points]]. */\n params: QParams2d;\n /** The [[QPoint2d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 2; the number of points in the array is half the array's length.\n * To obtain the `n`th point, use `QPoint2d.fromScalars(buffer.points[n * 2], buffer.points[n * 2 + 1])`.\n */\n points: Uint16Array;\n}\n\n/**\n * @public\n * @extensions\n */\nexport namespace QPoint2dBuffer {\n const scratchQPoint2d = new QPoint2d();\n\n /** Extracts the point at the specified index from a buffer.\n * @param points The buffer in which each consecutive pair of integers is a 2d quantized point.\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [[QPoint2d]] to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint2d): QPoint2d {\n const index = pointIndex * 2;\n const x = points[index + 0];\n const y = points[index + 1];\n if (undefined === x || undefined === y)\n throw new Error(\"Index out of range\");\n\n result = result ?? new QPoint2d();\n result.setFromScalars(x, y);\n return result;\n }\n\n /** Extracts and unquantizes the point at the specified index from a buffer.\n * @param buffer The array of points and the quantization parameters.\n * @param The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [Point2d]($core-geometry) to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function unquantizePoint(buffer: QPoint2dBuffer, pointIndex: number, result?: Point2d): Point2d {\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint2d);\n return qpt.unquantize(buffer.params, result);\n }\n}\n\n/** A list of [[QPoint2d]]s all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint2dList {\n /** Parameters used to quantize the points. */\n public readonly params: QParams2d;\n private readonly _list = new Array<QPoint2d>();\n\n /** The list of quantized points. */\n public get list(): ReadonlyArray<QPoint2d> {\n return this._list;\n }\n\n /** Construct an empty list set up to use the supplied quantization parameters. */\n public constructor(params: QParams2d) {\n this.params = params.clone();\n }\n\n /** Removes all points from the list. */\n public clear() {\n this._list.length = 0;\n }\n\n /** Removes all points from the list and change the quantization parameters. */\n public reset(params: QParams2d) {\n this.clear();\n this.params.copyFrom(params);\n }\n\n /** Quantizes the supplied Point2d to this list's range and appends it to the list. */\n public add(pt: Point2d) {\n this._list.push(QPoint2d.create(pt, this.params));\n }\n\n /** Adds a previously-quantized point to this list. */\n public push(qpt: QPoint2d) {\n this._list.push(qpt.clone());\n }\n\n /** The number of points in the list. */\n public get length() {\n return this._list.length;\n }\n\n /** Returns the unquantized value of the point at the specified index in the list. */\n public unquantize(index: number, out?: Point2d): Point2d {\n assert(index < this.length);\n if (index < this.length) {\n return this._list[index].unquantize(this.params, out);\n } else {\n return undefined !== out ? out : new Point2d();\n }\n }\n\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\n * @note The loss of precision is compounded each time the points are requantized to a new range.\n */\n public requantize(params: QParams2d) {\n for (let i = 0; i < this.length; i++) {\n const pt = this.unquantize(i);\n this._list[i].init(pt, params);\n }\n\n this.params.copyFrom(params);\n }\n\n /** Extracts the current contents of the list as a Uint16Array such that the first element of the array corresponds to the first point's `x` component,\n * the second to the first point's `y` component, and so on.\n */\n public toTypedArray(): Uint16Array {\n const array = new Uint16Array(this.length * 2);\n const pts = this._list;\n for (let i = 0; i < this.length; i++) {\n const pt = pts[i];\n array[i * 2] = pt.x;\n array[i * 2 + 1] = pt.y;\n }\n\n return array;\n }\n\n /** Create from a Uint16Array laid out such that `array[0]` corresponds to the first point's `x` component, `array[1]` to the first point's `y` component, and so on. */\n public fromTypedArray(range: Range2d, array: Uint16Array) {\n this.params.setFromRange(range);\n this._list.length = array.length / 2;\n for (let i = 0, j = 0; i < this.list.length; i++)\n this._list[i] = QPoint2d.fromScalars(array[j++], array[j++]);\n }\n\n /** Construct a QPoint2dList containing all points in the supplied list, quantized to the range of those points. */\n public static fromPoints(points: Point2d[], out?: QPoint2dList) {\n let qPoints;\n const qParams = QParams2d.fromRange(Range2d.createArray(points));\n if (out) {\n qPoints = out;\n qPoints.reset(qParams);\n } else {\n qPoints = new QPoint2dList(qParams);\n }\n\n for (const point of points)\n qPoints.add(point);\n\n return qPoints;\n }\n}\n\n/** @alpha */\nexport interface QParams3dProps {\n origin: XYAndZ;\n scale: XYAndZ;\n}\n\n/** Parameters used for [[Quantization]] of 3d points such that the `x`, `y`, and `z` components are each quantized to 16-bit unsigned integers.\n * @see [[QPoint3d]] for the quantized representation of a [Point3d]($core-geometry).\n * @see [[QPoint3dList]] for a list of [[QPoint3d]]s quantized using a [[QParams3d]].\n * @public\n * @extensions\n */\nexport class QParams3d {\n /** The origin of the quantization range. */\n public readonly origin = new Point3d();\n /** The scale applied to coordinates to quantize them. */\n public readonly scale = new Point3d();\n\n private constructor(ox = 0, oy = 0, oz = 0, sx = 0, sy = 0, sz = 0) {\n this.setFrom(ox, oy, oz, sx, sy, sz);\n }\n\n private setFrom(ox: number, oy: number, oz: number, sx: number, sy: number, sz: number) {\n this.origin.x = ox;\n this.origin.y = oy;\n this.origin.z = oz;\n this.scale.x = sx;\n this.scale.y = sy;\n this.scale.z = sz;\n }\n\n /** Set `x`, `y`, and `z` from `src. */\n public copyFrom(src: QParams3d): void {\n this.setFrom(src.origin.x, src.origin.y, src.origin.z, src.scale.x, src.scale.y, src.scale.z);\n }\n\n /** Create a copy of these parameters.\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\n */\n public clone(out?: QParams3d): QParams3d {\n const result = undefined !== out ? out : new QParams3d();\n result.copyFrom(this);\n return result;\n }\n\n /** Initialize from origin and scale */\n public setFromOriginAndScale(origin: Point3d, scale: Point3d) {\n this.setFrom(origin.x, origin.y, origin.z, scale.x, scale.y, scale.z);\n }\n\n /** Initialize these parameters to support quantization of values within the specified range. */\n public setFromRange(range: Range3d, rangeScale = Quantization.rangeScale16) {\n if (!range.isNull) {\n this.setFrom(range.low.x, range.low.y, range.low.z,\n Quantization.computeScale(range.high.x - range.low.x, rangeScale), Quantization.computeScale(range.high.y - range.low.y, rangeScale), Quantization.computeScale(range.high.z - range.low.z, rangeScale));\n } else {\n this.origin.x = this.origin.y = this.origin.z = 0;\n this.scale.x = this.scale.y = this.scale.z = 0;\n }\n }\n\n /** Return the unquantized point for the input components.\n * @param out If supplied, it will be modified in-place and returned instead of allocating a new Point3d.\n */\n public unquantize(x: number, y: number, z: number, out?: Point3d): Point3d {\n const pt: Point3d = undefined !== out ? out : new Point3d();\n pt.x = Quantization.unquantize(x, this.origin.x, this.scale.x);\n pt.y = Quantization.unquantize(y, this.origin.y, this.scale.y);\n pt.z = Quantization.unquantize(z, this.origin.z, this.scale.z);\n return pt;\n }\n\n /** Creates parameters to support quantization of values within the specified range.\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\n */\n public static fromRange(range: Range3d, out?: QParams3d, rangeScale = Quantization.rangeScale16): QParams3d {\n const params = undefined !== out ? out : new QParams3d();\n params.setFromRange(range, rangeScale);\n return params;\n }\n\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0].\n * If `out` is supplied, it will be modified in-place and returned instead of allocating a new QParams3d.\n */\n public static fromOriginAndScale(origin: Point3d, scale: Point3d, out?: QParams3d): QParams3d {\n const params = undefined !== out ? out : new QParams3d();\n params.setFromOriginAndScale(origin, scale);\n return params;\n }\n\n /** Creates parameters supporting quantization of values within the range [-1.0, 1.0]. */\n public static fromNormalizedRange(rangeScale = Quantization.rangeScale16) {\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(-1, -1, -1), Point3d.create(1, 1, 1)]), undefined, rangeScale);\n }\n\n /** Creates parameters supporting quantization of values within the range [0.0, 1.0]. */\n public static fromZeroToOne(rangeScale = Quantization.rangeScale16) {\n return QParams3d.fromRange(Range3d.createArray([Point3d.create(0, 0, 0), Point3d.create(1, 1, 1)]), undefined, rangeScale);\n }\n\n /** The diagonal of the unquantized range represented by these parameters. */\n public get rangeDiagonal(): Vector3d {\n return Vector3d.createFrom({\n x: this.scale.x === 0 ? 0 : Quantization.rangeScale16 / this.scale.x,\n y: this.scale.y === 0 ? 0 : Quantization.rangeScale16 / this.scale.y,\n z: this.scale.z === 0 ? 0 : Quantization.rangeScale16 / this.scale.z,\n });\n }\n\n /** Return true if the point point is quantizable using these parameters. */\n public isQuantizable(point: Point3d) {\n return Quantization.isQuantizable(point.x, this.origin.x, this.scale.x) && Quantization.isQuantizable(point.y, this.origin.y, this.scale.y) && Quantization.isQuantizable(point.z, this.origin.z, this.scale.z);\n }\n\n /** Compute the range to which these parameters quantize. */\n public computeRange(out?: Range3d): Range3d {\n const range = Range3d.createNull(out);\n range.extendPoint(this.origin);\n range.extendPoint(this.origin.plus(this.rangeDiagonal));\n return range;\n }\n\n /** @alpha */\n public toJSON(): QParams3dProps {\n return {\n origin: { x: this.origin.x, y: this.origin.y, z: this.origin.z },\n scale: { x: this.scale.x, y: this.scale.y, z: this.scale.z },\n };\n }\n\n /** @alpha */\n public static fromJSON(src: QParams3dProps, out?: QParams3d): QParams3d {\n return this.fromOriginAndScale(Point3d.fromJSON(src.origin), Point3d.fromJSON(src.scale), out);\n }\n}\n\n/** Represents a [Point3d]($core-geometry) compressed such that each component `x`, `y`, and `z` is quantized to the 16-bit integer range [0, 0xffff].\n * These are primarily used to reduce the space required for coordinates used by [RenderGraphic]($frontend)s.\n * @see [[QParams3d]] to define quantization parameters for a range of points.\n * @see [[QPoint3dList]] for a list of points all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint3d {\n private _x: number = 0;\n private _y: number = 0;\n private _z: number = 0;\n\n /** The quantized x component. */\n public get x() { return this._x; }\n public set x(x: number) {\n assert(Quantization.isQuantized(x));\n this._x = x;\n }\n\n /** The quantized y component. */\n public get y() { return this._y; }\n public set y(y: number) {\n assert(Quantization.isQuantized(y));\n this._y = y;\n }\n\n /** The quantized z component. */\n public get z() { return this._z; }\n public set z(z: number) {\n assert(Quantization.isQuantized(z));\n this._z = z;\n }\n\n /** Construct with all components initialized to zero. */\n public constructor() { }\n\n /** Initialize this point by quantizing the supplied { x, y, z } using the specified params */\n public init(pos: XYAndZ, params: QParams3d): void {\n this.x = Quantization.quantize(pos.x, params.origin.x, params.scale.x);\n this.y = Quantization.quantize(pos.y, params.origin.y, params.scale.y);\n this.z = Quantization.quantize(pos.z, params.origin.z, params.scale.z);\n }\n\n /** Creates a quantized point from the supplied Point3d using the specified params */\n public static create(pos: Point3d, params: QParams3d): QPoint3d {\n const qpt = new QPoint3d();\n qpt.init(pos, params);\n return qpt;\n }\n\n /** Set this points components from `src`. */\n public copyFrom(src: QPoint3d): void {\n this.x = src.x;\n this.y = src.y;\n this.z = src.z;\n }\n\n /** Create a copy of this point.\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\n */\n public clone(out?: QPoint3d): QPoint3d {\n const result = undefined !== out ? out : new QPoint3d();\n result.copyFrom(this);\n return result;\n }\n\n /**\n * Sets the x, y, and z components directly.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n * @param z Must be an integer in the range [0, 0xffff]\n */\n public setFromScalars(x: number, y: number, z: number) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n /**\n * Creates a QPoint3d directly from x, y, and z components.\n * @param x Must be an integer in the range [0, 0xffff]\n * @param y Must be an integer in the range [0, 0xffff]\n * @param z Must be an integer in the range [0, 0xffff]\n * @param out If supplied, it will be modified in-place instead of allocating a new QPoint3d.\n */\n public static fromScalars(x: number, y: number, z: number, out?: QPoint3d): QPoint3d {\n const pt = undefined === out ? new QPoint3d() : out;\n pt.setFromScalars(x, y, z);\n return pt;\n }\n\n /** Returns a Point3d unquantized according to the supplied params.\n * If `out` is supplied, it will be modified in-place instead of allocating a new Point3d.\n */\n public unquantize(params: QParams3d, out?: Point3d): Point3d {\n const pt: Point3d = undefined !== out ? out : new Point3d();\n pt.x = Quantization.unquantize(this.x, params.origin.x, params.scale.x);\n pt.y = Quantization.unquantize(this.y, params.origin.y, params.scale.y);\n pt.z = Quantization.unquantize(this.z, params.origin.z, params.scale.z);\n return pt;\n }\n\n /** Return true if this point's components are identical to the other point's components. */\n public equals(other: QPoint3d): boolean {\n return this.x === other.x && this.y === other.y && this.z === other.z;\n }\n\n /** Perform ordinal comparison to another point. The function returns:\n * - Zero if this point is identical to `rhs`; or\n * - A number less than zero if this point is ordered before `rhs`; or\n * - A number greater than zero if this point is ordered after `rhs`.\n * @see [OrderedComparator]($core-bentley).\n */\n public compare(rhs: QPoint3d): number {\n let diff = this.x - rhs.x;\n if (0 === diff) {\n diff = this.y - rhs.y;\n if (0 === diff) {\n diff = this.z - rhs.z;\n }\n }\n\n return diff;\n }\n}\n\n/** A compact representation of a list of [[QPoint3d]]s stored in a `Uint16Array`.\n * This representation is particularly useful when passing data to WebGL; for example, see [RealityMeshParams.positions]($frontend).\n * @public\n * @extensions\n */\nexport interface QPoint3dBuffer {\n /** The parameters used to quantize the [[points]]. */\n params: QParams3d;\n /** The [[QPoint3d]]s as pairs of unsigned 16-bit integers. The length must be a multiple of 3; the number of points in the array is half the array's length.\n * To obtain the `n`th point, use `QPoint3d.fromScalars(buffer.points[n * 3], buffer.points[n * 3 + 1], buffer.points[n * 3 + 2])`.\n */\n points: Uint16Array;\n}\n\n/** @public\n * @extensions\n */\nexport namespace QPoint3dBuffer {\n const scratchQPoint3d = new QPoint3d();\n\n /** Extracts the point at the specified index from a buffer.\n * @param points The buffer in which each consecutive pair of integers is a 3d quantized point.\n * @param pointIndex The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [[QPoint3d]] to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function getQPoint(points: Uint16Array, pointIndex: number, result?: QPoint3d): QPoint3d {\n const index = pointIndex * 3;\n const x = points[index + 0];\n const y = points[index + 1];\n const z = points[index + 2];\n if (undefined === x || undefined === y || undefined === z)\n throw new Error(\"Index out of range\");\n\n result = result ?? new QPoint3d();\n result.setFromScalars(x, y, z);\n return result;\n }\n\n /** Extracts and unquantizes the point at the specified index from a buffer.\n * @param buffer The array of points and the quantization parameters.\n * @param buffer The index of the point to extract, ranging from zero to one less than the number of points in the buffer.\n * @param result If supplied, a preallocated [Point3d]($core-geometry) to initialize with the result and return.\n * @returns The point at `pointIndex`.\n * @throws Error if `pointIndex` is out of bounds.\n */\n export function unquantizePoint(buffer: QPoint3dBuffer, pointIndex: number, result?: Point3d): Point3d {\n const qpt = getQPoint(buffer.points, pointIndex, scratchQPoint3d);\n return qpt.unquantize(buffer.params, result);\n }\n}\n\n/** A list of [[QPoint3d]]s all quantized to the same range.\n * @public\n * @extensions\n */\nexport class QPoint3dList {\n /** Parameters used to quantize the points. */\n public readonly params: QParams3d;\n private readonly _list: QPoint3d[] = [];\n\n /** The list of quantized points. */\n public get list(): ReadonlyArray<QPoint3d> {\n return this._list;\n }\n\n /** Construct an empty list set up to quantize to the supplied range.\n * @param params The quantization parameters. If omitted, a null range will be used.\n */\n public constructor(params?: QParams3d) {\n this.params = params ? params.clone() : QParams3d.fromRange(Range3d.createNull());\n }\n\n /** Construct a QPoint3dList containing all points in the supplied list, quantized to the range of those points.\n * @param points The points to quantize and add to the list.\n * @param out If supplied, it will be cleared, its parameters recomputed, and the points will be added to it; otherwise, a new QPoint3dList will be created and returned.\n */\n public static fromPoints(points: Point3d[], out?: QPoint3dList): QPoint3dList {\n let qPoints;\n const qParams = QParams3d.fromRange(Range3d.createArray(points));\n if (out) {\n qPoints = out;\n qPoints.reset(qParams);\n } else {\n qPoints = new QPoint3dList(qParams);\n }\n\n for (const point of points)\n qPoints.add(point);\n\n return qPoints;\n }\n\n /** Removes all points from the list. */\n public clear() {\n this._list.length = 0;\n }\n\n /** Clears out the contents of the list and changes the quantization parameters. */\n public reset(params: QParams3d) {\n this.clear();\n this.params.copyFrom(params);\n }\n\n /** Quantizes the supplied Point3d to this list's range and appends it to the list. */\n public add(pt: Point3d) {\n this._list.push(QPoint3d.create(pt, this.params));\n }\n\n /** Adds a previously-quantized point to this list. */\n public push(qpt: QPoint3d) {\n this._list.push(qpt.clone());\n }\n\n /** The number of points in the list. */\n public get length() {\n return this._list.length;\n }\n\n /** Returns the unquantized value of the point at the specified index in the list. */\n public unquantize(index: number, out?: Point3d): Point3d {\n assert(index < this.length);\n if (index < this.length) {\n return this._list[index].unquantize(this.params, out);\n } else {\n return undefined !== out ? out : new Point3d();\n }\n }\n\n /** Changes the quantization parameters and requantizes all points in the list to the new range.\n * @note The loss of precision is compounded each time the points are requantized to a new range.\n */\n public requantize(params: QParams3d): void {\n for (let i = 0; i < this.length; i++) {\n const pt = this.unquantize(i);\n this._list[i].init(pt, params);\n }\n\n this.params.copyFrom(params);\n }\n\n /** Extracts the current contents of the list as a Uint16Array such that the first 3 elements contain the first point's x, y, and z components,\n * the second three elements contain the second point's components, and so on.\n */\n public toTypedArray(): Uint16Array {\n const array = new Uint16Array(this.length * 3);\n const pts = this._list;\n for (let i = 0; i < this.length; i++) {\n const pt = pts[i];\n array[i * 3 + 0] = pt.x;\n array[i * 3 + 1] = pt.y;\n array[i * 3 + 2] = pt.z;\n }\n\n return array;\n }\n\n /** Reinitialize from a Uint16Array in which the first three elements specify the x, y, and z components of the first point, the second three elements specify the components\n * of the second point, and so on.\n */\n public fromTypedArray(range: Range3d, array: Uint16Array): void {\n this.params.setFromRange(range);\n this._list.length = array.length / 3;\n for (let i = 0, j = 0; i < this.list.length; i++)\n this._list[i] = QPoint3d.fromScalars(array[j++], array[j++], array[j++]);\n }\n\n /** Construct a list containing all points in the supplied list, quantized using the supplied parameters. */\n public static createFrom(points: Point3d[], params: QParams3d): QPoint3dList {\n const list = new QPoint3dList(params);\n for (const point of points)\n list.add(point);\n\n return list;\n }\n\n /** An iterator over the points in the list. */\n public [Symbol.iterator]() {\n return this.list[Symbol.iterator]();\n }\n}\n\n/** Options used to construct a [[QPoint2dBufferBuilder]].\n * @public\n * @extensions\n */\ninterface QPoint2dBufferBuilderOptions {\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\n range: Range2d;\n /** The number of points for which to allocate space.\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\n */\n initialCapacity?: number;\n /** Multiplier used to compute new capacity when resizing the buffer.\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\n */\n growthFactor?: number;\n}\n\n/** Constructs a [[QPoint2dBuffer]] using a [Uint16ArrayBuilder]($bentley).\n * @public\n * @extensions\n */\nexport class QPoint2dBufferBuilder {\n private readonly _scratchQPoint2d = new QPoint2d();\n\n /** The parameters used to quantize the points in the [[buffer]]. */\n public readonly params: QParams2d;\n /** The buffer that holds the points. */\n public readonly buffer: Uint16ArrayBuilder;\n\n /** Construct a new buffer with a [[length]] of zero. */\n public constructor(options: QPoint2dBufferBuilderOptions) {\n this.params = QParams2d.fromRange(options.range);\n const initialCapacity = options.initialCapacity ?? 0;\n this.buffer = new Uint16ArrayBuilder({\n growthFactor: options.growthFactor,\n initialCapacity: 2 * initialCapacity,\n });\n }\n\n /** Append a point with the specified quantized coordinates. */\n public pushXY(x: number, y: number): void {\n this.buffer.push(x);\n this.buffer.push(y);\n }\n\n /** Append a point with the specified quantized coordinates. */\n public push(pt: XAndY): void {\n this.pushXY(pt.x, pt.y);\n }\n\n /** The number of points currently in the [[buffer]]. */\n public get length(): number {\n const len = this.buffer.length;\n assert(len % 2 === 0);\n return len / 2;\n }\n\n /** Returns the quantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [[QPoint2d]] to initialize with the result and return.\n * @returns The quantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public get(pointIndex: number, result?: QPoint2d): QPoint2d {\n return QPoint2dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\n }\n\n /** Returns the unquantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [Point2d]($core-geometry) to initialize with the result and return.\n * @returns The unquantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public unquantize(pointIndex: number, result?: Point2d): Point2d {\n return this.get(pointIndex, this._scratchQPoint2d).unquantize(this.params, result);\n }\n\n /** Obtain a [[QPoint2dBuffer]] containing all of the points that have been appended by this builder. */\n public finish(): QPoint2dBuffer {\n return {\n params: this.params,\n points: this.buffer.toTypedArray(),\n };\n }\n}\n\n/** Options used to construct a [[QPoint3dBufferBuilder]].\n * @public\n * @extensions\n */\ninterface QPoint3dBufferBuilderOptions {\n /** The range to which the points will be quantized. This must be large enough to contain all of the points that will be added to the buffer. */\n range: Range3d;\n /** The number of points for which to allocate space.\n * @see [TypedArrayBuilderOptions.initialCapacity]($bentley).\n */\n initialCapacity?: number;\n /** Multiplier used to compute new capacity when resizing the buffer.\n * @see [TypedArrayBuilderOptions.growthFactor]($bentley).\n */\n growthFactor?: number;\n}\n\n/** Constructs a [[QPoint3dBuffer]] using a [Uint16ArrayBuilder]($bentley).\n * @public\n * @extensions\n */\nexport class QPoint3dBufferBuilder {\n private readonly _scratchQPoint3d = new QPoint3d();\n\n /** The parameters used to quantize the points in the [[buffer]]. */\n public readonly params: QParams3d;\n /** The buffer that holds the points. */\n public readonly buffer: Uint16ArrayBuilder;\n\n /** Construct a new buffer with a [[length]] of zero. */\n public constructor(options: QPoint3dBufferBuilderOptions) {\n this.params = QParams3d.fromRange(options.range);\n const initialCapacity = options.initialCapacity ?? 0;\n this.buffer = new Uint16ArrayBuilder({\n growthFactor: options.growthFactor,\n initialCapacity: 3 * initialCapacity,\n });\n }\n\n /** Append a point with the specified quantized coordinates. */\n public pushXYZ(x: number, y: number, z: number): void {\n this.buffer.push(x);\n this.buffer.push(y);\n this.buffer.push(z);\n }\n\n /** Append a point with the specified quantized coordinates. */\n public push(pt: XYAndZ): void {\n this.pushXYZ(pt.x, pt.y, pt.z);\n }\n\n /** The number of points currently in the [[buffer]]. */\n public get length(): number {\n const len = this.buffer.length;\n assert(len % 3 === 0);\n return len / 3;\n }\n\n /** Returns the quantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [[QPoint3d]] to initialize with the result and return.\n * @returns The quantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public get(pointIndex: number, result?: QPoint3d): QPoint3d {\n return QPoint3dBuffer.getQPoint(this.buffer.toTypedArray(), pointIndex, result);\n }\n\n /** Returns the unquantized point at the specified index in [[buffer]].\n * @param pointIndex The index of the point of interest, ranging from zero to one minus the number of points currently in the [[buffer]].\n * @param result If supplied, a [Point3d]($core-geometry) to initialize with the result and return.\n * @returns The unquantized point at the specified index in [[buffer]].\n * @throws Error if `pointIndex` is out of bounds.\n */\n public unquantize(pointIndex: number, result?: Point3d): Point3d {\n return this.get(pointIndex, this._scratchQPoint3d).unquantize(this.params, result);\n }\n\n /** Obtain a [[QPoint3dBuffer]] containing all of the points that have been appended by this builder. */\n public finish(): QPoint3dBuffer {\n return {\n params: this.params,\n points: this.buffer.toTypedArray(),\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RealityDataAccessProps.js","sourceRoot":"","sources":["../../src/RealityDataAccessProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAO/F;;;GAGG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,kEAAyC,CAAA;IACzC,oCAAW,CAAA;IACX,0DAAiC,CAAA;IACjC,oCAAW,CAAA;IACX,wDAA+B,CAAA,CAAC,kBAAkB;AACpD,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC","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\r\n/** @packageDocumentation\r\n * @module RealityData\r\n */\r\nimport { AccessToken } from \"@itwin/core-bentley\";\r\n\r\n/**\r\n * All of the currently supported Reality Data types\r\n * @beta\r\n */\r\nexport enum DefaultSupportedTypes {\r\n RealityMesh3dTiles = \"RealityMesh3DTiles\", // Web Ready 3D Scalable Mesh\r\n OPC = \"OPC\", // Web Ready Orbit Point Cloud\r\n Terrain3dTiles = \"Terrain3DTiles\", // Web Ready Terrain Scalable Mesh\r\n OMR = \"OMR\", // Orbit Mapping Resource\r\n Cesium3dTiles = \"Cesium3DTiles\" // Cesium 3D Tiles\r\n}\r\n\r\n/** RealityData\r\n * This class implements a Reality Data stored in the Reality Data API\r\n * Data is accessed directly through methods of the reality data instance.\r\n * Access to the data required a properly entitled token though the access to the blob is controlled through\r\n * an Azure blob URL, the token may be required to obtain this Azure blob URL or refresh it.\r\n * The Azure blob URL is considered valid for an hour and is refreshed after 50 minutes.\r\n * In addition to the reality data properties, and Azure blob URL and internal states, a reality data also contains\r\n * the identification of the iTwin to identify the context(used for access permissions resolution)\r\n * @beta\r\n */\r\nexport interface RealityData {\r\n id?: string;\r\n rootDocument?: string;\r\n type?: string;\r\n\r\n getBlobUrl(accessToken: AccessToken, blobPath: string): Promise<URL>;\r\n}\r\n\r\n/**\r\n * Client wrapper to Reality Data Service.\r\n * An instance of this class is used to extract reality data from the Reality Data API\r\n * This class implements obtaining a specific reality data and extraction of the Azure blob address.\r\n * @beta\r\n */\r\nexport interface RealityDataAccess {\r\n getRealityData: (accessToken: AccessToken, iTwinId: string | undefined, realityDataId: string) => Promise<RealityData>;\r\n getRealityDataUrl: (iTwinId: string | undefined, realityDataId: string) => Promise<string>;\r\n}\r\n"]}
1
+ {"version":3,"file":"RealityDataAccessProps.js","sourceRoot":"","sources":["../../src/RealityDataAccessProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAO/F;;;GAGG;AACH,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,kEAAyC,CAAA;IACzC,oCAAW,CAAA;IACX,0DAAiC,CAAA;IACjC,oCAAW,CAAA;IACX,wDAA+B,CAAA,CAAC,kBAAkB;AACpD,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module RealityData\n */\nimport { AccessToken } from \"@itwin/core-bentley\";\n\n/**\n * All of the currently supported Reality Data types\n * @beta\n */\nexport enum DefaultSupportedTypes {\n RealityMesh3dTiles = \"RealityMesh3DTiles\", // Web Ready 3D Scalable Mesh\n OPC = \"OPC\", // Web Ready Orbit Point Cloud\n Terrain3dTiles = \"Terrain3DTiles\", // Web Ready Terrain Scalable Mesh\n OMR = \"OMR\", // Orbit Mapping Resource\n Cesium3dTiles = \"Cesium3DTiles\" // Cesium 3D Tiles\n}\n\n/** RealityData\n * This class implements a Reality Data stored in the Reality Data API\n * Data is accessed directly through methods of the reality data instance.\n * Access to the data required a properly entitled token though the access to the blob is controlled through\n * an Azure blob URL, the token may be required to obtain this Azure blob URL or refresh it.\n * The Azure blob URL is considered valid for an hour and is refreshed after 50 minutes.\n * In addition to the reality data properties, and Azure blob URL and internal states, a reality data also contains\n * the identification of the iTwin to identify the context(used for access permissions resolution)\n * @beta\n */\nexport interface RealityData {\n id?: string;\n rootDocument?: string;\n type?: string;\n\n getBlobUrl(accessToken: AccessToken, blobPath: string): Promise<URL>;\n}\n\n/**\n * Client wrapper to Reality Data Service.\n * An instance of this class is used to extract reality data from the Reality Data API\n * This class implements obtaining a specific reality data and extraction of the Azure blob address.\n * @beta\n */\nexport interface RealityDataAccess {\n getRealityData: (accessToken: AccessToken, iTwinId: string | undefined, realityDataId: string) => Promise<RealityData>;\n getRealityDataUrl: (iTwinId: string | undefined, realityDataId: string) => Promise<string>;\n}\n"]}