@itwin/core-common 5.0.0-dev.99 → 5.1.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js.map +1 -1
  4. package/lib/cjs/Atmosphere.js.map +1 -1
  5. package/lib/cjs/AuthorizationClient.js.map +1 -1
  6. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/Base64EncodedString.js.map +1 -1
  9. package/lib/cjs/BlobReader.js.map +1 -1
  10. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  11. package/lib/cjs/Camera.js.map +1 -1
  12. package/lib/cjs/CatalogIModel.d.ts +152 -0
  13. package/lib/cjs/CatalogIModel.d.ts.map +1 -0
  14. package/lib/cjs/CatalogIModel.js +30 -0
  15. package/lib/cjs/CatalogIModel.js.map +1 -0
  16. package/lib/cjs/CesiumIonAssets.d.ts +23 -0
  17. package/lib/cjs/CesiumIonAssets.d.ts.map +1 -0
  18. package/lib/cjs/CesiumIonAssets.js +32 -0
  19. package/lib/cjs/CesiumIonAssets.js.map +1 -0
  20. package/lib/cjs/ChangedElements.js.map +1 -1
  21. package/lib/cjs/ChangedEntities.js.map +1 -1
  22. package/lib/cjs/ChangesetProps.js.map +1 -1
  23. package/lib/cjs/ClipStyle.js.map +1 -1
  24. package/lib/cjs/Code.js.map +1 -1
  25. package/lib/cjs/ColorByName.js.map +1 -1
  26. package/lib/cjs/ColorDef.js.map +1 -1
  27. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  28. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  29. package/lib/cjs/ContextRealityModel.js.map +1 -1
  30. package/lib/cjs/ContourDisplay.js.map +1 -1
  31. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  32. package/lib/cjs/ECSchemaProps.js.map +1 -1
  33. package/lib/cjs/ECSqlReader.js.map +1 -1
  34. package/lib/cjs/ECSqlTypes.js.map +1 -1
  35. package/lib/cjs/ElementMesh.js.map +1 -1
  36. package/lib/cjs/ElementProps.js.map +1 -1
  37. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  38. package/lib/cjs/EntityProps.js.map +1 -1
  39. package/lib/cjs/EntityReference.js.map +1 -1
  40. package/lib/cjs/Environment.js.map +1 -1
  41. package/lib/cjs/FeatureIndex.js.map +1 -1
  42. package/lib/cjs/FeatureSymbology.js.map +1 -1
  43. package/lib/cjs/FeatureTable.js.map +1 -1
  44. package/lib/cjs/Fonts.js.map +1 -1
  45. package/lib/cjs/Frustum.js.map +1 -1
  46. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  47. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  48. package/lib/cjs/GeometryContainment.js.map +1 -1
  49. package/lib/cjs/GeometryParams.js.map +1 -1
  50. package/lib/cjs/GeometrySummary.js.map +1 -1
  51. package/lib/cjs/Gradient.js.map +1 -1
  52. package/lib/cjs/GraphicParams.js.map +1 -1
  53. package/lib/cjs/GroundPlane.js.map +1 -1
  54. package/lib/cjs/HSLColor.js.map +1 -1
  55. package/lib/cjs/HSVColor.js.map +1 -1
  56. package/lib/cjs/HiddenLine.js.map +1 -1
  57. package/lib/cjs/Hilite.js.map +1 -1
  58. package/lib/cjs/IModel.js.map +1 -1
  59. package/lib/cjs/IModelError.js.map +1 -1
  60. package/lib/cjs/IModelVersion.js.map +1 -1
  61. package/lib/cjs/ITwinCoreErrors.d.ts +87 -8
  62. package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -1
  63. package/lib/cjs/ITwinCoreErrors.js +74 -12
  64. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  65. package/lib/cjs/Image.js.map +1 -1
  66. package/lib/cjs/IpcAppProps.js.map +1 -1
  67. package/lib/cjs/LightSettings.js.map +1 -1
  68. package/lib/cjs/LinePixels.js.map +1 -1
  69. package/lib/cjs/Localization.js.map +1 -1
  70. package/lib/cjs/MapImagerySettings.js.map +1 -1
  71. package/lib/cjs/MapLayerSettings.d.ts +4 -2
  72. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  73. package/lib/cjs/MapLayerSettings.js +4 -2
  74. package/lib/cjs/MapLayerSettings.js.map +1 -1
  75. package/lib/cjs/MassProperties.js.map +1 -1
  76. package/lib/cjs/MaterialProps.js.map +1 -1
  77. package/lib/cjs/ModelClipGroup.js.map +1 -1
  78. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  79. package/lib/cjs/ModelProps.js.map +1 -1
  80. package/lib/cjs/NativeAppProps.js.map +1 -1
  81. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  82. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  83. package/lib/cjs/PlanarClipMask.js.map +1 -1
  84. package/lib/cjs/QPoint.js.map +1 -1
  85. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  86. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  87. package/lib/cjs/RenderMaterial.js.map +1 -1
  88. package/lib/cjs/RenderPolyline.js.map +1 -1
  89. package/lib/cjs/RenderTexture.js.map +1 -1
  90. package/lib/cjs/RgbColor.js.map +1 -1
  91. package/lib/cjs/RpcInterface.js.map +1 -1
  92. package/lib/cjs/RpcManager.js.map +1 -1
  93. package/lib/cjs/SessionProps.js.map +1 -1
  94. package/lib/cjs/SkyBox.js.map +1 -1
  95. package/lib/cjs/SolarCalculate.js.map +1 -1
  96. package/lib/cjs/SolarShadows.js.map +1 -1
  97. package/lib/cjs/SpatialClassification.js.map +1 -1
  98. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  99. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  100. package/lib/cjs/TerrainSettings.d.ts +0 -12
  101. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  102. package/lib/cjs/TerrainSettings.js +3 -15
  103. package/lib/cjs/TerrainSettings.js.map +1 -1
  104. package/lib/cjs/TextureMapping.js.map +1 -1
  105. package/lib/cjs/TextureProps.js.map +1 -1
  106. package/lib/cjs/ThematicDisplay.js.map +1 -1
  107. package/lib/cjs/Thumbnail.js.map +1 -1
  108. package/lib/cjs/TileProps.js.map +1 -1
  109. package/lib/cjs/Tween.js.map +1 -1
  110. package/lib/cjs/TxnAction.js.map +1 -1
  111. package/lib/cjs/ViewDetails.js.map +1 -1
  112. package/lib/cjs/ViewFlags.js.map +1 -1
  113. package/lib/cjs/ViewProps.js.map +1 -1
  114. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  115. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  116. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  117. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  118. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  119. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  120. package/lib/cjs/core-common.d.ts +2 -0
  121. package/lib/cjs/core-common.d.ts.map +1 -1
  122. package/lib/cjs/core-common.js +2 -0
  123. package/lib/cjs/core-common.js.map +1 -1
  124. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  125. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  126. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  127. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  128. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  129. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  130. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  131. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  132. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  133. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  134. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  135. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  136. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  137. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  138. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  139. package/lib/cjs/geometry/Placement.js.map +1 -1
  140. package/lib/cjs/geometry/Projection.js.map +1 -1
  141. package/lib/cjs/geometry/TextString.js.map +1 -1
  142. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  143. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  144. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  145. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  146. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  147. package/lib/cjs/internal/Snapping.js.map +1 -1
  148. package/lib/cjs/internal/cross-package.js.map +1 -1
  149. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  150. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  151. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  152. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  153. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  154. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  155. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  156. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  157. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  158. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  159. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  160. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  161. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  162. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  163. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  164. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  165. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  166. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  167. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  168. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  169. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  170. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  171. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  172. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  173. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  174. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  175. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  176. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  177. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  178. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  179. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  180. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  181. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  182. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  183. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  184. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  185. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  186. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  187. package/lib/cjs/tile/TileIO.js.map +1 -1
  188. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  189. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  190. package/lib/esm/AmbientOcclusion.js.map +1 -1
  191. package/lib/esm/AnalysisStyle.js.map +1 -1
  192. package/lib/esm/Atmosphere.js.map +1 -1
  193. package/lib/esm/AuthorizationClient.js.map +1 -1
  194. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  195. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  196. package/lib/esm/Base64EncodedString.js.map +1 -1
  197. package/lib/esm/BlobReader.js.map +1 -1
  198. package/lib/esm/BriefcaseTypes.js.map +1 -1
  199. package/lib/esm/Camera.js.map +1 -1
  200. package/lib/esm/CatalogIModel.d.ts +152 -0
  201. package/lib/esm/CatalogIModel.d.ts.map +1 -0
  202. package/lib/esm/CatalogIModel.js +27 -0
  203. package/lib/esm/CatalogIModel.js.map +1 -0
  204. package/lib/esm/CesiumIonAssets.d.ts +23 -0
  205. package/lib/esm/CesiumIonAssets.d.ts.map +1 -0
  206. package/lib/esm/CesiumIonAssets.js +29 -0
  207. package/lib/esm/CesiumIonAssets.js.map +1 -0
  208. package/lib/esm/ChangedElements.js.map +1 -1
  209. package/lib/esm/ChangedEntities.js.map +1 -1
  210. package/lib/esm/ChangesetProps.js.map +1 -1
  211. package/lib/esm/ClipStyle.js.map +1 -1
  212. package/lib/esm/Code.js.map +1 -1
  213. package/lib/esm/ColorByName.js.map +1 -1
  214. package/lib/esm/ColorDef.js.map +1 -1
  215. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  216. package/lib/esm/ConcurrentQuery.js.map +1 -1
  217. package/lib/esm/ContextRealityModel.js.map +1 -1
  218. package/lib/esm/ContourDisplay.js.map +1 -1
  219. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  220. package/lib/esm/ECSchemaProps.js.map +1 -1
  221. package/lib/esm/ECSqlReader.js.map +1 -1
  222. package/lib/esm/ECSqlTypes.js.map +1 -1
  223. package/lib/esm/ElementMesh.js.map +1 -1
  224. package/lib/esm/ElementProps.js.map +1 -1
  225. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  226. package/lib/esm/EntityProps.js.map +1 -1
  227. package/lib/esm/EntityReference.js.map +1 -1
  228. package/lib/esm/Environment.js.map +1 -1
  229. package/lib/esm/FeatureIndex.js.map +1 -1
  230. package/lib/esm/FeatureSymbology.js.map +1 -1
  231. package/lib/esm/FeatureTable.js.map +1 -1
  232. package/lib/esm/Fonts.js.map +1 -1
  233. package/lib/esm/Frustum.js.map +1 -1
  234. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  235. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  236. package/lib/esm/GeometryContainment.js.map +1 -1
  237. package/lib/esm/GeometryParams.js.map +1 -1
  238. package/lib/esm/GeometrySummary.js.map +1 -1
  239. package/lib/esm/Gradient.js.map +1 -1
  240. package/lib/esm/GraphicParams.js.map +1 -1
  241. package/lib/esm/GroundPlane.js.map +1 -1
  242. package/lib/esm/HSLColor.js.map +1 -1
  243. package/lib/esm/HSVColor.js.map +1 -1
  244. package/lib/esm/HiddenLine.js.map +1 -1
  245. package/lib/esm/Hilite.js.map +1 -1
  246. package/lib/esm/IModel.js.map +1 -1
  247. package/lib/esm/IModelError.js.map +1 -1
  248. package/lib/esm/IModelVersion.js.map +1 -1
  249. package/lib/esm/ITwinCoreErrors.d.ts +87 -8
  250. package/lib/esm/ITwinCoreErrors.d.ts.map +1 -1
  251. package/lib/esm/ITwinCoreErrors.js +73 -11
  252. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  253. package/lib/esm/Image.js.map +1 -1
  254. package/lib/esm/IpcAppProps.js.map +1 -1
  255. package/lib/esm/LightSettings.js.map +1 -1
  256. package/lib/esm/LinePixels.js.map +1 -1
  257. package/lib/esm/Localization.js.map +1 -1
  258. package/lib/esm/MapImagerySettings.js.map +1 -1
  259. package/lib/esm/MapLayerSettings.d.ts +4 -2
  260. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  261. package/lib/esm/MapLayerSettings.js +4 -2
  262. package/lib/esm/MapLayerSettings.js.map +1 -1
  263. package/lib/esm/MassProperties.js.map +1 -1
  264. package/lib/esm/MaterialProps.js.map +1 -1
  265. package/lib/esm/ModelClipGroup.js.map +1 -1
  266. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  267. package/lib/esm/ModelProps.js.map +1 -1
  268. package/lib/esm/NativeAppProps.js.map +1 -1
  269. package/lib/esm/OctEncodedNormal.js.map +1 -1
  270. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  271. package/lib/esm/PlanarClipMask.js.map +1 -1
  272. package/lib/esm/QPoint.js.map +1 -1
  273. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  274. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  275. package/lib/esm/RenderMaterial.js.map +1 -1
  276. package/lib/esm/RenderPolyline.js.map +1 -1
  277. package/lib/esm/RenderTexture.js.map +1 -1
  278. package/lib/esm/RgbColor.js.map +1 -1
  279. package/lib/esm/RpcInterface.js.map +1 -1
  280. package/lib/esm/RpcManager.js.map +1 -1
  281. package/lib/esm/SessionProps.js.map +1 -1
  282. package/lib/esm/SkyBox.js.map +1 -1
  283. package/lib/esm/SolarCalculate.js.map +1 -1
  284. package/lib/esm/SolarShadows.js.map +1 -1
  285. package/lib/esm/SpatialClassification.js.map +1 -1
  286. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  287. package/lib/esm/SubCategoryOverride.js.map +1 -1
  288. package/lib/esm/TerrainSettings.d.ts +0 -12
  289. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  290. package/lib/esm/TerrainSettings.js +1 -13
  291. package/lib/esm/TerrainSettings.js.map +1 -1
  292. package/lib/esm/TextureMapping.js.map +1 -1
  293. package/lib/esm/TextureProps.js.map +1 -1
  294. package/lib/esm/ThematicDisplay.js.map +1 -1
  295. package/lib/esm/Thumbnail.js.map +1 -1
  296. package/lib/esm/TileProps.js.map +1 -1
  297. package/lib/esm/Tween.js.map +1 -1
  298. package/lib/esm/TxnAction.js.map +1 -1
  299. package/lib/esm/ViewDetails.js.map +1 -1
  300. package/lib/esm/ViewFlags.js.map +1 -1
  301. package/lib/esm/ViewProps.js.map +1 -1
  302. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  303. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  304. package/lib/esm/annotation/TextBlock.js.map +1 -1
  305. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  306. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  307. package/lib/esm/annotation/TextStyle.js.map +1 -1
  308. package/lib/esm/core-common.d.ts +2 -0
  309. package/lib/esm/core-common.d.ts.map +1 -1
  310. package/lib/esm/core-common.js +2 -0
  311. package/lib/esm/core-common.js.map +1 -1
  312. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  313. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  314. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  315. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  316. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  317. package/lib/esm/geometry/Cartographic.js.map +1 -1
  318. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  319. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  320. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  321. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  322. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  323. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  324. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  325. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  326. package/lib/esm/geometry/LineStyle.js.map +1 -1
  327. package/lib/esm/geometry/Placement.js.map +1 -1
  328. package/lib/esm/geometry/Projection.js.map +1 -1
  329. package/lib/esm/geometry/TextString.js.map +1 -1
  330. package/lib/esm/internal/BackendTypes.js.map +1 -1
  331. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  332. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  333. package/lib/esm/internal/RenderMesh.js.map +1 -1
  334. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  335. package/lib/esm/internal/Snapping.js.map +1 -1
  336. package/lib/esm/internal/cross-package.js.map +1 -1
  337. package/lib/esm/ipc/IpcSession.js.map +1 -1
  338. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  339. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  340. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  341. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  342. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  343. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  344. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  345. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  346. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  347. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  348. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  349. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  350. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  351. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  352. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  353. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  354. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  355. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  356. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  357. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  358. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  359. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  360. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  361. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  362. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  363. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  364. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  365. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  366. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  367. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  368. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  369. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  370. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  371. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  372. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  373. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  374. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  375. package/lib/esm/tile/TileIO.js.map +1 -1
  376. package/lib/esm/tile/TileMetadata.js.map +1 -1
  377. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  378. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"OctEncodedNormal.js","sourceRoot":"","sources":["../../src/OctEncodedNormal.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAwD;AAExD,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzC,SAAS,KAAK,CAAC,GAAW,EAAE,MAAc,EAAE,MAAc;IACxD,OAAO,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,WAAW,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IACvB,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;AAChC,CAAC;AAED;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AC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AApED,4CAoEC;AAED,gBAAgB;AAChB,MAAa,oBAAoB;IACZ;IAAgC;IAAnD,YAAmB,KAAuB,EAAS,MAAwB;QAAxD,UAAK,GAAL,KAAK,CAAkB;QAAS,WAAM,GAAN,MAAM,CAAkB;IAAI,CAAC;CACjF;AAFD,oDAEC","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 Rendering\n */\n\nimport { Vector3d, XYAndZ } from \"@itwin/core-geometry\";\n\nconst scratchUInt16 = new Uint16Array(1);\n\nfunction clamp(val: number, minVal: number, maxVal: number): number {\n return val < minVal ? minVal : (val > maxVal ? maxVal : val);\n}\n\nfunction clampUint8(val: number): number {\n return roundUint16(0.5 + (clamp(val, -1, 1) * 0.5 + 0.5) * 255);\n}\n\nfunction roundUint16(val: number): number {\n scratchUInt16[0] = val;\n return scratchUInt16[0];\n}\n\nfunction signNotZero(val: number): number {\n return val < 0.0 ? -1.0 : 1.0;\n}\n\n/** Represents a 3d normal vector compressed into a single 16-bit integer using [oct-encoding](http://jcgt.org/published/0003/02/01/paper.pdf).\n * These are chiefly used to reduce the space required to store normal vectors for [RenderGraphic]($frontend)s.\n * @public\n */\nexport class OctEncodedNormal {\n /** The encoded normal. */\n public readonly value: number;\n\n /** Construct directly from a 16-bit encoded value.\n * @see [[encode]] to compute the encoded value.\n * @see [[fromVector]] to construct from a vector.\n */\n public constructor(val: number) {\n this.value = roundUint16(val);\n }\n\n /** Compute the encoded 16-bit value of the supplied normalized vector. */\n public static encode(vec: XYAndZ): number {\n return this.encodeXYZ(vec.x, vec.y, vec.z);\n }\n\n /** Compute the encoded 16-bit value of the supplied normalized vector components. */\n public static encodeXYZ(nx: number, ny: number, nz: number): number {\n const denom = Math.abs(nx) + Math.abs(ny) + Math.abs(nz);\n let rx = nx / denom;\n let ry = ny / denom;\n if (nz < 0) {\n const x = rx;\n const y = ry;\n rx = (1 - Math.abs(y)) * signNotZero(x);\n ry = (1 - Math.abs(x)) * signNotZero(y);\n }\n return clampUint8(ry) << 8 | clampUint8(rx);\n }\n\n /** Create an OctEncodedNormal from a normalized vector. */\n public static fromVector(val: XYAndZ): OctEncodedNormal {\n return new OctEncodedNormal(this.encode(val));\n }\n\n /** Decode this oct-encoded normal into a normalized vector. */\n public decode(): Vector3d {\n return OctEncodedNormal.decodeValue(this.value);\n }\n\n /** Decode a 16-bit encoded value into a normalized vector. */\n public static decodeValue(val: number, result?: Vector3d): Vector3d {\n let ex = val & 0xff;\n let ey = val >> 8;\n ex = ex / 255.0 * 2.0 - 1.0;\n ey = ey / 255.0 * 2.0 - 1.0;\n const ez = 1 - (Math.abs(ex) + Math.abs(ey));\n let n;\n if (result === undefined) {\n n = new Vector3d(ex, ey, ez);\n } else {\n n = result;\n n.x = ex;\n n.y = ey;\n n.z = ez;\n }\n\n if (n.z < 0) {\n const x = n.x;\n const y = n.y;\n n.x = (1 - Math.abs(y)) * signNotZero(x);\n n.y = (1 - Math.abs(x)) * signNotZero(y);\n }\n\n n.normalizeInPlace();\n return n;\n }\n}\n\n/** @internal */\nexport class OctEncodedNormalPair {\n constructor(public first: OctEncodedNormal, public second: OctEncodedNormal) { }\n}\n"]}
1
+ {"version":3,"file":"OctEncodedNormal.js","sourceRoot":"","sources":["../../src/OctEncodedNormal.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAwD;AAExD,MAAM,aAAa,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;AAEzC,SAAS,KAAK,CAAC,GAAW,EAAE,MAAc,EAAE,MAAc;IACxD,OAAO,GAAG,GAAG,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ACzB,CAAC,GAAG,IAAI,wBAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC/B,CAAC;aAAM,CAAC;YACN,CAAC,GAAG,MAAM,CAAC;YACX,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACT,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACT,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QACX,CAAC;QAED,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YACZ,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACd,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACd,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AApED,4CAoEC;AAED,gBAAgB;AAChB,MAAa,oBAAoB;IACZ;IAAgC;IAAnD,YAAmB,KAAuB,EAAS,MAAwB;QAAxD,UAAK,GAAL,KAAK,CAAkB;QAAS,WAAM,GAAN,MAAM,CAAkB;IAAI,CAAC;CACjF;AAFD,oDAEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Vector3d, XYAndZ } from \"@itwin/core-geometry\";\r\n\r\nconst scratchUInt16 = new Uint16Array(1);\r\n\r\nfunction clamp(val: number, minVal: number, maxVal: number): number {\r\n return val < minVal ? minVal : (val > maxVal ? maxVal : val);\r\n}\r\n\r\nfunction clampUint8(val: number): number {\r\n return roundUint16(0.5 + (clamp(val, -1, 1) * 0.5 + 0.5) * 255);\r\n}\r\n\r\nfunction roundUint16(val: number): number {\r\n scratchUInt16[0] = val;\r\n return scratchUInt16[0];\r\n}\r\n\r\nfunction signNotZero(val: number): number {\r\n return val < 0.0 ? -1.0 : 1.0;\r\n}\r\n\r\n/** Represents a 3d normal vector compressed into a single 16-bit integer using [oct-encoding](http://jcgt.org/published/0003/02/01/paper.pdf).\r\n * These are chiefly used to reduce the space required to store normal vectors for [RenderGraphic]($frontend)s.\r\n * @public\r\n */\r\nexport class OctEncodedNormal {\r\n /** The encoded normal. */\r\n public readonly value: number;\r\n\r\n /** Construct directly from a 16-bit encoded value.\r\n * @see [[encode]] to compute the encoded value.\r\n * @see [[fromVector]] to construct from a vector.\r\n */\r\n public constructor(val: number) {\r\n this.value = roundUint16(val);\r\n }\r\n\r\n /** Compute the encoded 16-bit value of the supplied normalized vector. */\r\n public static encode(vec: XYAndZ): number {\r\n return this.encodeXYZ(vec.x, vec.y, vec.z);\r\n }\r\n\r\n /** Compute the encoded 16-bit value of the supplied normalized vector components. */\r\n public static encodeXYZ(nx: number, ny: number, nz: number): number {\r\n const denom = Math.abs(nx) + Math.abs(ny) + Math.abs(nz);\r\n let rx = nx / denom;\r\n let ry = ny / denom;\r\n if (nz < 0) {\r\n const x = rx;\r\n const y = ry;\r\n rx = (1 - Math.abs(y)) * signNotZero(x);\r\n ry = (1 - Math.abs(x)) * signNotZero(y);\r\n }\r\n return clampUint8(ry) << 8 | clampUint8(rx);\r\n }\r\n\r\n /** Create an OctEncodedNormal from a normalized vector. */\r\n public static fromVector(val: XYAndZ): OctEncodedNormal {\r\n return new OctEncodedNormal(this.encode(val));\r\n }\r\n\r\n /** Decode this oct-encoded normal into a normalized vector. */\r\n public decode(): Vector3d {\r\n return OctEncodedNormal.decodeValue(this.value);\r\n }\r\n\r\n /** Decode a 16-bit encoded value into a normalized vector. */\r\n public static decodeValue(val: number, result?: Vector3d): Vector3d {\r\n let ex = val & 0xff;\r\n let ey = val >> 8;\r\n ex = ex / 255.0 * 2.0 - 1.0;\r\n ey = ey / 255.0 * 2.0 - 1.0;\r\n const ez = 1 - (Math.abs(ex) + Math.abs(ey));\r\n let n;\r\n if (result === undefined) {\r\n n = new Vector3d(ex, ey, ez);\r\n } else {\r\n n = result;\r\n n.x = ex;\r\n n.y = ey;\r\n n.z = ez;\r\n }\r\n\r\n if (n.z < 0) {\r\n const x = n.x;\r\n const y = n.y;\r\n n.x = (1 - Math.abs(y)) * signNotZero(x);\r\n n.y = (1 - Math.abs(x)) * signNotZero(y);\r\n }\r\n\r\n n.normalizeInPlace();\r\n return n;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class OctEncodedNormalPair {\r\n constructor(public first: OctEncodedNormal, public second: OctEncodedNormal) { }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PlanProjectionSettings.js","sourceRoot":"","sources":["../../src/PlanProjectionSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;;;;GAMG;AACH,MAAa,sBAAsB;IACjC,oDAAoD;IACpC,SAAS,CAAU;IACnC,uDAAuD;IACvC,YAAY,CAAU;IACtC,kDAAkD;IAClC,OAAO,CAAU;IACjC,iEAAiE;IACjD,sBAAsB,CAAW;IAE1C,MAAM;QACX,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YACjD,sBAAsB,EAAE,IAAI,KAAK,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SAChF,CAAC;IACJ,CAAC;IAEM,MAAM,CAA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,SAAS,KAAK,YAAY,CAAC,sBAAsB;YACnD,KAAK,CAAC,sBAAsB,GAAG,YAAY,CAAC,sBAAsB,CAAC;QAErE,OAAO,IAAI,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,8EAA8E;IACvE,MAAM,CAAC,KAA6B;QACzC,IAAI,IAAI,KAAK,KAAK;YAChB,OAAO,IAAI,CAAC;QAEd,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,sBAAsB,KAAK,KAAK,CAAC,sBAAsB,CAAC;IAC1L,CAAC;CACF;AAxED,wDAwEC","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 DisplayStyles\n */\n\n/** Wire format describing [[PlanProjectionSettings]].\n * @public\n * @extensions\n */\nexport interface PlanProjectionSettingsProps {\n /** If defined, the absolute height in meters at which to display the model. */\n elevation?: number;\n /** If defined, specifies a uniform transparency applied to all of the geometry in the model, in the range 0.0 (fully opaque) to 1.0 (fully transparent). */\n transparency?: number;\n /** If defined and true, the model is displayed as an overlay in the view (without depth testing) so that it is always visible behind other geometry. */\n overlay?: boolean;\n /** If defined and true, subcategory display priority is used to specify the draw order of portions of the model. Geometry belonging to a subcategory with a higher priority\n * value is drawn on top of coincident geometry belonging to a subcategory with a lower priority value. The priorities can be modified at display time using\n * [FeatureSymbology.Overrides]($frontend). Note that subcategory \"layers\" cross model boundaries; that is, geometry belonging to the same subcategory in different models\n * are drawn as part of the same layer.\n */\n enforceDisplayPriority?: boolean;\n}\n\n/** Describes how to draw a plan projection model. A plan projection model is a [GeometricModel3d]($backend) whose geometry all lies in\n * a single XY plane, wherein the Z coordinate of the plane may be arbitrary or flexible. Multiple plan projection models can be combined into one view\n * and drawn as \"layers\" with relative priorities.\n * @see [[DisplayStyle3dSettings.setPlanProjectionSettings]] to define plan projection settings for a [DisplayStyle3dState]($frontend).\n * @see [GeometricModel3d.isPlanProjection]($backend).\n * @public\n */\nexport class PlanProjectionSettings {\n /** See [[PlanProjectionSettingsProps.elevation]] */\n public readonly elevation?: number;\n /** See [[PlanProjectionSettingsProps.transparency]] */\n public readonly transparency?: number;\n /** See [[PlanProjectionSettingsProps.overlay]] */\n public readonly overlay: boolean;\n /** See [[PlanProjectionSettingsProps.enforceDisplayPriority]] */\n public readonly enforceDisplayPriority?: boolean;\n\n public toJSON(): PlanProjectionSettingsProps {\n return {\n elevation: this.elevation,\n transparency: this.transparency,\n overlay: true === this.overlay ? true : undefined,\n enforceDisplayPriority: true === this.enforceDisplayPriority ? true : undefined,\n };\n }\n\n public static fromJSON(props: PlanProjectionSettingsProps | undefined): PlanProjectionSettings | undefined {\n if (undefined === props)\n return undefined;\n\n if (undefined === props.elevation && undefined === props.transparency && undefined === props.overlay && undefined === props.enforceDisplayPriority)\n return undefined;\n\n return new PlanProjectionSettings(props);\n }\n\n private constructor(props: PlanProjectionSettingsProps) {\n this.elevation = props.elevation;\n this.overlay = true === props.overlay;\n this.enforceDisplayPriority = true === props.enforceDisplayPriority;\n\n let transparency = props.transparency;\n if (undefined !== transparency)\n transparency = Math.max(0, Math.min(1, transparency));\n\n this.transparency = transparency;\n }\n\n /** Create a copy of this PlanProjectionSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A PlanProjectionSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: PlanProjectionSettingsProps): PlanProjectionSettings {\n if (undefined === changedProps)\n return this;\n\n const props: PlanProjectionSettingsProps = this.toJSON();\n if (undefined !== changedProps.elevation)\n props.elevation = changedProps.elevation;\n\n if (undefined !== changedProps.transparency)\n props.transparency = changedProps.transparency;\n\n if (undefined !== changedProps.overlay)\n props.overlay = changedProps.overlay;\n\n if (undefined !== changedProps.enforceDisplayPriority)\n props.enforceDisplayPriority = changedProps.enforceDisplayPriority;\n\n return new PlanProjectionSettings(props);\n }\n\n /** Return true if these settings are equivalent to the specified settings. */\n public equals(other: PlanProjectionSettings): boolean {\n if (this === other)\n return true;\n\n return this.elevation === other.elevation && this.transparency === other.transparency && this.overlay === other.overlay && this.enforceDisplayPriority === other.enforceDisplayPriority;\n }\n}\n"]}
1
+ {"version":3,"file":"PlanProjectionSettings.js","sourceRoot":"","sources":["../../src/PlanProjectionSettings.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqBH;;;;;;GAMG;AACH,MAAa,sBAAsB;IACjC,oDAAoD;IACpC,SAAS,CAAU;IACnC,uDAAuD;IACvC,YAAY,CAAU;IACtC,kDAAkD;IAClC,OAAO,CAAU;IACjC,iEAAiE;IACjD,sBAAsB,CAAW;IAE1C,MAAM;QACX,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,IAAI,KAAK,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;YACjD,sBAAsB,EAAE,IAAI,KAAK,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SAChF,CAAC;IACJ,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,KAA8C;QACnE,IAAI,SAAS,KAAK,KAAK;YACrB,OAAO,SAAS,CAAC;QAEnB,IAAI,SAAS,KAAK,KAAK,CAAC,SAAS,IAAI,SAAS,KAAK,KAAK,CAAC,YAAY,IAAI,SAAS,KAAK,KAAK,CAAC,OAAO,IAAI,SAAS,KAAK,KAAK,CAAC,sBAAsB;YAChJ,OAAO,SAAS,CAAC;QAEnB,OAAO,IAAI,sBAAsB,CAAC,KAAK,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,SAAS,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC,sBAAsB,KAAK,KAAK,CAAC,sBAAsB,CAAC;IAC1L,CAAC;CACF;AAxED,wDAwEC","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 DisplayStyles\r\n */\r\n\r\n/** Wire format describing [[PlanProjectionSettings]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PlanProjectionSettingsProps {\r\n /** If defined, the absolute height in meters at which to display the model. */\r\n elevation?: number;\r\n /** If defined, specifies a uniform transparency applied to all of the geometry in the model, in the range 0.0 (fully opaque) to 1.0 (fully transparent). */\r\n transparency?: number;\r\n /** If defined and true, the model is displayed as an overlay in the view (without depth testing) so that it is always visible behind other geometry. */\r\n overlay?: boolean;\r\n /** If defined and true, subcategory display priority is used to specify the draw order of portions of the model. Geometry belonging to a subcategory with a higher priority\r\n * value is drawn on top of coincident geometry belonging to a subcategory with a lower priority value. The priorities can be modified at display time using\r\n * [FeatureSymbology.Overrides]($frontend). Note that subcategory \"layers\" cross model boundaries; that is, geometry belonging to the same subcategory in different models\r\n * are drawn as part of the same layer.\r\n */\r\n enforceDisplayPriority?: boolean;\r\n}\r\n\r\n/** Describes how to draw a plan projection model. A plan projection model is a [GeometricModel3d]($backend) whose geometry all lies in\r\n * a single XY plane, wherein the Z coordinate of the plane may be arbitrary or flexible. Multiple plan projection models can be combined into one view\r\n * and drawn as \"layers\" with relative priorities.\r\n * @see [[DisplayStyle3dSettings.setPlanProjectionSettings]] to define plan projection settings for a [DisplayStyle3dState]($frontend).\r\n * @see [GeometricModel3d.isPlanProjection]($backend).\r\n * @public\r\n */\r\nexport class PlanProjectionSettings {\r\n /** See [[PlanProjectionSettingsProps.elevation]] */\r\n public readonly elevation?: number;\r\n /** See [[PlanProjectionSettingsProps.transparency]] */\r\n public readonly transparency?: number;\r\n /** See [[PlanProjectionSettingsProps.overlay]] */\r\n public readonly overlay: boolean;\r\n /** See [[PlanProjectionSettingsProps.enforceDisplayPriority]] */\r\n public readonly enforceDisplayPriority?: boolean;\r\n\r\n public toJSON(): PlanProjectionSettingsProps {\r\n return {\r\n elevation: this.elevation,\r\n transparency: this.transparency,\r\n overlay: true === this.overlay ? true : undefined,\r\n enforceDisplayPriority: true === this.enforceDisplayPriority ? true : undefined,\r\n };\r\n }\r\n\r\n public static fromJSON(props: PlanProjectionSettingsProps | undefined): PlanProjectionSettings | undefined {\r\n if (undefined === props)\r\n return undefined;\r\n\r\n if (undefined === props.elevation && undefined === props.transparency && undefined === props.overlay && undefined === props.enforceDisplayPriority)\r\n return undefined;\r\n\r\n return new PlanProjectionSettings(props);\r\n }\r\n\r\n private constructor(props: PlanProjectionSettingsProps) {\r\n this.elevation = props.elevation;\r\n this.overlay = true === props.overlay;\r\n this.enforceDisplayPriority = true === props.enforceDisplayPriority;\r\n\r\n let transparency = props.transparency;\r\n if (undefined !== transparency)\r\n transparency = Math.max(0, Math.min(1, transparency));\r\n\r\n this.transparency = transparency;\r\n }\r\n\r\n /** Create a copy of this PlanProjectionSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A PlanProjectionSettings with all of its properties set to match those of `this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: PlanProjectionSettingsProps): PlanProjectionSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n const props: PlanProjectionSettingsProps = this.toJSON();\r\n if (undefined !== changedProps.elevation)\r\n props.elevation = changedProps.elevation;\r\n\r\n if (undefined !== changedProps.transparency)\r\n props.transparency = changedProps.transparency;\r\n\r\n if (undefined !== changedProps.overlay)\r\n props.overlay = changedProps.overlay;\r\n\r\n if (undefined !== changedProps.enforceDisplayPriority)\r\n props.enforceDisplayPriority = changedProps.enforceDisplayPriority;\r\n\r\n return new PlanProjectionSettings(props);\r\n }\r\n\r\n /** Return true if these settings are equivalent to the specified settings. */\r\n public equals(other: PlanProjectionSettings): boolean {\r\n if (this === other)\r\n return true;\r\n\r\n return this.elevation === other.elevation && this.transparency === other.transparency && this.overlay === other.overlay && this.enforceDisplayPriority === other.enforceDisplayPriority;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PlanarClipMask.js","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AAEzF;;;GAGG;AACH,IAAY,kBAyBX;AAzBD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,2DAAQ,CAAA;IACR;;;;OAIG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,+DAAU,CAAA;IACV;;OAEG;IACH,2FAAwB,CAAA;IACxB;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,iFAAmB,CAAA;AACrB,CAAC,EAzBW,kBAAkB,kCAAlB,kBAAkB,QAyB7B;AAED;;;;GAIG;AACH,IAAY,sBASX;AATD,WAAY,sBAAsB;IAChC,sBAAsB;IACtB,yFAAqB,CAAA;IACrB,6EAA6E;IAC7E,mGAA0B,CAAA;IAC1B,4CAA4C;IAC5C,mFAAgB,CAAA;IAChB,yDAAyD;IACzD,oFAAkB,CAAA;AACpB,CAAC,EATW,sBAAsB,sCAAtB,sBAAsB,QASjC;AAkFD;;;;;;;;GAQG;AACH,MAAa,sBAAsB;IACjC,mDAAmD;IACnC,IAAI,CAAqB;IACzC;;;OAGG;IACa,QAAQ,CAAuB;IAC/C;;;OAGG;IACa,uBAAuB,CAAuB;IAC9D,+DAA+D;IAC/C,QAAQ,CAAU;IAClC;;OAEG;IACa,YAAY,CAAU;IACtC,iMAAiM;IACjL,MAAM,CAAU;IACf,SAAS,CAAqB;IAC9B,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esContent":["/*---------------------------------------------------------------------------------------------\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 DisplayStyles\n */\n\nimport { CompressedId64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\n\n/** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model.\n * @public\n * @extensions\n */\nexport enum PlanarClipMaskMode {\n /** No masking. */\n None = 0,\n /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].\n * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.\n * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.\n * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.\n */\n Priority = 1,\n /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.\n * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.\n */\n Models = 2,\n /** Indicates that masks should be produced from geometry belonging to a set of subcategories.\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\n */\n IncludeSubCategories = 3,\n /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\n */\n IncludeElements = 4,\n /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\n */\n ExcludeElements = 5,\n}\n\n/** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.\n * The default can be overridden by [[PlanarClipMaskSettings.priority]].\n * @public\n * @extensions\n */\nexport enum PlanarClipMaskPriority {\n /** Background map. */\n BackgroundMap = -2048,\n /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */\n GlobalRealityModel = -1024,\n /** A reality model with a bounded range. */\n RealityModel = 0,\n /** A design model stored in the [IModelDb]($backend). */\n DesignModel = 2048,\n}\n\n/** JSON representation of a [[PlanarClipMaskSettings]].\n * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]].\n * @public\n * @extensions\n */\nexport interface PlanarClipMaskProps {\n /** Controls how the mask geometry is collected */\n mode: PlanarClipMaskMode;\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: CompressedId64Set;\n /** See [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\n subCategoryOrElementIds?: CompressedId64Set;\n /** See [[PlanarClipMaskSettings.priority]]. */\n priority?: number;\n /** See [[PlanarClipMaskSettings.transparency]]. */\n transparency?: number;\n /** See PlanarClipMaskSettings.invert */\n invert?: boolean;\n}\n\n/** Basic arguments supplied to [[PlanarClipMaskSettings.create]].\n * @public\n */\nexport interface BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.transparency]]. */\n transparency?: number;\n /** See [[PlanarClipMaskSettings.invert]]. */\n invert?: boolean;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Models]].\n * @public\n */\nexport interface ModelPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: Iterable<Id64String>;\n exclude?: never;\n elementIds?: never;\n subCategoryIds?: never;\n priority?: never;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludeElements]].\n * @public\n */\nexport interface ElementPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: Iterable<Id64String>;\n /** The elements used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\n elementIds: Iterable<Id64String>;\n /** If true, creates a mask of [[PlanarClipMaskMode.ExcludeElements]]; otherwise, [[PlanarClipMaskMode.IncludeElements]]. */\n exclude?: boolean;\n subCategoryIds?: never;\n priority?: never;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeSubCategories]].\n * @public\n */\nexport interface SubCategoryPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.modelIds]]. */\n modelIds?: Iterable<Id64String>;\n /** The subcategories used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\n subCategoryIds: Iterable<Id64String>;\n exclude?: never;\n elementIds?: never;\n priority?: never;\n}\n\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Priority]].\n * @public\n */\nexport interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\n /** See [[PlanarClipMaskSettings.priority]]. */\n priority: number;\n exclude?: never;\n elementIds?: never;\n modelIds?: never;\n}\n\n/** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models -\n * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the\n * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions\n * of a reality model that intersect a design model.\n * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks.\n * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend).\n * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model.\n * @public\n */\nexport class PlanarClipMaskSettings {\n /** Specifies how the mask geometry is produced. */\n public readonly mode: PlanarClipMaskMode;\n /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask,\n * and if `undefined`, no mask geometry will be created.\n * The mask geometry can be filtered by [[subCategoryOrElementIds]].\n */\n public readonly modelIds?: OrderedId64Iterable;\n /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;\n * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.\n * If undefined, Modes IncludeSubCategories, IncludeElements, and ExcludeElements behave like Models mode.\n */\n public readonly subCategoryOrElementIds?: OrderedId64Iterable;\n /** For [[PlanarClipMaskMode.Priority]], the priority value. */\n public readonly priority?: number;\n /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking).\n If no transparency is defined then the transparencies of the mask elements are used.\n */\n public readonly transparency?: number;\n /** A value of true indicates that the mask should be inverted and only content within the mask should be displayed, in other words the area inside the mask is displayed rather than outside. */\n public readonly invert: boolean;\n private readonly _modelIds?: CompressedId64Set;\n private readonly _subCategoryOrElementIds?: CompressedId64Set;\n\n /** The compressed representation of [[modelIds]]. */\n public get compressedModelIds(): CompressedId64Set | undefined {\n return this._modelIds;\n }\n\n /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */\n public static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings {\n if (!json || undefined === json.mode)\n return this.defaults;\n\n return new PlanarClipMaskSettings(json.mode, json.transparency, json.modelIds, json.subCategoryOrElementIds, json.priority, json.invert);\n }\n\n /** Create a new PlanarClipMaskSettings. */\n public static create(args: ModelPlanarClipMaskArgs | ElementPlanarClipMaskArgs | SubCategoryPlanarClipMaskArgs | PriorityPlanarClipMaskArgs): PlanarClipMaskSettings {\n const modelIds = args.modelIds ? CompressedId64Set.sortAndCompress(args.modelIds) : undefined;\n if (undefined !== args.priority)\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Priority, args.transparency, undefined, undefined, args.priority, args.invert);\n else if (undefined !== args.subCategoryIds)\n return new PlanarClipMaskSettings(PlanarClipMaskMode.IncludeSubCategories, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.subCategoryIds), undefined, args.invert);\n else if (undefined !== args.elementIds)\n return new PlanarClipMaskSettings(args.exclude ? PlanarClipMaskMode.ExcludeElements : PlanarClipMaskMode.IncludeElements, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.elementIds), undefined, args.invert);\n else\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Models, args.transparency, modelIds, undefined, undefined, args.invert);\n }\n\n /** Create JSON object representing this [[PlanarClipMaskSettings]] */\n public toJSON(): PlanarClipMaskProps {\n const props: PlanarClipMaskProps = { mode: this.mode };\n if (undefined !== this._modelIds)\n props.modelIds = this._modelIds;\n\n if (undefined !== this._subCategoryOrElementIds)\n props.subCategoryOrElementIds = this._subCategoryOrElementIds;\n\n if (undefined !== this.priority)\n props.priority = this.priority;\n\n if (undefined !== this.transparency)\n props.transparency = this.transparency;\n\n if (this.invert)\n props.invert = true;\n\n return props;\n }\n\n /** Returns true if masking is enabled. */\n public get isValid(): boolean {\n return this.mode !== PlanarClipMaskMode.None;\n }\n\n public equals(other: PlanarClipMaskSettings): boolean {\n return this.mode === other.mode &&\n this.priority === other.priority &&\n this.transparency === other.transparency &&\n this.invert === other.invert &&\n this._modelIds === other._modelIds &&\n this._subCategoryOrElementIds === other._subCategoryOrElementIds;\n }\n\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\n * @param changedProps JSON representation of the properties to change.\n * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\n */\n public clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings {\n if (undefined === changedProps)\n return this;\n\n return PlanarClipMaskSettings.fromJSON({\n ...this.toJSON(),\n ...changedProps,\n });\n }\n\n private constructor(mode: PlanarClipMaskMode, transparency?: number, modelIds?: CompressedId64Set, subCategoryOrElementIds?: CompressedId64Set, priority?: number, invert?: boolean) {\n this.mode = mode;\n this._modelIds = modelIds;\n this._subCategoryOrElementIds = subCategoryOrElementIds;\n this.priority = priority;\n this.invert = true === invert;\n this.transparency = undefined !== transparency ? Math.max(0, Math.min(1, transparency)) : undefined;\n\n if (modelIds)\n this.modelIds = CompressedId64Set.iterable(modelIds);\n\n if (subCategoryOrElementIds)\n this.subCategoryOrElementIds = CompressedId64Set.iterable(subCategoryOrElementIds);\n }\n\n /** A default PlanarClipMask which masks nothing. */\n public static defaults = new PlanarClipMaskSettings(PlanarClipMaskMode.None);\n}\n"]}
1
+ {"version":3,"file":"PlanarClipMask.js","sourceRoot":"","sources":["../../src/PlanarClipMask.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyF;AAEzF;;;GAGG;AACH,IAAY,kBAyBX;AAzBD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,2DAAQ,CAAA;IACR;;;;OAIG;IACH,mEAAY,CAAA;IACZ;;OAEG;IACH,+DAAU,CAAA;IACV;;OAEG;IACH,2FAAwB,CAAA;IACxB;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,iFAAmB,CAAA;AACrB,CAAC,EAzBW,kBAAkB,kCAAlB,kBAAkB,QAyB7B;AAED;;;;GAIG;AACH,IAAY,sBASX;AATD,WAAY,sBAAsB;IAChC,sBAAsB;IACtB,yFAAqB,CAAA;IACrB,6EAA6E;IAC7E,mGAA0B,CAAA;IAC1B,4CAA4C;IAC5C,mFAAgB,CAAA;IAChB,yDAAyD;IACzD,oFAAkB,CAAA;AACpB,CAAC,EATW,sBAAsB,sCAAtB,sBAAsB,QASjC;AAkFD;;;;;;;;GAQG;AACH,MAAa,sBAAsB;IACjC,mDAAmD;IACnC,IAAI,CAAqB;IACzC;;;OAGG;IACa,QAAQ,CAAuB;IAC/C;;;OAGG;IACa,uBAAuB,CAAuB;IAC9D,+DAA+D;IAC/C,QAAQ,CAAU;IAClC;;OAEG;IACa,YAAY,CA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,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;;AAnH/E,wDAoHC","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 DisplayStyles\r\n */\r\n\r\nimport { CompressedId64Set, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\n\r\n/** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskMode {\r\n /** No masking. */\r\n None = 0,\r\n /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]].\r\n * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked.\r\n * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one.\r\n * Everything visible in the view creates the mask, so turning off models, categories, or elements (via fully transparent overrides) will make things not be in the mask.\r\n */\r\n Priority = 1,\r\n /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s, regardless of what model is on or off in the view.\r\n * However, things that are off from category settings or element feature overrides in the view will not be in the mask for these models.\r\n */\r\n Models = 2,\r\n /** Indicates that masks should be produced from geometry belonging to a set of subcategories.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n IncludeSubCategories = 3,\r\n /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n IncludeElements = 4,\r\n /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements.\r\n * View settings do not affect what is in the mask, unless [[PlanarClipMaskSettings.subCategoryOrElementIds]] is undefined, in which case it behaves like Models mode.\r\n */\r\n ExcludeElements = 5,\r\n}\r\n\r\n/** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority.\r\n * The default can be overridden by [[PlanarClipMaskSettings.priority]].\r\n * @public\r\n * @extensions\r\n */\r\nexport enum PlanarClipMaskPriority {\r\n /** Background map. */\r\n BackgroundMap = -2048,\r\n /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */\r\n GlobalRealityModel = -1024,\r\n /** A reality model with a bounded range. */\r\n RealityModel = 0,\r\n /** A design model stored in the [IModelDb]($backend). */\r\n DesignModel = 2048,\r\n}\r\n\r\n/** JSON representation of a [[PlanarClipMaskSettings]].\r\n * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PlanarClipMaskProps {\r\n /** Controls how the mask geometry is collected */\r\n mode: PlanarClipMaskMode;\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryOrElementIds?: CompressedId64Set;\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority?: number;\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See PlanarClipMaskSettings.invert */\r\n invert?: boolean;\r\n}\r\n\r\n/** Basic arguments supplied to [[PlanarClipMaskSettings.create]].\r\n * @public\r\n */\r\nexport interface BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.transparency]]. */\r\n transparency?: number;\r\n /** See [[PlanarClipMaskSettings.invert]]. */\r\n invert?: boolean;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Models]].\r\n * @public\r\n */\r\nexport interface ModelPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n exclude?: never;\r\n elementIds?: never;\r\n subCategoryIds?: never;\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludeElements]].\r\n * @public\r\n */\r\nexport interface ElementPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The elements used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n elementIds: Iterable<Id64String>;\r\n /** If true, creates a mask of [[PlanarClipMaskMode.ExcludeElements]]; otherwise, [[PlanarClipMaskMode.IncludeElements]]. */\r\n exclude?: boolean;\r\n subCategoryIds?: never;\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.IncludeSubCategories]].\r\n * @public\r\n */\r\nexport interface SubCategoryPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.modelIds]]. */\r\n modelIds?: Iterable<Id64String>;\r\n /** The subcategories used by the mask. @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */\r\n subCategoryIds: Iterable<Id64String>;\r\n exclude?: never;\r\n elementIds?: never;\r\n priority?: never;\r\n}\r\n\r\n/** Arguments supplied to [[PlanarClipMaskSettings.create]] to create a mask of [[PlanarClipMaskMode.Priority]].\r\n * @public\r\n */\r\nexport interface PriorityPlanarClipMaskArgs extends BasicPlanarClipMaskArgs {\r\n /** See [[PlanarClipMaskSettings.priority]]. */\r\n priority: number;\r\n exclude?: never;\r\n elementIds?: never;\r\n modelIds?: never;\r\n}\r\n\r\n/** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models -\r\n * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the\r\n * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions\r\n * of a reality model that intersect a design model.\r\n * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks.\r\n * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend).\r\n * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model.\r\n * @public\r\n */\r\nexport class PlanarClipMaskSettings {\r\n /** Specifies how the mask geometry is produced. */\r\n public readonly mode: PlanarClipMaskMode;\r\n /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask,\r\n * and if `undefined`, no mask geometry will be created.\r\n * The mask geometry can be filtered by [[subCategoryOrElementIds]].\r\n */\r\n public readonly modelIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking;\r\n * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask.\r\n * If undefined, Modes IncludeSubCategories, IncludeElements, and ExcludeElements behave like Models mode.\r\n */\r\n public readonly subCategoryOrElementIds?: OrderedId64Iterable;\r\n /** For [[PlanarClipMaskMode.Priority]], the priority value. */\r\n public readonly priority?: number;\r\n /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking).\r\n If no transparency is defined then the transparencies of the mask elements are used.\r\n */\r\n public readonly transparency?: number;\r\n /** A value of true indicates that the mask should be inverted and only content within the mask should be displayed, in other words the area inside the mask is displayed rather than outside. */\r\n public readonly invert: boolean;\r\n private readonly _modelIds?: CompressedId64Set;\r\n private readonly _subCategoryOrElementIds?: CompressedId64Set;\r\n\r\n /** The compressed representation of [[modelIds]]. */\r\n public get compressedModelIds(): CompressedId64Set | undefined {\r\n return this._modelIds;\r\n }\r\n\r\n /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */\r\n public static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (!json || undefined === json.mode)\r\n return this.defaults;\r\n\r\n return new PlanarClipMaskSettings(json.mode, json.transparency, json.modelIds, json.subCategoryOrElementIds, json.priority, json.invert);\r\n }\r\n\r\n /** Create a new PlanarClipMaskSettings. */\r\n public static create(args: ModelPlanarClipMaskArgs | ElementPlanarClipMaskArgs | SubCategoryPlanarClipMaskArgs | PriorityPlanarClipMaskArgs): PlanarClipMaskSettings {\r\n const modelIds = args.modelIds ? CompressedId64Set.sortAndCompress(args.modelIds) : undefined;\r\n if (undefined !== args.priority)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Priority, args.transparency, undefined, undefined, args.priority, args.invert);\r\n else if (undefined !== args.subCategoryIds)\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.IncludeSubCategories, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.subCategoryIds), undefined, args.invert);\r\n else if (undefined !== args.elementIds)\r\n return new PlanarClipMaskSettings(args.exclude ? PlanarClipMaskMode.ExcludeElements : PlanarClipMaskMode.IncludeElements, args.transparency, modelIds, CompressedId64Set.sortAndCompress(args.elementIds), undefined, args.invert);\r\n else\r\n return new PlanarClipMaskSettings(PlanarClipMaskMode.Models, args.transparency, modelIds, undefined, undefined, args.invert);\r\n }\r\n\r\n /** Create JSON object representing this [[PlanarClipMaskSettings]] */\r\n public toJSON(): PlanarClipMaskProps {\r\n const props: PlanarClipMaskProps = { mode: this.mode };\r\n if (undefined !== this._modelIds)\r\n props.modelIds = this._modelIds;\r\n\r\n if (undefined !== this._subCategoryOrElementIds)\r\n props.subCategoryOrElementIds = this._subCategoryOrElementIds;\r\n\r\n if (undefined !== this.priority)\r\n props.priority = this.priority;\r\n\r\n if (undefined !== this.transparency)\r\n props.transparency = this.transparency;\r\n\r\n if (this.invert)\r\n props.invert = true;\r\n\r\n return props;\r\n }\r\n\r\n /** Returns true if masking is enabled. */\r\n public get isValid(): boolean {\r\n return this.mode !== PlanarClipMaskMode.None;\r\n }\r\n\r\n public equals(other: PlanarClipMaskSettings): boolean {\r\n return this.mode === other.mode &&\r\n this.priority === other.priority &&\r\n this.transparency === other.transparency &&\r\n this.invert === other.invert &&\r\n this._modelIds === other._modelIds &&\r\n this._subCategoryOrElementIds === other._subCategoryOrElementIds;\r\n }\r\n\r\n /** Create a copy of this TerrainSettings, optionally modifying some of its properties.\r\n * @param changedProps JSON representation of the properties to change.\r\n * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`.\r\n */\r\n public clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings {\r\n if (undefined === changedProps)\r\n return this;\r\n\r\n return PlanarClipMaskSettings.fromJSON({\r\n ...this.toJSON(),\r\n ...changedProps,\r\n });\r\n }\r\n\r\n private constructor(mode: PlanarClipMaskMode, transparency?: number, modelIds?: CompressedId64Set, subCategoryOrElementIds?: CompressedId64Set, priority?: number, invert?: boolean) {\r\n this.mode = mode;\r\n this._modelIds = modelIds;\r\n this._subCategoryOrElementIds = subCategoryOrElementIds;\r\n this.priority = priority;\r\n this.invert = true === invert;\r\n this.transparency = undefined !== transparency ? Math.max(0, Math.min(1, transparency)) : undefined;\r\n\r\n if (modelIds)\r\n this.modelIds = CompressedId64Set.iterable(modelIds);\r\n\r\n if (subCategoryOrElementIds)\r\n this.subCategoryOrElementIds = CompressedId64Set.iterable(subCategoryOrElementIds);\r\n }\r\n\r\n /** A default PlanarClipMask which masks nothing. */\r\n public static defaults = new PlanarClipMaskSettings(PlanarClipMaskMode.None);\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"QPoint.js","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAiE;AACjE,wDAE8B;AAE9B;;;;;;;;;;GAUG;AACH,IAAiB,YAAY,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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;AAhED,sDAgEC","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
+ {"version":3,"file":"QPoint.js","sourceRoot":"","sources":["../../src/QPoint.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAiE;AACjE,wDAE8B;AAE9B;;;;;;;;;;GAUG;AACH,IAAiB,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,kFAAkF;IAClF,SAAgB,SAAS,CAAC,IAAY,EAAE,UAAU,GAAG,aAAA,YAAY;QAC/D,OAAO,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,UAAU,GAAG,GAAG,CAAC;IAChD,CAAC;IAFe,sBAAS,YAExB,CAAA;IAED;;OAEG;IACH,SAAgB,QAAQ,CAAC,GAAW,EAAE,MAAc,EAAE,KAAa,EAAE,UAAU,GAAG,aAAA,YAAY;QAC5F,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvF,CAAC;IAFe,qBAAQ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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,IAAA,qBAAM,EAAC,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;AAhED,sDAgEC","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 /** Returns true if the quantized value `qpos` fits within the specified range. */\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 /** Returns true if the value `pos` can be quantized to the specified range. */\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 /** Returns true if `qpos` is a valid quantized 16-bit value. */\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 /** The diagonal of the unquantized range represented by these parameters. */\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 /** The diagonal of the unquantized range represented by these parameters. */\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 +1 @@
1
- {"version":3,"file":"RealityDataAccessProps.js","sourceRoot":"","sources":["../../src/RealityDataAccessProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F;;;GAGG;AACH,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,qCAArB,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"]}
1
+ {"version":3,"file":"RealityDataAccessProps.js","sourceRoot":"","sources":["../../src/RealityDataAccessProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F;;;GAGG;AACH,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,qCAArB,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"]}