@itwin/core-common 3.4.0-dev.9 → 3.5.0-dev.11

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 (266) hide show
  1. package/CHANGELOG.md +33 -1
  2. package/lib/cjs/Camera.d.ts.map +1 -1
  3. package/lib/cjs/Camera.js +7 -3
  4. package/lib/cjs/Camera.js.map +1 -1
  5. package/lib/cjs/CloudStorage.d.ts +20 -5
  6. package/lib/cjs/CloudStorage.d.ts.map +1 -1
  7. package/lib/cjs/CloudStorage.js +13 -3
  8. package/lib/cjs/CloudStorage.js.map +1 -1
  9. package/lib/cjs/CloudStorageTileCache.d.ts +4 -1
  10. package/lib/cjs/CloudStorageTileCache.d.ts.map +1 -1
  11. package/lib/cjs/CloudStorageTileCache.js +5 -1
  12. package/lib/cjs/CloudStorageTileCache.js.map +1 -1
  13. package/lib/cjs/Code.d.ts +10 -4
  14. package/lib/cjs/Code.d.ts.map +1 -1
  15. package/lib/cjs/Code.js +6 -2
  16. package/lib/cjs/Code.js.map +1 -1
  17. package/lib/cjs/ColorDef.d.ts.map +1 -1
  18. package/lib/cjs/ColorDef.js +2 -0
  19. package/lib/cjs/ColorDef.js.map +1 -1
  20. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  21. package/lib/cjs/ConcurrentQuery.js +56 -14
  22. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  23. package/lib/cjs/ContextRealityModel.d.ts +21 -0
  24. package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
  25. package/lib/cjs/ContextRealityModel.js +33 -0
  26. package/lib/cjs/ContextRealityModel.js.map +1 -1
  27. package/lib/cjs/DisplayStyleSettings.d.ts +32 -0
  28. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  29. package/lib/cjs/DisplayStyleSettings.js +30 -0
  30. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  31. package/lib/cjs/ECSchemaProps.d.ts +40 -0
  32. package/lib/cjs/ECSchemaProps.d.ts.map +1 -0
  33. package/lib/cjs/ECSchemaProps.js +10 -0
  34. package/lib/cjs/ECSchemaProps.js.map +1 -0
  35. package/lib/cjs/ElementProps.d.ts +6 -0
  36. package/lib/cjs/ElementProps.d.ts.map +1 -1
  37. package/lib/cjs/ElementProps.js.map +1 -1
  38. package/lib/cjs/FeatureGates.d.ts.map +1 -1
  39. package/lib/cjs/FeatureGates.js +6 -2
  40. package/lib/cjs/FeatureGates.js.map +1 -1
  41. package/lib/cjs/FeatureIndex.d.ts.map +1 -1
  42. package/lib/cjs/FeatureIndex.js +5 -1
  43. package/lib/cjs/FeatureIndex.js.map +1 -1
  44. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  45. package/lib/cjs/FeatureSymbology.js.map +1 -1
  46. package/lib/cjs/Fonts.d.ts.map +1 -1
  47. package/lib/cjs/Fonts.js.map +1 -1
  48. package/lib/cjs/Frustum.d.ts.map +1 -1
  49. package/lib/cjs/Frustum.js +55 -21
  50. package/lib/cjs/Frustum.js.map +1 -1
  51. package/lib/cjs/Gradient.d.ts +18 -2
  52. package/lib/cjs/Gradient.d.ts.map +1 -1
  53. package/lib/cjs/Gradient.js +29 -18
  54. package/lib/cjs/Gradient.js.map +1 -1
  55. package/lib/cjs/IModel.d.ts +4 -0
  56. package/lib/cjs/IModel.d.ts.map +1 -1
  57. package/lib/cjs/IModel.js +8 -1
  58. package/lib/cjs/IModel.js.map +1 -1
  59. package/lib/cjs/Image.d.ts.map +1 -1
  60. package/lib/cjs/Image.js +3 -1
  61. package/lib/cjs/Image.js.map +1 -1
  62. package/lib/cjs/Localization.d.ts +4 -5
  63. package/lib/cjs/Localization.d.ts.map +1 -1
  64. package/lib/cjs/Localization.js.map +1 -1
  65. package/lib/cjs/QPoint.d.ts +185 -5
  66. package/lib/cjs/QPoint.d.ts.map +1 -1
  67. package/lib/cjs/QPoint.js +204 -4
  68. package/lib/cjs/QPoint.js.map +1 -1
  69. package/lib/cjs/RealityModelDisplaySettings.d.ts +119 -0
  70. package/lib/cjs/RealityModelDisplaySettings.d.ts.map +1 -0
  71. package/lib/cjs/RealityModelDisplaySettings.js +115 -0
  72. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -0
  73. package/lib/cjs/Render.d.ts.map +1 -1
  74. package/lib/cjs/Render.js +11 -3
  75. package/lib/cjs/Render.js.map +1 -1
  76. package/lib/cjs/RgbColor.d.ts +9 -1
  77. package/lib/cjs/RgbColor.d.ts.map +1 -1
  78. package/lib/cjs/RgbColor.js +12 -2
  79. package/lib/cjs/RgbColor.js.map +1 -1
  80. package/lib/cjs/SubCategoryOverride.d.ts.map +1 -1
  81. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  82. package/lib/cjs/TerrainSettings.d.ts +12 -7
  83. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  84. package/lib/cjs/TerrainSettings.js +2 -1
  85. package/lib/cjs/TerrainSettings.js.map +1 -1
  86. package/lib/cjs/ThematicDisplay.d.ts +6 -10
  87. package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
  88. package/lib/cjs/ThematicDisplay.js.map +1 -1
  89. package/lib/cjs/TileProps.d.ts +5 -0
  90. package/lib/cjs/TileProps.d.ts.map +1 -1
  91. package/lib/cjs/TileProps.js +12 -1
  92. package/lib/cjs/TileProps.js.map +1 -1
  93. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  94. package/lib/cjs/ViewFlags.js.map +1 -1
  95. package/lib/cjs/core-common.d.ts +2 -0
  96. package/lib/cjs/core-common.d.ts.map +1 -1
  97. package/lib/cjs/core-common.js +2 -0
  98. package/lib/cjs/core-common.js.map +1 -1
  99. package/lib/cjs/geometry/BoundingSphere.d.ts.map +1 -1
  100. package/lib/cjs/geometry/BoundingSphere.js +8 -2
  101. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  102. package/lib/cjs/geometry/TextString.d.ts.map +1 -1
  103. package/lib/cjs/geometry/TextString.js.map +1 -1
  104. package/lib/cjs/ipc/IpcWebSocketTransport.js +10 -3
  105. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  106. package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
  107. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  108. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts +9 -1
  109. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts.map +1 -1
  110. package/lib/cjs/rpc/IModelTileRpcInterface.js +12 -2
  111. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  112. package/lib/cjs/rpc/core/RpcConfiguration.js +1 -1
  113. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  114. package/lib/cjs/rpc/core/RpcConstants.d.ts +3 -1
  115. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  116. package/lib/cjs/rpc/core/RpcConstants.js +4 -1
  117. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  118. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  119. package/lib/cjs/rpc/core/RpcRequest.js +8 -2
  120. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  121. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  122. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +3 -0
  123. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  124. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  125. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  126. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +17 -1
  127. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  128. package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
  129. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  130. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  131. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  132. package/lib/cjs/tile/I3dmTileIO.d.ts.map +1 -1
  133. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  134. package/lib/esm/Camera.d.ts.map +1 -1
  135. package/lib/esm/Camera.js +7 -3
  136. package/lib/esm/Camera.js.map +1 -1
  137. package/lib/esm/CloudStorage.d.ts +20 -5
  138. package/lib/esm/CloudStorage.d.ts.map +1 -1
  139. package/lib/esm/CloudStorage.js +13 -3
  140. package/lib/esm/CloudStorage.js.map +1 -1
  141. package/lib/esm/CloudStorageTileCache.d.ts +4 -1
  142. package/lib/esm/CloudStorageTileCache.d.ts.map +1 -1
  143. package/lib/esm/CloudStorageTileCache.js +5 -1
  144. package/lib/esm/CloudStorageTileCache.js.map +1 -1
  145. package/lib/esm/Code.d.ts +10 -4
  146. package/lib/esm/Code.d.ts.map +1 -1
  147. package/lib/esm/Code.js +6 -2
  148. package/lib/esm/Code.js.map +1 -1
  149. package/lib/esm/ColorDef.d.ts.map +1 -1
  150. package/lib/esm/ColorDef.js +2 -0
  151. package/lib/esm/ColorDef.js.map +1 -1
  152. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  153. package/lib/esm/ConcurrentQuery.js +56 -14
  154. package/lib/esm/ConcurrentQuery.js.map +1 -1
  155. package/lib/esm/ContextRealityModel.d.ts +21 -0
  156. package/lib/esm/ContextRealityModel.d.ts.map +1 -1
  157. package/lib/esm/ContextRealityModel.js +33 -0
  158. package/lib/esm/ContextRealityModel.js.map +1 -1
  159. package/lib/esm/DisplayStyleSettings.d.ts +32 -0
  160. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  161. package/lib/esm/DisplayStyleSettings.js +30 -0
  162. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  163. package/lib/esm/ECSchemaProps.d.ts +40 -0
  164. package/lib/esm/ECSchemaProps.d.ts.map +1 -0
  165. package/lib/esm/ECSchemaProps.js +9 -0
  166. package/lib/esm/ECSchemaProps.js.map +1 -0
  167. package/lib/esm/ElementProps.d.ts +6 -0
  168. package/lib/esm/ElementProps.d.ts.map +1 -1
  169. package/lib/esm/ElementProps.js.map +1 -1
  170. package/lib/esm/FeatureGates.d.ts.map +1 -1
  171. package/lib/esm/FeatureGates.js +6 -2
  172. package/lib/esm/FeatureGates.js.map +1 -1
  173. package/lib/esm/FeatureIndex.d.ts.map +1 -1
  174. package/lib/esm/FeatureIndex.js +5 -1
  175. package/lib/esm/FeatureIndex.js.map +1 -1
  176. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  177. package/lib/esm/FeatureSymbology.js.map +1 -1
  178. package/lib/esm/Fonts.d.ts.map +1 -1
  179. package/lib/esm/Fonts.js.map +1 -1
  180. package/lib/esm/Frustum.d.ts.map +1 -1
  181. package/lib/esm/Frustum.js +55 -21
  182. package/lib/esm/Frustum.js.map +1 -1
  183. package/lib/esm/Gradient.d.ts +18 -2
  184. package/lib/esm/Gradient.d.ts.map +1 -1
  185. package/lib/esm/Gradient.js +29 -18
  186. package/lib/esm/Gradient.js.map +1 -1
  187. package/lib/esm/IModel.d.ts +4 -0
  188. package/lib/esm/IModel.d.ts.map +1 -1
  189. package/lib/esm/IModel.js +8 -1
  190. package/lib/esm/IModel.js.map +1 -1
  191. package/lib/esm/Image.d.ts.map +1 -1
  192. package/lib/esm/Image.js +3 -1
  193. package/lib/esm/Image.js.map +1 -1
  194. package/lib/esm/Localization.d.ts +4 -5
  195. package/lib/esm/Localization.d.ts.map +1 -1
  196. package/lib/esm/Localization.js.map +1 -1
  197. package/lib/esm/QPoint.d.ts +185 -5
  198. package/lib/esm/QPoint.d.ts.map +1 -1
  199. package/lib/esm/QPoint.js +203 -5
  200. package/lib/esm/QPoint.js.map +1 -1
  201. package/lib/esm/RealityModelDisplaySettings.d.ts +119 -0
  202. package/lib/esm/RealityModelDisplaySettings.d.ts.map +1 -0
  203. package/lib/esm/RealityModelDisplaySettings.js +110 -0
  204. package/lib/esm/RealityModelDisplaySettings.js.map +1 -0
  205. package/lib/esm/Render.d.ts.map +1 -1
  206. package/lib/esm/Render.js +11 -3
  207. package/lib/esm/Render.js.map +1 -1
  208. package/lib/esm/RgbColor.d.ts +9 -1
  209. package/lib/esm/RgbColor.d.ts.map +1 -1
  210. package/lib/esm/RgbColor.js +12 -2
  211. package/lib/esm/RgbColor.js.map +1 -1
  212. package/lib/esm/SubCategoryOverride.d.ts.map +1 -1
  213. package/lib/esm/SubCategoryOverride.js.map +1 -1
  214. package/lib/esm/TerrainSettings.d.ts +12 -7
  215. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  216. package/lib/esm/TerrainSettings.js +2 -1
  217. package/lib/esm/TerrainSettings.js.map +1 -1
  218. package/lib/esm/ThematicDisplay.d.ts +6 -10
  219. package/lib/esm/ThematicDisplay.d.ts.map +1 -1
  220. package/lib/esm/ThematicDisplay.js.map +1 -1
  221. package/lib/esm/TileProps.d.ts +5 -0
  222. package/lib/esm/TileProps.d.ts.map +1 -1
  223. package/lib/esm/TileProps.js +10 -0
  224. package/lib/esm/TileProps.js.map +1 -1
  225. package/lib/esm/ViewFlags.d.ts.map +1 -1
  226. package/lib/esm/ViewFlags.js.map +1 -1
  227. package/lib/esm/core-common.d.ts +2 -0
  228. package/lib/esm/core-common.d.ts.map +1 -1
  229. package/lib/esm/core-common.js +2 -0
  230. package/lib/esm/core-common.js.map +1 -1
  231. package/lib/esm/geometry/BoundingSphere.d.ts.map +1 -1
  232. package/lib/esm/geometry/BoundingSphere.js +8 -2
  233. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  234. package/lib/esm/geometry/TextString.d.ts.map +1 -1
  235. package/lib/esm/geometry/TextString.js.map +1 -1
  236. package/lib/esm/ipc/IpcWebSocketTransport.js +10 -3
  237. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  238. package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
  239. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  240. package/lib/esm/rpc/IModelTileRpcInterface.d.ts +9 -1
  241. package/lib/esm/rpc/IModelTileRpcInterface.d.ts.map +1 -1
  242. package/lib/esm/rpc/IModelTileRpcInterface.js +12 -2
  243. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  244. package/lib/esm/rpc/core/RpcConfiguration.js +1 -1
  245. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  246. package/lib/esm/rpc/core/RpcConstants.d.ts +3 -1
  247. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  248. package/lib/esm/rpc/core/RpcConstants.js +4 -1
  249. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  250. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  251. package/lib/esm/rpc/core/RpcRequest.js +8 -2
  252. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  253. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  254. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +3 -0
  255. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  256. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  257. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  258. package/lib/esm/rpc/web/WebAppRpcProtocol.js +17 -1
  259. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  260. package/lib/esm/rpc/web/WebAppRpcRequest.js +1 -1
  261. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  262. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  263. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  264. package/lib/esm/tile/I3dmTileIO.d.ts.map +1 -1
  265. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  266. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,QAA2C;AAAvD,WAAY,QAAQ;IAAG,+CAAY,CAAA;IAAE,qCAAO,CAAA;IAAE,qCAAO,CAAA;AAAC,CAAC,EAA3C,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAAmC;AA0BvD;;;;;;;GAOG;AACH,MAAa,OAAO;IAElB,YAAY,KAAoB;QADhB,UAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEnD,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,gEAAgE;IACzD,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACxD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG;gBAAE,OAAO,IAAI,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArBD,0BAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\n/** The type of a font.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FontType { TrueType = 1, Rsc = 2, Shx = 3 }\r\n\r\n/** An iModel-local identifier for a font.\r\n * @public\r\n * @extensions\r\n */\r\nexport type FontId = number;\r\n\r\n/** The properties of a Font.\r\n * @public\r\n */\r\nexport interface FontProps {\r\n /** the Id, within an iModel, of this font. */\r\n id: FontId;\r\n /** The type of font */\r\n type: FontType;\r\n /** The name of the font. */\r\n name: string;\r\n}\r\n\r\n/** The properties of a FontMap\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FontMapProps { fonts: FontProps[] }\r\n\r\n/**\r\n * A FontMap holds the set of font names available in an iModel.\r\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\r\n * This class maps FontIds to FontProps.\r\n * @note The font map is generally established when the iModel is first created to specify the set of fonts available\r\n * for editors. Adding new entries requires that the schema lock be held.\r\n * @public\r\n */\r\nexport class FontMap {\r\n public readonly fonts = new Map<FontId, FontProps>();\r\n constructor(props?: FontMapProps) {\r\n if (undefined !== props)\r\n this.addFonts(props.fonts);\r\n }\r\n public addFonts(fonts: FontProps[]) {\r\n fonts.forEach((font) => this.fonts.set(font.id, font));\r\n }\r\n public toJSON(): FontMapProps {\r\n const fonts: FontProps[] = [];\r\n this.fonts.forEach((font) => fonts.push(font));\r\n return { fonts };\r\n }\r\n /** look up a font by name or number and return its FontProps */\r\n public getFont(arg: string | FontId): FontProps | undefined {\r\n if (typeof arg === \"number\") return this.fonts.get(arg);\r\n for (const font of this.fonts.values())\r\n if (font.name === arg) return font;\r\n return undefined;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Fonts.js","sourceRoot":"","sources":["../../src/Fonts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,QAA2C;AAAvD,WAAY,QAAQ;IAAG,+CAAY,CAAA;IAAE,qCAAO,CAAA;IAAE,qCAAO,CAAA;AAAC,CAAC,EAA3C,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAAmC;AA0BvD;;;;;;;GAOG;AACH,MAAa,OAAO;IAElB,YAAY,KAAoB;QADhB,UAAK,GAAG,IAAI,GAAG,EAAqB,CAAC;QAEnD,IAAI,SAAS,KAAK,KAAK;YACrB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACM,QAAQ,CAAC,KAAkB;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;IACM,MAAM;QACX,MAAM,KAAK,GAAgB,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,gEAAgE;IACzD,OAAO,CAAC,GAAoB;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ;YACzB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAE7B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;YACpC,IAAI,IAAI,CAAC,IAAI,KAAK,GAAG;gBACnB,OAAO,IAAI,CAAC;QAEhB,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAzBD,0BAyBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\n/** The type of a font.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum FontType { TrueType = 1, Rsc = 2, Shx = 3 }\r\n\r\n/** An iModel-local identifier for a font.\r\n * @public\r\n * @extensions\r\n */\r\nexport type FontId = number;\r\n\r\n/** The properties of a Font.\r\n * @public\r\n */\r\nexport interface FontProps {\r\n /** the Id, within an iModel, of this font. */\r\n id: FontId;\r\n /** The type of font */\r\n type: FontType;\r\n /** The name of the font. */\r\n name: string;\r\n}\r\n\r\n/** The properties of a FontMap\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FontMapProps { fonts: FontProps[] }\r\n\r\n/**\r\n * A FontMap holds the set of font names available in an iModel.\r\n * Within the GeometryStream of an Element, a specific font is referenced by its FontId that is local to the iModel.\r\n * This class maps FontIds to FontProps.\r\n * @note The font map is generally established when the iModel is first created to specify the set of fonts available\r\n * for editors. Adding new entries requires that the schema lock be held.\r\n * @public\r\n */\r\nexport class FontMap {\r\n public readonly fonts = new Map<FontId, FontProps>();\r\n constructor(props?: FontMapProps) {\r\n if (undefined !== props)\r\n this.addFonts(props.fonts);\r\n }\r\n public addFonts(fonts: FontProps[]) {\r\n fonts.forEach((font) => this.fonts.set(font.id, font));\r\n }\r\n public toJSON(): FontMapProps {\r\n const fonts: FontProps[] = [];\r\n this.fonts.forEach((font) => fonts.push(font));\r\n return { fonts };\r\n }\r\n /** look up a font by name or number and return its FontProps */\r\n public getFont(arg: string | FontId): FontProps | undefined {\r\n if (typeof arg === \"number\")\r\n return this.fonts.get(arg);\r\n\r\n for (const font of this.fonts.values())\r\n if (font.name === arg)\r\n return font;\r\n\r\n return undefined;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Frustum.d.ts","sourceRoot":"","sources":["../../src/Frustum.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACiB,kBAAkB,EAA8B,YAAY,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,4BAA4B,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EA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SAAS,IAAI,OAAO,CAM9B;IACD,8FAA8F;IACvF,aAAa,IAAI,IAAI;IAa5B,yFAAyF;IAClF,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,GAAG,kBAAkB;IA6B7G,mIAAmI;IAC5H,wBAAwB,CAAC,KAAK,EAAE,4BAA4B,GAAG,OAAO,EAAE,GAAG,SAAS;CAa5F"}
@@ -75,34 +75,59 @@ class Frustum {
75
75
  this.points[i] = exports.NpcCorners[i].clone();
76
76
  }
77
77
  /** Initialize this Frustum to the 8 corners of the NPC cube. */
78
- initNpc() { for (let i = 0; i < 8; ++i)
79
- core_geometry_1.Point3d.createFrom(exports.NpcCorners[i], this.points[i]); return this; }
78
+ initNpc() {
79
+ for (let i = 0; i < 8; ++i)
80
+ core_geometry_1.Point3d.createFrom(exports.NpcCorners[i], this.points[i]);
81
+ return this;
82
+ }
80
83
  /** Get a corner Point from this Frustum. */
81
84
  getCorner(i) { return this.points[i]; }
82
85
  /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */
83
- getCenter() { return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear)); }
86
+ getCenter() {
87
+ return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear));
88
+ }
84
89
  /** Get the distance between two corners of this Frustum. */
85
- distance(corner1, corner2) { return this.getCorner(corner1).distance(this.getCorner(corner2)); }
90
+ distance(corner1, corner2) {
91
+ return this.getCorner(corner1).distance(this.getCorner(corner2));
92
+ }
86
93
  /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */
87
- getFraction() { return core_geometry_1.Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0); }
94
+ getFraction() {
95
+ return core_geometry_1.Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0);
96
+ }
88
97
  /** Multiply all the points of this Frustum by a Transform, in place. */
89
- multiply(trans) { trans.multiplyPoint3dArrayInPlace(this.points); }
98
+ multiply(trans) {
99
+ trans.multiplyPoint3dArrayInPlace(this.points);
100
+ }
90
101
  /** Offset all of the points of this Frustum by a vector. */
91
- translate(offset) { for (const pt of this.points)
92
- pt.plus(offset, pt); }
102
+ translate(offset) {
103
+ for (const pt of this.points)
104
+ pt.plus(offset, pt);
105
+ }
93
106
  /** Transform all the points of this Frustum and return the result in another Frustum. */
94
- transformBy(trans, result) { result = result ? result : new Frustum(); trans.multiplyPoint3dArray(this.points, result.points); return result; }
107
+ transformBy(trans, result) {
108
+ result = result ? result : new Frustum();
109
+ trans.multiplyPoint3dArray(this.points, result.points);
110
+ return result;
111
+ }
95
112
  /** Calculate a bounding range from the 8 points in this Frustum. */
96
- toRange(range) { range = range ? range : new core_geometry_1.Range3d(); core_geometry_1.Range3d.createArray(this.points, range); return range; }
113
+ toRange(range) {
114
+ return core_geometry_1.Range3d.createArray(this.points, range);
115
+ }
97
116
  /** Make a copy of this Frustum.
98
117
  * @param result Optional Frustum for copy. If undefined allocate a new Frustum.
99
118
  */
100
- clone(result) { result = result ? result : new Frustum(); result.setFrom(this); return result; }
119
+ clone(result) {
120
+ result = result ? result : new Frustum();
121
+ result.setFrom(this);
122
+ return result;
123
+ }
101
124
  /** Set the points of this Frustum to be copies of the points in another Frustum. */
102
125
  setFrom(other) { this.setFromCorners(other.points); }
103
126
  /** Set the points of this frustum from array of corner points in NPC order. */
104
- setFromCorners(corners) { for (let i = 0; i < 8; ++i)
105
- this.points[i].setFrom(corners[i]); }
127
+ setFromCorners(corners) {
128
+ for (let i = 0; i < 8; ++i)
129
+ this.points[i].setFrom(corners[i]);
130
+ }
106
131
  /** Scale this Frustum, in place, about its center by a scale factor. */
107
132
  scaleAboutCenter(scale) {
108
133
  const orig = this.clone();
@@ -117,9 +142,13 @@ class Frustum {
117
142
  orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);
118
143
  }
119
144
  /** The point at the center of the front face of this frustum */
120
- get frontCenter() { return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront)); }
145
+ get frontCenter() {
146
+ return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront));
147
+ }
121
148
  /** The point at the center of the rear face of this frustum */
122
- get rearCenter() { return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear)); }
149
+ get rearCenter() {
150
+ return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear));
151
+ }
123
152
  /** Scale this frustum's XY (viewing) plane about its center */
124
153
  scaleXYAboutCenter(scale) {
125
154
  const frontCenter = this.frontCenter, rearCenter = this.rearCenter;
@@ -160,8 +189,10 @@ class Frustum {
160
189
  return org.plusScaled(zVec, 1 / (1 - fraction), result);
161
190
  }
162
191
  /** Invalidate this Frustum by setting all 8 points to zero. */
163
- invalidate() { for (let i = 0; i < 8; ++i)
164
- this.points[i].set(0, 0, 0); }
192
+ invalidate() {
193
+ for (let i = 0; i < 8; ++i)
194
+ this.points[i].set(0, 0, 0);
195
+ }
165
196
  /** Return true if this Frustum is equal to another Frustum */
166
197
  equals(rhs) {
167
198
  for (let i = 0; i < 8; ++i) {
@@ -173,10 +204,13 @@ class Frustum {
173
204
  /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.
174
205
  * @see [[equals]], [XYZ.isAlmostEqual]($geometry)
175
206
  */
176
- isSame(other) { for (let i = 0; i < 8; ++i) {
177
- if (!this.points[i].isAlmostEqual(other.points[i]))
178
- return false;
179
- } return true; }
207
+ isSame(other) {
208
+ for (let i = 0; i < 8; ++i) {
209
+ if (!this.points[i].isAlmostEqual(other.points[i]))
210
+ return false;
211
+ }
212
+ return true;
213
+ }
180
214
  /** Initialize this Frustum from a Range */
181
215
  initFromRange(range) {
182
216
  const getZ = (arg) => arg.z !== undefined ? arg.z : 0;
@@ -1 +1 @@
1
- {"version":3,"file":"Frustum.js","sourceRoot":"","sources":["../../src/Frustum.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAE8B;AAE9B;;;GAGG;AACH,IAAY,GA4BX;AA5BD,WAAY,GAAG;IACb,uBAAuB;IACvB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,oBAAoB;IACpB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,wBAAwB;IACxB,6BAAQ,CAAA;IACR,yBAAyB;IACzB,6BAAQ,CAAA;IACR,qBAAqB;IACrB,6BAAQ,CAAA;IACR,sBAAsB;IACtB,6BAAQ,CAAA;IAER,iDAAkB,CAAA;IAClB,mDAAmB,CAAA;IACnB,2CAAe,CAAA;IACf,6CAAgB,CAAA;IAChB,mDAAmB,CAAA;IACnB,qDAAoB,CAAA;IACpB,6CAAgB,CAAA;IAChB,+CAAiB,CAAA;IACjB,+BAA+B;IAC/B,6CAAgB,CAAA;AAClB,CAAC,EA5BW,GAAG,GAAH,WAAG,KAAH,WAAG,QA4Bd;AAED;;GAEG;AACU,QAAA,UAAU,GAAG;IACxB,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1B,IAAI,uBAAO,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC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E,CAAC,CAAC,CAAC;QACvD,MAAM,UAAU,GAAG,IAAI,gCAAgB,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG,IAAI,gCAAgB,EAAE,CAAC;QACzC,SAAS,CAAC,WAAW,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAEzD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IAExE,CAAC;CACF;AAtMD,0BAsMC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport {\r\n AxisOrder, ClipPlane, ConvexClipPlaneSet, Geometry, GrowableXYZArray, LowAndHighXY, LowAndHighXYZ, Map4d, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Transform, Vector3d, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/** The 8 corners of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Npc {\r\n /** Left bottom rear */\r\n _000 = 0,\r\n /** Right bottom rear */\r\n _100 = 1,\r\n /** Left top rear */\r\n _010 = 2,\r\n /** Right top rear */\r\n _110 = 3,\r\n /** Left bottom front */\r\n _001 = 4,\r\n /** Right bottom front */\r\n _101 = 5,\r\n /** Left top front */\r\n _011 = 6,\r\n /** Right top front */\r\n _111 = 7,\r\n\r\n LeftBottomRear = 0,\r\n RightBottomRear = 1,\r\n LeftTopRear = 2,\r\n RightTopRear = 3,\r\n LeftBottomFront = 4,\r\n RightBottomFront = 5,\r\n LeftTopFront = 6,\r\n RightTopFront = 7,\r\n /** useful for sizing arrays */\r\n CORNER_COUNT = 8,\r\n}\r\n\r\n/** The 8 corners of an [[Npc]] Frustum.\r\n * @public\r\n */\r\nexport const NpcCorners = [ // eslint-disable-line @typescript-eslint/naming-convention\r\n new Point3d(0.0, 0.0, 0.0),\r\n new Point3d(1.0, 0.0, 0.0),\r\n new Point3d(0.0, 1.0, 0.0),\r\n new Point3d(1.0, 1.0, 0.0),\r\n new Point3d(0.0, 0.0, 1.0),\r\n new Point3d(1.0, 0.0, 1.0),\r\n new Point3d(0.0, 1.0, 1.0),\r\n new Point3d(1.0, 1.0, 1.0),\r\n];\r\nNpcCorners.forEach((corner) => Object.freeze(corner));\r\nObject.freeze(NpcCorners);\r\n\r\n/** The center point of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n */\r\nexport const NpcCenter = new Point3d(.5, .5, .5); // eslint-disable-line @typescript-eslint/naming-convention\r\nObject.freeze(NpcCenter);\r\n\r\n/** The region of physical (3d) space that appears in a view. It forms the field-of-view of a camera.\r\n * It is stored as 8 points, in [[Npc]] order, that must define a truncated pyramid.\r\n * @public\r\n */\r\nexport class Frustum {\r\n /** Array of the 8 points of this Frustum. */\r\n public readonly points: Point3d[] = [];\r\n /** Constructor for Frustum. Members are initialized to the Npc cube. */\r\n public constructor() { for (let i = 0; i < 8; ++i) this.points[i] = NpcCorners[i].clone(); }\r\n /** Initialize this Frustum to the 8 corners of the NPC cube. */\r\n public initNpc() { for (let i = 0; i < 8; ++i) Point3d.createFrom(NpcCorners[i], this.points[i]); return this; }\r\n /** Get a corner Point from this Frustum. */\r\n public getCorner(i: number) { return this.points[i]; }\r\n /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */\r\n public getCenter(): Point3d { return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear)); }\r\n /** Get the distance between two corners of this Frustum. */\r\n public distance(corner1: number, corner2: number): number { return this.getCorner(corner1).distance(this.getCorner(corner2)); }\r\n /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */\r\n public getFraction(): number { return Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0); }\r\n /** Multiply all the points of this Frustum by a Transform, in place. */\r\n public multiply(trans: Transform): void { trans.multiplyPoint3dArrayInPlace(this.points); }\r\n /** Offset all of the points of this Frustum by a vector. */\r\n public translate(offset: XYAndZ): void { for (const pt of this.points) pt.plus(offset, pt); }\r\n /** Transform all the points of this Frustum and return the result in another Frustum. */\r\n public transformBy(trans: Transform, result?: Frustum): Frustum { result = result ? result : new Frustum(); trans.multiplyPoint3dArray(this.points, result.points); return result; }\r\n /** Calculate a bounding range from the 8 points in this Frustum. */\r\n public toRange(range?: Range3d): Range3d { range = range ? range : new Range3d(); Range3d.createArray(this.points, range); return range; }\r\n /** Make a copy of this Frustum.\r\n * @param result Optional Frustum for copy. If undefined allocate a new Frustum.\r\n */\r\n public clone(result?: Frustum): Frustum { result = result ? result : new Frustum(); result.setFrom(this); return result; }\r\n /** Set the points of this Frustum to be copies of the points in another Frustum. */\r\n public setFrom(other: Frustum) { this.setFromCorners(other.points); }\r\n /** Set the points of this frustum from array of corner points in NPC order. */\r\n public setFromCorners(corners: Point3d[]) { for (let i = 0; i < 8; ++i) this.points[i].setFrom(corners[i]); }\r\n /** Scale this Frustum, in place, about its center by a scale factor. */\r\n public scaleAboutCenter(scale: number): void {\r\n const orig = this.clone();\r\n const f = 0.5 * (1.0 + scale);\r\n orig.points[Npc._111].interpolate(f, orig.points[Npc._000], this.points[Npc._000]);\r\n orig.points[Npc._011].interpolate(f, orig.points[Npc._100], this.points[Npc._100]);\r\n orig.points[Npc._101].interpolate(f, orig.points[Npc._010], this.points[Npc._010]);\r\n orig.points[Npc._001].interpolate(f, orig.points[Npc._110], this.points[Npc._110]);\r\n orig.points[Npc._110].interpolate(f, orig.points[Npc._001], this.points[Npc._001]);\r\n orig.points[Npc._010].interpolate(f, orig.points[Npc._101], this.points[Npc._101]);\r\n orig.points[Npc._100].interpolate(f, orig.points[Npc._011], this.points[Npc._011]);\r\n orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);\r\n }\r\n /** The point at the center of the front face of this frustum */\r\n public get frontCenter() { return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront)); }\r\n\r\n /** The point at the center of the rear face of this frustum */\r\n public get rearCenter() { return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear)); }\r\n\r\n /** Scale this frustum's XY (viewing) plane about its center */\r\n public scaleXYAboutCenter(scale: number) {\r\n const frontCenter = this.frontCenter, rearCenter = this.rearCenter;\r\n frontCenter.interpolate(scale, this.points[Npc.LeftTopFront], this.points[Npc.LeftTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightTopFront], this.points[Npc.RightTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.LeftBottomFront], this.points[Npc.LeftBottomFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightBottomFront], this.points[Npc.RightBottomFront]);\r\n\r\n rearCenter.interpolate(scale, this.points[Npc.LeftTopRear], this.points[Npc.LeftTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightTopRear], this.points[Npc.RightTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.LeftBottomRear], this.points[Npc.LeftBottomRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightBottomRear], this.points[Npc.RightBottomRear]);\r\n }\r\n\r\n /** Create a Map4d that converts world coordinates to/from [[Npc]] coordinates of this Frustum. */\r\n public toMap4d(): Map4d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n return Map4d.createVectorFrustum(org, xVec, yVec, zVec, this.getFraction());\r\n }\r\n\r\n /** Get the rotation matrix to the frame of this frustum. This is equivalent to the view rotation matrix. */\r\n public getRotation(result?: Matrix3d): Matrix3d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const matrix = Matrix3d.createRigidFromColumns(xVec, yVec, AxisOrder.XYZ, result);\r\n if (matrix)\r\n matrix.transposeInPlace();\r\n return matrix;\r\n }\r\n\r\n /** Get the eye point - undefined if parallel projection */\r\n public getEyePoint(result?: Point3d): Point3d | undefined {\r\n const fraction = this.getFraction();\r\n\r\n if (Math.abs(fraction - 1) < 1E-8)\r\n return undefined; // Parallel.\r\n\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n\r\n return org.plusScaled(zVec, 1 / (1 - fraction), result);\r\n }\r\n\r\n /** Invalidate this Frustum by setting all 8 points to zero. */\r\n public invalidate(): void { for (let i = 0; i < 8; ++i) this.points[i].set(0, 0, 0); }\r\n /** Return true if this Frustum is equal to another Frustum */\r\n public equals(rhs: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isExactEqual(rhs.points[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.\r\n * @see [[equals]], [XYZ.isAlmostEqual]($geometry)\r\n */\r\n public isSame(other: Frustum): boolean { for (let i = 0; i < 8; ++i) { if (!this.points[i].isAlmostEqual(other.points[i])) return false; } return true; }\r\n\r\n /** Initialize this Frustum from a Range */\r\n public initFromRange(range: LowAndHighXYZ | LowAndHighXY): void {\r\n const getZ = (arg: any): number => arg.z !== undefined ? arg.z : 0;\r\n const pts = this.points;\r\n pts[0].x = pts[2].x = pts[4].x = pts[6].x = range.low.x;\r\n pts[1].x = pts[3].x = pts[5].x = pts[7].x = range.high.x;\r\n pts[0].y = pts[1].y = pts[4].y = pts[5].y = range.low.y;\r\n pts[2].y = pts[3].y = pts[6].y = pts[7].y = range.high.y;\r\n pts[0].z = pts[1].z = pts[2].z = pts[3].z = getZ(range.low);\r\n pts[4].z = pts[5].z = pts[6].z = pts[7].z = getZ(range.high);\r\n }\r\n\r\n /** Create a new Frustum from a Range3d */\r\n public static fromRange(range: LowAndHighXYZ | LowAndHighXY, out?: Frustum): Frustum {\r\n const frustum = undefined !== out ? out : new Frustum();\r\n frustum.initFromRange(range);\r\n return frustum;\r\n }\r\n\r\n /** Return true if this Frustum has a mirror (is not in the correct order.) */\r\n public get hasMirror(): boolean {\r\n const pts = this.points;\r\n const u = pts[Npc._000].vectorTo(pts[Npc._001]);\r\n const v = pts[Npc._000].vectorTo(pts[Npc._010]);\r\n const w = pts[Npc._000].vectorTo(pts[Npc._100]);\r\n return (u.tripleProduct(v, w) > 0);\r\n }\r\n /** Make sure the frustum point order does not include mirroring. If so, reverse the order. */\r\n public fixPointOrder(): void {\r\n if (!this.hasMirror)\r\n return;\r\n\r\n // frustum has mirroring, reverse points\r\n const pts = this.points;\r\n for (let i = 0; i < 8; i += 2) {\r\n const tmpPoint = pts[i];\r\n pts[i] = pts[i + 1];\r\n pts[i + 1] = tmpPoint;\r\n }\r\n }\r\n\r\n /** Get a convex set of clipping planes bounding the region contained by this Frustum. */\r\n public getRangePlanes(clipFront: boolean, clipBack: boolean, expandPlaneDistance: number): ConvexClipPlaneSet {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n const scratchNormal = Vector3d.create();\r\n Vector3d.createCrossProductToPoints(this.points[5], this.points[3], this.points[1], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[1]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[2], this.points[4], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[3], this.points[6], this.points[2], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[2]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[4], this.points[1], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n\r\n if (clipBack) {\r\n Vector3d.createCrossProductToPoints(this.points[1], this.points[2], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n }\r\n if (clipFront) {\r\n Vector3d.createCrossProductToPoints(this.points[6], this.points[5], this.points[4], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[4]) - expandPlaneDistance));\r\n }\r\n return convexSet;\r\n }\r\n\r\n /** Get a (convex) polygon that represents the intersection of this frustum with a plane, or undefined if no intersection exists */\r\n public getIntersectionWithPlane(plane: Plane3dByOriginAndUnitNormal): Point3d[] | undefined {\r\n const clipPlane = ClipPlane.createPlane(plane);\r\n const loopPoints = clipPlane.intersectRange(this.toRange(), true);\r\n if (undefined === loopPoints)\r\n return undefined;\r\n\r\n const convexSet = this.getRangePlanes(false, false, 0);\r\n const workPoints = new GrowableXYZArray();\r\n const outPoints = new GrowableXYZArray();\r\n convexSet.polygonClip(loopPoints, outPoints, workPoints);\r\n\r\n return outPoints.length < 4 ? undefined : outPoints.getPoint3dArray();\r\n\r\n }\r\n}\r\n"]}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EzD,OAAO,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;IACxE,CAAC;CACF;AA/PD,0BA+PC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport {\r\n AxisOrder, ClipPlane, ConvexClipPlaneSet, Geometry, GrowableXYZArray, LowAndHighXY, LowAndHighXYZ, Map4d, Matrix3d, Plane3dByOriginAndUnitNormal, Point3d, Range3d, Transform, Vector3d, XYAndZ,\r\n} from \"@itwin/core-geometry\";\r\n\r\n/** The 8 corners of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n * @extensions\r\n */\r\nexport enum Npc {\r\n /** Left bottom rear */\r\n _000 = 0,\r\n /** Right bottom rear */\r\n _100 = 1,\r\n /** Left top rear */\r\n _010 = 2,\r\n /** Right top rear */\r\n _110 = 3,\r\n /** Left bottom front */\r\n _001 = 4,\r\n /** Right bottom front */\r\n _101 = 5,\r\n /** Left top front */\r\n _011 = 6,\r\n /** Right top front */\r\n _111 = 7,\r\n\r\n LeftBottomRear = 0,\r\n RightBottomRear = 1,\r\n LeftTopRear = 2,\r\n RightTopRear = 3,\r\n LeftBottomFront = 4,\r\n RightBottomFront = 5,\r\n LeftTopFront = 6,\r\n RightTopFront = 7,\r\n /** useful for sizing arrays */\r\n CORNER_COUNT = 8,\r\n}\r\n\r\n/** The 8 corners of an [[Npc]] Frustum.\r\n * @public\r\n */\r\nexport const NpcCorners = [ // eslint-disable-line @typescript-eslint/naming-convention\r\n new Point3d(0.0, 0.0, 0.0),\r\n new Point3d(1.0, 0.0, 0.0),\r\n new Point3d(0.0, 1.0, 0.0),\r\n new Point3d(1.0, 1.0, 0.0),\r\n new Point3d(0.0, 0.0, 1.0),\r\n new Point3d(1.0, 0.0, 1.0),\r\n new Point3d(0.0, 1.0, 1.0),\r\n new Point3d(1.0, 1.0, 1.0),\r\n];\r\nNpcCorners.forEach((corner) => Object.freeze(corner));\r\nObject.freeze(NpcCorners);\r\n\r\n/** The center point of the [Normalized Plane Coordinate]($docs/learning/glossary.md#npc) cube.\r\n * @public\r\n */\r\nexport const NpcCenter = new Point3d(.5, .5, .5); // eslint-disable-line @typescript-eslint/naming-convention\r\nObject.freeze(NpcCenter);\r\n\r\n/** The region of physical (3d) space that appears in a view. It forms the field-of-view of a camera.\r\n * It is stored as 8 points, in [[Npc]] order, that must define a truncated pyramid.\r\n * @public\r\n */\r\nexport class Frustum {\r\n /** Array of the 8 points of this Frustum. */\r\n public readonly points: Point3d[] = [];\r\n /** Constructor for Frustum. Members are initialized to the Npc cube. */\r\n public constructor() {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i] = NpcCorners[i].clone();\r\n }\r\n\r\n /** Initialize this Frustum to the 8 corners of the NPC cube. */\r\n public initNpc() {\r\n for (let i = 0; i < 8; ++i)\r\n Point3d.createFrom(NpcCorners[i], this.points[i]);\r\n\r\n return this;\r\n }\r\n\r\n /** Get a corner Point from this Frustum. */\r\n public getCorner(i: number) { return this.points[i]; }\r\n /** Get the point at the center of this Frustum (halfway between RightTopFront and LeftBottomRear. */\r\n public getCenter(): Point3d {\r\n return this.getCorner(Npc.RightTopFront).interpolate(0.5, this.getCorner(Npc.LeftBottomRear));\r\n }\r\n\r\n /** Get the distance between two corners of this Frustum. */\r\n public distance(corner1: number, corner2: number): number {\r\n return this.getCorner(corner1).distance(this.getCorner(corner2));\r\n }\r\n\r\n /** Get the ratio of the length of the diagonal of the front plane to the diagonal of the back plane. */\r\n public getFraction(): number {\r\n return Geometry.safeDivideFraction(this.distance(Npc.LeftTopFront, Npc.RightBottomFront), this.distance(Npc.LeftTopRear, Npc.RightBottomRear), 0);\r\n }\r\n\r\n /** Multiply all the points of this Frustum by a Transform, in place. */\r\n public multiply(trans: Transform): void {\r\n trans.multiplyPoint3dArrayInPlace(this.points);\r\n }\r\n\r\n /** Offset all of the points of this Frustum by a vector. */\r\n public translate(offset: XYAndZ): void {\r\n for (const pt of this.points)\r\n pt.plus(offset, pt);\r\n }\r\n\r\n /** Transform all the points of this Frustum and return the result in another Frustum. */\r\n public transformBy(trans: Transform, result?: Frustum): Frustum {\r\n result = result ? result : new Frustum();\r\n trans.multiplyPoint3dArray(this.points, result.points);\r\n return result;\r\n }\r\n\r\n /** Calculate a bounding range from the 8 points in this Frustum. */\r\n public toRange(range?: Range3d): Range3d {\r\n return Range3d.createArray(this.points, range);\r\n }\r\n\r\n /** Make a copy of this Frustum.\r\n * @param result Optional Frustum for copy. If undefined allocate a new Frustum.\r\n */\r\n public clone(result?: Frustum): Frustum {\r\n result = result ? result : new Frustum();\r\n result.setFrom(this);\r\n return result;\r\n }\r\n\r\n /** Set the points of this Frustum to be copies of the points in another Frustum. */\r\n public setFrom(other: Frustum) { this.setFromCorners(other.points); }\r\n /** Set the points of this frustum from array of corner points in NPC order. */\r\n public setFromCorners(corners: Point3d[]) {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i].setFrom(corners[i]);\r\n }\r\n\r\n /** Scale this Frustum, in place, about its center by a scale factor. */\r\n public scaleAboutCenter(scale: number): void {\r\n const orig = this.clone();\r\n const f = 0.5 * (1.0 + scale);\r\n orig.points[Npc._111].interpolate(f, orig.points[Npc._000], this.points[Npc._000]);\r\n orig.points[Npc._011].interpolate(f, orig.points[Npc._100], this.points[Npc._100]);\r\n orig.points[Npc._101].interpolate(f, orig.points[Npc._010], this.points[Npc._010]);\r\n orig.points[Npc._001].interpolate(f, orig.points[Npc._110], this.points[Npc._110]);\r\n orig.points[Npc._110].interpolate(f, orig.points[Npc._001], this.points[Npc._001]);\r\n orig.points[Npc._010].interpolate(f, orig.points[Npc._101], this.points[Npc._101]);\r\n orig.points[Npc._100].interpolate(f, orig.points[Npc._011], this.points[Npc._011]);\r\n orig.points[Npc._000].interpolate(f, orig.points[Npc._111], this.points[Npc._111]);\r\n }\r\n /** The point at the center of the front face of this frustum */\r\n public get frontCenter() {\r\n return this.getCorner(Npc.LeftBottomFront).interpolate(.5, this.getCorner(Npc.RightTopFront));\r\n }\r\n\r\n /** The point at the center of the rear face of this frustum */\r\n public get rearCenter() {\r\n return this.getCorner(Npc.LeftBottomRear).interpolate(.5, this.getCorner(Npc.RightTopRear));\r\n }\r\n\r\n /** Scale this frustum's XY (viewing) plane about its center */\r\n public scaleXYAboutCenter(scale: number) {\r\n const frontCenter = this.frontCenter, rearCenter = this.rearCenter;\r\n frontCenter.interpolate(scale, this.points[Npc.LeftTopFront], this.points[Npc.LeftTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightTopFront], this.points[Npc.RightTopFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.LeftBottomFront], this.points[Npc.LeftBottomFront]);\r\n frontCenter.interpolate(scale, this.points[Npc.RightBottomFront], this.points[Npc.RightBottomFront]);\r\n\r\n rearCenter.interpolate(scale, this.points[Npc.LeftTopRear], this.points[Npc.LeftTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightTopRear], this.points[Npc.RightTopRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.LeftBottomRear], this.points[Npc.LeftBottomRear]);\r\n rearCenter.interpolate(scale, this.points[Npc.RightBottomRear], this.points[Npc.RightBottomRear]);\r\n }\r\n\r\n /** Create a Map4d that converts world coordinates to/from [[Npc]] coordinates of this Frustum. */\r\n public toMap4d(): Map4d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n return Map4d.createVectorFrustum(org, xVec, yVec, zVec, this.getFraction());\r\n }\r\n\r\n /** Get the rotation matrix to the frame of this frustum. This is equivalent to the view rotation matrix. */\r\n public getRotation(result?: Matrix3d): Matrix3d | undefined {\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const xVec = org.vectorTo(this.getCorner(Npc.RightBottomRear));\r\n const yVec = org.vectorTo(this.getCorner(Npc.LeftTopRear));\r\n const matrix = Matrix3d.createRigidFromColumns(xVec, yVec, AxisOrder.XYZ, result);\r\n if (matrix)\r\n matrix.transposeInPlace();\r\n return matrix;\r\n }\r\n\r\n /** Get the eye point - undefined if parallel projection */\r\n public getEyePoint(result?: Point3d): Point3d | undefined {\r\n const fraction = this.getFraction();\r\n\r\n if (Math.abs(fraction - 1) < 1E-8)\r\n return undefined; // Parallel.\r\n\r\n const org = this.getCorner(Npc.LeftBottomRear);\r\n const zVec = org.vectorTo(this.getCorner(Npc.LeftBottomFront));\r\n\r\n return org.plusScaled(zVec, 1 / (1 - fraction), result);\r\n }\r\n\r\n /** Invalidate this Frustum by setting all 8 points to zero. */\r\n public invalidate(): void {\r\n for (let i = 0; i < 8; ++i)\r\n this.points[i].set(0, 0, 0);\r\n }\r\n\r\n /** Return true if this Frustum is equal to another Frustum */\r\n public equals(rhs: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isExactEqual(rhs.points[i]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n /** Return true if all of the points in this Frustum are *almost* the same as the points in another Frustum.\r\n * @see [[equals]], [XYZ.isAlmostEqual]($geometry)\r\n */\r\n public isSame(other: Frustum): boolean {\r\n for (let i = 0; i < 8; ++i) {\r\n if (!this.points[i].isAlmostEqual(other.points[i]))\r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n /** Initialize this Frustum from a Range */\r\n public initFromRange(range: LowAndHighXYZ | LowAndHighXY): void {\r\n const getZ = (arg: any): number => arg.z !== undefined ? arg.z : 0;\r\n const pts = this.points;\r\n pts[0].x = pts[2].x = pts[4].x = pts[6].x = range.low.x;\r\n pts[1].x = pts[3].x = pts[5].x = pts[7].x = range.high.x;\r\n pts[0].y = pts[1].y = pts[4].y = pts[5].y = range.low.y;\r\n pts[2].y = pts[3].y = pts[6].y = pts[7].y = range.high.y;\r\n pts[0].z = pts[1].z = pts[2].z = pts[3].z = getZ(range.low);\r\n pts[4].z = pts[5].z = pts[6].z = pts[7].z = getZ(range.high);\r\n }\r\n\r\n /** Create a new Frustum from a Range3d */\r\n public static fromRange(range: LowAndHighXYZ | LowAndHighXY, out?: Frustum): Frustum {\r\n const frustum = undefined !== out ? out : new Frustum();\r\n frustum.initFromRange(range);\r\n return frustum;\r\n }\r\n\r\n /** Return true if this Frustum has a mirror (is not in the correct order.) */\r\n public get hasMirror(): boolean {\r\n const pts = this.points;\r\n const u = pts[Npc._000].vectorTo(pts[Npc._001]);\r\n const v = pts[Npc._000].vectorTo(pts[Npc._010]);\r\n const w = pts[Npc._000].vectorTo(pts[Npc._100]);\r\n return (u.tripleProduct(v, w) > 0);\r\n }\r\n /** Make sure the frustum point order does not include mirroring. If so, reverse the order. */\r\n public fixPointOrder(): void {\r\n if (!this.hasMirror)\r\n return;\r\n\r\n // frustum has mirroring, reverse points\r\n const pts = this.points;\r\n for (let i = 0; i < 8; i += 2) {\r\n const tmpPoint = pts[i];\r\n pts[i] = pts[i + 1];\r\n pts[i + 1] = tmpPoint;\r\n }\r\n }\r\n\r\n /** Get a convex set of clipping planes bounding the region contained by this Frustum. */\r\n public getRangePlanes(clipFront: boolean, clipBack: boolean, expandPlaneDistance: number): ConvexClipPlaneSet {\r\n const convexSet = ConvexClipPlaneSet.createEmpty();\r\n const scratchNormal = Vector3d.create();\r\n Vector3d.createCrossProductToPoints(this.points[5], this.points[3], this.points[1], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[1]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[2], this.points[4], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[3], this.points[6], this.points[2], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[2]) - expandPlaneDistance));\r\n Vector3d.createCrossProductToPoints(this.points[4], this.points[1], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n\r\n if (clipBack) {\r\n Vector3d.createCrossProductToPoints(this.points[1], this.points[2], this.points[0], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[0]) - expandPlaneDistance));\r\n }\r\n if (clipFront) {\r\n Vector3d.createCrossProductToPoints(this.points[6], this.points[5], this.points[4], scratchNormal);\r\n if (scratchNormal.normalizeInPlace())\r\n convexSet.addPlaneToConvexSet(ClipPlane.createNormalAndDistance(scratchNormal, scratchNormal.dotProduct(this.points[4]) - expandPlaneDistance));\r\n }\r\n return convexSet;\r\n }\r\n\r\n /** Get a (convex) polygon that represents the intersection of this frustum with a plane, or undefined if no intersection exists */\r\n public getIntersectionWithPlane(plane: Plane3dByOriginAndUnitNormal): Point3d[] | undefined {\r\n const clipPlane = ClipPlane.createPlane(plane);\r\n const loopPoints = clipPlane.intersectRange(this.toRange(), true);\r\n if (undefined === loopPoints)\r\n return undefined;\r\n\r\n const convexSet = this.getRangePlanes(false, false, 0);\r\n const workPoints = new GrowableXYZArray();\r\n const outPoints = new GrowableXYZArray();\r\n convexSet.polygonClip(loopPoints, outPoints, workPoints);\r\n\r\n return outPoints.length < 4 ? undefined : outPoints.getPoint3dArray();\r\n }\r\n}\r\n"]}
@@ -65,6 +65,19 @@ export declare namespace Gradient {
65
65
  /** Settings applicable to [[ThematicDisplay]]. */
66
66
  thematicSettings?: ThematicGradientSettingsProps;
67
67
  }
68
+ /** Arguments supplied to [[Gradient.Symb.produceImage]].
69
+ * @public
70
+ */
71
+ interface ProduceImageArgs {
72
+ /** The desired width of the image in pixels. Must be an integer greater than zero. */
73
+ width: number;
74
+ /** The desired height of the image in pixels. Must be an integer greater than zero. */
75
+ height: number;
76
+ /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included
77
+ * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.
78
+ */
79
+ includeThematicMargin?: boolean;
80
+ }
68
81
  /** Multi-color area fill defined by a range of colors that vary by position.
69
82
  * Gradient fill can be applied to planar regions.
70
83
  * @see [[Gradient.SymbProps]]
@@ -113,12 +126,15 @@ export declare namespace Gradient {
113
126
  * @internal
114
127
  */
115
128
  getThematicImageForRenderer(maxDimension: number): ImageBuffer;
116
- /** Applies this gradient's settings to produce a bitmap image.
129
+ /** Produces a bitmap image from this gradient.
117
130
  * @param width Width of the image
118
131
  * @param height Height of the image
119
- * @returns Bitmap image of the specified dimensions. For thematic gradients with a width > 1, pixels in each column will be identical.
132
+ * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.
133
+ * @see [[produceImage]] for more customization.
120
134
  */
121
135
  getImage(width: number, height: number): ImageBuffer;
136
+ /** Produces a bitmap image from this gradient. */
137
+ produceImage(args: ProduceImageArgs): ImageBuffer;
122
138
  }
123
139
  }
124
140
  //# sourceMappingURL=Gradient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,s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E/E;;;;WAIG;QACI,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW;QAsDrE;;;;;WAKG;QACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW;QAO3D,kDAAkD;QAC3C,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW;KAqJzD;CACF"}
@@ -283,12 +283,21 @@ var Gradient;
283
283
  (0, core_bentley_1.assert)(undefined !== imageBuffer);
284
284
  return imageBuffer;
285
285
  }
286
- /** Applies this gradient's settings to produce a bitmap image.
286
+ /** Produces a bitmap image from this gradient.
287
287
  * @param width Width of the image
288
288
  * @param height Height of the image
289
- * @returns Bitmap image of the specified dimensions. For thematic gradients with a width > 1, pixels in each column will be identical.
289
+ * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.
290
+ * @see [[produceImage]] for more customization.
290
291
  */
291
292
  getImage(width, height) {
293
+ if (this.mode === Mode.Thematic)
294
+ width = 1;
295
+ return this.produceImage({ width, height, includeThematicMargin: true });
296
+ }
297
+ /** Produces a bitmap image from this gradient. */
298
+ produceImage(args) {
299
+ var _a;
300
+ const { width, height, includeThematicMargin } = { ...args };
292
301
  const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;
293
302
  const cosA = Math.cos(thisAngle);
294
303
  const sinA = Math.sin(thisAngle);
@@ -394,27 +403,29 @@ var Gradient;
394
403
  break;
395
404
  }
396
405
  case Mode.Thematic: {
397
- let settings = this.thematicSettings;
398
- if (settings === undefined) {
399
- settings = ThematicDisplay_1.ThematicGradientSettings.defaults;
400
- }
406
+ const settings = (_a = this.thematicSettings) !== null && _a !== void 0 ? _a : ThematicDisplay_1.ThematicGradientSettings.defaults;
401
407
  for (let j = 0; j < height; j++) {
402
408
  let f = 1 - j / height;
403
409
  let color;
404
- f = (f - ThematicDisplay_1.ThematicGradientSettings.margin) / (ThematicDisplay_1.ThematicGradientSettings.contentRange);
405
- switch (settings.mode) {
406
- case ThematicDisplay_1.ThematicGradientMode.SteppedWithDelimiter:
407
- case ThematicDisplay_1.ThematicGradientMode.IsoLines:
408
- case ThematicDisplay_1.ThematicGradientMode.Stepped: {
409
- if (settings.stepCount > 1) {
410
- const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
411
- color = this.mapColor(fStep);
410
+ if (includeThematicMargin && (f < ThematicDisplay_1.ThematicGradientSettings.margin || f > ThematicDisplay_1.ThematicGradientSettings.contentMax)) {
411
+ color = settings.marginColor;
412
+ }
413
+ else {
414
+ f = (f - ThematicDisplay_1.ThematicGradientSettings.margin) / (ThematicDisplay_1.ThematicGradientSettings.contentRange);
415
+ switch (settings.mode) {
416
+ case ThematicDisplay_1.ThematicGradientMode.SteppedWithDelimiter:
417
+ case ThematicDisplay_1.ThematicGradientMode.IsoLines:
418
+ case ThematicDisplay_1.ThematicGradientMode.Stepped: {
419
+ if (settings.stepCount > 1) {
420
+ const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
421
+ color = this.mapColor(fStep);
422
+ }
423
+ break;
412
424
  }
413
- break;
425
+ case ThematicDisplay_1.ThematicGradientMode.Smooth:
426
+ color = this.mapColor(f);
427
+ break;
414
428
  }
415
- case ThematicDisplay_1.ThematicGradientMode.Smooth:
416
- color = this.mapColor(f);
417
- break;
418
429
  }
419
430
  for (let i = 0; i < width; i++) {
420
431
  image[currentIdx--] = color.getAlpha();