@itwin/core-frontend 4.10.0-dev.30 → 4.10.0-dev.32

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 (385) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/AccuDraw.js +2 -2
  3. package/lib/cjs/AccuDraw.js.map +1 -1
  4. package/lib/cjs/AccuSnap.d.ts.map +1 -1
  5. package/lib/cjs/AccuSnap.js +7 -2
  6. package/lib/cjs/AccuSnap.js.map +1 -1
  7. package/lib/cjs/BackgroundMapGeometry.js +3 -3
  8. package/lib/cjs/BackgroundMapGeometry.js.map +1 -1
  9. package/lib/cjs/BriefcaseConnection.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseTxns.d.ts.map +1 -1
  11. package/lib/cjs/DisplayStyleState.d.ts.map +1 -1
  12. package/lib/cjs/DrawingViewState.d.ts +3 -3
  13. package/lib/cjs/DrawingViewState.d.ts.map +1 -1
  14. package/lib/cjs/DrawingViewState.js +9 -8
  15. package/lib/cjs/DrawingViewState.js.map +1 -1
  16. package/lib/cjs/GraphicalEditingScope.d.ts.map +1 -1
  17. package/lib/cjs/HitDetail.d.ts +36 -7
  18. package/lib/cjs/HitDetail.d.ts.map +1 -1
  19. package/lib/cjs/HitDetail.js +11 -3
  20. package/lib/cjs/HitDetail.js.map +1 -1
  21. package/lib/cjs/IModelApp.d.ts.map +1 -1
  22. package/lib/cjs/LinePlaneIntersect.js +1 -2
  23. package/lib/cjs/LinePlaneIntersect.js.map +1 -1
  24. package/lib/cjs/NoRenderApp.d.ts.map +1 -1
  25. package/lib/cjs/NotificationManager.d.ts +2 -2
  26. package/lib/cjs/NotificationManager.d.ts.map +1 -1
  27. package/lib/cjs/SheetViewState.d.ts +3 -3
  28. package/lib/cjs/SheetViewState.d.ts.map +1 -1
  29. package/lib/cjs/SheetViewState.js +18 -5
  30. package/lib/cjs/SheetViewState.js.map +1 -1
  31. package/lib/cjs/ViewGlobalLocation.js +9 -9
  32. package/lib/cjs/ViewGlobalLocation.js.map +1 -1
  33. package/lib/cjs/ViewState.d.ts +16 -7
  34. package/lib/cjs/ViewState.d.ts.map +1 -1
  35. package/lib/cjs/ViewState.js +4 -4
  36. package/lib/cjs/ViewState.js.map +1 -1
  37. package/lib/cjs/Viewport.d.ts.map +1 -1
  38. package/lib/cjs/Viewport.js +1 -0
  39. package/lib/cjs/Viewport.js.map +1 -1
  40. package/lib/cjs/ViewportSync.js +6 -6
  41. package/lib/cjs/ViewportSync.js.map +1 -1
  42. package/lib/cjs/common/ImageUtil.js +15 -16
  43. package/lib/cjs/common/ImageUtil.js.map +1 -1
  44. package/lib/cjs/common/WorkerProxy.js +1 -2
  45. package/lib/cjs/common/WorkerProxy.js.map +1 -1
  46. package/lib/cjs/common/gltf/GltfParser.js +1 -2
  47. package/lib/cjs/common/gltf/GltfParser.js.map +1 -1
  48. package/lib/cjs/common/gltf/GltfSchema.js +5 -5
  49. package/lib/cjs/common/gltf/GltfSchema.js.map +1 -1
  50. package/lib/cjs/common/imdl/CompactEdges.js +1 -2
  51. package/lib/cjs/common/imdl/CompactEdges.js.map +1 -1
  52. package/lib/cjs/common/imdl/ImdlModel.js +2 -3
  53. package/lib/cjs/common/imdl/ImdlModel.js.map +1 -1
  54. package/lib/cjs/common/imdl/ParseImdlDocument.js +6 -7
  55. package/lib/cjs/common/imdl/ParseImdlDocument.js.map +1 -1
  56. package/lib/cjs/common/internal/render/EdgeParams.js +2 -3
  57. package/lib/cjs/common/internal/render/EdgeParams.js.map +1 -1
  58. package/lib/cjs/common/internal/render/GeometryList.d.ts +1 -1
  59. package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js +3 -3
  60. package/lib/cjs/common/internal/render/GraphicDescriptionBuilderImpl.js.map +1 -1
  61. package/lib/cjs/common/internal/render/LineCode.js +1 -2
  62. package/lib/cjs/common/internal/render/LineCode.js.map +1 -1
  63. package/lib/cjs/common/internal/render/MeshPrimitives.js +3 -3
  64. package/lib/cjs/common/internal/render/MeshPrimitives.js.map +1 -1
  65. package/lib/cjs/common/internal/render/PointStringParams.js +1 -2
  66. package/lib/cjs/common/internal/render/PointStringParams.js.map +1 -1
  67. package/lib/cjs/common/internal/render/PolylineParams.js +4 -5
  68. package/lib/cjs/common/internal/render/PolylineParams.js.map +1 -1
  69. package/lib/cjs/common/internal/render/SurfaceParams.js +3 -3
  70. package/lib/cjs/common/internal/render/SurfaceParams.js.map +1 -1
  71. package/lib/cjs/common/internal/render/VertexTable.js +1 -2
  72. package/lib/cjs/common/internal/render/VertexTable.js.map +1 -1
  73. package/lib/cjs/common/internal/render/VertexTableBuilder.js +2 -2
  74. package/lib/cjs/common/internal/render/VertexTableBuilder.js.map +1 -1
  75. package/lib/cjs/common/internal/render/VertexTableSplitter.js +4 -4
  76. package/lib/cjs/common/internal/render/VertexTableSplitter.js.map +1 -1
  77. package/lib/cjs/extension/providers/ExtensionLoadScript.js +1 -2
  78. package/lib/cjs/extension/providers/ExtensionLoadScript.js.map +1 -1
  79. package/lib/cjs/internal/render/RenderInstancesParamsImpl.js +2 -3
  80. package/lib/cjs/internal/render/RenderInstancesParamsImpl.js.map +1 -1
  81. package/lib/cjs/quantity-formatting/BaseUnitFormattingSettingsProvider.d.ts.map +1 -1
  82. package/lib/cjs/quantity-formatting/BasicUnitsProvider.js +2 -2
  83. package/lib/cjs/quantity-formatting/BasicUnitsProvider.js.map +1 -1
  84. package/lib/cjs/quantity-formatting/QuantityFormatter.js +3 -3
  85. package/lib/cjs/quantity-formatting/QuantityFormatter.js.map +1 -1
  86. package/lib/cjs/quantity-formatting/QuantityTypesEditorSpecs.d.ts.map +1 -1
  87. package/lib/cjs/render/GraphicBranch.d.ts +3 -1
  88. package/lib/cjs/render/GraphicBranch.d.ts.map +1 -1
  89. package/lib/cjs/render/GraphicBranch.js +2 -2
  90. package/lib/cjs/render/GraphicBranch.js.map +1 -1
  91. package/lib/cjs/render/GraphicTemplate.js +1 -2
  92. package/lib/cjs/render/GraphicTemplate.js.map +1 -1
  93. package/lib/cjs/render/MockRender.d.ts.map +1 -1
  94. package/lib/cjs/render/Pixel.d.ts +9 -7
  95. package/lib/cjs/render/Pixel.d.ts.map +1 -1
  96. package/lib/cjs/render/Pixel.js +20 -5
  97. package/lib/cjs/render/Pixel.js.map +1 -1
  98. package/lib/cjs/render/RenderPlan.js +3 -3
  99. package/lib/cjs/render/RenderPlan.js.map +1 -1
  100. package/lib/cjs/render/RenderSystem.d.ts.map +1 -1
  101. package/lib/cjs/render/UpsampleRealityMeshParams.js +1 -2
  102. package/lib/cjs/render/UpsampleRealityMeshParams.js.map +1 -1
  103. package/lib/cjs/render/VisibleFeature.js +1 -2
  104. package/lib/cjs/render/VisibleFeature.js.map +1 -1
  105. package/lib/cjs/render/webgl/AttributeBuffers.js +5 -5
  106. package/lib/cjs/render/webgl/AttributeBuffers.js.map +1 -1
  107. package/lib/cjs/render/webgl/BranchState.d.ts +2 -0
  108. package/lib/cjs/render/webgl/BranchState.d.ts.map +1 -1
  109. package/lib/cjs/render/webgl/BranchState.js +2 -0
  110. package/lib/cjs/render/webgl/BranchState.js.map +1 -1
  111. package/lib/cjs/render/webgl/ClippingProgram.js +2 -2
  112. package/lib/cjs/render/webgl/ClippingProgram.js.map +1 -1
  113. package/lib/cjs/render/webgl/DrawCommand.js +3 -3
  114. package/lib/cjs/render/webgl/DrawCommand.js.map +1 -1
  115. package/lib/cjs/render/webgl/FeatureOverrides.js +2 -2
  116. package/lib/cjs/render/webgl/FeatureOverrides.js.map +1 -1
  117. package/lib/cjs/render/webgl/FrustumUniforms.js +2 -2
  118. package/lib/cjs/render/webgl/FrustumUniforms.js.map +1 -1
  119. package/lib/cjs/render/webgl/Graphic.d.ts +3 -0
  120. package/lib/cjs/render/webgl/Graphic.d.ts.map +1 -1
  121. package/lib/cjs/render/webgl/Graphic.js +4 -0
  122. package/lib/cjs/render/webgl/Graphic.js.map +1 -1
  123. package/lib/cjs/render/webgl/InstancedGeometry.js +2 -2
  124. package/lib/cjs/render/webgl/InstancedGeometry.js.map +1 -1
  125. package/lib/cjs/render/webgl/Material.js +2 -2
  126. package/lib/cjs/render/webgl/Material.js.map +1 -1
  127. package/lib/cjs/render/webgl/Matrix.js +3 -3
  128. package/lib/cjs/render/webgl/Matrix.js.map +1 -1
  129. package/lib/cjs/render/webgl/RenderFlags.js +2 -2
  130. package/lib/cjs/render/webgl/RenderFlags.js.map +1 -1
  131. package/lib/cjs/render/webgl/SceneCompositor.d.ts.map +1 -1
  132. package/lib/cjs/render/webgl/SceneCompositor.js +7 -4
  133. package/lib/cjs/render/webgl/SceneCompositor.js.map +1 -1
  134. package/lib/cjs/render/webgl/ScratchDrawParams.js +2 -3
  135. package/lib/cjs/render/webgl/ScratchDrawParams.js.map +1 -1
  136. package/lib/cjs/render/webgl/ScreenSpaceEffect.js +2 -2
  137. package/lib/cjs/render/webgl/ScreenSpaceEffect.js.map +1 -1
  138. package/lib/cjs/render/webgl/SurfaceGeometry.js +2 -2
  139. package/lib/cjs/render/webgl/SurfaceGeometry.js.map +1 -1
  140. package/lib/cjs/render/webgl/Sync.js +3 -4
  141. package/lib/cjs/render/webgl/Sync.js.map +1 -1
  142. package/lib/cjs/render/webgl/System.d.ts.map +1 -1
  143. package/lib/cjs/render/webgl/TechniqueFlags.d.ts.map +1 -1
  144. package/lib/cjs/render/webgl/TechniqueId.js +1 -2
  145. package/lib/cjs/render/webgl/TechniqueId.js.map +1 -1
  146. package/lib/cjs/render/webgl/Texture.d.ts.map +1 -1
  147. package/lib/cjs/render/webgl/glsl/AmbientOcclusion.js +1 -2
  148. package/lib/cjs/render/webgl/glsl/AmbientOcclusion.js.map +1 -1
  149. package/lib/cjs/render/webgl/glsl/Animation.js +1 -2
  150. package/lib/cjs/render/webgl/glsl/Animation.js.map +1 -1
  151. package/lib/cjs/render/webgl/glsl/Atmosphere.js +1 -2
  152. package/lib/cjs/render/webgl/glsl/Atmosphere.js.map +1 -1
  153. package/lib/cjs/render/webgl/glsl/Blur.js +1 -2
  154. package/lib/cjs/render/webgl/glsl/Blur.js.map +1 -1
  155. package/lib/cjs/render/webgl/glsl/ClearPickAndColor.js +1 -2
  156. package/lib/cjs/render/webgl/glsl/ClearPickAndColor.js.map +1 -1
  157. package/lib/cjs/render/webgl/glsl/ClearTranslucent.js +1 -2
  158. package/lib/cjs/render/webgl/glsl/ClearTranslucent.js.map +1 -1
  159. package/lib/cjs/render/webgl/glsl/Clipping.js +2 -2
  160. package/lib/cjs/render/webgl/glsl/Clipping.js.map +1 -1
  161. package/lib/cjs/render/webgl/glsl/Color.js +2 -3
  162. package/lib/cjs/render/webgl/glsl/Color.js.map +1 -1
  163. package/lib/cjs/render/webgl/glsl/Combine3Textures.js +1 -2
  164. package/lib/cjs/render/webgl/glsl/Combine3Textures.js.map +1 -1
  165. package/lib/cjs/render/webgl/glsl/CombineTextures.js +1 -2
  166. package/lib/cjs/render/webgl/glsl/CombineTextures.js.map +1 -1
  167. package/lib/cjs/render/webgl/glsl/Common.js +7 -7
  168. package/lib/cjs/render/webgl/glsl/Common.js.map +1 -1
  169. package/lib/cjs/render/webgl/glsl/Composite.js +1 -2
  170. package/lib/cjs/render/webgl/glsl/Composite.js.map +1 -1
  171. package/lib/cjs/render/webgl/glsl/Contours.js +1 -2
  172. package/lib/cjs/render/webgl/glsl/Contours.js.map +1 -1
  173. package/lib/cjs/render/webgl/glsl/CopyColor.js +1 -2
  174. package/lib/cjs/render/webgl/glsl/CopyColor.js.map +1 -1
  175. package/lib/cjs/render/webgl/glsl/CopyPickBuffers.js +1 -2
  176. package/lib/cjs/render/webgl/glsl/CopyPickBuffers.js.map +1 -1
  177. package/lib/cjs/render/webgl/glsl/CopyStencil.js +4 -5
  178. package/lib/cjs/render/webgl/glsl/CopyStencil.js.map +1 -1
  179. package/lib/cjs/render/webgl/glsl/Decode.js +2 -2
  180. package/lib/cjs/render/webgl/glsl/Decode.js.map +1 -1
  181. package/lib/cjs/render/webgl/glsl/EDL.js +4 -5
  182. package/lib/cjs/render/webgl/glsl/EDL.js.map +1 -1
  183. package/lib/cjs/render/webgl/glsl/EVSMFromDepth.js +1 -2
  184. package/lib/cjs/render/webgl/glsl/EVSMFromDepth.js.map +1 -1
  185. package/lib/cjs/render/webgl/glsl/Edge.js +2 -3
  186. package/lib/cjs/render/webgl/glsl/Edge.js.map +1 -1
  187. package/lib/cjs/render/webgl/glsl/FeatureSymbology.js +15 -15
  188. package/lib/cjs/render/webgl/glsl/FeatureSymbology.js.map +1 -1
  189. package/lib/cjs/render/webgl/glsl/Fragment.js +6 -6
  190. package/lib/cjs/render/webgl/glsl/Fragment.js.map +1 -1
  191. package/lib/cjs/render/webgl/glsl/Instancing.js +3 -4
  192. package/lib/cjs/render/webgl/glsl/Instancing.js.map +1 -1
  193. package/lib/cjs/render/webgl/glsl/Lighting.js +1 -2
  194. package/lib/cjs/render/webgl/glsl/Lighting.js.map +1 -1
  195. package/lib/cjs/render/webgl/glsl/LogarithmicDepthBuffer.js +1 -2
  196. package/lib/cjs/render/webgl/glsl/LogarithmicDepthBuffer.js.map +1 -1
  197. package/lib/cjs/render/webgl/glsl/LookupTable.js +1 -2
  198. package/lib/cjs/render/webgl/glsl/LookupTable.js.map +1 -1
  199. package/lib/cjs/render/webgl/glsl/Monochrome.js +2 -3
  200. package/lib/cjs/render/webgl/glsl/Monochrome.js.map +1 -1
  201. package/lib/cjs/render/webgl/glsl/PlanarClassification.js +5 -5
  202. package/lib/cjs/render/webgl/glsl/PlanarClassification.js.map +1 -1
  203. package/lib/cjs/render/webgl/glsl/PlanarGrid.js +1 -1
  204. package/lib/cjs/render/webgl/glsl/PlanarGrid.js.map +1 -1
  205. package/lib/cjs/render/webgl/glsl/PointCloud.js +2 -3
  206. package/lib/cjs/render/webgl/glsl/PointCloud.js.map +1 -1
  207. package/lib/cjs/render/webgl/glsl/PointString.js +2 -3
  208. package/lib/cjs/render/webgl/glsl/PointString.js.map +1 -1
  209. package/lib/cjs/render/webgl/glsl/Polyline.js +6 -6
  210. package/lib/cjs/render/webgl/glsl/Polyline.js.map +1 -1
  211. package/lib/cjs/render/webgl/glsl/RealityMesh.js +5 -5
  212. package/lib/cjs/render/webgl/glsl/RealityMesh.js.map +1 -1
  213. package/lib/cjs/render/webgl/glsl/RenderPass.js +1 -2
  214. package/lib/cjs/render/webgl/glsl/RenderPass.js.map +1 -1
  215. package/lib/cjs/render/webgl/glsl/ScreenSpaceEffect.js +1 -2
  216. package/lib/cjs/render/webgl/glsl/ScreenSpaceEffect.js.map +1 -1
  217. package/lib/cjs/render/webgl/glsl/SkyBox.js +1 -2
  218. package/lib/cjs/render/webgl/glsl/SkyBox.js.map +1 -1
  219. package/lib/cjs/render/webgl/glsl/SkySphere.js +1 -2
  220. package/lib/cjs/render/webgl/glsl/SkySphere.js.map +1 -1
  221. package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js +3 -3
  222. package/lib/cjs/render/webgl/glsl/SolarShadowMapping.js.map +1 -1
  223. package/lib/cjs/render/webgl/glsl/Surface.js +6 -6
  224. package/lib/cjs/render/webgl/glsl/Surface.js.map +1 -1
  225. package/lib/cjs/render/webgl/glsl/Thematic.js +2 -3
  226. package/lib/cjs/render/webgl/glsl/Thematic.js.map +1 -1
  227. package/lib/cjs/render/webgl/glsl/Translucency.js +2 -2
  228. package/lib/cjs/render/webgl/glsl/Translucency.js.map +1 -1
  229. package/lib/cjs/render/webgl/glsl/Vertex.js +13 -13
  230. package/lib/cjs/render/webgl/glsl/Vertex.js.map +1 -1
  231. package/lib/cjs/render/webgl/glsl/Viewport.js +3 -4
  232. package/lib/cjs/render/webgl/glsl/Viewport.js.map +1 -1
  233. package/lib/cjs/render/webgl/glsl/ViewportQuad.js +1 -2
  234. package/lib/cjs/render/webgl/glsl/ViewportQuad.js.map +1 -1
  235. package/lib/cjs/render/webgl/glsl/Wiremesh.js +1 -2
  236. package/lib/cjs/render/webgl/glsl/Wiremesh.js.map +1 -1
  237. package/lib/cjs/request/Request.d.ts.map +1 -1
  238. package/lib/cjs/request/Request.js +2 -2
  239. package/lib/cjs/request/Request.js.map +1 -1
  240. package/lib/cjs/request/utils.js +3 -4
  241. package/lib/cjs/request/utils.js.map +1 -1
  242. package/lib/cjs/tile/ClassifierTileTree.js +2 -2
  243. package/lib/cjs/tile/ClassifierTileTree.js.map +1 -1
  244. package/lib/cjs/tile/GltfReader.js +4 -4
  245. package/lib/cjs/tile/GltfReader.js.map +1 -1
  246. package/lib/cjs/tile/IModelTile.js +2 -2
  247. package/lib/cjs/tile/IModelTile.js.map +1 -1
  248. package/lib/cjs/tile/IModelTileTree.js +2 -2
  249. package/lib/cjs/tile/IModelTileTree.js.map +1 -1
  250. package/lib/cjs/tile/ImdlDecoder.js +1 -2
  251. package/lib/cjs/tile/ImdlDecoder.js.map +1 -1
  252. package/lib/cjs/tile/ImdlGraphicsCreator.js +3 -4
  253. package/lib/cjs/tile/ImdlGraphicsCreator.js.map +1 -1
  254. package/lib/cjs/tile/ImdlParser.js +1 -2
  255. package/lib/cjs/tile/ImdlParser.js.map +1 -1
  256. package/lib/cjs/tile/ImdlReader.js +3 -3
  257. package/lib/cjs/tile/ImdlReader.js.map +1 -1
  258. package/lib/cjs/tile/MeshoptCompression.js +1 -2
  259. package/lib/cjs/tile/MeshoptCompression.js.map +1 -1
  260. package/lib/cjs/tile/OrbitGtTileTree.js +2 -2
  261. package/lib/cjs/tile/OrbitGtTileTree.js.map +1 -1
  262. package/lib/cjs/tile/PntsReader.js +1 -2
  263. package/lib/cjs/tile/PntsReader.js.map +1 -1
  264. package/lib/cjs/tile/PrimaryTileTree.d.ts.map +1 -1
  265. package/lib/cjs/tile/PrimaryTileTree.js +6 -6
  266. package/lib/cjs/tile/PrimaryTileTree.js.map +1 -1
  267. package/lib/cjs/tile/RealityModelTileTree.js +2 -2
  268. package/lib/cjs/tile/RealityModelTileTree.js.map +1 -1
  269. package/lib/cjs/tile/RealityTileDrawArgs.d.ts.map +1 -1
  270. package/lib/cjs/tile/RealityTileLoader.d.ts.map +1 -1
  271. package/lib/cjs/tile/RealityTileTree.d.ts.map +1 -1
  272. package/lib/cjs/tile/RenderGraphicTileTree.js +1 -2
  273. package/lib/cjs/tile/RenderGraphicTileTree.js.map +1 -1
  274. package/lib/cjs/tile/ThreeDTileFormatInterpreter.js.map +1 -1
  275. package/lib/cjs/tile/Tile.js +2 -2
  276. package/lib/cjs/tile/Tile.js.map +1 -1
  277. package/lib/cjs/tile/TileAdmin.js +2 -2
  278. package/lib/cjs/tile/TileAdmin.js.map +1 -1
  279. package/lib/cjs/tile/TileRequestChannel.js +1 -1
  280. package/lib/cjs/tile/TileRequestChannel.js.map +1 -1
  281. package/lib/cjs/tile/ViewFlagOverrides.js +1 -2
  282. package/lib/cjs/tile/ViewFlagOverrides.js.map +1 -1
  283. package/lib/cjs/tile/map/CesiumTerrainProvider.js +4 -5
  284. package/lib/cjs/tile/map/CesiumTerrainProvider.js.map +1 -1
  285. package/lib/cjs/tile/map/ImageryProviders/CoordinatesUtils.js +1 -2
  286. package/lib/cjs/tile/map/ImageryProviders/CoordinatesUtils.js.map +1 -1
  287. package/lib/cjs/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
  288. package/lib/cjs/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
  289. package/lib/cjs/tile/map/MapLayerTileTreeReference.js +2 -2
  290. package/lib/cjs/tile/map/MapLayerTileTreeReference.js.map +1 -1
  291. package/lib/cjs/tile/map/MapTile.d.ts.map +1 -1
  292. package/lib/cjs/tile/map/MapTileTree.d.ts.map +1 -1
  293. package/lib/cjs/tile/map/MapTileTree.js +2 -2
  294. package/lib/cjs/tile/map/MapTileTree.js.map +1 -1
  295. package/lib/cjs/tile/map/UrlUtils.js +1 -2
  296. package/lib/cjs/tile/map/UrlUtils.js.map +1 -1
  297. package/lib/cjs/tile/map/WmsCapabilities.d.ts.map +1 -1
  298. package/lib/cjs/tools/ClipViewTool.d.ts.map +1 -1
  299. package/lib/cjs/tools/Tool.d.ts +1 -1
  300. package/lib/cjs/tools/Tool.d.ts.map +1 -1
  301. package/lib/cjs/tools/ViewTool.d.ts.map +1 -1
  302. package/lib/cjs/tools/ViewTool.js +2 -2
  303. package/lib/cjs/tools/ViewTool.js.map +1 -1
  304. package/lib/cjs/workers/RegisterWorker.js +1 -2
  305. package/lib/cjs/workers/RegisterWorker.js.map +1 -1
  306. package/lib/esm/AccuDraw.js +2 -2
  307. package/lib/esm/AccuDraw.js.map +1 -1
  308. package/lib/esm/AccuSnap.d.ts.map +1 -1
  309. package/lib/esm/AccuSnap.js +7 -2
  310. package/lib/esm/AccuSnap.js.map +1 -1
  311. package/lib/esm/BriefcaseConnection.d.ts.map +1 -1
  312. package/lib/esm/BriefcaseTxns.d.ts.map +1 -1
  313. package/lib/esm/DisplayStyleState.d.ts.map +1 -1
  314. package/lib/esm/DrawingViewState.d.ts +3 -3
  315. package/lib/esm/DrawingViewState.d.ts.map +1 -1
  316. package/lib/esm/DrawingViewState.js +9 -8
  317. package/lib/esm/DrawingViewState.js.map +1 -1
  318. package/lib/esm/GraphicalEditingScope.d.ts.map +1 -1
  319. package/lib/esm/HitDetail.d.ts +36 -7
  320. package/lib/esm/HitDetail.d.ts.map +1 -1
  321. package/lib/esm/HitDetail.js +11 -3
  322. package/lib/esm/HitDetail.js.map +1 -1
  323. package/lib/esm/IModelApp.d.ts.map +1 -1
  324. package/lib/esm/NoRenderApp.d.ts.map +1 -1
  325. package/lib/esm/NotificationManager.d.ts +2 -2
  326. package/lib/esm/NotificationManager.d.ts.map +1 -1
  327. package/lib/esm/SheetViewState.d.ts +3 -3
  328. package/lib/esm/SheetViewState.d.ts.map +1 -1
  329. package/lib/esm/SheetViewState.js +18 -5
  330. package/lib/esm/SheetViewState.js.map +1 -1
  331. package/lib/esm/ViewState.d.ts +16 -7
  332. package/lib/esm/ViewState.d.ts.map +1 -1
  333. package/lib/esm/ViewState.js +4 -4
  334. package/lib/esm/ViewState.js.map +1 -1
  335. package/lib/esm/Viewport.d.ts.map +1 -1
  336. package/lib/esm/Viewport.js +1 -0
  337. package/lib/esm/Viewport.js.map +1 -1
  338. package/lib/esm/common/internal/render/GeometryList.d.ts +1 -1
  339. package/lib/esm/quantity-formatting/BaseUnitFormattingSettingsProvider.d.ts.map +1 -1
  340. package/lib/esm/quantity-formatting/QuantityTypesEditorSpecs.d.ts.map +1 -1
  341. package/lib/esm/render/GraphicBranch.d.ts +3 -1
  342. package/lib/esm/render/GraphicBranch.d.ts.map +1 -1
  343. package/lib/esm/render/GraphicBranch.js.map +1 -1
  344. package/lib/esm/render/MockRender.d.ts.map +1 -1
  345. package/lib/esm/render/Pixel.d.ts +9 -7
  346. package/lib/esm/render/Pixel.d.ts.map +1 -1
  347. package/lib/esm/render/Pixel.js +20 -5
  348. package/lib/esm/render/Pixel.js.map +1 -1
  349. package/lib/esm/render/RenderSystem.d.ts.map +1 -1
  350. package/lib/esm/render/webgl/BranchState.d.ts +2 -0
  351. package/lib/esm/render/webgl/BranchState.d.ts.map +1 -1
  352. package/lib/esm/render/webgl/BranchState.js +2 -0
  353. package/lib/esm/render/webgl/BranchState.js.map +1 -1
  354. package/lib/esm/render/webgl/Graphic.d.ts +3 -0
  355. package/lib/esm/render/webgl/Graphic.d.ts.map +1 -1
  356. package/lib/esm/render/webgl/Graphic.js +4 -0
  357. package/lib/esm/render/webgl/Graphic.js.map +1 -1
  358. package/lib/esm/render/webgl/SceneCompositor.d.ts.map +1 -1
  359. package/lib/esm/render/webgl/SceneCompositor.js +4 -1
  360. package/lib/esm/render/webgl/SceneCompositor.js.map +1 -1
  361. package/lib/esm/render/webgl/System.d.ts.map +1 -1
  362. package/lib/esm/render/webgl/TechniqueFlags.d.ts.map +1 -1
  363. package/lib/esm/render/webgl/Texture.d.ts.map +1 -1
  364. package/lib/esm/request/Request.d.ts.map +1 -1
  365. package/lib/esm/tile/PrimaryTileTree.d.ts.map +1 -1
  366. package/lib/esm/tile/RealityTileDrawArgs.d.ts.map +1 -1
  367. package/lib/esm/tile/RealityTileLoader.d.ts.map +1 -1
  368. package/lib/esm/tile/RealityTileTree.d.ts.map +1 -1
  369. package/lib/esm/tile/ThreeDTileFormatInterpreter.js.map +1 -1
  370. package/lib/esm/tile/TileRequestChannel.js +1 -1
  371. package/lib/esm/tile/TileRequestChannel.js.map +1 -1
  372. package/lib/esm/tile/map/ImageryProviders/WmsMapLayerImageryProvider.js.map +1 -1
  373. package/lib/esm/tile/map/ImageryProviders/WmtsMapLayerImageryProvider.js.map +1 -1
  374. package/lib/esm/tile/map/MapTile.d.ts.map +1 -1
  375. package/lib/esm/tile/map/MapTileTree.d.ts.map +1 -1
  376. package/lib/esm/tile/map/WmsCapabilities.d.ts.map +1 -1
  377. package/lib/esm/tools/ClipViewTool.d.ts.map +1 -1
  378. package/lib/esm/tools/Tool.d.ts +1 -1
  379. package/lib/esm/tools/Tool.d.ts.map +1 -1
  380. package/lib/esm/tools/ViewTool.d.ts.map +1 -1
  381. package/lib/esm/tools/ViewTool.js +2 -2
  382. package/lib/esm/tools/ViewTool.js.map +1 -1
  383. package/lib/public/scripts/parse-imdl-worker.js +1 -1
  384. package/lib/workers/webpack/parse-imdl-worker.js +1 -1
  385. package/package.json +18 -18
@@ -1 +1 @@
1
- {"version":3,"file":"GraphicTemplate.js","sourceRoot":"","sources":["../../../src/render/GraphicTemplate.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,wDAAgG;AAiEhG;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,IAKrC;IACC,IAAI,cAAc,GAAG,IAAI,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,cAAc,GAAG,KAAK,CAAC;QACzB,CAAC;QAED,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACpC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC7B,cAAc,GAAG,KAAK,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,CAAC,mCAAyB,CAAC,EAAE,SAAS;QACtC,cAAc;QACd,CAAC,gBAAM,CAAC,EAAE,IAAI,CAAC,KAAK;QACpB,CAAC,gBAAM,CAAC,EAAE,IAAI,CAAC,KAAK;QACpB,CAAC,iBAAO,CAAC,EAAE,IAAI,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC;AA3BD,sDA2BC","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 { Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { _batch, _branch, _implementationProhibited, _nodes } from \"../common/internal/Symbols\";\r\nimport { RenderGeometry } from \"../internal/render/RenderGeometry\";\r\nimport { RenderFeatureTable, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { InstancedGraphicParams } from \"../common/render/InstancedGraphicParams\";\r\nimport { BatchOptions } from \"../common/render/BatchOptions\";\r\n\r\n/** @internal */\r\nexport interface GraphicTemplateNode {\r\n geometry: RenderGeometry[];\r\n /** For glTF models, the flattened transform of the scene graph node. */\r\n transform?: Transform;\r\n /** For glTF models, the instances associated with the scene graph node, or with the model as a whole. */\r\n instances?: InstancedGraphicParams;\r\n}\r\n\r\n/** Describes the collection of $[Feature]($common)s in a [[GraphicTemplate]].\r\n * If the template is used for instancing, the batch information in the [[RenderInstances]] overrides this.\r\n * @internal\r\n */\r\nexport interface GraphicTemplateBatch {\r\n readonly featureTable: RenderFeatureTable;\r\n readonly options?: BatchOptions;\r\n readonly range: Range3d;\r\n}\r\n\r\n/** Applies a transform and/or view flag overrides to all of the nodes in a [[GraphicTemplate]].\r\n * @internal\r\n */\r\nexport interface GraphicTemplateBranch {\r\n readonly transform?: Transform;\r\n readonly viewFlagOverrides?: ViewFlagOverrides;\r\n}\r\n\r\n/** A reusable representation of a [[RenderGraphic]].\r\n * You can use [[RenderSystem.createGraphicFromTemplate]] to produce a [[RenderGraphic]] from a template.\r\n * The template contains all of the WebGL resources required to render the graphics, so no matter how many times you use the template,\r\n * no additional GPU resources will be allocated.\r\n * The primary use for a template is [instanced rendering](https://webglfundamentals.org/webgl/lessons/webgl-instanced-drawing.html) - efficiently\r\n * drawing many repetitions of the same graphic with different positions, scales, rotations, and symbology.\r\n * Using instancing to draw 1 template N times is far more efficient than drawing N [[RenderGraphic]]s created from the same template.\r\n * You can instance a template by supplying a [[RenderInstances]] to [[RenderSystem.createGraphicFromTemplate]], unless [[isInstanceable]] is `false`.\r\n * @see [[GraphicBuilder.finishTemplate]] to create a template from a [[GraphicBuilder]].\r\n * @see [[RenderSystem.createTemplateFromDescription]] to create a template from a [[GraphicDescription]].\r\n * @see [[readGltfTemplate]] to create a template from a glTF model.\r\n * @beta\r\n */\r\nexport interface GraphicTemplate {\r\n /** @internal */\r\n readonly [_implementationProhibited]: unknown;\r\n\r\n /** Whether the graphics in this template can be instanced. Non-instanceable graphics include those produced from glTF models that already\r\n * contain instanced geometry and view-independent geometry created from a [[GraphicBuilder]].\r\n * [[RenderSystem.createGraphicFromTemplate]] will throw an error if you attempt to instance a non-instanceable template by supplying\r\n * [[CreateGraphicFromTemplateArgs.instances]].\r\n */\r\n readonly isInstanceable: boolean;\r\n\r\n /** @internal */\r\n readonly [_nodes]: GraphicTemplateNode[];\r\n /** @internal */\r\n readonly [_batch]?: GraphicTemplateBatch;\r\n /** @internal */\r\n readonly [_branch]?: GraphicTemplateBranch;\r\n}\r\n\r\n/** Create a GraphicTemplate.\r\n * If the caller specifies `noDispose` as `true`, every RenderGeometry in every node will be marked `noDispose`;\r\n * this permits the same template to be reused by multiple graphics. The garbage collector will reclaim its\r\n * WebGL resources and its `dispose` method will do nothing.\r\n * The `isInstancable` flag will be calculated from the nodes and their geometry.\r\n * @internal\r\n */\r\nexport function createGraphicTemplate(args: {\r\n nodes: GraphicTemplateNode[];\r\n batch?: GraphicTemplateBatch;\r\n noDispose: boolean;\r\n branch?: GraphicTemplateBranch;\r\n}): GraphicTemplate {\r\n let isInstanceable = true;\r\n for (const node of args.nodes) {\r\n if (node.instances) {\r\n isInstanceable = false;\r\n }\r\n\r\n for (const geometry of node.geometry) {\r\n geometry.noDispose = args.noDispose;\r\n if (!geometry.isInstanceable) {\r\n isInstanceable = false;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n [_implementationProhibited]: undefined,\r\n isInstanceable,\r\n [_nodes]: args.nodes,\r\n [_batch]: args.batch,\r\n [_branch]: args.branch,\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"GraphicTemplate.js","sourceRoot":"","sources":["../../../src/render/GraphicTemplate.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA2EH,sDA2BC;AAnGD,wDAAgG;AAiEhG;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,IAKrC;IACC,IAAI,cAAc,GAAG,IAAI,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,cAAc,GAAG,KAAK,CAAC;QACzB,CAAC;QAED,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;YACpC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAC7B,cAAc,GAAG,KAAK,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,CAAC,mCAAyB,CAAC,EAAE,SAAS;QACtC,cAAc;QACd,CAAC,gBAAM,CAAC,EAAE,IAAI,CAAC,KAAK;QACpB,CAAC,gBAAM,CAAC,EAAE,IAAI,CAAC,KAAK;QACpB,CAAC,iBAAO,CAAC,EAAE,IAAI,CAAC,MAAM;KACvB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { _batch, _branch, _implementationProhibited, _nodes } from \"../common/internal/Symbols\";\r\nimport { RenderGeometry } from \"../internal/render/RenderGeometry\";\r\nimport { RenderFeatureTable, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport { InstancedGraphicParams } from \"../common/render/InstancedGraphicParams\";\r\nimport { BatchOptions } from \"../common/render/BatchOptions\";\r\n\r\n/** @internal */\r\nexport interface GraphicTemplateNode {\r\n geometry: RenderGeometry[];\r\n /** For glTF models, the flattened transform of the scene graph node. */\r\n transform?: Transform;\r\n /** For glTF models, the instances associated with the scene graph node, or with the model as a whole. */\r\n instances?: InstancedGraphicParams;\r\n}\r\n\r\n/** Describes the collection of $[Feature]($common)s in a [[GraphicTemplate]].\r\n * If the template is used for instancing, the batch information in the [[RenderInstances]] overrides this.\r\n * @internal\r\n */\r\nexport interface GraphicTemplateBatch {\r\n readonly featureTable: RenderFeatureTable;\r\n readonly options?: BatchOptions;\r\n readonly range: Range3d;\r\n}\r\n\r\n/** Applies a transform and/or view flag overrides to all of the nodes in a [[GraphicTemplate]].\r\n * @internal\r\n */\r\nexport interface GraphicTemplateBranch {\r\n readonly transform?: Transform;\r\n readonly viewFlagOverrides?: ViewFlagOverrides;\r\n}\r\n\r\n/** A reusable representation of a [[RenderGraphic]].\r\n * You can use [[RenderSystem.createGraphicFromTemplate]] to produce a [[RenderGraphic]] from a template.\r\n * The template contains all of the WebGL resources required to render the graphics, so no matter how many times you use the template,\r\n * no additional GPU resources will be allocated.\r\n * The primary use for a template is [instanced rendering](https://webglfundamentals.org/webgl/lessons/webgl-instanced-drawing.html) - efficiently\r\n * drawing many repetitions of the same graphic with different positions, scales, rotations, and symbology.\r\n * Using instancing to draw 1 template N times is far more efficient than drawing N [[RenderGraphic]]s created from the same template.\r\n * You can instance a template by supplying a [[RenderInstances]] to [[RenderSystem.createGraphicFromTemplate]], unless [[isInstanceable]] is `false`.\r\n * @see [[GraphicBuilder.finishTemplate]] to create a template from a [[GraphicBuilder]].\r\n * @see [[RenderSystem.createTemplateFromDescription]] to create a template from a [[GraphicDescription]].\r\n * @see [[readGltfTemplate]] to create a template from a glTF model.\r\n * @beta\r\n */\r\nexport interface GraphicTemplate {\r\n /** @internal */\r\n readonly [_implementationProhibited]: unknown;\r\n\r\n /** Whether the graphics in this template can be instanced. Non-instanceable graphics include those produced from glTF models that already\r\n * contain instanced geometry and view-independent geometry created from a [[GraphicBuilder]].\r\n * [[RenderSystem.createGraphicFromTemplate]] will throw an error if you attempt to instance a non-instanceable template by supplying\r\n * [[CreateGraphicFromTemplateArgs.instances]].\r\n */\r\n readonly isInstanceable: boolean;\r\n\r\n /** @internal */\r\n readonly [_nodes]: GraphicTemplateNode[];\r\n /** @internal */\r\n readonly [_batch]?: GraphicTemplateBatch;\r\n /** @internal */\r\n readonly [_branch]?: GraphicTemplateBranch;\r\n}\r\n\r\n/** Create a GraphicTemplate.\r\n * If the caller specifies `noDispose` as `true`, every RenderGeometry in every node will be marked `noDispose`;\r\n * this permits the same template to be reused by multiple graphics. The garbage collector will reclaim its\r\n * WebGL resources and its `dispose` method will do nothing.\r\n * The `isInstancable` flag will be calculated from the nodes and their geometry.\r\n * @internal\r\n */\r\nexport function createGraphicTemplate(args: {\r\n nodes: GraphicTemplateNode[];\r\n batch?: GraphicTemplateBatch;\r\n noDispose: boolean;\r\n branch?: GraphicTemplateBranch;\r\n}): GraphicTemplate {\r\n let isInstanceable = true;\r\n for (const node of args.nodes) {\r\n if (node.instances) {\r\n isInstanceable = false;\r\n }\r\n\r\n for (const geometry of node.geometry) {\r\n geometry.noDispose = args.noDispose;\r\n if (!geometry.isInstanceable) {\r\n isInstanceable = false;\r\n }\r\n }\r\n }\r\n\r\n return {\r\n [_implementationProhibited]: undefined,\r\n isInstanceable,\r\n [_nodes]: args.nodes,\r\n [_batch]: args.batch,\r\n [_branch]: args.branch,\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MockRender.d.ts","sourceRoot":"","sources":["../../../src/render/MockRender.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAqB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAa,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAC9G,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE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OAAO,EAAE,cAAc;QACtD,gBAAgB;QACA,iBAAiB,CAAC,OAAO,EAAE,iBAAiB;QAC5D,gBAAgB;QACA,gBAAgB,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,gBAAgB;QACjE,mBAAmB;QAEnC,gBAAgB;QACA,kBAAkB;QAClC,gBAAgB;QACA,sBAAsB;QACtC,gBAAgB;QACA,yBAAyB;QACzC,gBAAgB;QACA,iBAAiB;QACjC,gBAAgB;QACA,yBAAyB;KAC1C;IAED,KAAY,aAAa,GAAG,MAAM,YAAY,CAAC;IAE/C,gFAAgF;IAChF,MAAa,GAAG;QACd,OAAc,aAAa,EAAE,aAAa,CAAyC;eAE/D,OAAO,CAAC,IAAI,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;eAO/C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;QAK7C,SAAS,CAAC,MAAM,CAAC,yBAAyB;KAC3C;CACF"}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { Id64String } from "@itwin/core-bentley";
5
5
  import { BatchType, Feature, GeometryClass, ModelFeature } from "@itwin/core-common";
6
- import { HitPriority, ViewAttachmentHitInfo } from "../HitDetail";
6
+ import { HitPath, HitPriority } from "../HitDetail";
7
7
  import { IModelConnection } from "../IModelConnection";
8
8
  import type { Viewport } from "../Viewport";
9
9
  import { Transform } from "@itwin/core-geometry";
@@ -32,12 +32,14 @@ export declare namespace Pixel {
32
32
  readonly transformFromIModel?: Transform;
33
33
  /** @internal */
34
34
  readonly tileId?: string;
35
- /** The Id of the "attached" view, if any, from which the pixel originated.
36
- * An attached view is a 2d view drawn into the context of another view - for example, a [[ViewAttachment]]($backend)
37
- * rendered into a [[SheetViewState]], or a [[SpatialViewState]] rendered by a [SectionDrawing]($backend) view.
35
+ /** The Id of the [ViewAttachment]($backend), if any, from which the pixel originated.
38
36
  * @beta
39
37
  */
40
38
  readonly viewAttachmentId?: Id64String;
39
+ /** True if the pixel originated from a [[SpatialViewState]] attached via a [SectionDrawing]($backend).
40
+ * @beta
41
+ */
42
+ readonly inSectionDrawingAttachment: boolean;
41
43
  /** @internal */
42
44
  get isClassifier(): boolean;
43
45
  /** @internal */
@@ -50,6 +52,7 @@ export declare namespace Pixel {
50
52
  iModel?: IModelConnection;
51
53
  tileId?: string;
52
54
  viewAttachmentId?: string;
55
+ inSectionDrawingAttachment?: boolean;
53
56
  transformFromIModel?: Transform;
54
57
  });
55
58
  /** The Id of the element that produced the pixel. */
@@ -105,11 +108,10 @@ export declare namespace Pixel {
105
108
  * @alpha
106
109
  */
107
110
  isClassifier?: boolean;
108
- /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.
109
- * @note Only [[SheetViewState]]s can have view attachments.
111
+ /** Path through which the hit was located.
110
112
  * @beta
111
113
  */
112
- viewAttachment?: ViewAttachmentHitInfo;
114
+ path?: HitPath;
113
115
  }
114
116
  /** Describes the type of geometry that produced the [[Pixel.Data]]. */
115
117
  enum GeometryType {
@@ -1 +1 @@
1
- {"version":3,"file":"Pixel.d.ts","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;;GAIG;AACH,yBAAiB,KAAK,CAAC;IACrB,0DAA0D;IAC1D,MAAa,IAAI;QACf,2CAA2C;QAC3C,SAAgB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClC,SAAgB,OAAO,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AAE,gBAAgB,CAAC;QAChC,gBAAgB;QAChB,yBAAyB,CAAC,EAAE,SAAS,CAAC;QACtC,sCAAsC;QACtC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;WAEG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB;IAED,uEAAuE;IACvE,KAAY,YAAY;QACtB,qGAAqG;QACrG,OAAO,IAAA,CAAE,6DAA6D;QACtE,8CAA8C;QAC9C,IAAI,IAAA;QACJ,qCAAqC;QACrC,OAAO,IAAA;QACP,yDAAyD;QACzD,MAAM,IAAA;QACN,uDAAuD;QACvD,IAAI,IAAA;QACJ,wEAAwE;QACxE,UAAU,IAAA;KACX;IAED,iFAAiF;IACjF,KAAY,SAAS;QACnB,0GAA0G;QAC1G,OAAO,IAAA;QACP,8CAA8C;QAC9C,IAAI,IAAA;QACJ,2CAA2C;QAC3C,MAAM,IAAA;QACN,+CAA+C;QAC/C,SAAS,IAAA;KACV;IAED;;;OAGG;IACH,KAAY,QAAQ;QAClB,IAAI,IAAI;QACR,wDAAwD;QACxD,OAAO,IAAS,CAAE,mDAAmD;QACrE,mJAAmJ;QACnJ,mBAAmB,IAAS;QAC5B,wCAAwC;QACxC,GAAG,IAAgC;KACpC;IAED;;;OAGG;IACH,UAAiB,MAAM;QACrB,gFAAgF;QAChF,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACtC;IAED;;OAEG;IACH,KAAY,QAAQ,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7D"}
@@ -35,6 +35,7 @@ var Pixel;
35
35
  this.iModel = args?.iModel;
36
36
  this.tileId = args?.tileId;
37
37
  this.viewAttachmentId = args?.viewAttachmentId;
38
+ this.inSectionDrawingAttachment = true === args?.inSectionDrawingAttachment;
38
39
  this.transformFromIModel = args?.transformFromIModel;
39
40
  }
40
41
  /** The Id of the element that produced the pixel. */
@@ -68,11 +69,25 @@ var Pixel;
68
69
  * @param viewport The viewport in which the hit originated.
69
70
  */
70
71
  toHitProps(viewport) {
71
- let viewAttachment;
72
+ let path;
72
73
  if (this.viewAttachmentId) {
73
- const attachmentViewport = viewport.view.getAttachmentViewport(this.viewAttachmentId);
74
- if (attachmentViewport)
75
- viewAttachment = { viewport: attachmentViewport, id: this.viewAttachmentId };
74
+ const attachmentViewport = viewport.view.getAttachmentViewport({ viewAttachmentId: this.viewAttachmentId });
75
+ if (attachmentViewport) {
76
+ path = {
77
+ viewAttachment: {
78
+ viewport: attachmentViewport,
79
+ id: this.viewAttachmentId,
80
+ },
81
+ };
82
+ }
83
+ }
84
+ if (this.inSectionDrawingAttachment) {
85
+ const checkVp = path?.viewAttachment?.viewport ?? viewport;
86
+ const attachVp = checkVp.view.getAttachmentViewport({ inSectionDrawingAttachment: true });
87
+ if (attachVp) {
88
+ path = path ?? {};
89
+ path.sectionDrawingAttachment = { viewport: attachVp };
90
+ }
76
91
  }
77
92
  return {
78
93
  sourceId: this.elementId ?? core_bentley_1.Id64.invalid,
@@ -85,7 +100,7 @@ var Pixel;
85
100
  isClassifier: this.isClassifier,
86
101
  sourceIModel: this.iModel,
87
102
  transformFromSourceIModel: this.transformFromIModel,
88
- viewAttachment,
103
+ path,
89
104
  };
90
105
  }
91
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAqF;AACrF,4CAAkE;AAKlE;;;;GAIG;AACH,IAAiB,KAAK,CAwNrB;AAxND,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QAwBf,gBAAgB;QAChB,IAAW,YAAY;YACrB,OAAO,SAAS,KAAK,IAAI,CAAC,SAAS,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,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YAAY,EAAE,IAAI,CAAC,MAAM;gBACzB,yBAAyB,EAAE,IAAI,CAAC,mBAAmB;gBACnD,cAAc;aACf,CAAC;QACJ,CAAC;KACF;IA9GY,UAAI,OA8GhB,CAAA;IAiDD,uEAAuE;IACvE,IAAY,YAaX;IAbD,WAAY,YAAY;QACtB,qGAAqG;QACrG,qDAAO,CAAA;QACP,8CAA8C;QAC9C,+CAAI,CAAA;QACJ,qCAAqC;QACrC,qDAAO,CAAA;QACP,yDAAyD;QACzD,mDAAM,CAAA;QACN,uDAAuD;QACvD,+CAAI,CAAA;QACJ,wEAAwE;QACxE,2DAAU,CAAA;IACZ,CAAC,EAbW,YAAY,GAAZ,kBAAY,KAAZ,kBAAY,QAavB;IAED,iFAAiF;IACjF,IAAY,SASX;IATD,WAAY,SAAS;QACnB,0GAA0G;QAC1G,+CAAO,CAAA;QACP,8CAA8C;QAC9C,yCAAI,CAAA;QACJ,2CAA2C;QAC3C,6CAAM,CAAA;QACN,+CAA+C;QAC/C,mDAAS,CAAA;IACX,CAAC,EATW,SAAS,GAAT,eAAS,KAAT,eAAS,QASpB;IAED;;;OAGG;IACH,IAAY,QAQX;IARD,WAAY,QAAQ;QAClB,uCAAQ,CAAA;QACR,wDAAwD;QACxD,6CAAgB,CAAA;QAChB,mJAAmJ;QACnJ,qEAA4B,CAAA;QAC5B,wCAAwC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EAxNgB,KAAK,qBAAL,KAAK,QAwNrB","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 { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, ModelFeature } from \"@itwin/core-common\";\r\nimport { HitPriority, ViewAttachmentHitInfo } from \"../HitDetail\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport type { Viewport } from \"../Viewport\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n public readonly modelId?: Id64String;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly batchType?: BatchType;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly transformFromIModel?: Transform;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** The Id of the \"attached\" view, if any, from which the pixel originated.\r\n * An attached view is a 2d view drawn into the context of another view - for example, a [[ViewAttachment]]($backend)\r\n * rendered into a [[SheetViewState]], or a [[SpatialViewState]] rendered by a [SectionDrawing]($backend) view.\r\n * @beta\r\n */\r\n public readonly viewAttachmentId?: Id64String;\r\n /** @internal */\r\n public get isClassifier(): boolean {\r\n return undefined !== this.batchType && BatchType.Primary !== this.batchType;\r\n }\r\n\r\n /** @internal */\r\n public constructor(args?: {\r\n feature?: ModelFeature;\r\n distanceFraction?: number;\r\n type?: GeometryType;\r\n planarity?: Planarity;\r\n batchType?: BatchType;\r\n iModel?: IModelConnection;\r\n tileId?: string;\r\n viewAttachmentId?: string;\r\n transformFromIModel?: Transform;\r\n }) {\r\n if (args?.feature)\r\n this.feature = new Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);\r\n\r\n this.modelId = args?.feature?.modelId;\r\n this.distanceFraction = args?.distanceFraction ?? -1;\r\n this.type = args?.type ?? GeometryType.Unknown;\r\n this.planarity = args?.planarity ?? Planarity.Unknown;\r\n this.iModel = args?.iModel;\r\n this.tileId = args?.tileId;\r\n this.viewAttachmentId = args?.viewAttachmentId;\r\n this.transformFromIModel = args?.transformFromIModel;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return this.feature?.elementId;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return this.feature?.subCategoryId;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return this.feature?.geometryClass;\r\n }\r\n\r\n /** Computes the [[HitPriority]] of this pixel based on its [[type]] and [[planarity]]. */\r\n public computeHitPriority(): HitPriority {\r\n switch (this.type) {\r\n case Pixel.GeometryType.Surface:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarSurface : HitPriority.NonPlanarSurface;\r\n case Pixel.GeometryType.Linear:\r\n return HitPriority.WireEdge;\r\n case Pixel.GeometryType.Edge:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarEdge : HitPriority.NonPlanarEdge;\r\n case Pixel.GeometryType.Silhouette:\r\n return HitPriority.SilhouetteEdge;\r\n default:\r\n return HitPriority.Unknown;\r\n }\r\n }\r\n\r\n /** Convert this pixel to a [[Pixel.HitProps]] suitable for constructing a [[HitDetail]].\r\n * @param viewport The viewport in which the hit originated.\r\n */\r\n public toHitProps(viewport: Viewport): Pixel.HitProps {\r\n let viewAttachment: ViewAttachmentHitInfo | undefined;\r\n if (this.viewAttachmentId) {\r\n const attachmentViewport = viewport.view.getAttachmentViewport(this.viewAttachmentId);\r\n if (attachmentViewport)\r\n viewAttachment = { viewport: attachmentViewport, id: this.viewAttachmentId };\r\n }\r\n\r\n return {\r\n sourceId: this.elementId ?? Id64.invalid,\r\n priority: this.computeHitPriority(),\r\n distFraction: this.distanceFraction,\r\n subCategoryId: this.subCategoryId,\r\n geometryClass: this.geometryClass,\r\n modelId: this.modelId,\r\n tileId: this.tileId,\r\n isClassifier: this.isClassifier,\r\n sourceIModel: this.iModel,\r\n transformFromSourceIModel: this.transformFromIModel,\r\n viewAttachment,\r\n };\r\n }\r\n }\r\n\r\n /** Describes a subset of [[HitDetailProps]] computed from a [[Pixel.Data]], suitable for constructing a [[HitDetail]].\r\n * For example, the following function creates a `HitDetail` from a `Pixel.Data` and other hit information:\r\n * ```ts\r\n * function makeHitDetail(pixel: Pixel.Data, viewport: ScreenViewport, testPoint: Point3d, hitSource: HitSource, hitPoint: Point3d, distXY: number): HitDetail {\r\n * return new HitDetail({\r\n * ...pixel.toHitProps(viewport),\r\n * viewport, testPoint, hitSource, hitPoint, distXY,\r\n * };\r\n * }\r\n * ```\r\n * @see [[Data.toHitProps]] to convert a [[Pixel.Data]] to a `HitProps`.\r\n * @public\r\n */\r\n export interface HitProps {\r\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\r\n sourceId: Id64String;\r\n /** The hit geometry priority/classification. */\r\n priority: HitPriority;\r\n /** The distance in view coordinates between the hit and the near plane. */\r\n distFraction: number;\r\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\r\n subCategoryId?: Id64String;\r\n /** The class of the hit geometry. */\r\n geometryClass?: GeometryClass;\r\n /** The Id of the [[ModelState]] from which the hit originated. */\r\n modelId?: Id64String;\r\n /** The IModelConnection from which the hit originated.\r\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\r\n * other than the one associated with the viewport.\r\n * @internal\r\n */\r\n sourceIModel?: IModelConnection;\r\n /** @internal */\r\n transformFromSourceIModel?: Transform;\r\n /** @internal chiefly for debugging */\r\n tileId?: string;\r\n /** True if the hit originated from a reality model classifier.\r\n * @alpha\r\n */\r\n isClassifier?: boolean;\r\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\r\n * @note Only [[SheetViewState]]s can have view attachments.\r\n * @beta\r\n */\r\n viewAttachment?: ViewAttachmentHitInfo;\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
1
+ {"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAqF;AACrF,4CAAoD;AAKpD;;;;GAIG;AACH,IAAiB,KAAK,CA0OrB;AA1OD,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QA0Bf,gBAAgB;QAChB,IAAW,YAAY;YACrB,OAAO,SAAS,KAAK,IAAI,CAAC,SAAS,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC;QAC9E,CAAC;QAED,gBAAgB;QAChB,YAAmB,IAWlB;YACC,IAAI,IAAI,EAAE,OAAO;gBACf,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;YAE7G,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;YACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,EAAE,gBAAgB,IAAI,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,IAAI,IAAI,YAAY,CAAC,OAAO,CAAC;YAC/C,IAAI,CAAC,SAAS,GAAG,IAAI,EAAE,SAAS,IAAI,SAAS,CAAC,OAAO,CAAC;YACtD,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC;YAC3B,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,CAAC;YAC3B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,UAAI,OAiIhB,CAAA;IAgDD,uEAAuE;IACvE,IAAY,YAaX;IAbD,WAAY,YAAY;QACtB,qGAAqG;QACrG,qDAAO,CAAA;QACP,8CAA8C;QAC9C,+CAAI,CAAA;QACJ,qCAAqC;QACrC,qDAAO,CAAA;QACP,yDAAyD;QACzD,mDAAM,CAAA;QACN,uDAAuD;QACvD,+CAAI,CAAA;QACJ,wEAAwE;QACxE,2DAAU,CAAA;IACZ,CAAC,EAbW,YAAY,GAAZ,kBAAY,KAAZ,kBAAY,QAavB;IAED,iFAAiF;IACjF,IAAY,SASX;IATD,WAAY,SAAS;QACnB,0GAA0G;QAC1G,+CAAO,CAAA;QACP,8CAA8C;QAC9C,yCAAI,CAAA;QACJ,2CAA2C;QAC3C,6CAAM,CAAA;QACN,+CAA+C;QAC/C,mDAAS,CAAA;IACX,CAAC,EATW,SAAS,GAAT,eAAS,KAAT,eAAS,QASpB;IAED;;;OAGG;IACH,IAAY,QAQX;IARD,WAAY,QAAQ;QAClB,uCAAQ,CAAA;QACR,wDAAwD;QACxD,6CAAgB,CAAA;QAChB,mJAAmJ;QACnJ,qEAA4B,CAAA;QAC5B,wCAAwC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EA1OgB,KAAK,qBAAL,KAAK,QA0OrB","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 { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, ModelFeature } from \"@itwin/core-common\";\r\nimport { HitPath, HitPriority } from \"../HitDetail\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport type { Viewport } from \"../Viewport\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n public readonly modelId?: Id64String;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly batchType?: BatchType;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly transformFromIModel?: Transform;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** The Id of the [ViewAttachment]($backend), if any, from which the pixel originated.\r\n * @beta\r\n */\r\n public readonly viewAttachmentId?: Id64String;\r\n /** True if the pixel originated from a [[SpatialViewState]] attached via a [SectionDrawing]($backend).\r\n * @beta\r\n */\r\n public readonly inSectionDrawingAttachment: boolean;\r\n /** @internal */\r\n public get isClassifier(): boolean {\r\n return undefined !== this.batchType && BatchType.Primary !== this.batchType;\r\n }\r\n\r\n /** @internal */\r\n public constructor(args?: {\r\n feature?: ModelFeature;\r\n distanceFraction?: number;\r\n type?: GeometryType;\r\n planarity?: Planarity;\r\n batchType?: BatchType;\r\n iModel?: IModelConnection;\r\n tileId?: string;\r\n viewAttachmentId?: string;\r\n inSectionDrawingAttachment?: boolean;\r\n transformFromIModel?: Transform;\r\n }) {\r\n if (args?.feature)\r\n this.feature = new Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);\r\n\r\n this.modelId = args?.feature?.modelId;\r\n this.distanceFraction = args?.distanceFraction ?? -1;\r\n this.type = args?.type ?? GeometryType.Unknown;\r\n this.planarity = args?.planarity ?? Planarity.Unknown;\r\n this.iModel = args?.iModel;\r\n this.tileId = args?.tileId;\r\n this.viewAttachmentId = args?.viewAttachmentId;\r\n this.inSectionDrawingAttachment = true === args?.inSectionDrawingAttachment;\r\n this.transformFromIModel = args?.transformFromIModel;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return this.feature?.elementId;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return this.feature?.subCategoryId;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return this.feature?.geometryClass;\r\n }\r\n\r\n /** Computes the [[HitPriority]] of this pixel based on its [[type]] and [[planarity]]. */\r\n public computeHitPriority(): HitPriority {\r\n switch (this.type) {\r\n case Pixel.GeometryType.Surface:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarSurface : HitPriority.NonPlanarSurface;\r\n case Pixel.GeometryType.Linear:\r\n return HitPriority.WireEdge;\r\n case Pixel.GeometryType.Edge:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarEdge : HitPriority.NonPlanarEdge;\r\n case Pixel.GeometryType.Silhouette:\r\n return HitPriority.SilhouetteEdge;\r\n default:\r\n return HitPriority.Unknown;\r\n }\r\n }\r\n\r\n /** Convert this pixel to a [[Pixel.HitProps]] suitable for constructing a [[HitDetail]].\r\n * @param viewport The viewport in which the hit originated.\r\n */\r\n public toHitProps(viewport: Viewport): Pixel.HitProps {\r\n let path: HitPath | undefined;\r\n if (this.viewAttachmentId) {\r\n const attachmentViewport = viewport.view.getAttachmentViewport({ viewAttachmentId: this.viewAttachmentId });\r\n if (attachmentViewport) {\r\n path = {\r\n viewAttachment: {\r\n viewport: attachmentViewport,\r\n id: this.viewAttachmentId,\r\n },\r\n };\r\n }\r\n }\r\n\r\n if (this.inSectionDrawingAttachment) {\r\n const checkVp = path?.viewAttachment?.viewport ?? viewport;\r\n const attachVp = checkVp.view.getAttachmentViewport({ inSectionDrawingAttachment: true });\r\n if (attachVp) {\r\n path = path ?? { };\r\n path.sectionDrawingAttachment = { viewport: attachVp };\r\n }\r\n }\r\n\r\n return {\r\n sourceId: this.elementId ?? Id64.invalid,\r\n priority: this.computeHitPriority(),\r\n distFraction: this.distanceFraction,\r\n subCategoryId: this.subCategoryId,\r\n geometryClass: this.geometryClass,\r\n modelId: this.modelId,\r\n tileId: this.tileId,\r\n isClassifier: this.isClassifier,\r\n sourceIModel: this.iModel,\r\n transformFromSourceIModel: this.transformFromIModel,\r\n path,\r\n };\r\n }\r\n }\r\n\r\n /** Describes a subset of [[HitDetailProps]] computed from a [[Pixel.Data]], suitable for constructing a [[HitDetail]].\r\n * For example, the following function creates a `HitDetail` from a `Pixel.Data` and other hit information:\r\n * ```ts\r\n * function makeHitDetail(pixel: Pixel.Data, viewport: ScreenViewport, testPoint: Point3d, hitSource: HitSource, hitPoint: Point3d, distXY: number): HitDetail {\r\n * return new HitDetail({\r\n * ...pixel.toHitProps(viewport),\r\n * viewport, testPoint, hitSource, hitPoint, distXY,\r\n * };\r\n * }\r\n * ```\r\n * @see [[Data.toHitProps]] to convert a [[Pixel.Data]] to a `HitProps`.\r\n * @public\r\n */\r\n export interface HitProps {\r\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\r\n sourceId: Id64String;\r\n /** The hit geometry priority/classification. */\r\n priority: HitPriority;\r\n /** The distance in view coordinates between the hit and the near plane. */\r\n distFraction: number;\r\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\r\n subCategoryId?: Id64String;\r\n /** The class of the hit geometry. */\r\n geometryClass?: GeometryClass;\r\n /** The Id of the [[ModelState]] from which the hit originated. */\r\n modelId?: Id64String;\r\n /** The IModelConnection from which the hit originated.\r\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\r\n * other than the one associated with the viewport.\r\n * @internal\r\n */\r\n sourceIModel?: IModelConnection;\r\n /** @internal */\r\n transformFromSourceIModel?: Transform;\r\n /** @internal chiefly for debugging */\r\n tileId?: string;\r\n /** True if the hit originated from a reality model classifier.\r\n * @alpha\r\n */\r\n isClassifier?: boolean;\r\n /** Path through which the hit was located.\r\n * @beta\r\n */\r\n path?: HitPath;\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
@@ -7,7 +7,9 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.createRenderPlanFromViewport = exports.createEmptyRenderPlan = exports.RenderPlanEllipsoid = void 0;
10
+ exports.RenderPlanEllipsoid = void 0;
11
+ exports.createEmptyRenderPlan = createEmptyRenderPlan;
12
+ exports.createRenderPlanFromViewport = createRenderPlanFromViewport;
11
13
  const core_common_1 = require("@itwin/core-common");
12
14
  const core_geometry_1 = require("@itwin/core-geometry");
13
15
  const FlashSettings_1 = require("../FlashSettings");
@@ -56,7 +58,6 @@ function createEmptyRenderPlan() {
56
58
  whiteOnWhiteReversal: core_common_1.WhiteOnWhiteReversalSettings.fromJSON(),
57
59
  };
58
60
  }
59
- exports.createEmptyRenderPlan = createEmptyRenderPlan;
60
61
  /** @internal */
61
62
  function createRenderPlanFromViewport(vp) {
62
63
  const view = vp.view;
@@ -133,5 +134,4 @@ function createRenderPlanFromViewport(vp) {
133
134
  ellipsoid,
134
135
  };
135
136
  }
136
- exports.createRenderPlanFromViewport = createRenderPlanFromViewport;
137
137
  //# sourceMappingURL=RenderPlan.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RenderPlan.js","sourceRoot":"","sources":["../../../src/render/RenderPlan.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAG4B;AAC5B,wDAAyF;AACzF,oDAAiD;AAIjD,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AACrC,MAAM,cAAc,GAAG,IAAI,uB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AC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,CACrI,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI;QACJ,SAAS;QACT,OAAO;QACP,SAAS;QACT,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,IAAI;QACJ,SAAS;QACT,KAAK;QACL,aAAa;QACb,EAAE;QACF,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,eAAe;QACf,eAAe;QACf,OAAO;QACP,QAAQ;QACR,oBAAoB;QACpB,aAAa;QACb,eAAe;QACf,QAAQ;QACR,MAAM;QACN,oBAAoB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB;QACnE,SAAS;KACV,CAAC;AACJ,CAAC;AAtFD,oEAsFC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n AmbientOcclusion, AnalysisStyle, Atmosphere, ClipStyle, ColorDef, ContourDisplay, Frustum, GlobeMode, HiddenLine, Hilite, LightSettings, MonochromeMode, Npc,\r\n RenderTexture, ThematicDisplay, ViewFlags, WhiteOnWhiteReversalSettings,\r\n} from \"@itwin/core-common\";\r\nimport { ClipVector, Constant, Matrix3d, Point3d, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FlashSettings } from \"../FlashSettings\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { ViewState3d } from \"../ViewState\";\r\n\r\nconst scratchPoint3a = new Point3d();\r\nconst scratchPoint3b = new Point3d();\r\nconst scratchPoint3c = new Point3d();\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class RenderPlanEllipsoid {\r\n public readonly ellipsoidCenter: Point3d;\r\n public readonly ellipsoidRotation: Matrix3d;\r\n public readonly ellipsoidRadii: Point3d;\r\n\r\n constructor(ellipsoidCenter: Point3d, ellipsoidRotation: Matrix3d, ellipsoidRadii: Point3d) {\r\n this.ellipsoidCenter = ellipsoidCenter;\r\n this.ellipsoidRotation = ellipsoidRotation;\r\n this.ellipsoidRadii = ellipsoidRadii;\r\n }\r\n\r\n public equals(other: RenderPlanEllipsoid): boolean {\r\n if (this.ellipsoidCenter.isAlmostEqual(other.ellipsoidCenter))\r\n return false;\r\n if (this.ellipsoidRotation.isAlmostEqual(other.ellipsoidRotation))\r\n return false;\r\n if (this.ellipsoidRadii.isAlmostEqual(other.ellipsoidRadii))\r\n return false;\r\n return true;\r\n }\r\n}\r\n\r\n/** A RenderPlan holds a Frustum and the render settings for displaying a RenderScene into a RenderTarget.\r\n * @internal\r\n */\r\nexport interface RenderPlan {\r\n readonly is3d: boolean;\r\n readonly viewFlags: ViewFlags;\r\n readonly bgColor: ColorDef;\r\n readonly monoColor: ColorDef;\r\n readonly monochromeMode: MonochromeMode;\r\n readonly hiliteSettings: Hilite.Settings;\r\n readonly emphasisSettings: Hilite.Settings;\r\n readonly flashSettings: FlashSettings;\r\n readonly clip?: ClipVector;\r\n readonly clipStyle: ClipStyle;\r\n readonly hline?: HiddenLine.Settings;\r\n readonly analysisStyle?: AnalysisStyle;\r\n readonly ao?: AmbientOcclusion.Settings;\r\n readonly thematic?: ThematicDisplay;\r\n readonly contours?: ContourDisplay;\r\n readonly atmosphere?: Atmosphere.Settings;\r\n readonly isFadeOutActive: boolean;\r\n readonly analysisTexture?: RenderTexture;\r\n readonly frustum: Frustum;\r\n readonly fraction: number;\r\n readonly globalViewTransition: number;\r\n readonly isGlobeMode3D: boolean;\r\n readonly backgroundMapOn: boolean;\r\n readonly upVector: Vector3d;\r\n readonly lights?: LightSettings;\r\n readonly whiteOnWhiteReversal: WhiteOnWhiteReversalSettings;\r\n readonly ellipsoid?: RenderPlanEllipsoid;\r\n}\r\n\r\n/** @internal */\r\nexport function createEmptyRenderPlan(): RenderPlan {\r\n return {\r\n is3d: true,\r\n viewFlags: new ViewFlags(),\r\n bgColor: ColorDef.white,\r\n monoColor: ColorDef.white,\r\n monochromeMode: MonochromeMode.Scaled,\r\n hiliteSettings: new Hilite.Settings(),\r\n emphasisSettings: new Hilite.Settings(),\r\n flashSettings: new FlashSettings(),\r\n clipStyle: ClipStyle.defaults,\r\n frustum: new Frustum(),\r\n fraction: 0,\r\n isFadeOutActive: false,\r\n globalViewTransition: 0,\r\n isGlobeMode3D: false,\r\n backgroundMapOn: false,\r\n upVector: Vector3d.unitZ(),\r\n whiteOnWhiteReversal: WhiteOnWhiteReversalSettings.fromJSON(),\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport function createRenderPlanFromViewport(vp: Viewport): RenderPlan {\r\n const view = vp.view;\r\n const style = view.displayStyle;\r\n\r\n const is3d = view.is3d();\r\n\r\n const globalViewTransition = view.is3d() ? view.globalViewTransition() : 0.0;\r\n const isGlobeMode3D = GlobeMode.Ellipsoid === view.globeMode;\r\n const backgroundMapOn = view.displayStyle.viewFlags.backgroundMap;\r\n const frustum = vp.viewingSpace.getFrustum();\r\n const fraction = vp.viewingSpace.frustFraction;\r\n const viewFlags = style.viewFlags;\r\n\r\n const bgColor = view.backgroundColor;\r\n const monoColor = style.monochromeColor;\r\n const monochromeMode = style.settings.monochromeMode;\r\n\r\n const hiliteSettings = vp.hilite;\r\n const emphasisSettings = vp.emphasisSettings;\r\n const flashSettings = vp.flashSettings;\r\n const lights = vp.lightSettings;\r\n\r\n const isFadeOutActive = vp.isFadeOutActive;\r\n const clip = view.getViewClip();\r\n const clipStyle = view.displayStyle.settings.clipStyle;\r\n const hline = style.is3d() ? style.settings.hiddenLineSettings : undefined;\r\n const ao = style.is3d() ? style.settings.ambientOcclusionSettings : undefined;\r\n const analysisStyle = style.settings.analysisStyle;\r\n const thematic = (style.is3d() && view.displayStyle.viewFlags.thematicDisplay) ? style.settings.thematic : undefined;\r\n const contours = (style.is3d() && style.settings.contours.groups.length > 0) ? style.settings.contours : undefined;\r\n const shouldDisplayAtmosphere = (style.is3d() && GlobeMode.Ellipsoid === view.globeMode && vp.iModel.isGeoLocated && style.viewFlags.backgroundMap) ? (vp.view as ViewState3d).getDisplayStyle3d().environment.displayAtmosphere : false;\r\n const atmosphere = shouldDisplayAtmosphere ? (vp.view as ViewState3d).getDisplayStyle3d().environment.atmosphere : undefined;\r\n\r\n let upVector;\r\n if (GlobeMode.Ellipsoid === view.globeMode) {\r\n const lb = frustum.getCorner(Npc.LeftBottomRear).interpolate(0.5, frustum.getCorner(Npc.LeftBottomFront), scratchPoint3a);\r\n const rt = frustum.getCorner(Npc.RightTopRear).interpolate(0.5, frustum.getCorner(Npc.RightTopFront), scratchPoint3b);\r\n const cntr = lb.interpolate(0.5, rt, scratchPoint3c);\r\n upVector = view.getUpVector(cntr);\r\n } else {\r\n upVector = Vector3d.unitZ();\r\n }\r\n\r\n let analysisTexture;\r\n if (analysisStyle?.thematic)\r\n analysisTexture = vp.target.renderSystem.getGradientTexture(analysisStyle.thematic.gradient, vp.iModel);\r\n\r\n let ellipsoid: RenderPlanEllipsoid | undefined;\r\n if (GlobeMode.Ellipsoid === view.globeMode) {\r\n const mapEcefToDb = view.iModel.getMapEcefToDb(0);\r\n ellipsoid = new RenderPlanEllipsoid(\r\n Point3d.fromJSON(mapEcefToDb.origin),\r\n mapEcefToDb.matrix,\r\n Point3d.fromJSON({ x: Constant.earthRadiusWGS84.equator, y: Constant.earthRadiusWGS84.equator, z: Constant.earthRadiusWGS84.polar }),\r\n );\r\n }\r\n\r\n return {\r\n is3d,\r\n viewFlags,\r\n bgColor,\r\n monoColor,\r\n monochromeMode,\r\n hiliteSettings,\r\n emphasisSettings,\r\n flashSettings,\r\n clip,\r\n clipStyle,\r\n hline,\r\n analysisStyle,\r\n ao,\r\n thematic,\r\n contours,\r\n atmosphere,\r\n isFadeOutActive,\r\n analysisTexture,\r\n frustum,\r\n fraction,\r\n globalViewTransition,\r\n isGlobeMode3D,\r\n backgroundMapOn,\r\n upVector,\r\n lights,\r\n whiteOnWhiteReversal: vp.displayStyle.settings.whiteOnWhiteReversal,\r\n ellipsoid,\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderPlan.js","sourceRoot":"","sources":["../../../src/render/RenderPlan.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA0EH,sDAoBC;AAGD,oEAsFC;AArLD,oDAG4B;AAC5B,wDAAyF;AACzF,oDAAiD;AAIjD,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AACrC,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AACrC,MAAM,cAAc,GAAG,IAAI,uBAAO,EAAE,CAAC;AAErC;;GAEG;AACH,MAAa,mBAAmB;IAK9B,YAAY,eAAwB,EAAE,iBAA2B,EAAE,cAAuB;QACxF,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAEM,MAAM,CAAC,KAA0B;QACtC,IAAI,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,CAAC,eAAe,CAAC;YAC3D,OAAO,KAAK,CAAC;QACf,IAAI,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,KAAK,CAAC,iBAAiB,CAAC;YAC/D,OAAO,KAAK,CAAC;QACf,IAAI,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC;YACzD,OAAO,KAAK,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApBD,kDAoBC;AAmCD,gBAAgB;AAChB,SAAgB,qBAAqB;IACnC,OAAO;QACL,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,IAAI,uBAAS,EA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G,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,kBAAkB,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAE1G,IAAI,SAA0C,CAAC;IAC/C,IAAI,uBAAS,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;QAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAClD,SAAS,GAAG,IAAI,mBAAmB,CACjC,uBAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,EACpC,WAAW,CAAC,MAAM,EAClB,uBAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,CACrI,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI;QACJ,SAAS;QACT,OAAO;QACP,SAAS;QACT,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,IAAI;QACJ,SAAS;QACT,KAAK;QACL,aAAa;QACb,EAAE;QACF,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,eAAe;QACf,eAAe;QACf,OAAO;QACP,QAAQ;QACR,oBAAoB;QACpB,aAAa;QACb,eAAe;QACf,QAAQ;QACR,MAAM;QACN,oBAAoB,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB;QACnE,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n AmbientOcclusion, AnalysisStyle, Atmosphere, ClipStyle, ColorDef, ContourDisplay, Frustum, GlobeMode, HiddenLine, Hilite, LightSettings, MonochromeMode, Npc,\r\n RenderTexture, ThematicDisplay, ViewFlags, WhiteOnWhiteReversalSettings,\r\n} from \"@itwin/core-common\";\r\nimport { ClipVector, Constant, Matrix3d, Point3d, Vector3d } from \"@itwin/core-geometry\";\r\nimport { FlashSettings } from \"../FlashSettings\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { ViewState3d } from \"../ViewState\";\r\n\r\nconst scratchPoint3a = new Point3d();\r\nconst scratchPoint3b = new Point3d();\r\nconst scratchPoint3c = new Point3d();\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class RenderPlanEllipsoid {\r\n public readonly ellipsoidCenter: Point3d;\r\n public readonly ellipsoidRotation: Matrix3d;\r\n public readonly ellipsoidRadii: Point3d;\r\n\r\n constructor(ellipsoidCenter: Point3d, ellipsoidRotation: Matrix3d, ellipsoidRadii: Point3d) {\r\n this.ellipsoidCenter = ellipsoidCenter;\r\n this.ellipsoidRotation = ellipsoidRotation;\r\n this.ellipsoidRadii = ellipsoidRadii;\r\n }\r\n\r\n public equals(other: RenderPlanEllipsoid): boolean {\r\n if (this.ellipsoidCenter.isAlmostEqual(other.ellipsoidCenter))\r\n return false;\r\n if (this.ellipsoidRotation.isAlmostEqual(other.ellipsoidRotation))\r\n return false;\r\n if (this.ellipsoidRadii.isAlmostEqual(other.ellipsoidRadii))\r\n return false;\r\n return true;\r\n }\r\n}\r\n\r\n/** A RenderPlan holds a Frustum and the render settings for displaying a RenderScene into a RenderTarget.\r\n * @internal\r\n */\r\nexport interface RenderPlan {\r\n readonly is3d: boolean;\r\n readonly viewFlags: ViewFlags;\r\n readonly bgColor: ColorDef;\r\n readonly monoColor: ColorDef;\r\n readonly monochromeMode: MonochromeMode;\r\n readonly hiliteSettings: Hilite.Settings;\r\n readonly emphasisSettings: Hilite.Settings;\r\n readonly flashSettings: FlashSettings;\r\n readonly clip?: ClipVector;\r\n readonly clipStyle: ClipStyle;\r\n readonly hline?: HiddenLine.Settings;\r\n readonly analysisStyle?: AnalysisStyle;\r\n readonly ao?: AmbientOcclusion.Settings;\r\n readonly thematic?: ThematicDisplay;\r\n readonly contours?: ContourDisplay;\r\n readonly atmosphere?: Atmosphere.Settings;\r\n readonly isFadeOutActive: boolean;\r\n readonly analysisTexture?: RenderTexture;\r\n readonly frustum: Frustum;\r\n readonly fraction: number;\r\n readonly globalViewTransition: number;\r\n readonly isGlobeMode3D: boolean;\r\n readonly backgroundMapOn: boolean;\r\n readonly upVector: Vector3d;\r\n readonly lights?: LightSettings;\r\n readonly whiteOnWhiteReversal: WhiteOnWhiteReversalSettings;\r\n readonly ellipsoid?: RenderPlanEllipsoid;\r\n}\r\n\r\n/** @internal */\r\nexport function createEmptyRenderPlan(): RenderPlan {\r\n return {\r\n is3d: true,\r\n viewFlags: new ViewFlags(),\r\n bgColor: ColorDef.white,\r\n monoColor: ColorDef.white,\r\n monochromeMode: MonochromeMode.Scaled,\r\n hiliteSettings: new Hilite.Settings(),\r\n emphasisSettings: new Hilite.Settings(),\r\n flashSettings: new FlashSettings(),\r\n clipStyle: ClipStyle.defaults,\r\n frustum: new Frustum(),\r\n fraction: 0,\r\n isFadeOutActive: false,\r\n globalViewTransition: 0,\r\n isGlobeMode3D: false,\r\n backgroundMapOn: false,\r\n upVector: Vector3d.unitZ(),\r\n whiteOnWhiteReversal: WhiteOnWhiteReversalSettings.fromJSON(),\r\n };\r\n}\r\n\r\n/** @internal */\r\nexport function createRenderPlanFromViewport(vp: Viewport): RenderPlan {\r\n const view = vp.view;\r\n const style = view.displayStyle;\r\n\r\n const is3d = view.is3d();\r\n\r\n const globalViewTransition = view.is3d() ? view.globalViewTransition() : 0.0;\r\n const isGlobeMode3D = GlobeMode.Ellipsoid === view.globeMode;\r\n const backgroundMapOn = view.displayStyle.viewFlags.backgroundMap;\r\n const frustum = vp.viewingSpace.getFrustum();\r\n const fraction = vp.viewingSpace.frustFraction;\r\n const viewFlags = style.viewFlags;\r\n\r\n const bgColor = view.backgroundColor;\r\n const monoColor = style.monochromeColor;\r\n const monochromeMode = style.settings.monochromeMode;\r\n\r\n const hiliteSettings = vp.hilite;\r\n const emphasisSettings = vp.emphasisSettings;\r\n const flashSettings = vp.flashSettings;\r\n const lights = vp.lightSettings;\r\n\r\n const isFadeOutActive = vp.isFadeOutActive;\r\n const clip = view.getViewClip();\r\n const clipStyle = view.displayStyle.settings.clipStyle;\r\n const hline = style.is3d() ? style.settings.hiddenLineSettings : undefined;\r\n const ao = style.is3d() ? style.settings.ambientOcclusionSettings : undefined;\r\n const analysisStyle = style.settings.analysisStyle;\r\n const thematic = (style.is3d() && view.displayStyle.viewFlags.thematicDisplay) ? style.settings.thematic : undefined;\r\n const contours = (style.is3d() && style.settings.contours.groups.length > 0) ? style.settings.contours : undefined;\r\n const shouldDisplayAtmosphere = (style.is3d() && GlobeMode.Ellipsoid === view.globeMode && vp.iModel.isGeoLocated && style.viewFlags.backgroundMap) ? (vp.view as ViewState3d).getDisplayStyle3d().environment.displayAtmosphere : false;\r\n const atmosphere = shouldDisplayAtmosphere ? (vp.view as ViewState3d).getDisplayStyle3d().environment.atmosphere : undefined;\r\n\r\n let upVector;\r\n if (GlobeMode.Ellipsoid === view.globeMode) {\r\n const lb = frustum.getCorner(Npc.LeftBottomRear).interpolate(0.5, frustum.getCorner(Npc.LeftBottomFront), scratchPoint3a);\r\n const rt = frustum.getCorner(Npc.RightTopRear).interpolate(0.5, frustum.getCorner(Npc.RightTopFront), scratchPoint3b);\r\n const cntr = lb.interpolate(0.5, rt, scratchPoint3c);\r\n upVector = view.getUpVector(cntr);\r\n } else {\r\n upVector = Vector3d.unitZ();\r\n }\r\n\r\n let analysisTexture;\r\n if (analysisStyle?.thematic)\r\n analysisTexture = vp.target.renderSystem.getGradientTexture(analysisStyle.thematic.gradient, vp.iModel);\r\n\r\n let ellipsoid: RenderPlanEllipsoid | undefined;\r\n if (GlobeMode.Ellipsoid === view.globeMode) {\r\n const mapEcefToDb = view.iModel.getMapEcefToDb(0);\r\n ellipsoid = new RenderPlanEllipsoid(\r\n Point3d.fromJSON(mapEcefToDb.origin),\r\n mapEcefToDb.matrix,\r\n Point3d.fromJSON({ x: Constant.earthRadiusWGS84.equator, y: Constant.earthRadiusWGS84.equator, z: Constant.earthRadiusWGS84.polar }),\r\n );\r\n }\r\n\r\n return {\r\n is3d,\r\n viewFlags,\r\n bgColor,\r\n monoColor,\r\n monochromeMode,\r\n hiliteSettings,\r\n emphasisSettings,\r\n flashSettings,\r\n clip,\r\n clipStyle,\r\n hline,\r\n analysisStyle,\r\n ao,\r\n thematic,\r\n contours,\r\n atmosphere,\r\n isFadeOutActive,\r\n analysisTexture,\r\n frustum,\r\n fraction,\r\n globalViewTransition,\r\n isGlobeMode3D,\r\n backgroundMapOn,\r\n upVector,\r\n lights,\r\n whiteOnWhiteReversal: vp.displayStyle.settings.whiteOnWhiteReversal,\r\n ellipsoid,\r\n };\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderSystem.d.ts","sourceRoot":"","sources":["../../../src/render/RenderSystem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA4B,UAAU,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACL,QAAQ,EAAc,mBAAmB,EAA6C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAqB,WAAW,EAAE,iBAAiB,EAC7I,kBAAkB,EAA2B,kBAAkB,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EACtI,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAW,OAAO,EAAE,OAAO,EAAW,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpI,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,q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CAAgC,GAAG,eAAe;IAI7F;;OAEG;IACI,0CAA0C,CAAC,MAAM,EAAE,gBAAgB,GAAG,oCAAoC;IAajH;;OAEG;IACU,gCAAgC,CAAC,KAAK,EAAE,8BAA8B,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAwDnJ;AAED;;;;;GAKG;AACH,yBAAiB,YAAY,CAAC;IAC5B;;;OAGG;IACH,UAAiB,OAAO;QACtB;;;;;;WAMG;QACH,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAE1C;;;;;WAKG;QACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;QAEnC;;;;;WAKG;QACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAE9B;;;;;WAKG;QACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;QAEjC;;;;;;;;WAQG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAE5B;;;;;;;;;WASG;QACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;QAElC;;;;;;;;WAQG;QACH,WAAW,CAAC,EAAE,OAAO,CAAC;QAEtB;;;;WAIG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,eAAe,CAAC,EAAE,OAAO,CAAC;QAE1B;;;;;;;;;WASG;QACH,UAAU,CAAC,EAAE,OAAO,CAAC;QAErB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;QAE3C;;;WAGG;QACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAEhC;;;;WAIG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB;;;;WAIG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B;CACF"}
@@ -7,7 +7,7 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.upsampleRealityMeshParams = void 0;
10
+ exports.upsampleRealityMeshParams = upsampleRealityMeshParams;
11
11
  const core_geometry_1 = require("@itwin/core-geometry");
12
12
  const core_common_1 = require("@itwin/core-common");
13
13
  const RealityMeshParams_1 = require("./RealityMeshParams");
@@ -108,7 +108,6 @@ function upsampleRealityMeshParams(params, uvSampleRange) {
108
108
  heightRange: core_geometry_1.Range1d.createXX(core_common_1.Quantization.unquantize(zRange.low, qParams.origin.z, qParams.scale.z), core_common_1.Quantization.unquantize(zRange.high, qParams.origin.z, qParams.scale.z)),
109
109
  };
110
110
  }
111
- exports.upsampleRealityMeshParams = upsampleRealityMeshParams;
112
111
  function interpolate(value0, value1, fraction) {
113
112
  return value0 + (value1 - value0) * fraction;
114
113
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UpsampleRealityMeshParams.js","sourceRoot":"","sources":["../../../src/render/UpsampleRealityMeshParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAE8B;AAC9B,oDAE4B;AAC5B,2DAAkF;AAElF,MAAM,gBAAiB,SAAQ,GAAmB;IAAlD;;QACU,UAAK,GAAG,CAAC,CAAC;QACX,YAAO,GAAG,IAAI,KAAK,EAAU,CAAC;IAWvC,CAAC;IATQ,WAAW,CAAC,OAAiB;QAClC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC/B,IAAI,SAAS,KAAK,QAAQ;gBACxB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YAE3C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF;AAOD,MAAM,QAAQ;IACZ,YAAmB,QAAiB,EAAS,QAAiB,EAAS,KAAa;QAAjE,aAAQ,GAAR,QAAQ,CAAS;QAAS,aAAQ,GAAR,QAAQ,CAAS;QAAS,UAAK,GAAL,KAAK,CAAQ;IA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CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;YACzH,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC,EAAE,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;YACzH,IAAI,aAAa;gBACf,YAAY,CAAC,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,KAAK,CAAE,EAAE,SAAS,CAAC,SAAS,CAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;QAEvG,CAAC;IACH,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAClH,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;YACvB,UAAU,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IAC7I,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n Range1d, Range2d, Vector3d,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n OctEncodedNormal, QParams2d, QPoint2d, QPoint3d, Quantization,\r\n} from \"@itwin/core-common\";\r\nimport { RealityMeshParams, RealityMeshParamsBuilder } from \"./RealityMeshParams\";\r\n\r\nclass UpsampleIndexMap extends Map<number, number> {\r\n private _next = 0;\r\n public indices = new Array<number>();\r\n\r\n public addTriangle(indices: number[]) {\r\n for (const index of indices) {\r\n let mapIndex = this.get(index);\r\n if (undefined === mapIndex)\r\n this.set(index, mapIndex = this._next++);\r\n\r\n this.indices.push(mapIndex);\r\n }\r\n }\r\n}\r\n\r\nexport interface UpsampledRealityMeshParams {\r\n heightRange: Range1d;\r\n mesh: RealityMeshParams;\r\n}\r\n\r\nclass ClipAxis {\r\n constructor(public vertical: boolean, public lessThan: boolean, public value: number) { }\r\n}\r\n\r\nexport function upsampleRealityMeshParams(params: RealityMeshParams, uvSampleRange: Range2d): UpsampledRealityMeshParams {\r\n const indexMap = new UpsampleIndexMap();\r\n const uvParams = QParams2d.fromZeroToOne();\r\n const uvLow = QPoint2d.create(uvSampleRange.low, uvParams);\r\n const uvHigh = QPoint2d.create(uvSampleRange.high, uvParams);\r\n const uvRange = Range2d.createXYXY(uvLow.x, uvLow.y, uvHigh.x, uvHigh.y);\r\n\r\n const clipAxes = new Array<ClipAxis>();\r\n const addedPoints = new Array<QPoint3d>(), addedParams = new Array<QPoint2d>(), addedNormals = new Array<number>();\r\n if (uvLow.x > 0)\r\n clipAxes.push(new ClipAxis(true, false, uvLow.x));\r\n if (uvHigh.x < Quantization.rangeScale16)\r\n clipAxes.push(new ClipAxis(true, true, uvHigh.x));\r\n if (uvLow.y > 0)\r\n clipAxes.push(new ClipAxis(false, false, uvLow.y));\r\n if (uvHigh.y < Quantization.rangeScale16)\r\n clipAxes.push(new ClipAxis(false, true, uvHigh.y));\r\n\r\n const triangleRange = Range2d.createNull();\r\n for (let i = 0; i < params.indices.length;) {\r\n const triangleIndices = [params.indices[i++], params.indices[i++], params.indices[i++]];\r\n\r\n Range2d.createNull(triangleRange);\r\n for (const index of triangleIndices) {\r\n const paramIndex = 2 * index;\r\n triangleRange.extendXY(params.uvs.points[paramIndex], params.uvs.points[paramIndex + 1]);\r\n }\r\n\r\n if (uvRange.intersectsRange(triangleRange)) {\r\n if (uvRange.containsRange(triangleRange)) {\r\n indexMap.addTriangle(triangleIndices);\r\n } else {\r\n addClipped(params, triangleIndices, indexMap, clipAxes, 0, addedPoints, addedParams, addedNormals);\r\n }\r\n }\r\n }\r\n\r\n const parentPoints = params.positions;\r\n const parentParams = params.uvs;\r\n const parentNormals = params.normals;\r\n const parentPointCount = parentPoints.points.length / 3;\r\n\r\n const zRange = Range1d.createNull();\r\n const builder = new RealityMeshParamsBuilder({\r\n positionRange: parentPoints.params.computeRange(),\r\n initialVertexCapacity: indexMap.size,\r\n initialIndexCapacity: indexMap.indices.length,\r\n wantNormals: parentNormals !== undefined,\r\n });\r\n\r\n const pos = new QPoint3d();\r\n const uv = new QPoint2d();\r\n for (const entry of indexMap.entries()) {\r\n const parentIndex = entry[0];\r\n let normal: number | undefined;\r\n if (parentIndex < parentPointCount) {\r\n const pointIndex = 3 * parentIndex;\r\n pos.setFromScalars(parentPoints.points[pointIndex], parentPoints.points[pointIndex + 1], parentPoints.points[pointIndex + 2]);\r\n const paramIndex = 2 * parentIndex;\r\n uv.setFromScalars(parentParams.points[paramIndex], parentParams.points[paramIndex + 1]);\r\n if (parentNormals)\r\n normal = parentNormals[parentIndex];\r\n } else {\r\n const addedIndex = parentIndex - parentPointCount;\r\n addedPoints[addedIndex].clone(pos);\r\n addedParams[addedIndex].clone(uv);\r\n if (addedNormals.length > 0)\r\n normal = addedNormals[addedIndex];\r\n }\r\n\r\n builder.addQuantizedVertex(pos, uv, normal);\r\n zRange.extendX(pos.z);\r\n }\r\n\r\n builder.addIndices(indexMap.indices);\r\n\r\n const mesh = builder.finish();\r\n const qParams = mesh.positions.params;\r\n return {\r\n mesh: builder.finish(),\r\n heightRange: Range1d.createXX(\r\n Quantization.unquantize(zRange.low, qParams.origin.z, qParams.scale.z),\r\n Quantization.unquantize(zRange.high, qParams.origin.z, qParams.scale.z),\r\n ),\r\n };\r\n}\r\n\r\nfunction interpolate(value0: number, value1: number, fraction: number) {\r\n return value0 + (value1 - value0) * fraction;\r\n}\r\n\r\nfunction interpolateInt(value0: number, value1: number, fraction: number) {\r\n return Math.floor(.5 + interpolate(value0, value1, fraction));\r\n}\r\n\r\nfunction interpolateQPoint3d(qPoint: QPoint3d, qNext: QPoint3d, fraction: number): QPoint3d {\r\n return QPoint3d.fromScalars(interpolateInt(qPoint.x, qNext.x, fraction), interpolateInt(qPoint.y, qNext.y, fraction), interpolateInt(qPoint.z, qNext.z, fraction));\r\n}\r\n\r\nfunction interpolateQPoint2d(qPoint: QPoint2d, qNext: QPoint2d, fraction: number): QPoint2d {\r\n return QPoint2d.fromScalars(interpolateInt(qPoint.x, qNext.x, fraction), interpolateInt(qPoint.y, qNext.y, fraction));\r\n}\r\n\r\nfunction interpolateOctEncodedNormal(normal0: number, normal1: number, fraction: number): number {\r\n const n0 = OctEncodedNormal.decodeValue(normal0);\r\n const n1 = OctEncodedNormal.decodeValue(normal1);\r\n if (undefined !== n0 && undefined !== n1) {\r\n const n = Vector3d.create(interpolate(n0.x, n1.x, fraction), interpolate(n0.y, n1.y, fraction), interpolate(n0.z, n1.z, fraction));\r\n n.normalizeInPlace();\r\n return OctEncodedNormal.encode(n);\r\n } else {\r\n return OctEncodedNormal.encode(Vector3d.create(0, 0, 1));\r\n }\r\n}\r\n\r\nfunction addClipped(params: RealityMeshParams, triangleIndices: number[], indexMap: UpsampleIndexMap, clipAxes: ClipAxis[], clipIndex: number, addedPoints: QPoint3d[], addedParams: QPoint2d[], addedNormals: number[]) {\r\n if (clipIndex === clipAxes.length) {\r\n indexMap.addTriangle(triangleIndices);\r\n return;\r\n }\r\n\r\n const inside = [false, false, false];\r\n const values = [0, 0, 0];\r\n const clipOutput: number[] = [];\r\n\r\n const parentPoints = params.positions.points;\r\n const parentParams = params.uvs.points;\r\n const parentNormals = params.normals;\r\n\r\n const clipAxis = clipAxes[clipIndex++];\r\n const clipValue = clipAxis.value;\r\n\r\n const parentPointCount = parentPoints.length / 3;\r\n const scratchQPoint3d = new QPoint3d(), scratchQPoint3d1 = new QPoint3d();\r\n const scratchQPoint2d = new QPoint2d(), scratchQPoint2d1 = new QPoint2d();\r\n\r\n const getPoint = (index: number, result: QPoint3d): QPoint3d => {\r\n if (index < parentPointCount) {\r\n const pointIndex = index * 3;\r\n result.setFromScalars(parentPoints[pointIndex], parentPoints[pointIndex + 1], parentPoints[pointIndex + 2]);\r\n } else {\r\n addedPoints[index - parentPointCount].clone(result);\r\n }\r\n\r\n return result;\r\n };\r\n\r\n const getParam = (index: number, result: QPoint2d): QPoint2d => {\r\n if (index < parentPointCount) {\r\n const pointIndex = index * 2;\r\n result.setFromScalars(parentParams[pointIndex], parentParams[pointIndex + 1]);\r\n } else {\r\n addedParams[index - parentPointCount].clone(result);\r\n }\r\n return result;\r\n };\r\n\r\n const getNormal = (index: number): number | undefined => {\r\n if (!parentNormals)\r\n return undefined;\r\n\r\n return (index < parentPointCount) ? parentNormals[index] : addedNormals[index - parentPointCount];\r\n };\r\n\r\n for (let i = 0; i < 3; i++) {\r\n const index = triangleIndices[i];\r\n const thisParam = getParam(index, scratchQPoint2d);\r\n const thisValue = clipAxis.vertical ? thisParam.x : thisParam.y;\r\n values[i] = thisValue;\r\n inside[i] = clipAxis.lessThan ? (thisValue < clipValue) : (thisValue > clipValue);\r\n }\r\n\r\n for (let i = 0; i < 3; i++) {\r\n const index = triangleIndices[i];\r\n const next = (i + 1) % 3;\r\n if (inside[i])\r\n clipOutput.push(index);\r\n if (inside[i] !== inside[next]) {\r\n const nextIndex = triangleIndices[next];\r\n const fraction = (clipValue - values[i]) / (values[next] - values[i]);\r\n\r\n clipOutput.push(parentPointCount + addedPoints.length);\r\n addedPoints.push(interpolateQPoint3d(getPoint(index, scratchQPoint3d), getPoint(nextIndex, scratchQPoint3d1), fraction));\r\n addedParams.push(interpolateQPoint2d(getParam(index, scratchQPoint2d), getParam(nextIndex, scratchQPoint2d1), fraction));\r\n if (parentNormals)\r\n addedNormals.push(interpolateOctEncodedNormal(getNormal(index)!, getNormal(nextIndex)!, fraction));\r\n\r\n }\r\n }\r\n\r\n if (clipOutput.length > 2) {\r\n addClipped(params, clipOutput.slice(0, 3), indexMap, clipAxes, clipIndex, addedPoints, addedParams, addedNormals);\r\n if (clipOutput.length > 3)\r\n addClipped(params, [clipOutput[0], clipOutput[2], clipOutput[3]], indexMap, clipAxes, clipIndex, addedPoints, addedParams, addedNormals);\r\n }\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"UpsampleRealityMeshParams.js","sourceRoot":"","sources":["../../../src/render/UpsampleRealityMeshParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAkCH,8DAqFC;AArHD,wDAE8B;AAC9B,oDAE4B;AAC5B,2DAAkF;AAElF,MAAM,gBAAiB,SAAQ,GAAmB;IAAlD;;QACU,UAAK,GAAG,CAAC,CAAC;QACX,YAAO,GAAG,IAAI,KAAK,EAAU,CAAC;IAWvC,CAAC;IATQ,WAAW,CAAC,OAAiB;QAClC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAC/B,IAAI,SAAS,KAAK,QAAQ;gBACxB,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YAE3C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF;AAOD,MAAM,QAAQ;IACZ,YAAmB,QAAiB,EAAS,QAAiB,EAAS,KAAa;QAAjE,aAAQ,GAAR,QAAQ,CAAS;QAAS,aAAQ,GAAR,QAAQ,CAAS;QAAS,UAAK,GAAL,KAAK,CAAQ;IAAI,CAAC;CAC1F;AAED,SAAgB,yBAAyB,CAAC,MAAyB,EAAE,aAAsB;IACzF,MAAM,QAAQ,GAAG,IAAI,gBAAgB,EAAE,CAA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AQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;YACzH,IAAI,aAAa;gBACf,YAAY,CAAC,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,KAAK,CAAE,EAAE,SAAS,CAAC,SAAS,CAAE,EAAE,QAAQ,CAAC,CAAC,CAAC;QAEvG,CAAC;IACH,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAClH,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC;YACvB,UAAU,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;IAC7I,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n Range1d, Range2d, Vector3d,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n OctEncodedNormal, QParams2d, QPoint2d, QPoint3d, Quantization,\r\n} from \"@itwin/core-common\";\r\nimport { RealityMeshParams, RealityMeshParamsBuilder } from \"./RealityMeshParams\";\r\n\r\nclass UpsampleIndexMap extends Map<number, number> {\r\n private _next = 0;\r\n public indices = new Array<number>();\r\n\r\n public addTriangle(indices: number[]) {\r\n for (const index of indices) {\r\n let mapIndex = this.get(index);\r\n if (undefined === mapIndex)\r\n this.set(index, mapIndex = this._next++);\r\n\r\n this.indices.push(mapIndex);\r\n }\r\n }\r\n}\r\n\r\nexport interface UpsampledRealityMeshParams {\r\n heightRange: Range1d;\r\n mesh: RealityMeshParams;\r\n}\r\n\r\nclass ClipAxis {\r\n constructor(public vertical: boolean, public lessThan: boolean, public value: number) { }\r\n}\r\n\r\nexport function upsampleRealityMeshParams(params: RealityMeshParams, uvSampleRange: Range2d): UpsampledRealityMeshParams {\r\n const indexMap = new UpsampleIndexMap();\r\n const uvParams = QParams2d.fromZeroToOne();\r\n const uvLow = QPoint2d.create(uvSampleRange.low, uvParams);\r\n const uvHigh = QPoint2d.create(uvSampleRange.high, uvParams);\r\n const uvRange = Range2d.createXYXY(uvLow.x, uvLow.y, uvHigh.x, uvHigh.y);\r\n\r\n const clipAxes = new Array<ClipAxis>();\r\n const addedPoints = new Array<QPoint3d>(), addedParams = new Array<QPoint2d>(), addedNormals = new Array<number>();\r\n if (uvLow.x > 0)\r\n clipAxes.push(new ClipAxis(true, false, uvLow.x));\r\n if (uvHigh.x < Quantization.rangeScale16)\r\n clipAxes.push(new ClipAxis(true, true, uvHigh.x));\r\n if (uvLow.y > 0)\r\n clipAxes.push(new ClipAxis(false, false, uvLow.y));\r\n if (uvHigh.y < Quantization.rangeScale16)\r\n clipAxes.push(new ClipAxis(false, true, uvHigh.y));\r\n\r\n const triangleRange = Range2d.createNull();\r\n for (let i = 0; i < params.indices.length;) {\r\n const triangleIndices = [params.indices[i++], params.indices[i++], params.indices[i++]];\r\n\r\n Range2d.createNull(triangleRange);\r\n for (const index of triangleIndices) {\r\n const paramIndex = 2 * index;\r\n triangleRange.extendXY(params.uvs.points[paramIndex], params.uvs.points[paramIndex + 1]);\r\n }\r\n\r\n if (uvRange.intersectsRange(triangleRange)) {\r\n if (uvRange.containsRange(triangleRange)) {\r\n indexMap.addTriangle(triangleIndices);\r\n } else {\r\n addClipped(params, triangleIndices, indexMap, clipAxes, 0, addedPoints, addedParams, addedNormals);\r\n }\r\n }\r\n }\r\n\r\n const parentPoints = params.positions;\r\n const parentParams = params.uvs;\r\n const parentNormals = params.normals;\r\n const parentPointCount = parentPoints.points.length / 3;\r\n\r\n const zRange = Range1d.createNull();\r\n const builder = new RealityMeshParamsBuilder({\r\n positionRange: parentPoints.params.computeRange(),\r\n initialVertexCapacity: indexMap.size,\r\n initialIndexCapacity: indexMap.indices.length,\r\n wantNormals: parentNormals !== undefined,\r\n });\r\n\r\n const pos = new QPoint3d();\r\n const uv = new QPoint2d();\r\n for (const entry of indexMap.entries()) {\r\n const parentIndex = entry[0];\r\n let normal: number | undefined;\r\n if (parentIndex < parentPointCount) {\r\n const pointIndex = 3 * parentIndex;\r\n pos.setFromScalars(parentPoints.points[pointIndex], parentPoints.points[pointIndex + 1], parentPoints.points[pointIndex + 2]);\r\n const paramIndex = 2 * parentIndex;\r\n uv.setFromScalars(parentParams.points[paramIndex], parentParams.points[paramIndex + 1]);\r\n if (parentNormals)\r\n normal = parentNormals[parentIndex];\r\n } else {\r\n const addedIndex = parentIndex - parentPointCount;\r\n addedPoints[addedIndex].clone(pos);\r\n addedParams[addedIndex].clone(uv);\r\n if (addedNormals.length > 0)\r\n normal = addedNormals[addedIndex];\r\n }\r\n\r\n builder.addQuantizedVertex(pos, uv, normal);\r\n zRange.extendX(pos.z);\r\n }\r\n\r\n builder.addIndices(indexMap.indices);\r\n\r\n const mesh = builder.finish();\r\n const qParams = mesh.positions.params;\r\n return {\r\n mesh: builder.finish(),\r\n heightRange: Range1d.createXX(\r\n Quantization.unquantize(zRange.low, qParams.origin.z, qParams.scale.z),\r\n Quantization.unquantize(zRange.high, qParams.origin.z, qParams.scale.z),\r\n ),\r\n };\r\n}\r\n\r\nfunction interpolate(value0: number, value1: number, fraction: number) {\r\n return value0 + (value1 - value0) * fraction;\r\n}\r\n\r\nfunction interpolateInt(value0: number, value1: number, fraction: number) {\r\n return Math.floor(.5 + interpolate(value0, value1, fraction));\r\n}\r\n\r\nfunction interpolateQPoint3d(qPoint: QPoint3d, qNext: QPoint3d, fraction: number): QPoint3d {\r\n return QPoint3d.fromScalars(interpolateInt(qPoint.x, qNext.x, fraction), interpolateInt(qPoint.y, qNext.y, fraction), interpolateInt(qPoint.z, qNext.z, fraction));\r\n}\r\n\r\nfunction interpolateQPoint2d(qPoint: QPoint2d, qNext: QPoint2d, fraction: number): QPoint2d {\r\n return QPoint2d.fromScalars(interpolateInt(qPoint.x, qNext.x, fraction), interpolateInt(qPoint.y, qNext.y, fraction));\r\n}\r\n\r\nfunction interpolateOctEncodedNormal(normal0: number, normal1: number, fraction: number): number {\r\n const n0 = OctEncodedNormal.decodeValue(normal0);\r\n const n1 = OctEncodedNormal.decodeValue(normal1);\r\n if (undefined !== n0 && undefined !== n1) {\r\n const n = Vector3d.create(interpolate(n0.x, n1.x, fraction), interpolate(n0.y, n1.y, fraction), interpolate(n0.z, n1.z, fraction));\r\n n.normalizeInPlace();\r\n return OctEncodedNormal.encode(n);\r\n } else {\r\n return OctEncodedNormal.encode(Vector3d.create(0, 0, 1));\r\n }\r\n}\r\n\r\nfunction addClipped(params: RealityMeshParams, triangleIndices: number[], indexMap: UpsampleIndexMap, clipAxes: ClipAxis[], clipIndex: number, addedPoints: QPoint3d[], addedParams: QPoint2d[], addedNormals: number[]) {\r\n if (clipIndex === clipAxes.length) {\r\n indexMap.addTriangle(triangleIndices);\r\n return;\r\n }\r\n\r\n const inside = [false, false, false];\r\n const values = [0, 0, 0];\r\n const clipOutput: number[] = [];\r\n\r\n const parentPoints = params.positions.points;\r\n const parentParams = params.uvs.points;\r\n const parentNormals = params.normals;\r\n\r\n const clipAxis = clipAxes[clipIndex++];\r\n const clipValue = clipAxis.value;\r\n\r\n const parentPointCount = parentPoints.length / 3;\r\n const scratchQPoint3d = new QPoint3d(), scratchQPoint3d1 = new QPoint3d();\r\n const scratchQPoint2d = new QPoint2d(), scratchQPoint2d1 = new QPoint2d();\r\n\r\n const getPoint = (index: number, result: QPoint3d): QPoint3d => {\r\n if (index < parentPointCount) {\r\n const pointIndex = index * 3;\r\n result.setFromScalars(parentPoints[pointIndex], parentPoints[pointIndex + 1], parentPoints[pointIndex + 2]);\r\n } else {\r\n addedPoints[index - parentPointCount].clone(result);\r\n }\r\n\r\n return result;\r\n };\r\n\r\n const getParam = (index: number, result: QPoint2d): QPoint2d => {\r\n if (index < parentPointCount) {\r\n const pointIndex = index * 2;\r\n result.setFromScalars(parentParams[pointIndex], parentParams[pointIndex + 1]);\r\n } else {\r\n addedParams[index - parentPointCount].clone(result);\r\n }\r\n return result;\r\n };\r\n\r\n const getNormal = (index: number): number | undefined => {\r\n if (!parentNormals)\r\n return undefined;\r\n\r\n return (index < parentPointCount) ? parentNormals[index] : addedNormals[index - parentPointCount];\r\n };\r\n\r\n for (let i = 0; i < 3; i++) {\r\n const index = triangleIndices[i];\r\n const thisParam = getParam(index, scratchQPoint2d);\r\n const thisValue = clipAxis.vertical ? thisParam.x : thisParam.y;\r\n values[i] = thisValue;\r\n inside[i] = clipAxis.lessThan ? (thisValue < clipValue) : (thisValue > clipValue);\r\n }\r\n\r\n for (let i = 0; i < 3; i++) {\r\n const index = triangleIndices[i];\r\n const next = (i + 1) % 3;\r\n if (inside[i])\r\n clipOutput.push(index);\r\n if (inside[i] !== inside[next]) {\r\n const nextIndex = triangleIndices[next];\r\n const fraction = (clipValue - values[i]) / (values[next] - values[i]);\r\n\r\n clipOutput.push(parentPointCount + addedPoints.length);\r\n addedPoints.push(interpolateQPoint3d(getPoint(index, scratchQPoint3d), getPoint(nextIndex, scratchQPoint3d1), fraction));\r\n addedParams.push(interpolateQPoint2d(getParam(index, scratchQPoint2d), getParam(nextIndex, scratchQPoint2d1), fraction));\r\n if (parentNormals)\r\n addedNormals.push(interpolateOctEncodedNormal(getNormal(index)!, getNormal(nextIndex)!, fraction));\r\n\r\n }\r\n }\r\n\r\n if (clipOutput.length > 2) {\r\n addClipped(params, clipOutput.slice(0, 3), indexMap, clipAxes, clipIndex, addedPoints, addedParams, addedNormals);\r\n if (clipOutput.length > 3)\r\n addClipped(params, [clipOutput[0], clipOutput[2], clipOutput[3]], indexMap, clipAxes, clipIndex, addedPoints, addedParams, addedNormals);\r\n }\r\n}\r\n\r\n"]}
@@ -7,7 +7,7 @@
7
7
  * @module Rendering
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.queryVisibleFeatures = void 0;
10
+ exports.queryVisibleFeatures = queryVisibleFeatures;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const Pixel_1 = require("./Pixel");
13
13
  /** Ensures that the iterable supplied to QueryVisibleFeaturesCallback becomes invalidated once the callback exits.
@@ -83,5 +83,4 @@ function queryVisibleFeatures(viewport, options, callback) {
83
83
  break;
84
84
  }
85
85
  }
86
- exports.queryVisibleFeatures = queryVisibleFeatures;
87
86
  //# sourceMappingURL=VisibleFeature.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VisibleFeature.js","sourceRoot":"","sources":["../../../src/render/VisibleFeature.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAyD;AAKzD,mCAAgC;AA+DhC;;GAEG;AACH,MAAM,gBAAgB;IAIpB,YAAmB,QAAkC;QAF7C,cAAS,GAAG,KAAK,CAAC;QAGxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAEM,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,SAAS,EAAE,uGAAuG,CAAC,CAAC;QACjI,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3C,CAAC;CACF;AAED,SAAS,cAAc,CAAC,QAAkC,EAAE,QAAsC;IAChG,MAAM,QA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IACV,CAAC;AACH,CAAC;AAdD,oDAcC","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 { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"@itwin/core-common\";\r\nimport { ViewRect } from \"../common/ViewRect\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Pixel } from \"./Pixel\";\r\n\r\n/** Represents a [Feature]($common) determined to be visible within a [[Viewport]].\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @public\r\n */\r\nexport interface VisibleFeature {\r\n /** The Id of the [Element]($backend) associated with the feature. May be invalid or transient. */\r\n readonly elementId: Id64String;\r\n /** The Id of the [SubCategory]($backend) associated with the feature. May be invalid or transient. */\r\n readonly subCategoryId: Id64String;\r\n /** The class of geometry associated with the feature. */\r\n readonly geometryClass: GeometryClass;\r\n /** The Id of the [GeometricModel]($backend) associated with the feature. May be invalid or transient. */\r\n readonly modelId: Id64String;\r\n /** The iModel associated with the feature. In some cases this may differ from the [[Viewport]]'s iModel. */\r\n iModel: IModelConnection;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by reading pixels rendered by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it lit up at least one pixel.\r\n * @note A pixel that is behind another, transparent pixel is not considered visible.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @public\r\n */\r\nexport interface QueryScreenFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"screen\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n /** If specified, a sub-region of the [[Viewport]] to which to constrain the query. */\r\n rect?: ViewRect;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by inspecting the [[Tile]]s selected for display by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it is included in at least one tile selected for display and is\r\n * not otherwise rendered invisible by the view's [[CategorySelectorState]], [SubCategoryAppearance]($common) overrides, [FeatureOverrides]($common), or\r\n * other means.\r\n * @note If a clip volume is applied to the view, features contained in tiles that *intersect* the clip volume are considered visible regardless of whether\r\n * their geometry would actually be entirely clipped out by the clip volume.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @public\r\n */\r\nexport interface QueryTileFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"tiles\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s.\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @public\r\n */\r\nexport type QueryVisibleFeaturesOptions = QueryScreenFeaturesOptions | QueryTileFeaturesOptions;\r\n\r\n/** A function supplied to [[Viewport.queryVisibleFeatures]] to process the results. The iterable supplied to the callback consists of all of the\r\n * [Feature]($common)s determined to be visible. The same feature may recur multiple times.\r\n * @note The iterable supplied to the callback is usable only within the callback. Once the callback exits, the iterable becomes empty.\r\n * @public\r\n */\r\nexport type QueryVisibleFeaturesCallback = (features: Iterable<VisibleFeature>) => void;\r\n\r\n/** Ensures that the iterable supplied to QueryVisibleFeaturesCallback becomes invalidated once the callback exits.\r\n * The iterable relies on RenderTarget state that changes from one frame to another.\r\n */\r\nclass ExpiringIterable implements Iterable<VisibleFeature> {\r\n private _features: Iterable<VisibleFeature>;\r\n private _disposed = false;\r\n\r\n public constructor(features: Iterable<VisibleFeature>) {\r\n this._features = features;\r\n }\r\n\r\n public dispose(): void {\r\n this._disposed = true;\r\n this._features = [];\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n assert(!this._disposed, \"The iterable supplied to QueryVisibleFeaturesCallback is valid only for the duration of the callback.\");\r\n return this._features[Symbol.iterator]();\r\n }\r\n}\r\n\r\nfunction invokeCallback(features: Iterable<VisibleFeature>, callback: QueryVisibleFeaturesCallback): void {\r\n const iterable = new ExpiringIterable(features);\r\n try {\r\n callback(iterable);\r\n } finally {\r\n iterable.dispose();\r\n }\r\n}\r\n\r\n/** Features read from pixels rendered by a viewport. */\r\nclass ScreenFeatures implements Iterable<VisibleFeature> {\r\n private readonly _pixels: Pixel.Buffer;\r\n private readonly _rect: ViewRect;\r\n private readonly _iModel: IModelConnection;\r\n\r\n public constructor(pixels: Pixel.Buffer, rect: ViewRect, viewport: Viewport) {\r\n this._pixels = pixels;\r\n this._rect = rect.clone();\r\n this._rect.right = viewport.cssPixelsToDevicePixels(this._rect.right);\r\n this._rect.bottom = viewport.cssPixelsToDevicePixels(this._rect.bottom);\r\n this._iModel = viewport.iModel;\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n function* iterator(pixels: Pixel.Buffer, rect: ViewRect, iModel: IModelConnection) {\r\n for (let x = rect.left; x < rect.right; x++) {\r\n for (let y = rect.top; y < rect.bottom; y++) {\r\n const pixel = pixels.getPixel(x, y);\r\n if (pixel.feature && pixel.modelId) {\r\n yield {\r\n elementId: pixel.feature.elementId,\r\n subCategoryId: pixel.feature.subCategoryId,\r\n geometryClass: pixel.feature.geometryClass,\r\n modelId: pixel.modelId,\r\n iModel: pixel.iModel ?? iModel,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n\r\n return iterator(this._pixels, this._rect, this._iModel);\r\n }\r\n}\r\n\r\n/** Implementation of [[Viewport.queryVisibleFeatures]].\r\n * @internal\r\n */\r\nexport function queryVisibleFeatures(viewport: Viewport, options: QueryVisibleFeaturesOptions, callback: QueryVisibleFeaturesCallback): void {\r\n assert(\"screen\" === options.source || \"tiles\" === options.source);\r\n switch (options.source) {\r\n case \"screen\":\r\n const rect = options.rect ?? viewport.viewRect;\r\n viewport.readPixels(rect, Pixel.Selector.Feature, (pixels) => invokeCallback(pixels ? new ScreenFeatures(pixels, rect, viewport) : [], callback), true !== options.includeNonLocatable);\r\n break;\r\n case \"tiles\":\r\n viewport.target.queryVisibleTileFeatures(options, viewport.iModel, (features) => invokeCallback(features, callback));\r\n break;\r\n default:\r\n invokeCallback([], callback);\r\n break;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"VisibleFeature.js","sourceRoot":"","sources":["../../../src/render/VisibleFeature.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA4IH,oDAcC;AAxJD,sDAAyD;AAKzD,mCAAgC;AA+DhC;;GAEG;AACH,MAAM,gBAAgB;IAIpB,YAAmB,QAAkC;QAF7C,cAAS,GAAG,KAAK,CAAC;QAGxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC5B,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;IAEM,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAA,qBAAM,EAAC,CAAC,IAAI,CAAC,SAAS,EAAE,uGAAuG,CAAC,CAAC;QACjI,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC3C,CAAC;CACF;AAED,SAAS,cAAc,CAAC,QAAkC,EAAE,QAAsC;IAChG,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,CAAC;QACH,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACrB,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,OAAO,EAAE,CAAC;IACrB,CAAC;AACH,CAAC;AAED,wDAAwD;AACxD,MAAM,cAAc;IAKlB,YAAmB,MAAoB,EAAE,IAAc,EAAE,QAAkB;QACzE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CA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H,SAAgB,oBAAoB,CAAC,QAAkB,EAAE,OAAoC,EAAE,QAAsC;IACnI,IAAA,qBAAM,EAAC,QAAQ,KAAK,OAAO,CAAC,MAAM,IAAI,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,QAAQ,OAAO,CAAC,MAAM,EAAE,CAAC;QACvB,KAAK,QAAQ;YACX,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,QAAQ,CAAC;YAC/C,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,aAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,QAAQ,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;YACxL,MAAM;QACR,KAAK,OAAO;YACV,QAAQ,CAAC,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;YACrH,MAAM;QACR;YACE,cAAc,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YAC7B,MAAM;IACV,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { GeometryClass } from \"@itwin/core-common\";\r\nimport { ViewRect } from \"../common/ViewRect\";\r\nimport { Viewport } from \"../Viewport\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { Pixel } from \"./Pixel\";\r\n\r\n/** Represents a [Feature]($common) determined to be visible within a [[Viewport]].\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @public\r\n */\r\nexport interface VisibleFeature {\r\n /** The Id of the [Element]($backend) associated with the feature. May be invalid or transient. */\r\n readonly elementId: Id64String;\r\n /** The Id of the [SubCategory]($backend) associated with the feature. May be invalid or transient. */\r\n readonly subCategoryId: Id64String;\r\n /** The class of geometry associated with the feature. */\r\n readonly geometryClass: GeometryClass;\r\n /** The Id of the [GeometricModel]($backend) associated with the feature. May be invalid or transient. */\r\n readonly modelId: Id64String;\r\n /** The iModel associated with the feature. In some cases this may differ from the [[Viewport]]'s iModel. */\r\n iModel: IModelConnection;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by reading pixels rendered by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it lit up at least one pixel.\r\n * @note A pixel that is behind another, transparent pixel is not considered visible.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @public\r\n */\r\nexport interface QueryScreenFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"screen\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n /** If specified, a sub-region of the [[Viewport]] to which to constrain the query. */\r\n rect?: ViewRect;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s by inspecting the [[Tile]]s selected for display by a [[Viewport]].\r\n * This method of determining visibility considers a feature \"visible\" if it is included in at least one tile selected for display and is\r\n * not otherwise rendered invisible by the view's [[CategorySelectorState]], [SubCategoryAppearance]($common) overrides, [FeatureOverrides]($common), or\r\n * other means.\r\n * @note If a clip volume is applied to the view, features contained in tiles that *intersect* the clip volume are considered visible regardless of whether\r\n * their geometry would actually be entirely clipped out by the clip volume.\r\n * @see [[QueryVisibleFeaturesOptions]].\r\n * @public\r\n */\r\nexport interface QueryTileFeaturesOptions {\r\n /** Union discriminator for [[QueryVisibleFeaturesOptions]]. */\r\n source: \"tiles\";\r\n /** If true, non-locatable features are considered visible. */\r\n includeNonLocatable?: boolean;\r\n}\r\n\r\n/** Options specifying how to query for visible [Feature]($common)s.\r\n * @see [[Viewport.queryVisibleFeatures]].\r\n * @public\r\n */\r\nexport type QueryVisibleFeaturesOptions = QueryScreenFeaturesOptions | QueryTileFeaturesOptions;\r\n\r\n/** A function supplied to [[Viewport.queryVisibleFeatures]] to process the results. The iterable supplied to the callback consists of all of the\r\n * [Feature]($common)s determined to be visible. The same feature may recur multiple times.\r\n * @note The iterable supplied to the callback is usable only within the callback. Once the callback exits, the iterable becomes empty.\r\n * @public\r\n */\r\nexport type QueryVisibleFeaturesCallback = (features: Iterable<VisibleFeature>) => void;\r\n\r\n/** Ensures that the iterable supplied to QueryVisibleFeaturesCallback becomes invalidated once the callback exits.\r\n * The iterable relies on RenderTarget state that changes from one frame to another.\r\n */\r\nclass ExpiringIterable implements Iterable<VisibleFeature> {\r\n private _features: Iterable<VisibleFeature>;\r\n private _disposed = false;\r\n\r\n public constructor(features: Iterable<VisibleFeature>) {\r\n this._features = features;\r\n }\r\n\r\n public dispose(): void {\r\n this._disposed = true;\r\n this._features = [];\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n assert(!this._disposed, \"The iterable supplied to QueryVisibleFeaturesCallback is valid only for the duration of the callback.\");\r\n return this._features[Symbol.iterator]();\r\n }\r\n}\r\n\r\nfunction invokeCallback(features: Iterable<VisibleFeature>, callback: QueryVisibleFeaturesCallback): void {\r\n const iterable = new ExpiringIterable(features);\r\n try {\r\n callback(iterable);\r\n } finally {\r\n iterable.dispose();\r\n }\r\n}\r\n\r\n/** Features read from pixels rendered by a viewport. */\r\nclass ScreenFeatures implements Iterable<VisibleFeature> {\r\n private readonly _pixels: Pixel.Buffer;\r\n private readonly _rect: ViewRect;\r\n private readonly _iModel: IModelConnection;\r\n\r\n public constructor(pixels: Pixel.Buffer, rect: ViewRect, viewport: Viewport) {\r\n this._pixels = pixels;\r\n this._rect = rect.clone();\r\n this._rect.right = viewport.cssPixelsToDevicePixels(this._rect.right);\r\n this._rect.bottom = viewport.cssPixelsToDevicePixels(this._rect.bottom);\r\n this._iModel = viewport.iModel;\r\n }\r\n\r\n public [Symbol.iterator](): Iterator<VisibleFeature> {\r\n function* iterator(pixels: Pixel.Buffer, rect: ViewRect, iModel: IModelConnection) {\r\n for (let x = rect.left; x < rect.right; x++) {\r\n for (let y = rect.top; y < rect.bottom; y++) {\r\n const pixel = pixels.getPixel(x, y);\r\n if (pixel.feature && pixel.modelId) {\r\n yield {\r\n elementId: pixel.feature.elementId,\r\n subCategoryId: pixel.feature.subCategoryId,\r\n geometryClass: pixel.feature.geometryClass,\r\n modelId: pixel.modelId,\r\n iModel: pixel.iModel ?? iModel,\r\n };\r\n }\r\n }\r\n }\r\n }\r\n\r\n return iterator(this._pixels, this._rect, this._iModel);\r\n }\r\n}\r\n\r\n/** Implementation of [[Viewport.queryVisibleFeatures]].\r\n * @internal\r\n */\r\nexport function queryVisibleFeatures(viewport: Viewport, options: QueryVisibleFeaturesOptions, callback: QueryVisibleFeaturesCallback): void {\r\n assert(\"screen\" === options.source || \"tiles\" === options.source);\r\n switch (options.source) {\r\n case \"screen\":\r\n const rect = options.rect ?? viewport.viewRect;\r\n viewport.readPixels(rect, Pixel.Selector.Feature, (pixels) => invokeCallback(pixels ? new ScreenFeatures(pixels, rect, viewport) : [], callback), true !== options.includeNonLocatable);\r\n break;\r\n case \"tiles\":\r\n viewport.target.queryVisibleTileFeatures(options, viewport.iModel, (features) => invokeCallback(features, callback));\r\n break;\r\n default:\r\n invokeCallback([], callback);\r\n break;\r\n }\r\n}\r\n"]}