@itwin/core-common 5.0.0-dev.32 → 5.0.0-dev.34

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 (193) hide show
  1. package/lib/cjs/AmbientOcclusion.js +9 -9
  2. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  3. package/lib/cjs/AnalysisStyle.js +1 -1
  4. package/lib/cjs/AnalysisStyle.js.map +1 -1
  5. package/lib/cjs/Atmosphere.js +19 -21
  6. package/lib/cjs/Atmosphere.js.map +1 -1
  7. package/lib/cjs/ClipStyle.js +5 -5
  8. package/lib/cjs/ClipStyle.js.map +1 -1
  9. package/lib/cjs/ColorDef.js +10 -10
  10. package/lib/cjs/ColorDef.js.map +1 -1
  11. package/lib/cjs/ContourDisplay.js +5 -5
  12. package/lib/cjs/ContourDisplay.js.map +1 -1
  13. package/lib/cjs/ECSqlReader.js +1 -1
  14. package/lib/cjs/ECSqlReader.js.map +1 -1
  15. package/lib/cjs/ElementProps.js +2 -2
  16. package/lib/cjs/ElementProps.js.map +1 -1
  17. package/lib/cjs/Environment.js +2 -2
  18. package/lib/cjs/Environment.js.map +1 -1
  19. package/lib/cjs/FeatureSymbology.js +3 -3
  20. package/lib/cjs/FeatureSymbology.js.map +1 -1
  21. package/lib/cjs/Gradient.js +9 -9
  22. package/lib/cjs/Gradient.js.map +1 -1
  23. package/lib/cjs/GroundPlane.js +2 -2
  24. package/lib/cjs/GroundPlane.js.map +1 -1
  25. package/lib/cjs/HiddenLine.js +4 -4
  26. package/lib/cjs/HiddenLine.js.map +1 -1
  27. package/lib/cjs/IModel.js +6 -6
  28. package/lib/cjs/IModel.js.map +1 -1
  29. package/lib/cjs/LightSettings.js +1 -1
  30. package/lib/cjs/LightSettings.js.map +1 -1
  31. package/lib/cjs/PlanarClipMask.js +2 -2
  32. package/lib/cjs/PlanarClipMask.js.map +1 -1
  33. package/lib/cjs/RealityModelDisplaySettings.js +4 -4
  34. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  35. package/lib/cjs/RenderMaterial.js +3 -3
  36. package/lib/cjs/RenderMaterial.js.map +1 -1
  37. package/lib/cjs/SkyBox.js +4 -4
  38. package/lib/cjs/SkyBox.js.map +1 -1
  39. package/lib/cjs/SolarShadows.js +1 -1
  40. package/lib/cjs/SolarShadows.js.map +1 -1
  41. package/lib/cjs/SubCategoryAppearance.js +1 -1
  42. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  43. package/lib/cjs/SubCategoryOverride.js +2 -2
  44. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  45. package/lib/cjs/TextureMapping.js +2 -2
  46. package/lib/cjs/TextureMapping.js.map +1 -1
  47. package/lib/cjs/ThematicDisplay.js +2 -2
  48. package/lib/cjs/ThematicDisplay.js.map +1 -1
  49. package/lib/cjs/ViewDetails.js +2 -2
  50. package/lib/cjs/ViewDetails.js.map +1 -1
  51. package/lib/cjs/ViewFlags.js +2 -2
  52. package/lib/cjs/ViewFlags.js.map +1 -1
  53. package/lib/cjs/WhiteOnWhiteReversalSettings.js +2 -2
  54. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  55. package/lib/cjs/annotation/TextStyle.js +19 -19
  56. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  57. package/lib/cjs/geometry/Cartographic.js +13 -13
  58. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  59. package/lib/cjs/ipc/IpcWebSocket.js +1 -1
  60. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  61. package/lib/cjs/ipc/IpcWebSocketTransport.js +1 -1
  62. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  63. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  64. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  65. package/lib/cjs/rpc/IModelReadRpcInterface.js +4 -4
  66. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  67. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  68. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  69. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  70. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  71. package/lib/cjs/rpc/core/RpcConfiguration.js +32 -34
  72. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  73. package/lib/cjs/rpc/core/RpcControl.js +8 -15
  74. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  75. package/lib/cjs/rpc/core/RpcInvocation.js +3 -5
  76. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  77. package/lib/cjs/rpc/core/RpcOperation.js +2 -2
  78. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  79. package/lib/cjs/rpc/core/RpcProtocol.js +4 -4
  80. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  81. package/lib/cjs/rpc/core/RpcPush.js +5 -5
  82. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  83. package/lib/cjs/rpc/core/RpcRequest.js +5 -5
  84. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  85. package/lib/cjs/rpc/core/RpcRoutingToken.js +2 -2
  86. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  87. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
  88. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  89. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +6 -6
  90. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  91. package/lib/cjs/rpc/web/RpcMultipart.js +12 -12
  92. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  93. package/lib/cjs/rpc/web/WebAppRpcRequest.js +17 -19
  94. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  95. package/lib/cjs/tile/IModelTileIO.js +1 -1
  96. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  97. package/lib/esm/AmbientOcclusion.js +9 -9
  98. package/lib/esm/AmbientOcclusion.js.map +1 -1
  99. package/lib/esm/AnalysisStyle.js +1 -1
  100. package/lib/esm/AnalysisStyle.js.map +1 -1
  101. package/lib/esm/Atmosphere.js +19 -21
  102. package/lib/esm/Atmosphere.js.map +1 -1
  103. package/lib/esm/ClipStyle.js +5 -5
  104. package/lib/esm/ClipStyle.js.map +1 -1
  105. package/lib/esm/ColorDef.js +10 -10
  106. package/lib/esm/ColorDef.js.map +1 -1
  107. package/lib/esm/ContourDisplay.js +5 -5
  108. package/lib/esm/ContourDisplay.js.map +1 -1
  109. package/lib/esm/ECSqlReader.js +1 -1
  110. package/lib/esm/ECSqlReader.js.map +1 -1
  111. package/lib/esm/ElementProps.js +2 -2
  112. package/lib/esm/ElementProps.js.map +1 -1
  113. package/lib/esm/Environment.js +2 -2
  114. package/lib/esm/Environment.js.map +1 -1
  115. package/lib/esm/FeatureSymbology.js +3 -3
  116. package/lib/esm/FeatureSymbology.js.map +1 -1
  117. package/lib/esm/Gradient.js +9 -9
  118. package/lib/esm/Gradient.js.map +1 -1
  119. package/lib/esm/GroundPlane.js +2 -2
  120. package/lib/esm/GroundPlane.js.map +1 -1
  121. package/lib/esm/HiddenLine.js +4 -4
  122. package/lib/esm/HiddenLine.js.map +1 -1
  123. package/lib/esm/IModel.js +6 -6
  124. package/lib/esm/IModel.js.map +1 -1
  125. package/lib/esm/LightSettings.js +1 -1
  126. package/lib/esm/LightSettings.js.map +1 -1
  127. package/lib/esm/PlanarClipMask.js +2 -2
  128. package/lib/esm/PlanarClipMask.js.map +1 -1
  129. package/lib/esm/RealityModelDisplaySettings.js +4 -4
  130. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  131. package/lib/esm/RenderMaterial.js +3 -3
  132. package/lib/esm/RenderMaterial.js.map +1 -1
  133. package/lib/esm/SkyBox.js +4 -4
  134. package/lib/esm/SkyBox.js.map +1 -1
  135. package/lib/esm/SolarShadows.js +1 -1
  136. package/lib/esm/SolarShadows.js.map +1 -1
  137. package/lib/esm/SubCategoryAppearance.js +1 -1
  138. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  139. package/lib/esm/SubCategoryOverride.js +2 -2
  140. package/lib/esm/SubCategoryOverride.js.map +1 -1
  141. package/lib/esm/TextureMapping.js +2 -2
  142. package/lib/esm/TextureMapping.js.map +1 -1
  143. package/lib/esm/ThematicDisplay.js +2 -2
  144. package/lib/esm/ThematicDisplay.js.map +1 -1
  145. package/lib/esm/ViewDetails.js +2 -2
  146. package/lib/esm/ViewDetails.js.map +1 -1
  147. package/lib/esm/ViewFlags.js +2 -2
  148. package/lib/esm/ViewFlags.js.map +1 -1
  149. package/lib/esm/WhiteOnWhiteReversalSettings.js +2 -2
  150. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  151. package/lib/esm/annotation/TextStyle.js +19 -19
  152. package/lib/esm/annotation/TextStyle.js.map +1 -1
  153. package/lib/esm/geometry/Cartographic.js +13 -13
  154. package/lib/esm/geometry/Cartographic.js.map +1 -1
  155. package/lib/esm/ipc/IpcWebSocket.js +1 -1
  156. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  157. package/lib/esm/ipc/IpcWebSocketTransport.js +1 -1
  158. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  159. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  160. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  161. package/lib/esm/rpc/IModelReadRpcInterface.js +4 -4
  162. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  163. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  164. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  165. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  166. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  167. package/lib/esm/rpc/core/RpcConfiguration.js +32 -34
  168. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  169. package/lib/esm/rpc/core/RpcControl.js +8 -15
  170. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  171. package/lib/esm/rpc/core/RpcInvocation.js +3 -5
  172. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  173. package/lib/esm/rpc/core/RpcOperation.js +2 -2
  174. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  175. package/lib/esm/rpc/core/RpcProtocol.js +4 -4
  176. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  177. package/lib/esm/rpc/core/RpcPush.js +5 -5
  178. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  179. package/lib/esm/rpc/core/RpcRequest.js +5 -5
  180. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  181. package/lib/esm/rpc/core/RpcRoutingToken.js +2 -2
  182. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  183. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
  184. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  185. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +6 -6
  186. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  187. package/lib/esm/rpc/web/RpcMultipart.js +12 -12
  188. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  189. package/lib/esm/rpc/web/WebAppRpcRequest.js +17 -19
  190. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  191. package/lib/esm/tile/IModelTileIO.js +1 -1
  192. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  193. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"ViewFlags.js","sourceRoot":"","sources":["../../src/ViewFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qBAAqB;AAErB,OAAO,EAAE,SAAS,EAAoC,MAAM,qBAAqB,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAyBX;AAzBD,WAAY,UA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AK,KAAK,CAAC,OAAO;eAC9B,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;eACpC,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;eACpC,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB;eAChD,IAAI,CAAC,eAAe,KAAK,KAAK,CAAC,eAAe;eAC9C,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,mBAAmB,KAAK,KAAK,CAAC,mBAAmB;eACtD,IAAI,CAAC,oBAAoB,KAAK,KAAK,CAAC,oBAAoB,CAAC;IAChE,CAAC;;AAzFD,kFAAkF;AAC3D,kBAAQ,GAAG,IAAI,SAAS,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\n// cspell:ignore ovrs\n\nimport { JsonUtils, Mutable, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\n\n/** Enumerates the available basic rendering modes, as part of a [DisplayStyle]($backend)'s [[ViewFlags]].\n * The rendering mode broadly affects various aspects of the display style - in particular, whether and how surfaces and their edges are drawn.\n * @public\n * @extensions\n */\nexport enum RenderMode {\n /** Renders only the edges of surfaces, with exceptions for planar regions based on their [[FillFlags]].\n * Lighting (and by extension, shadows) is not applied.\n * [[HiddenLine.Settings]] are not applied - edges use the elements' width, style, and color.\n * [[ViewFlags.hiddenEdges]] is ignored - hidden edges are never displayed in wireframe mode.\n */\n Wireframe = 0,\n /** By default, renders surfaces without their edges.\n * Lighting and shadows can be applied using [[ViewFlags.lighting]] and [[ViewFlags.shadows]].\n * Edges can be enabled using [[ViewFlags.visibleEdges]] and [[ViewFlags.hiddenEdges]], and their appearance customized using [[HiddenLine.Settings]].\n * Surfaces can be drawn with transparency, based on [[ViewFlags.transparency]].\n */\n SmoothShade = 6,\n /** Renders surfaces and their edges. By default, edges are drawn in white; this can be overridden using [[HiddenLine.Settings]].\n * All surfaces are rendered opaque. If a surface's transparency is below that specified by [[HiddenLine.Settings.transparencyThreshold]], it is not rendered.\n * Materials and textures are not applied - surfaces are drawn in their actual colors.\n * [[ViewFlags.visibleEdges]] is ignored - visible edges are always drawn. Hidden edges can be enabled using [[ViewFlags.hiddenEdges]].\n * Lighting (and by extension, shadows) is not applied.\n */\n SolidFill = 4,\n /** Identical to [[RenderMode.SolidFill]], except:\n * - Surfaces are drawn using the [DisplayStyle]($backend)'s background color.\n * - Edges are drawn using their surface's colors; this can be overridden using [[HiddenLine.Settings]].\n */\n HiddenLine = 3,\n}\n\n/** JSON representation of [[ViewFlags]].\n * This is a persistence format with some unfortunate quirks that have been retained for backwards compatibility.\n * In particular, it supplies three separate flags intended to control lighting - [[noCameraLights]], [[noSourceLights]], and [[noSolarLight]] -\n * but there exists only a single [[ViewFlags.lighting]] flag. [[ViewFlags.lighting]] is set to true unless all three of the \"no lighting\" flags are true.\n * It also uses awkward negative ([[noConstruct]], [[noTransp]]) and/or abbreviated ([[clipVol]], [[visEdges]]) property names that differ from\n * those of the corresponding [[ViewFlags]] properties, making usage of this type in code error-prone.\n * Prefer to use [[ViewFlagsProperties]] unless you need to work directly with the persistence format.\n * @public\n * @extensions\n */\nexport interface ViewFlagProps {\n /** If true, don't display geometry of class [[GeometryClass.Construction]]. */\n noConstruct?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Dimension]]. */\n noDim?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Pattern]]. */\n noPattern?: boolean;\n /** If true, all lines are drawn with a width of 1 pixel. */\n noWeight?: boolean;\n /** If true, don't apply [[LinePixels]] styles. */\n noStyle?: boolean;\n /** If true, display transparency geometry as opaque. */\n noTransp?: boolean;\n /** If true, don't show filled planar regions, unless they use [[FillFlags.Always]]. */\n noFill?: boolean;\n /** If true, display a grid in the view. */\n grid?: boolean;\n /** If true, display graphics representing the [AuxCoordSystem]($backend). */\n acs?: boolean;\n /** If true, don't apply [[RenderTexture]]s to surfaces. */\n noTexture?: boolean;\n /** If true, don't apply [[RenderMaterial]]s to surfaces. */\n noMaterial?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noCameraLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSourceLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSolarLight?: boolean;\n /** If true, display the edges of surfaces. */\n visEdges?: boolean;\n /** If true, display the edges of surfaces, even if they are behind other geometry. */\n hidEdges?: boolean;\n /** If true, display shadows. */\n shadows?: boolean;\n /** If true, apply the view's clipping volume. Has no effect on other types of clips like [[ModelClipGroups]]. */\n clipVol?: boolean;\n /** If true, apply the view's [[DisplayStyleSettings.monochromeColor]] and [[DisplayStyleSettings.monochromeMode]] to produce a monochrome image. */\n monochrome?: boolean;\n /** The basic rendering mode, which affects the behavior of other flags. */\n renderMode?: RenderMode;\n /** Display a background map. */\n backgroundMap?: boolean;\n /** If true, apply [[AmbientOcclusion]]. */\n ambientOcclusion?: boolean;\n /** If true, apply [[ThematicDisplay]]. */\n thematicDisplay?: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n wiremesh?: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n forceSurfaceDiscard?: boolean;\n /** Disables the \"white-on-white reversal\" employed by some CAD applications.\n * @see [[ViewFlags.whiteOnWhiteReversal]].\n */\n noWhiteOnWhiteReversal?: boolean;\n}\n\nfunction edgesRequired(renderMode: RenderMode, visibleEdges: boolean): boolean {\n return visibleEdges || RenderMode.SmoothShade !== renderMode;\n}\n\n/** Flags controlling how graphics appear within a view.\n * A [[ViewFlags]] object is immutable. There are several ways to produce a modified copy of a ViewFlags object:\n * ```ts\n * // Start with the default values for all properties.\n * let vf = ViewFlags.defaults;\n * // Change a single boolean property:\n * vf = vf.with(\"visibleEdges\", true);\n * // Change only the render mode:\n * vf = vf.withRenderMode(RenderMode.HiddenLine);\n * // Change multiple properties:\n * vf = vf.copy({ renderMode: RenderMode.SmoothShade, visibleEdges: true });\n * // Reset multiple properties to their default values:\n * vf = vf.copy({ renderMode: undefined, visibleEdges: undefined });\n *\n * ```\n * [[with]] and [[withRenderMode]] should be preferred if you only need to change a single property, as they will not create a new object unless\n * the new value differs from the current value.\n * [[copy]] and [[override]] should be preferred if you need to change multiple properties, as they will create no more than one new object, vs\n * each call to [[with]] or [[withRenderMode]] potentially creating a new object.\n * @see [[DisplayStyleSettings.viewFlags]] to define the view flags for a [DisplayStyle]($backend).\n * @public\n */\nexport class ViewFlags {\n /** The basic rendering mode applied to the view. This modulates the behavior of some of the other flags.\n * Default: [[RenderMode.Wireframe]].\n * @see [[RenderMode]] for details.\n */\n public readonly renderMode: RenderMode;\n /** Whether to display geometry of class [[GeometryClass.Dimension]]. Default: true. */\n public readonly dimensions: boolean;\n /** Whether to display geometry of class [[GeometryClass.Pattern]]. Default: true. */\n public readonly patterns: boolean;\n /** Whether to allow lines and edges to draw with width greater than one pixel. Default: true. */\n public readonly weights: boolean;\n /** Whether [[LinePixels]] are allowed to apply patterns to lines and edges. If false, they all draw as solid lines. Default: true. */\n public readonly styles: boolean;\n /** Whether element transparency is applied. If false, transparent geometry is drawn opaque. Default: true.\n * @see [[RenderMode]] for render mode-specific behavior.\n */\n public readonly transparency: boolean;\n /** In [[RenderMode.Wireframe]] only, whether to display the interiors of planar regions with [[FillFlags.ByView]]. Default: true. */\n public readonly fill: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderTexture]]s to surfaces. Default: true. */\n public readonly textures: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderMaterial]]s to surfaces. Default: true. */\n public readonly materials: boolean;\n /** Whether to display a graphical representation of the view's [AuxCoordSystem]($backend). Default: false. */\n public readonly acsTriad: boolean;\n /** Whether to display a grid. Default: false. */\n public readonly grid: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display the edges of surfaces. Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly visibleEdges: boolean;\n /** In any mode except [[RenderMode.Wireframe]], whether to display the edges of surfaces occluded by other geometry.\n * This has no effect unless [[visibleEdges]] is also true.\n * Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly hiddenEdges: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display solar shadows. This has no effect unless [[lighting]] is also true. Default: false.\n * @note Rendering shadows can reduce framerate, particularly on less capable graphics hardware or in complex scenes.\n */\n public readonly shadows: boolean;\n /** Whether to apply the view's clip volume to the geometry in the scene.\n * Default: true, except when using [[fromJSON]].\n * @see [[ViewDetails.clipVector]] to define the view's clip volume.\n */\n public readonly clipVolume: boolean;\n /** Whether to display geometry of class [[GeometryClass.Construction]].\n * Default: false, except when using [[fromJSON]].\n */\n public readonly constructions: boolean;\n /** Whether to produce a monochrome image. Default: false.\n * @see [DisplayStyleSettings.monochromeColor]($common) to define the monochrome color.\n * @see [DisplayStyleSettings.monochromeMode]($common) to define how the monochrome image is produced.\n */\n public readonly monochrome: boolean;\n /** Whether to display background map imagery. Default: false.\n * @see [[DisplayStyleSettings.backgroundMap]] to customize the map settings.\n */\n public readonly backgroundMap: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[AmbientOcclusion]]. Default: false. */\n public readonly ambientOcclusion: boolean;\n /** Whether to apply [[ThematicDisplay]]. Default: false. */\n public readonly thematicDisplay: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n public readonly wiremesh: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n public readonly forceSurfaceDiscard: boolean;\n /** Whether to apply white-on-white reversal.\n * Some CAD applications use this to cause white geometry to be drawn as black if the view's background color is white.\n * When enabled, the [[DisplayStyleSettings]]' [[WhiteOnWhiteReversalSettings]] control how white-on-white reversal is applied.\n * Default: true.\n */\n public readonly whiteOnWhiteReversal: boolean;\n\n /** In [[RenderMode.SmoothShade]], whether to apply lighting to surfaces.\n * Default: false, except when using [[fromJSON]].\n * @see [[DisplayStyleSettings.lights]] to customize the light settings.\n */\n public readonly lighting: boolean;\n\n /** Create a new ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public constructor(flags?: Partial<ViewFlagsProperties>) {\n this.renderMode = flags?.renderMode ?? RenderMode.Wireframe;\n this.dimensions = flags?.dimensions ?? true;\n this.patterns = flags?.patterns ?? true;\n this.weights = flags?.weights ?? true;\n this.styles = flags?.styles ?? true;\n this.transparency = flags?.transparency ?? true;\n this.fill = flags?.fill ?? true;\n this.textures = flags?.textures ?? true;\n this.materials = flags?.materials ?? true;\n this.acsTriad = flags?.acsTriad ?? false;\n this.grid = flags?.grid ?? false;\n this.visibleEdges = flags?.visibleEdges ?? false;\n this.hiddenEdges = flags?.hiddenEdges ?? false;\n this.shadows = flags?.shadows ?? false;\n this.clipVolume = flags?.clipVolume ?? true;\n this.constructions = flags?.constructions ?? false;\n this.monochrome = flags?.monochrome ?? false;\n this.backgroundMap = flags?.backgroundMap ?? false;\n this.ambientOcclusion = flags?.ambientOcclusion ?? false;\n this.thematicDisplay = flags?.thematicDisplay ?? false;\n this.wiremesh = flags?.wiremesh ?? false;\n this.forceSurfaceDiscard = flags?.forceSurfaceDiscard ?? false;\n this.whiteOnWhiteReversal = flags?.whiteOnWhiteReversal ?? true;\n this.lighting = flags?.lighting ?? false;\n }\n\n /** Produce a copy of these ViewFlags with some modified properties. Any properties not explicitly specified by `changedFlags` will retain their current values.\n * @param changedFlags Properties to modify.\n * @returns A copy of these ViewFlags modified according to the supplied properties.\n * @note Any explicitly `undefined` property of `changedFlags` will be set to its default value in the returned ViewFlags.\n * @see [[override]] to have `undefined` properties retain their current values.\n */\n public copy(changedFlags: Partial<ViewFlagsProperties>): ViewFlags {\n return JsonUtils.isNonEmptyObject(changedFlags) ? new ViewFlags({ ...this, ...changedFlags }) : this;\n }\n\n /** Produce a copy of these ViewFlags, overriding some of its properties. Any properties not explicitly specified by `overrides` will retain their current values,\n * as will any property explicitly set to `undefined`.\n * @param overrides The properties to override.\n * @see [[copy]] to have `undefined` properties reset to their default values.\n */\n public override(overrides: Partial<ViewFlagsProperties>): ViewFlags {\n // This method can get called very frequently when a RenderTimeline script is applied to the view. Often `overrides` will be an empty object.\n // To optimize:\n // - Bail as quickly as possible if nothing is actually overridden, without allocating a new ViewFlags.\n // - Only make a copy of the input if at least one property is explicitly `undefined`.\n let copied = false;\n let anyOverridden = false;\n\n for (const propName of Object.keys(overrides)) {\n const key = propName as keyof Partial<ViewFlagsProperties>;\n const overrideValue = overrides[key];\n if (undefined === overrideValue) {\n if (!copied) {\n // Don't modify input...\n overrides = { ...overrides };\n copied = true;\n }\n\n // `undefined` means \"retain existing value\".\n delete overrides[key];\n } else if (overrideValue !== this[key]) {\n anyOverridden = true;\n }\n }\n\n return anyOverridden ? this.copy(overrides) : this;\n }\n\n /** Produce a copy of these ViewFlags with a single boolean property changed.\n * @param flag The name of the property.\n * @param value The value to change the property to.\n * @returns A new ViewFlags with the property changed as specified, or `this` if the property already has the specified value.\n * @see [[withRenderMode]] to change the [[renderMode]] property.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public with(flag: keyof Omit<ViewFlagsProperties, \"renderMode\">, value: boolean): ViewFlags {\n if (this[flag] === value)\n return this;\n\n const props: ViewFlagsProperties = { ...this };\n props[flag] = value;\n return new ViewFlags(props);\n }\n\n /** Produce a copy of these ViewFlags with a different [[renderMode]].\n * @param renderMode The new render mode.\n * @returns A new ViewFlags with the render mode changed as specified, or `this` if the render mode is already set to the requested value.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public withRenderMode(renderMode: RenderMode): ViewFlags {\n return renderMode === this.renderMode ? this : this.copy({ renderMode });\n }\n\n /** Adjust view flags for renderer.\n * @internal\n */\n public normalize(): ViewFlags {\n switch (this.renderMode) {\n case RenderMode.Wireframe:\n if (this.visibleEdges || this.hiddenEdges)\n return this.copy({ visibleEdges: false, hiddenEdges: false });\n break;\n case RenderMode.SmoothShade:\n if (!this.visibleEdges)\n return this.copy({ hiddenEdges: false });\n break;\n case RenderMode.HiddenLine:\n case RenderMode.SolidFill:\n if (!this.visibleEdges || this.transparency)\n return this.copy({ visibleEdges: true, transparency: false });\n break;\n }\n\n return this;\n }\n\n /** Returns true if edges that could be occluded by other geometry are visible for the current [[RenderMode]]. */\n public hiddenEdgesVisible(): boolean {\n switch (this.renderMode) {\n case RenderMode.SolidFill:\n case RenderMode.HiddenLine:\n return this.hiddenEdges;\n case RenderMode.SmoothShade:\n return this.visibleEdges && this.hiddenEdges;\n }\n return true;\n }\n\n /** Returns true if the edges of surfaces should be displayed, based on [[RenderMode]] and the [[visibleEdges]] flag. */\n public edgesRequired(): boolean {\n return edgesRequired(this.renderMode, this.visibleEdges);\n }\n\n /** Convert to JSON representation.\n * Properties are omitted if they match the default values.\n */\n public toJSON(): ViewFlagProps {\n const out: ViewFlagProps = {};\n if (!this.constructions)\n out.noConstruct = true;\n if (!this.dimensions)\n out.noDim = true;\n if (!this.patterns)\n out.noPattern = true;\n if (!this.weights)\n out.noWeight = true;\n if (!this.styles)\n out.noStyle = true;\n if (!this.transparency)\n out.noTransp = true;\n if (!this.fill)\n out.noFill = true;\n if (this.grid)\n out.grid = true;\n if (this.acsTriad)\n out.acs = true;\n if (!this.textures)\n out.noTexture = true;\n if (!this.materials)\n out.noMaterial = true;\n if (!this.lighting)\n out.noCameraLights = out.noSourceLights = out.noSolarLight = true;\n if (this.visibleEdges)\n out.visEdges = true;\n if (this.hiddenEdges)\n out.hidEdges = true;\n if (this.shadows)\n out.shadows = true;\n if (this.clipVolume)\n out.clipVol = true;\n if (this.monochrome)\n out.monochrome = true;\n if (this.backgroundMap)\n out.backgroundMap = true;\n if (this.ambientOcclusion)\n out.ambientOcclusion = true;\n if (this.thematicDisplay)\n out.thematicDisplay = true;\n if (this.wiremesh)\n out.wiremesh = true;\n if (this.forceSurfaceDiscard)\n out.forceSurfaceDiscard = true;\n if (!this.whiteOnWhiteReversal)\n out.noWhiteOnWhiteReversal = true;\n\n out.renderMode = this.renderMode;\n return out;\n }\n\n /** Like [[toJSON]], but no properties are omitted. */\n public toFullyDefinedJSON(): Required<ViewFlagProps> {\n return {\n renderMode: this.renderMode,\n noConstruct: !this.constructions,\n noDim: !this.dimensions,\n noPattern: !this.patterns,\n noWeight: !this.weights,\n noStyle: !this.styles,\n noTransp: !this.transparency,\n noFill: !this.fill,\n grid: this.grid,\n acs: this.acsTriad,\n noTexture: !this.textures,\n noMaterial: !this.materials,\n noCameraLights: !this.lighting,\n noSourceLights: !this.lighting,\n noSolarLight: !this.lighting,\n visEdges: this.visibleEdges,\n hidEdges: this.hiddenEdges,\n shadows: this.shadows,\n clipVol: this.clipVolume,\n monochrome: this.monochrome,\n backgroundMap: this.backgroundMap,\n ambientOcclusion: this.ambientOcclusion,\n thematicDisplay: this.thematicDisplay,\n wiremesh: this.wiremesh,\n forceSurfaceDiscard: this.forceSurfaceDiscard,\n noWhiteOnWhiteReversal: !this.whiteOnWhiteReversal,\n };\n }\n\n /** A ViewFlags object with all properties initialized to their default values. */\n public static readonly defaults = new ViewFlags();\n\n /** Create a ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public static create(flags?: Partial<ViewFlagsProperties>): ViewFlags {\n return flags && !JsonUtils.isEmptyObject(flags) ? new ViewFlags(flags) : this.defaults;\n }\n\n /** Create a ViewFlags from its JSON representation.\n * @note As described in [[ViewFlagProps]], the JSON representation is awkward and error-prone. Prefer to use [[create]] unless you\n * need to deal with the persistence format directly.\n * @note The default values differ slightly from those used by the constructor and [[create]]:\n * - [[clipVolume]] defaults to false.\n * - [[constructions]] defaults to true.\n * - [[lighting]] defaults to true unless all of [[ViewFlagProps.noSolarLight]], [[ViewFlagProps.noCameraLights]], and [[ViewFlagProps.noSourceLights]] are true.\n */\n public static fromJSON(json?: ViewFlagProps): ViewFlags {\n if (!json)\n return this.defaults;\n\n let renderMode: RenderMode;\n const renderModeValue = JsonUtils.asInt(json.renderMode);\n if (renderModeValue < RenderMode.HiddenLine)\n renderMode = RenderMode.Wireframe;\n else if (renderModeValue > RenderMode.SolidFill)\n renderMode = RenderMode.SmoothShade;\n else\n renderMode = renderModeValue;\n\n const lighting = !JsonUtils.asBool(json.noCameraLights) || !JsonUtils.asBool(json.noSourceLights) || !JsonUtils.asBool(json.noSolarLight);\n return new ViewFlags({\n renderMode,\n lighting,\n constructions: !JsonUtils.asBool(json.noConstruct),\n dimensions: !JsonUtils.asBool(json.noDim),\n patterns: !JsonUtils.asBool(json.noPattern),\n weights: !JsonUtils.asBool(json.noWeight),\n styles: !JsonUtils.asBool(json.noStyle),\n transparency: !JsonUtils.asBool(json.noTransp),\n fill: !JsonUtils.asBool(json.noFill),\n grid: JsonUtils.asBool(json.grid),\n acsTriad: JsonUtils.asBool(json.acs),\n textures: !JsonUtils.asBool(json.noTexture),\n materials: !JsonUtils.asBool(json.noMaterial),\n visibleEdges: JsonUtils.asBool(json.visEdges),\n hiddenEdges: JsonUtils.asBool(json.hidEdges),\n shadows: JsonUtils.asBool(json.shadows),\n clipVolume: JsonUtils.asBool(json.clipVol),\n monochrome: JsonUtils.asBool(json.monochrome),\n backgroundMap: JsonUtils.asBool(json.backgroundMap),\n ambientOcclusion: JsonUtils.asBool(json.ambientOcclusion),\n thematicDisplay: JsonUtils.asBool(json.thematicDisplay),\n wiremesh: JsonUtils.asBool(json.wiremesh),\n forceSurfaceDiscard: JsonUtils.asBool(json.forceSurfaceDiscard),\n whiteOnWhiteReversal: !JsonUtils.asBool(json.noWhiteOnWhiteReversal),\n });\n }\n\n /** Returns true if `this` and `other` are equivalent. */\n public equals(other: Readonly<ViewFlagsProperties>): boolean {\n if (this === other)\n return true;\n\n return this.renderMode === other.renderMode\n && this.dimensions === other.dimensions\n && this.patterns === other.patterns\n && this.weights === other.weights\n && this.styles === other.styles\n && this.transparency === other.transparency\n && this.fill === other.fill\n && this.textures === other.textures\n && this.materials === other.materials\n && this.acsTriad === other.acsTriad\n && this.grid === other.grid\n && this.visibleEdges === other.visibleEdges\n && this.hiddenEdges === other.hiddenEdges\n && this.lighting === other.lighting\n && this.shadows === other.shadows\n && this.clipVolume === other.clipVolume\n && this.constructions === other.constructions\n && this.monochrome === other.monochrome\n && this.backgroundMap === other.backgroundMap\n && this.ambientOcclusion === other.ambientOcclusion\n && this.thematicDisplay === other.thematicDisplay\n && this.wiremesh === other.wiremesh\n && this.forceSurfaceDiscard === other.forceSurfaceDiscard\n && this.whiteOnWhiteReversal === other.whiteOnWhiteReversal;\n }\n}\n\n/** A type containing all of the properties of [[ViewFlags]] with none of the methods and with the `readonly` modifiers removed.\n * @see [[ViewFlags.create]], [[ViewFlags.copy]], and [[ViewFlags.override]] for methods accepting an object of this type.\n * @public\n * @extensions\n */\nexport type ViewFlagsProperties = Mutable<NonFunctionPropertiesOf<ViewFlags>>;\n\n/** A type that describes how to override selected properties of a [[ViewFlags]].\n * @see [[ViewFlags.override]] to apply the overrides to a ViewFlags object.\n * @public\n * @extensions\n */\nexport type ViewFlagOverrides = Partial<ViewFlagsProperties>;\n"]}
1
+ {"version":3,"file":"ViewFlags.js","sourceRoot":"","sources":["../../src/ViewFlags.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qBAAqB;AAErB,OAAO,EAAE,SAAS,EAAoC,MAAM,qBAAqB,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAN,IAAY,UAyBX;AAzBD,WAAY,UAAU;IACpB;;;;OAIG;IACH,qDAAa,CAAA;IACb;;;;OAIG;IACH,yDAAe,CAAA;IACf;;;;;OAKG;IACH,qDAAa,CAAA;IACb;;;OAGG;IACH,uDAAc,CAAA;AAChB,CAAC,EAzBW,UAAU,KAAV,UAAU,QAyBrB;AA0ED,SAAS,aAAa,CAAC,UAAsB,EAAE,YAAqB;IAClE,OAAO,YAAY,IAAI,UAAU,CAAC,WAAW,KAAK,UAAU,CAAC;AAC/D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,SAAS;IAsFpB;;OAEG;IACH,YAAmB,KAAoC;QACrD,IAAI,CAAC,UAAU,GAAG,KAAK,EAAE,UAAU,IAAI,UAAU,CAAC,SAAS,CAAC;QAC5D,IAAI,CAAC,UAAU,GAAG,KAAK,EAAE,UAAU,IAAI,IAAI,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,KAAK,EAAE,QAAQ,IAAI,IAAI,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,EAAE,OAAO,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,KAAK,EAAE,MAAM,IAAI,IAAI,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,KAAK,EA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IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM;eAC5B,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY;eACxC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;eACxB,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS;eAClC,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;eACxB,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY;eACxC,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW;eACtC,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO;eAC9B,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;eACpC,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;eACpC,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,gBAAgB,KAAK,KAAK,CAAC,gBAAgB;eAChD,IAAI,CAAC,eAAe,KAAK,KAAK,CAAC,eAAe;eAC9C,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;eAChC,IAAI,CAAC,mBAAmB,KAAK,KAAK,CAAC,mBAAmB;eACtD,IAAI,CAAC,oBAAoB,KAAK,KAAK,CAAC,oBAAoB,CAAC;IAChE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\n// cspell:ignore ovrs\n\nimport { JsonUtils, Mutable, NonFunctionPropertiesOf } from \"@itwin/core-bentley\";\n\n/** Enumerates the available basic rendering modes, as part of a [DisplayStyle]($backend)'s [[ViewFlags]].\n * The rendering mode broadly affects various aspects of the display style - in particular, whether and how surfaces and their edges are drawn.\n * @public\n * @extensions\n */\nexport enum RenderMode {\n /** Renders only the edges of surfaces, with exceptions for planar regions based on their [[FillFlags]].\n * Lighting (and by extension, shadows) is not applied.\n * [[HiddenLine.Settings]] are not applied - edges use the elements' width, style, and color.\n * [[ViewFlags.hiddenEdges]] is ignored - hidden edges are never displayed in wireframe mode.\n */\n Wireframe = 0,\n /** By default, renders surfaces without their edges.\n * Lighting and shadows can be applied using [[ViewFlags.lighting]] and [[ViewFlags.shadows]].\n * Edges can be enabled using [[ViewFlags.visibleEdges]] and [[ViewFlags.hiddenEdges]], and their appearance customized using [[HiddenLine.Settings]].\n * Surfaces can be drawn with transparency, based on [[ViewFlags.transparency]].\n */\n SmoothShade = 6,\n /** Renders surfaces and their edges. By default, edges are drawn in white; this can be overridden using [[HiddenLine.Settings]].\n * All surfaces are rendered opaque. If a surface's transparency is below that specified by [[HiddenLine.Settings.transparencyThreshold]], it is not rendered.\n * Materials and textures are not applied - surfaces are drawn in their actual colors.\n * [[ViewFlags.visibleEdges]] is ignored - visible edges are always drawn. Hidden edges can be enabled using [[ViewFlags.hiddenEdges]].\n * Lighting (and by extension, shadows) is not applied.\n */\n SolidFill = 4,\n /** Identical to [[RenderMode.SolidFill]], except:\n * - Surfaces are drawn using the [DisplayStyle]($backend)'s background color.\n * - Edges are drawn using their surface's colors; this can be overridden using [[HiddenLine.Settings]].\n */\n HiddenLine = 3,\n}\n\n/** JSON representation of [[ViewFlags]].\n * This is a persistence format with some unfortunate quirks that have been retained for backwards compatibility.\n * In particular, it supplies three separate flags intended to control lighting - [[noCameraLights]], [[noSourceLights]], and [[noSolarLight]] -\n * but there exists only a single [[ViewFlags.lighting]] flag. [[ViewFlags.lighting]] is set to true unless all three of the \"no lighting\" flags are true.\n * It also uses awkward negative ([[noConstruct]], [[noTransp]]) and/or abbreviated ([[clipVol]], [[visEdges]]) property names that differ from\n * those of the corresponding [[ViewFlags]] properties, making usage of this type in code error-prone.\n * Prefer to use [[ViewFlagsProperties]] unless you need to work directly with the persistence format.\n * @public\n * @extensions\n */\nexport interface ViewFlagProps {\n /** If true, don't display geometry of class [[GeometryClass.Construction]]. */\n noConstruct?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Dimension]]. */\n noDim?: boolean;\n /** If true, don't display geometry of class [[GeometryClass.Pattern]]. */\n noPattern?: boolean;\n /** If true, all lines are drawn with a width of 1 pixel. */\n noWeight?: boolean;\n /** If true, don't apply [[LinePixels]] styles. */\n noStyle?: boolean;\n /** If true, display transparency geometry as opaque. */\n noTransp?: boolean;\n /** If true, don't show filled planar regions, unless they use [[FillFlags.Always]]. */\n noFill?: boolean;\n /** If true, display a grid in the view. */\n grid?: boolean;\n /** If true, display graphics representing the [AuxCoordSystem]($backend). */\n acs?: boolean;\n /** If true, don't apply [[RenderTexture]]s to surfaces. */\n noTexture?: boolean;\n /** If true, don't apply [[RenderMaterial]]s to surfaces. */\n noMaterial?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noCameraLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSourceLights?: boolean;\n /** See [[ViewFlagProps]] for how this affects [[ViewFlags.lighting]]. */\n noSolarLight?: boolean;\n /** If true, display the edges of surfaces. */\n visEdges?: boolean;\n /** If true, display the edges of surfaces, even if they are behind other geometry. */\n hidEdges?: boolean;\n /** If true, display shadows. */\n shadows?: boolean;\n /** If true, apply the view's clipping volume. Has no effect on other types of clips like [[ModelClipGroups]]. */\n clipVol?: boolean;\n /** If true, apply the view's [[DisplayStyleSettings.monochromeColor]] and [[DisplayStyleSettings.monochromeMode]] to produce a monochrome image. */\n monochrome?: boolean;\n /** The basic rendering mode, which affects the behavior of other flags. */\n renderMode?: RenderMode;\n /** Display a background map. */\n backgroundMap?: boolean;\n /** If true, apply [[AmbientOcclusion]]. */\n ambientOcclusion?: boolean;\n /** If true, apply [[ThematicDisplay]]. */\n thematicDisplay?: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n wiremesh?: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n forceSurfaceDiscard?: boolean;\n /** Disables the \"white-on-white reversal\" employed by some CAD applications.\n * @see [[ViewFlags.whiteOnWhiteReversal]].\n */\n noWhiteOnWhiteReversal?: boolean;\n}\n\nfunction edgesRequired(renderMode: RenderMode, visibleEdges: boolean): boolean {\n return visibleEdges || RenderMode.SmoothShade !== renderMode;\n}\n\n/** Flags controlling how graphics appear within a view.\n * A [[ViewFlags]] object is immutable. There are several ways to produce a modified copy of a ViewFlags object:\n * ```ts\n * // Start with the default values for all properties.\n * let vf = ViewFlags.defaults;\n * // Change a single boolean property:\n * vf = vf.with(\"visibleEdges\", true);\n * // Change only the render mode:\n * vf = vf.withRenderMode(RenderMode.HiddenLine);\n * // Change multiple properties:\n * vf = vf.copy({ renderMode: RenderMode.SmoothShade, visibleEdges: true });\n * // Reset multiple properties to their default values:\n * vf = vf.copy({ renderMode: undefined, visibleEdges: undefined });\n *\n * ```\n * [[with]] and [[withRenderMode]] should be preferred if you only need to change a single property, as they will not create a new object unless\n * the new value differs from the current value.\n * [[copy]] and [[override]] should be preferred if you need to change multiple properties, as they will create no more than one new object, vs\n * each call to [[with]] or [[withRenderMode]] potentially creating a new object.\n * @see [[DisplayStyleSettings.viewFlags]] to define the view flags for a [DisplayStyle]($backend).\n * @public\n */\nexport class ViewFlags {\n /** The basic rendering mode applied to the view. This modulates the behavior of some of the other flags.\n * Default: [[RenderMode.Wireframe]].\n * @see [[RenderMode]] for details.\n */\n public readonly renderMode: RenderMode;\n /** Whether to display geometry of class [[GeometryClass.Dimension]]. Default: true. */\n public readonly dimensions: boolean;\n /** Whether to display geometry of class [[GeometryClass.Pattern]]. Default: true. */\n public readonly patterns: boolean;\n /** Whether to allow lines and edges to draw with width greater than one pixel. Default: true. */\n public readonly weights: boolean;\n /** Whether [[LinePixels]] are allowed to apply patterns to lines and edges. If false, they all draw as solid lines. Default: true. */\n public readonly styles: boolean;\n /** Whether element transparency is applied. If false, transparent geometry is drawn opaque. Default: true.\n * @see [[RenderMode]] for render mode-specific behavior.\n */\n public readonly transparency: boolean;\n /** In [[RenderMode.Wireframe]] only, whether to display the interiors of planar regions with [[FillFlags.ByView]]. Default: true. */\n public readonly fill: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderTexture]]s to surfaces. Default: true. */\n public readonly textures: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[RenderMaterial]]s to surfaces. Default: true. */\n public readonly materials: boolean;\n /** Whether to display a graphical representation of the view's [AuxCoordSystem]($backend). Default: false. */\n public readonly acsTriad: boolean;\n /** Whether to display a grid. Default: false. */\n public readonly grid: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display the edges of surfaces. Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly visibleEdges: boolean;\n /** In any mode except [[RenderMode.Wireframe]], whether to display the edges of surfaces occluded by other geometry.\n * This has no effect unless [[visibleEdges]] is also true.\n * Default: false.\n * @see [[HiddenLine.Settings]] to customize the appearance of the edges.\n */\n public readonly hiddenEdges: boolean;\n /** In [[RenderMode.SmoothShade]], whether to display solar shadows. This has no effect unless [[lighting]] is also true. Default: false.\n * @note Rendering shadows can reduce framerate, particularly on less capable graphics hardware or in complex scenes.\n */\n public readonly shadows: boolean;\n /** Whether to apply the view's clip volume to the geometry in the scene.\n * Default: true, except when using [[fromJSON]].\n * @see [[ViewDetails.clipVector]] to define the view's clip volume.\n */\n public readonly clipVolume: boolean;\n /** Whether to display geometry of class [[GeometryClass.Construction]].\n * Default: false, except when using [[fromJSON]].\n */\n public readonly constructions: boolean;\n /** Whether to produce a monochrome image. Default: false.\n * @see [DisplayStyleSettings.monochromeColor]($common) to define the monochrome color.\n * @see [DisplayStyleSettings.monochromeMode]($common) to define how the monochrome image is produced.\n */\n public readonly monochrome: boolean;\n /** Whether to display background map imagery. Default: false.\n * @see [[DisplayStyleSettings.backgroundMap]] to customize the map settings.\n */\n public readonly backgroundMap: boolean;\n /** In [[RenderMode.SmoothShade]], whether to apply [[AmbientOcclusion]]. Default: false. */\n public readonly ambientOcclusion: boolean;\n /** Whether to apply [[ThematicDisplay]]. Default: false. */\n public readonly thematicDisplay: boolean;\n /** If true, overlay surfaces with wiremesh to reveal their triangulation. */\n public readonly wiremesh: boolean;\n /** Controls whether surface discard is always applied regardless of other ViewFlags.\n * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with\n * non-planar surfaces always draw in front of those non-planar surfaces.\n * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed),\n * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute.\n */\n public readonly forceSurfaceDiscard: boolean;\n /** Whether to apply white-on-white reversal.\n * Some CAD applications use this to cause white geometry to be drawn as black if the view's background color is white.\n * When enabled, the [[DisplayStyleSettings]]' [[WhiteOnWhiteReversalSettings]] control how white-on-white reversal is applied.\n * Default: true.\n */\n public readonly whiteOnWhiteReversal: boolean;\n\n /** In [[RenderMode.SmoothShade]], whether to apply lighting to surfaces.\n * Default: false, except when using [[fromJSON]].\n * @see [[DisplayStyleSettings.lights]] to customize the light settings.\n */\n public readonly lighting: boolean;\n\n /** Create a new ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public constructor(flags?: Partial<ViewFlagsProperties>) {\n this.renderMode = flags?.renderMode ?? RenderMode.Wireframe;\n this.dimensions = flags?.dimensions ?? true;\n this.patterns = flags?.patterns ?? true;\n this.weights = flags?.weights ?? true;\n this.styles = flags?.styles ?? true;\n this.transparency = flags?.transparency ?? true;\n this.fill = flags?.fill ?? true;\n this.textures = flags?.textures ?? true;\n this.materials = flags?.materials ?? true;\n this.acsTriad = flags?.acsTriad ?? false;\n this.grid = flags?.grid ?? false;\n this.visibleEdges = flags?.visibleEdges ?? false;\n this.hiddenEdges = flags?.hiddenEdges ?? false;\n this.shadows = flags?.shadows ?? false;\n this.clipVolume = flags?.clipVolume ?? true;\n this.constructions = flags?.constructions ?? false;\n this.monochrome = flags?.monochrome ?? false;\n this.backgroundMap = flags?.backgroundMap ?? false;\n this.ambientOcclusion = flags?.ambientOcclusion ?? false;\n this.thematicDisplay = flags?.thematicDisplay ?? false;\n this.wiremesh = flags?.wiremesh ?? false;\n this.forceSurfaceDiscard = flags?.forceSurfaceDiscard ?? false;\n this.whiteOnWhiteReversal = flags?.whiteOnWhiteReversal ?? true;\n this.lighting = flags?.lighting ?? false;\n }\n\n /** Produce a copy of these ViewFlags with some modified properties. Any properties not explicitly specified by `changedFlags` will retain their current values.\n * @param changedFlags Properties to modify.\n * @returns A copy of these ViewFlags modified according to the supplied properties.\n * @note Any explicitly `undefined` property of `changedFlags` will be set to its default value in the returned ViewFlags.\n * @see [[override]] to have `undefined` properties retain their current values.\n */\n public copy(changedFlags: Partial<ViewFlagsProperties>): ViewFlags {\n return JsonUtils.isNonEmptyObject(changedFlags) ? new ViewFlags({ ...this, ...changedFlags }) : this;\n }\n\n /** Produce a copy of these ViewFlags, overriding some of its properties. Any properties not explicitly specified by `overrides` will retain their current values,\n * as will any property explicitly set to `undefined`.\n * @param overrides The properties to override.\n * @see [[copy]] to have `undefined` properties reset to their default values.\n */\n public override(overrides: Partial<ViewFlagsProperties>): ViewFlags {\n // This method can get called very frequently when a RenderTimeline script is applied to the view. Often `overrides` will be an empty object.\n // To optimize:\n // - Bail as quickly as possible if nothing is actually overridden, without allocating a new ViewFlags.\n // - Only make a copy of the input if at least one property is explicitly `undefined`.\n let copied = false;\n let anyOverridden = false;\n\n for (const propName of Object.keys(overrides)) {\n const key = propName as keyof Partial<ViewFlagsProperties>;\n const overrideValue = overrides[key];\n if (undefined === overrideValue) {\n if (!copied) {\n // Don't modify input...\n overrides = { ...overrides };\n copied = true;\n }\n\n // `undefined` means \"retain existing value\".\n delete overrides[key];\n } else if (overrideValue !== this[key]) {\n anyOverridden = true;\n }\n }\n\n return anyOverridden ? this.copy(overrides) : this;\n }\n\n /** Produce a copy of these ViewFlags with a single boolean property changed.\n * @param flag The name of the property.\n * @param value The value to change the property to.\n * @returns A new ViewFlags with the property changed as specified, or `this` if the property already has the specified value.\n * @see [[withRenderMode]] to change the [[renderMode]] property.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public with(flag: keyof Omit<ViewFlagsProperties, \"renderMode\">, value: boolean): ViewFlags {\n if (this[flag] === value)\n return this;\n\n const props: ViewFlagsProperties = { ...this };\n props[flag] = value;\n return new ViewFlags(props);\n }\n\n /** Produce a copy of these ViewFlags with a different [[renderMode]].\n * @param renderMode The new render mode.\n * @returns A new ViewFlags with the render mode changed as specified, or `this` if the render mode is already set to the requested value.\n * @see [[copy]] and [[override]] to change multiple properties.\n */\n public withRenderMode(renderMode: RenderMode): ViewFlags {\n return renderMode === this.renderMode ? this : this.copy({ renderMode });\n }\n\n /** Adjust view flags for renderer.\n * @internal\n */\n public normalize(): ViewFlags {\n switch (this.renderMode) {\n case RenderMode.Wireframe:\n if (this.visibleEdges || this.hiddenEdges)\n return this.copy({ visibleEdges: false, hiddenEdges: false });\n break;\n case RenderMode.SmoothShade:\n if (!this.visibleEdges)\n return this.copy({ hiddenEdges: false });\n break;\n case RenderMode.HiddenLine:\n case RenderMode.SolidFill:\n if (!this.visibleEdges || this.transparency)\n return this.copy({ visibleEdges: true, transparency: false });\n break;\n }\n\n return this;\n }\n\n /** Returns true if edges that could be occluded by other geometry are visible for the current [[RenderMode]]. */\n public hiddenEdgesVisible(): boolean {\n switch (this.renderMode) {\n case RenderMode.SolidFill:\n case RenderMode.HiddenLine:\n return this.hiddenEdges;\n case RenderMode.SmoothShade:\n return this.visibleEdges && this.hiddenEdges;\n }\n return true;\n }\n\n /** Returns true if the edges of surfaces should be displayed, based on [[RenderMode]] and the [[visibleEdges]] flag. */\n public edgesRequired(): boolean {\n return edgesRequired(this.renderMode, this.visibleEdges);\n }\n\n /** Convert to JSON representation.\n * Properties are omitted if they match the default values.\n */\n public toJSON(): ViewFlagProps {\n const out: ViewFlagProps = {};\n if (!this.constructions)\n out.noConstruct = true;\n if (!this.dimensions)\n out.noDim = true;\n if (!this.patterns)\n out.noPattern = true;\n if (!this.weights)\n out.noWeight = true;\n if (!this.styles)\n out.noStyle = true;\n if (!this.transparency)\n out.noTransp = true;\n if (!this.fill)\n out.noFill = true;\n if (this.grid)\n out.grid = true;\n if (this.acsTriad)\n out.acs = true;\n if (!this.textures)\n out.noTexture = true;\n if (!this.materials)\n out.noMaterial = true;\n if (!this.lighting)\n out.noCameraLights = out.noSourceLights = out.noSolarLight = true;\n if (this.visibleEdges)\n out.visEdges = true;\n if (this.hiddenEdges)\n out.hidEdges = true;\n if (this.shadows)\n out.shadows = true;\n if (this.clipVolume)\n out.clipVol = true;\n if (this.monochrome)\n out.monochrome = true;\n if (this.backgroundMap)\n out.backgroundMap = true;\n if (this.ambientOcclusion)\n out.ambientOcclusion = true;\n if (this.thematicDisplay)\n out.thematicDisplay = true;\n if (this.wiremesh)\n out.wiremesh = true;\n if (this.forceSurfaceDiscard)\n out.forceSurfaceDiscard = true;\n if (!this.whiteOnWhiteReversal)\n out.noWhiteOnWhiteReversal = true;\n\n out.renderMode = this.renderMode;\n return out;\n }\n\n /** Like [[toJSON]], but no properties are omitted. */\n public toFullyDefinedJSON(): Required<ViewFlagProps> {\n return {\n renderMode: this.renderMode,\n noConstruct: !this.constructions,\n noDim: !this.dimensions,\n noPattern: !this.patterns,\n noWeight: !this.weights,\n noStyle: !this.styles,\n noTransp: !this.transparency,\n noFill: !this.fill,\n grid: this.grid,\n acs: this.acsTriad,\n noTexture: !this.textures,\n noMaterial: !this.materials,\n noCameraLights: !this.lighting,\n noSourceLights: !this.lighting,\n noSolarLight: !this.lighting,\n visEdges: this.visibleEdges,\n hidEdges: this.hiddenEdges,\n shadows: this.shadows,\n clipVol: this.clipVolume,\n monochrome: this.monochrome,\n backgroundMap: this.backgroundMap,\n ambientOcclusion: this.ambientOcclusion,\n thematicDisplay: this.thematicDisplay,\n wiremesh: this.wiremesh,\n forceSurfaceDiscard: this.forceSurfaceDiscard,\n noWhiteOnWhiteReversal: !this.whiteOnWhiteReversal,\n };\n }\n\n /** A ViewFlags object with all properties initialized to their default values. */\n public static readonly defaults = new ViewFlags();\n\n /** Create a ViewFlags.\n * @param flags The properties to initialize. Any properties not specified are initialized to their default values.\n */\n public static create(flags?: Partial<ViewFlagsProperties>): ViewFlags {\n return flags && !JsonUtils.isEmptyObject(flags) ? new ViewFlags(flags) : this.defaults;\n }\n\n /** Create a ViewFlags from its JSON representation.\n * @note As described in [[ViewFlagProps]], the JSON representation is awkward and error-prone. Prefer to use [[create]] unless you\n * need to deal with the persistence format directly.\n * @note The default values differ slightly from those used by the constructor and [[create]]:\n * - [[clipVolume]] defaults to false.\n * - [[constructions]] defaults to true.\n * - [[lighting]] defaults to true unless all of [[ViewFlagProps.noSolarLight]], [[ViewFlagProps.noCameraLights]], and [[ViewFlagProps.noSourceLights]] are true.\n */\n public static fromJSON(json?: ViewFlagProps): ViewFlags {\n if (!json)\n return this.defaults;\n\n let renderMode: RenderMode;\n const renderModeValue = JsonUtils.asInt(json.renderMode);\n if (renderModeValue < RenderMode.HiddenLine)\n renderMode = RenderMode.Wireframe;\n else if (renderModeValue > RenderMode.SolidFill)\n renderMode = RenderMode.SmoothShade;\n else\n renderMode = renderModeValue;\n\n const lighting = !JsonUtils.asBool(json.noCameraLights) || !JsonUtils.asBool(json.noSourceLights) || !JsonUtils.asBool(json.noSolarLight);\n return new ViewFlags({\n renderMode,\n lighting,\n constructions: !JsonUtils.asBool(json.noConstruct),\n dimensions: !JsonUtils.asBool(json.noDim),\n patterns: !JsonUtils.asBool(json.noPattern),\n weights: !JsonUtils.asBool(json.noWeight),\n styles: !JsonUtils.asBool(json.noStyle),\n transparency: !JsonUtils.asBool(json.noTransp),\n fill: !JsonUtils.asBool(json.noFill),\n grid: JsonUtils.asBool(json.grid),\n acsTriad: JsonUtils.asBool(json.acs),\n textures: !JsonUtils.asBool(json.noTexture),\n materials: !JsonUtils.asBool(json.noMaterial),\n visibleEdges: JsonUtils.asBool(json.visEdges),\n hiddenEdges: JsonUtils.asBool(json.hidEdges),\n shadows: JsonUtils.asBool(json.shadows),\n clipVolume: JsonUtils.asBool(json.clipVol),\n monochrome: JsonUtils.asBool(json.monochrome),\n backgroundMap: JsonUtils.asBool(json.backgroundMap),\n ambientOcclusion: JsonUtils.asBool(json.ambientOcclusion),\n thematicDisplay: JsonUtils.asBool(json.thematicDisplay),\n wiremesh: JsonUtils.asBool(json.wiremesh),\n forceSurfaceDiscard: JsonUtils.asBool(json.forceSurfaceDiscard),\n whiteOnWhiteReversal: !JsonUtils.asBool(json.noWhiteOnWhiteReversal),\n });\n }\n\n /** Returns true if `this` and `other` are equivalent. */\n public equals(other: Readonly<ViewFlagsProperties>): boolean {\n if (this === other)\n return true;\n\n return this.renderMode === other.renderMode\n && this.dimensions === other.dimensions\n && this.patterns === other.patterns\n && this.weights === other.weights\n && this.styles === other.styles\n && this.transparency === other.transparency\n && this.fill === other.fill\n && this.textures === other.textures\n && this.materials === other.materials\n && this.acsTriad === other.acsTriad\n && this.grid === other.grid\n && this.visibleEdges === other.visibleEdges\n && this.hiddenEdges === other.hiddenEdges\n && this.lighting === other.lighting\n && this.shadows === other.shadows\n && this.clipVolume === other.clipVolume\n && this.constructions === other.constructions\n && this.monochrome === other.monochrome\n && this.backgroundMap === other.backgroundMap\n && this.ambientOcclusion === other.ambientOcclusion\n && this.thematicDisplay === other.thematicDisplay\n && this.wiremesh === other.wiremesh\n && this.forceSurfaceDiscard === other.forceSurfaceDiscard\n && this.whiteOnWhiteReversal === other.whiteOnWhiteReversal;\n }\n}\n\n/** A type containing all of the properties of [[ViewFlags]] with none of the methods and with the `readonly` modifiers removed.\n * @see [[ViewFlags.create]], [[ViewFlags.copy]], and [[ViewFlags.override]] for methods accepting an object of this type.\n * @public\n * @extensions\n */\nexport type ViewFlagsProperties = Mutable<NonFunctionPropertiesOf<ViewFlags>>;\n\n/** A type that describes how to override selected properties of a [[ViewFlags]].\n * @see [[ViewFlags.override]] to apply the overrides to a ViewFlags object.\n * @public\n * @extensions\n */\nexport type ViewFlagOverrides = Partial<ViewFlagsProperties>;\n"]}
@@ -16,6 +16,8 @@ export class WhiteOnWhiteReversalSettings {
16
16
  constructor(ignoreBackground) {
17
17
  this.ignoreBackgroundColor = ignoreBackground;
18
18
  }
19
+ static { this._noIgnore = new WhiteOnWhiteReversalSettings(true); }
20
+ static { this._ignore = new WhiteOnWhiteReversalSettings(false); }
19
21
  /** Create from JSON representation. */
20
22
  static fromJSON(props) {
21
23
  return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;
@@ -29,6 +31,4 @@ export class WhiteOnWhiteReversalSettings {
29
31
  return this === other;
30
32
  }
31
33
  }
32
- WhiteOnWhiteReversalSettings._noIgnore = new WhiteOnWhiteReversalSettings(true);
33
- WhiteOnWhiteReversalSettings._ignore = new WhiteOnWhiteReversalSettings(false);
34
34
  //# sourceMappingURL=WhiteOnWhiteReversalSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IAOvC,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;IAKD,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC;;AAhBc,sCAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;AACnD,oCAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\n * @public\n * @extensions\n */\nexport interface WhiteOnWhiteReversalProps {\n /** Default: false.\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\n */\n ignoreBackgroundColor?: boolean;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\n * visible in the view.\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\n * @public\n */\nexport class WhiteOnWhiteReversalSettings {\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\n * if the background color is pure white.\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\n */\n public readonly ignoreBackgroundColor: boolean;\n\n private constructor(ignoreBackground: boolean) {\n this.ignoreBackgroundColor = ignoreBackground;\n }\n\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\n\n /** Create from JSON representation. */\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\n }\n\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\n return this === other;\n }\n}\n"]}
1
+ {"version":3,"file":"WhiteOnWhiteReversalSettings.js","sourceRoot":"","sources":["../../src/WhiteOnWhiteReversalSettings.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAaH;;;;;;GAMG;AACH,MAAM,OAAO,4BAA4B;IAOvC,YAAoB,gBAAyB;QAC3C,IAAI,CAAC,qBAAqB,GAAG,gBAAgB,CAAC;IAChD,CAAC;aAEc,cAAS,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;aACnD,YAAO,GAAG,IAAI,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAEjE,uCAAuC;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,OAAO,KAAK,EAAE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IACtE,CAAC;IAED,mHAAmH;IAC5G,MAAM;QACX,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,uDAAuD;IAChD,MAAM,CAAC,KAAmC;QAC/C,OAAO,IAAI,KAAK,KAAK,CAAC;IACxB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module DisplayStyles\n */\n\n/** JSON representation of a [[WhiteOnWhiteReversalSettings]].\n * @public\n * @extensions\n */\nexport interface WhiteOnWhiteReversalProps {\n /** Default: false.\n * @see [[WhiteOnWhiteReversalSettings.ignoreBackgroundColor]].\n */\n ignoreBackgroundColor?: boolean;\n}\n\n/** As part of a [[DisplayStyleSettings]], controls how white-on-white reversal is applied to make white geometry more\n * visible in the view.\n * By default, pure white geometry is displayed as black instead if the [[DisplayStyleSettings.backgroundColor]] is also pure white.\n * These settings are only applied if the display style's [[ViewFlags.whiteOnWhiteReversal]] flag is enabled.\n * @see [[DisplayStyleSettings.whiteOnWhiteReversal]] to change these settings for a display style.\n * @public\n */\nexport class WhiteOnWhiteReversalSettings {\n /** If true, white-on-white reversal ignores the display style's background color; otherwise, white-on-white reversal applies only\n * if the background color is pure white.\n * @see [[DisplayStyleSettings.backgroundColor]] to change the background color.\n */\n public readonly ignoreBackgroundColor: boolean;\n\n private constructor(ignoreBackground: boolean) {\n this.ignoreBackgroundColor = ignoreBackground;\n }\n\n private static _noIgnore = new WhiteOnWhiteReversalSettings(true);\n private static _ignore = new WhiteOnWhiteReversalSettings(false);\n\n /** Create from JSON representation. */\n public static fromJSON(props?: WhiteOnWhiteReversalProps): WhiteOnWhiteReversalSettings {\n return props?.ignoreBackgroundColor ? this._noIgnore : this._ignore;\n }\n\n /** Convert to JSON representation. The JSON representation is `undefined` if these settings match the defaults. */\n public toJSON(): WhiteOnWhiteReversalProps | undefined {\n return this.ignoreBackgroundColor ? { ignoreBackgroundColor: true } : undefined;\n }\n\n /** Returns true if `this` is equivalent to `other`. */\n public equals(other: WhiteOnWhiteReversalSettings): boolean {\n return this === other;\n }\n}\n"]}
@@ -12,6 +12,25 @@
12
12
  * @beta
13
13
  */
14
14
  export class TextStyleSettings {
15
+ /** A fully-populated JSON representation of the default settings. */
16
+ static { this.defaultProps = {
17
+ color: "subcategory",
18
+ fontName: "",
19
+ lineHeight: 1,
20
+ lineSpacingFactor: 0.5,
21
+ isBold: false,
22
+ isItalic: false,
23
+ isUnderlined: false,
24
+ stackedFractionScale: 0.7,
25
+ stackedFractionType: "horizontal",
26
+ subScriptOffsetFactor: -0.15,
27
+ subScriptScale: 2 / 3,
28
+ superScriptOffsetFactor: 0.5,
29
+ superScriptScale: 2 / 3,
30
+ widthFactor: 1,
31
+ }; }
32
+ /** Settings initialized to all default values. */
33
+ static { this.defaults = new TextStyleSettings({}); }
15
34
  constructor(props, defaults) {
16
35
  if (!defaults) {
17
36
  defaults = TextStyleSettings.defaultProps;
@@ -51,25 +70,6 @@ export class TextStyleSettings {
51
70
  && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale;
52
71
  }
53
72
  }
54
- /** A fully-populated JSON representation of the default settings. */
55
- TextStyleSettings.defaultProps = {
56
- color: "subcategory",
57
- fontName: "",
58
- lineHeight: 1,
59
- lineSpacingFactor: 0.5,
60
- isBold: false,
61
- isItalic: false,
62
- isUnderlined: false,
63
- stackedFractionScale: 0.7,
64
- stackedFractionType: "horizontal",
65
- subScriptOffsetFactor: -0.15,
66
- subScriptScale: 2 / 3,
67
- superScriptOffsetFactor: 0.5,
68
- superScriptScale: 2 / 3,
69
- widthFactor: 1,
70
- };
71
- /** Settings initialized to all default values. */
72
- TextStyleSettings.defaults = new TextStyleSettings({});
73
73
  Object.freeze(TextStyleSettings.defaultProps);
74
74
  Object.freeze(TextStyleSettings.defaults);
75
75
  /** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).
@@ -1 +1 @@
1
- {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAsFH;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IAmE5B,YAAoB,KAA6B,EAAE,QAA2C;QAC5F,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,QAAQ,GAAG,iBAAiB,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC;QAC1D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,IAAI,QAAQ,CAAC,iBAAiB,CAAC;QAC/E,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,QAAQ,CAAC,YAAY,CAAC;QAChE,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC,oBAAoB,IAAI,QAAQ,CAAC,oBAAoB,CAAC;QACxF,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,IAAI,QAAQ,CAAC,mBAAmB,CAAC;QACrF,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,qBAAqB,IAAI,QAAQ,CAAC,qBAAqB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,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,0BAA0B;IACnB,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,QAA2B;QAC5D,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,sIAAsI;IAC/H,KAAK,CAAC,eAAuC;QAClD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CAAC,KAAgB;QAC5B,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1E,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { ColorDefProps } from \"../ColorDef\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [[TextStyle]]'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The name of a font stored in a [Workspace]($backend), used to draw the contents of a [[TextRun]].\n * Default: \"\" (an invalid font name).\n */\n fontName?: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are compuated as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n lineHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [[TextStyle]]s in a [Workspace]($backend).\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The name of a font stored in a [Workspace]($backend), used to draw the contents of a [[TextRun]].\n */\n public readonly fontName: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are compuated as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly lineHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n */\n public readonly lineSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\n public readonly widthFactor: number;\n\n /** A fully-populated JSON representation of the default settings. */\n public static defaultProps: Readonly<Required<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n fontName: \"\",\n lineHeight: 1,\n lineSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({ });\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n this.fontName = props.fontName ?? defaults.fontName;\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return { ...this };\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.fontName === other.fontName\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale;\n }\n}\n\nObject.freeze(TextStyleSettings.defaultProps);\nObject.freeze(TextStyleSettings.defaults);\n\n/** The JSON representation of a [[TextStyle]].\n * @beta\n */\nexport interface TextStyleProps {\n /** The name of the style. */\n name: string;\n /** The settings defined for the style. Any omitted properties will use their default values, as described by [[TextStyleSettingsProps]]. */\n settings?: TextStyleSettingsProps;\n}\n\n/** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).\n * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @beta\n */\nexport class TextStyle {\n public readonly name: string;\n public readonly settings: TextStyleSettings;\n\n private constructor(name: string, settings: TextStyleSettings) {\n this.name = name;\n this.settings = settings;\n }\n\n /** Create a style from its JSON representation. */\n public static fromJSON(json: TextStyleProps): TextStyle {\n return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));\n }\n\n /** Create a new style. */\n public static create(name: string, settings: TextStyleSettings): TextStyle {\n return new TextStyle(name, settings);\n }\n\n /** Create a copy of this style with the same name, and settings modified according to the properties defined by `alteredSettings`. */\n public clone(alteredSettings: TextStyleSettingsProps): TextStyle {\n return TextStyle.create(this.name, this.settings.clone(alteredSettings));\n }\n\n public equals(other: TextStyle): boolean {\n return this.name === other.name && this.settings.equals(other.settings);\n }\n}\n\n"]}
1
+ {"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAsFH;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IA8C5B,qEAAqE;aACvD,iBAAY,GAA+C;QACvE,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,CAAC;QACb,iBAAiB,EAAE,GAAG;QACtB,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,KAAK;QACf,YAAY,EAAE,KAAK;QACnB,oBAAoB,EAAE,GAAG;QACzB,mBAAmB,EAAE,YAAY;QACjC,qBAAqB,EAAE,CAAC,IAAI;QAC5B,cAAc,EAAE,CAAC,GAAG,CAAC;QACrB,uBAAuB,EAAE,GAAG;QAC5B,gBAAgB,EAAE,CAAC,GAAG,CAAC;QACvB,WAAW,EAAE,CAAC;KACf,CAAC;IAEF,kDAAkD;aACpC,aAAQ,GAAsB,IAAI,iBAAiB,CAAC,EAAG,CAAC,CAAC;IAEvE,YAAoB,KAA6B,EAAE,QAA2C;QAC5F,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,QAAQ,GAAG,iBAAiB,CAAC,YAAY,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC;QAC1D,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,IAAI,QAAQ,CAAC,iBAAiB,CAAC;QAC/E,IAAI,C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Q,CAAC,CAAC,CAAC;IAChF,CAAC;IAED,0BAA0B;IACnB,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,QAA2B;QAC5D,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACvC,CAAC;IAED,sIAAsI;IAC/H,KAAK,CAAC,eAAuC;QAClD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CAAC,KAAgB;QAC5B,OAAO,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC1E,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { ColorDefProps } from \"../ColorDef\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [[TextStyle]]'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The name of a font stored in a [Workspace]($backend), used to draw the contents of a [[TextRun]].\n * Default: \"\" (an invalid font name).\n */\n fontName?: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are compuated as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n lineHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [[TextStyle]]s in a [Workspace]($backend).\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The name of a font stored in a [Workspace]($backend), used to draw the contents of a [[TextRun]].\n */\n public readonly fontName: string;\n /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are compuated as lineHeight * [[subScriptScale]] and\n * lineHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly lineHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[lineHeight]].\n */\n public readonly lineSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[lineHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[lineHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[lineHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[lineHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[lineHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[lineHeight]]. */\n public readonly widthFactor: number;\n\n /** A fully-populated JSON representation of the default settings. */\n public static defaultProps: Readonly<Required<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n fontName: \"\",\n lineHeight: 1,\n lineSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({ });\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n this.fontName = props.fontName ?? defaults.fontName;\n this.lineHeight = props.lineHeight ?? defaults.lineHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return { ...this };\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.fontName === other.fontName\n && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale;\n }\n}\n\nObject.freeze(TextStyleSettings.defaultProps);\nObject.freeze(TextStyleSettings.defaults);\n\n/** The JSON representation of a [[TextStyle]].\n * @beta\n */\nexport interface TextStyleProps {\n /** The name of the style. */\n name: string;\n /** The settings defined for the style. Any omitted properties will use their default values, as described by [[TextStyleSettingsProps]]. */\n settings?: TextStyleSettingsProps;\n}\n\n/** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).\n * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @beta\n */\nexport class TextStyle {\n public readonly name: string;\n public readonly settings: TextStyleSettings;\n\n private constructor(name: string, settings: TextStyleSettings) {\n this.name = name;\n this.settings = settings;\n }\n\n /** Create a style from its JSON representation. */\n public static fromJSON(json: TextStyleProps): TextStyle {\n return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));\n }\n\n /** Create a new style. */\n public static create(name: string, settings: TextStyleSettings): TextStyle {\n return new TextStyle(name, settings);\n }\n\n /** Create a copy of this style with the same name, and settings modified according to the properties defined by `alteredSettings`. */\n public clone(alteredSettings: TextStyleSettingsProps): TextStyle {\n return TextStyle.create(this.name, this.settings.clone(alteredSettings));\n }\n\n public equals(other: TextStyle): boolean {\n return this.name === other.name && this.settings.equals(other.settings);\n }\n}\n\n"]}
@@ -57,6 +57,8 @@ export class Cartographic {
57
57
  get latitudeDegrees() {
58
58
  return Angle.radiansToDegrees(this.latitude);
59
59
  }
60
+ static { this._oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator; }
61
+ static { this._equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar; }
60
62
  /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).
61
63
  * @param geodeticLatitude geodetic latitude angle in radians
62
64
  */
@@ -84,6 +86,15 @@ export class Cartographic {
84
86
  static fromAngles(args, result) {
85
87
  return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);
86
88
  }
89
+ static { this._cartesianToCartographicN = new Point3d(); }
90
+ static { this._cartesianToCartographicP = new Point3d(); }
91
+ static { this._cartesianToCartographicH = new Vector3d(); }
92
+ static { this._wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793); }
93
+ static { this._wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793)); }
94
+ static { this._wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793); }
95
+ static { this._wgs84CenterToleranceSquared = 0.1; }
96
+ static { this._scratchN = new Vector3d(); }
97
+ static { this._scratchK = new Vector3d(); }
87
98
  /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.
88
99
  * @param cartesian The position, in ECEF, to convert to cartographic representation.
89
100
  * @param [result] The object onto which to store the result.
@@ -165,6 +176,8 @@ export class Cartographic {
165
176
  }
166
177
  /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */
167
178
  toString() { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }
179
+ static { this._scaleToGeodeticSurfaceIntersection = new Point3d(); }
180
+ static { this._scaleToGeodeticSurfaceGradient = new Point3d(); }
168
181
  static _scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result) {
169
182
  const positionX = cartesian.x;
170
183
  const positionY = cartesian.y;
@@ -251,19 +264,6 @@ export class Cartographic {
251
264
  return result;
252
265
  }
253
266
  }
254
- Cartographic._oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;
255
- Cartographic._equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;
256
- Cartographic._cartesianToCartographicN = new Point3d();
257
- Cartographic._cartesianToCartographicP = new Point3d();
258
- Cartographic._cartesianToCartographicH = new Vector3d();
259
- Cartographic._wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);
260
- Cartographic._wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));
261
- Cartographic._wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);
262
- Cartographic._wgs84CenterToleranceSquared = 0.1;
263
- Cartographic._scratchN = new Vector3d();
264
- Cartographic._scratchK = new Vector3d();
265
- Cartographic._scaleToGeodeticSurfaceIntersection = new Point3d();
266
- Cartographic._scaleToGeodeticSurfaceGradient = new Point3d();
267
267
  /** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.
268
268
  * @public
269
269
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Cartographic.js","sourceRoot":"","sources":["../../../src/geometry/Cartographic.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAE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CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACvH,CAAC;QACH,CAAC;IACH,CAAC;IAEM,eAAe,CAAC,KAAwB;QAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAC9B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO;gBACpC,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC;oBACnC,OAAO,IAAI,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACI,+BAA+B;QACpC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Angle, Constant, Point3d, Range1d, Range2d, Range3d, Transform, Vector3d, XYAndZ, XYZ } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\n// portions adapted from Cesium.js Copyright 2011 - 2017 Cesium Contributors\n\n/** The JSON representation of a Cartographic object.\n * @public\n * @extensions\n **/\nexport interface CartographicProps {\n /** The longitude, specified in radians. */\n longitude: number;\n /** The latitude, specified in radians. */\n latitude: number;\n /** The height, specified in meters above the ellipsoid. */\n height: number;\n}\n\n/** A position on the earth defined by longitude, latitude, and height above the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) ellipsoid.\n * @public\n */\nexport class Cartographic implements CartographicProps {\n /**\n * @param longitude longitude, in radians.\n * @param latitude latitude, in radians.\n * @param height The height, in meters, above the ellipsoid.\n */\n private constructor(public longitude: number = 0, public latitude: number = 0, public height: number = 0) { }\n\n /** Create a Cartographic object with longitude, latitude, and height of zero. */\n public static createZero() {\n return new Cartographic(0, 0, 0);\n }\n\n /** Create a new Cartographic from longitude and latitude specified in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in radians. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromRadians(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n if (!result)\n return new Cartographic(args.longitude, args.latitude, args.height);\n\n result.longitude = args.longitude;\n result.latitude = args.latitude;\n result.height = args.height !== undefined ? args.height : 0;\n return result;\n }\n\n /** Create a JSON representation of a Cartographic object. */\n public toJSON(): CartographicProps {\n return {\n latitude: this.latitude,\n longitude: this.longitude,\n height: this.height,\n };\n }\n\n /** Freeze this Cartographic */\n public freeze(): Readonly<this> {\n return Object.freeze(this);\n }\n\n /** longitude, in degrees */\n public get longitudeDegrees() {\n return Angle.radiansToDegrees(this.longitude);\n }\n\n /** latitude, in degrees */\n public get latitudeDegrees() {\n return Angle.radiansToDegrees(this.latitude);\n }\n\n private static _oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;\n private static _equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;\n /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static geocentricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Math.tan(geodeticLatitude));\n }\n /** return the parametric latitude angle for the input geodetic latitude angle (both in radians). The parametric latitude\n * is appropriate for input to the Ellipsoid methods.\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static parametricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Cartographic._equatorOverPolar * Math.tan(geodeticLatitude));\n }\n\n /** Create a new Cartographic from longitude and latitude specified in degrees. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in degrees. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromDegrees(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: Angle.degreesToRadians(args.longitude), latitude: Angle.degreesToRadians(args.latitude), height: args.height }, result);\n }\n\n /** Create a new Cartographic from longitude and latitude in [Angle]($geometry)s. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are Angle objects. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object into which to store the result (optional)\n */\n public static fromAngles(args: { longitude: Angle, latitude: Angle, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);\n }\n\n private static _cartesianToCartographicN = new Point3d();\n private static _cartesianToCartographicP = new Point3d();\n private static _cartesianToCartographicH = new Vector3d();\n private static _wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\n private static _wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));\n private static _wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);\n private static _wgs84CenterToleranceSquared = 0.1;\n private static _scratchN = new Vector3d();\n private static _scratchK = new Vector3d();\n\n /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.\n * @param cartesian The position, in ECEF, to convert to cartographic representation.\n * @param [result] The object onto which to store the result.\n * @returns The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */\n public static fromEcef(cartesian: Point3d, result?: Cartographic): Cartographic | undefined {\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const p = Cartographic.scalePointToGeodeticSurface(cartesian, Cartographic._cartesianToCartographicP);\n\n if (!p)\n return undefined;\n\n const n = Cartographic._cartesianToCartographicN;\n Cartographic.multiplyComponents(p, oneOverRadiiSquared, n);\n Cartographic.normalize(n, n);\n\n const h = p.vectorTo(cartesian, Cartographic._cartesianToCartographicH);\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height = Math.sign(h.dotProduct(cartesian)) * h.magnitude();\n\n if (!result)\n return new Cartographic(longitude, latitude, height);\n\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n }\n\n /** Scale point to geodetic surface\n * @param point in ECEF to scale to the surface\n * @param [result] The object onto which to store the result.\n * @returns a point on the geodetic surface\n */\n public static scalePointToGeodeticSurface(point: Point3d, result?: Point3d): Point3d | undefined {\n const oneOverRadii = Cartographic._wgs84OneOverRadii;\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const centerToleranceSquared = Cartographic._wgs84CenterToleranceSquared;\n return Cartographic._scaleToGeodeticSurface(point, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result);\n }\n\n /** Duplicates a Cartographic. */\n public clone(result?: Cartographic): Cartographic {\n if (!result)\n return new Cartographic(this.longitude, this.latitude, this.height);\n\n result.longitude = this.longitude;\n result.latitude = this.latitude;\n result.height = this.height;\n return result;\n }\n\n /** Return true if this Cartographic is the same as right */\n public equals(right: CartographicProps): boolean {\n return (this === right) ||\n ((this.longitude === right.longitude) &&\n (this.latitude === right.latitude) &&\n (this.height === right.height));\n }\n\n /** Compares this Cartographic component-wise and returns true if they are within the provided epsilon, */\n public equalsEpsilon(right: CartographicProps, epsilon: number): boolean {\n return (this === right) ||\n ((Math.abs(this.longitude - right.longitude) <= epsilon) &&\n (Math.abs(this.latitude - right.latitude) <= epsilon) &&\n (Math.abs(this.height - right.height) <= epsilon));\n }\n\n private static normalize(cartesian: XYZ, result: XYZ) {\n const magnitude = cartesian.magnitude();\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n }\n\n private static multiplyComponents(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n }\n\n private static scalePoint(cartesian: XYAndZ, scalar: number, result: XYZ) {\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n }\n\n private static addPoints(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n }\n\n /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */\n public toString(): string { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }\n\n private static _scaleToGeodeticSurfaceIntersection = new Point3d();\n private static _scaleToGeodeticSurfaceGradient = new Point3d();\n private static _scaleToGeodeticSurface(cartesian: Point3d, oneOverRadii: XYAndZ, oneOverRadiiSquared: XYAndZ, centerToleranceSquared: number, result?: Point3d) {\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = Cartographic._scaleToGeodeticSurfaceIntersection;\n Cartographic.scalePoint(cartesian, ratio, intersection);\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return !isFinite(ratio) ? undefined : Point3d.createFrom(intersection, result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = Cartographic._scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda = (1.0 - ratio) * cartesian.magnitude() / (0.5 * gradient.magnitude());\n let correction = 0.0;\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > 0.01);\n\n if (!result)\n return new Point3d(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n }\n\n /** Return an ECEF point from a Cartographic point */\n public toEcef(result?: Point3d): Point3d {\n const cosLatitude = Math.cos(this.latitude);\n const scratchN = Cartographic._scratchN;\n const scratchK = Cartographic._scratchK;\n scratchN.x = cosLatitude * Math.cos(this.longitude);\n scratchN.y = cosLatitude * Math.sin(this.longitude);\n scratchN.z = Math.sin(this.latitude);\n Cartographic.normalize(scratchN, scratchN);\n\n Cartographic.multiplyComponents(Cartographic._wgs84RadiiSquared, scratchN, scratchK);\n const gamma = Math.sqrt(scratchN.dotProduct(scratchK));\n Cartographic.scalePoint(scratchK, 1.0 / gamma, scratchK);\n Cartographic.scalePoint(scratchN, this.height, scratchN);\n\n result = result ? result : new Point3d();\n Cartographic.addPoints(scratchK, scratchN, result);\n return result;\n }\n}\n/** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.\n * @public\n */\nexport class CartographicRange {\n private _ranges: Range2d[] = [];\n\n // These following are used to preserve the min/max latitude and longitudes.\n // The longitudes are raw values and may cross over the -PI or 2PI boundaries.\n private _minLongitude = 0;\n private _maxLongitude = 0;\n private _minLatitude = 0;\n private _maxLatitude = 0;\n constructor(spatialRange: Range3d, spatialToEcef: Transform) {\n // Compute 8 corners in spatial coordinate system before converting to ECEF\n // We want a box oriented in the spatial coordinate system and not in the ECEF coordinate system\n const spatialCorners = spatialRange.corners();\n const ecefCorners = spatialToEcef.multiplyPoint3dArray(spatialCorners);\n let low: Cartographic | undefined, high: Cartographic | undefined;\n\n for (const ecefCorner of ecefCorners) {\n const geoPt = Cartographic.fromEcef(ecefCorner);\n if (!geoPt)\n continue;\n if (undefined === low || undefined === high) {\n low = geoPt;\n high = geoPt.clone();\n continue;\n }\n low.latitude = Math.min(low.latitude, geoPt.latitude);\n low.longitude = Math.min(low.longitude, geoPt.longitude);\n high.latitude = Math.max(high.latitude, geoPt.latitude);\n high.longitude = Math.max(high.longitude, geoPt.longitude);\n }\n\n if (!low || !high) {\n assert(false);\n return;\n }\n\n const longitudeRanges = [];\n this._minLongitude = Math.min(low.longitude, high.longitude), this._maxLongitude = Math.max(low.longitude, high.longitude);\n if (this._maxLongitude - this._minLongitude > Angle.piRadians) {\n longitudeRanges.push(Range1d.createXX(0.0, this._minLongitude));\n longitudeRanges.push(Range1d.createXX(this._maxLongitude, Angle.pi2Radians));\n } else {\n longitudeRanges.push(Range1d.createXX(this._minLongitude, this._maxLongitude));\n }\n\n for (const longitudeRange of longitudeRanges) {\n this._minLatitude = Math.min(low.latitude, high.latitude), this._maxLatitude = Math.max(low.latitude, high.latitude);\n if (this._maxLatitude - this._minLatitude > Angle.piOver2Radians) {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, 0.0, longitudeRange.high, this._minLatitude));\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._maxLatitude, longitudeRange.high, Angle.piRadians));\n } else {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._minLatitude, longitudeRange.high, this._maxLatitude));\n }\n }\n }\n\n public intersectsRange(other: CartographicRange): boolean {\n for (const range of this._ranges)\n for (const otherRange of other._ranges)\n if (range.intersectsRange(otherRange))\n return true;\n return false;\n }\n\n /** This method returns the raw latitude / longitude for the range in a Range2d object.\n * The X value represents the longitude and the Y value the latitudes.\n * Y values are kept between -PI and +PI while\n * longitude values can be expressed in any range between -2PI to +2PI\n * given the minimum longitude is always smaller numerically than the maximum longitude.\n * Note that usually the longitudes are usually by convention in the range of -PI to PI except\n * for ranges that overlap the -PI/+PI frontier in which case either representation is acceptable.\n */\n public getLongitudeLatitudeBoundingBox(): Range2d {\n return Range2d.createXYXY(this._minLongitude, this._minLatitude, this._maxLongitude, this._maxLatitude);\n }\n}\n"]}
1
+ {"version":3,"file":"Cartographic.js","sourceRoot":"","sources":["../../../src/geometry/Cartographic.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAsB,QAAQ,EAAe,MAAM,sBAAsB,CAAC;AAC7H,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAiB7C;;GAEG;AACH,MAAM,OAAO,YAAY;IACvB;;;;OAIG;IACH,YAA2B,YAAoB,CAAC,EAAS,WAAmB,CAAC,EAAS,SAAiB,CAAC;QAA7E,cAAS,GAAT,SAAS,CAAY;QAAS,aAAQ,GAAR,QAAQ,CAAY;QAAS,WAAM,GAAN,MAAM,CAAY;IAAI,CAAC;IAE7G,iFAAiF;IAC1E,MAAM,CAAC,UAAU;QACtB,OAAO,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,WAAW,CAAC,IAA8D,EAAE,MAAqB;QAC7G,IAAI,CAAC,MAAM;YACT,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAEtE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAClC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAChC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6DAA6D;IACtD,MAAM;QACX,OAAO;YACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,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c,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;YACrH,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YACvH,CAAC;QACH,CAAC;IACH,CAAC;IAEM,eAAe,CAAC,KAAwB;QAC7C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO;YAC9B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,OAAO;gBACpC,IAAI,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC;oBACnC,OAAO,IAAI,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;;OAOG;IACI,+BAA+B;QACpC,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1G,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Angle, Constant, Point3d, Range1d, Range2d, Range3d, Transform, Vector3d, XYAndZ, XYZ } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\n// portions adapted from Cesium.js Copyright 2011 - 2017 Cesium Contributors\n\n/** The JSON representation of a Cartographic object.\n * @public\n * @extensions\n **/\nexport interface CartographicProps {\n /** The longitude, specified in radians. */\n longitude: number;\n /** The latitude, specified in radians. */\n latitude: number;\n /** The height, specified in meters above the ellipsoid. */\n height: number;\n}\n\n/** A position on the earth defined by longitude, latitude, and height above the [WGS84](https://en.wikipedia.org/wiki/World_Geodetic_System) ellipsoid.\n * @public\n */\nexport class Cartographic implements CartographicProps {\n /**\n * @param longitude longitude, in radians.\n * @param latitude latitude, in radians.\n * @param height The height, in meters, above the ellipsoid.\n */\n private constructor(public longitude: number = 0, public latitude: number = 0, public height: number = 0) { }\n\n /** Create a Cartographic object with longitude, latitude, and height of zero. */\n public static createZero() {\n return new Cartographic(0, 0, 0);\n }\n\n /** Create a new Cartographic from longitude and latitude specified in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in radians. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromRadians(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n if (!result)\n return new Cartographic(args.longitude, args.latitude, args.height);\n\n result.longitude = args.longitude;\n result.latitude = args.latitude;\n result.height = args.height !== undefined ? args.height : 0;\n return result;\n }\n\n /** Create a JSON representation of a Cartographic object. */\n public toJSON(): CartographicProps {\n return {\n latitude: this.latitude,\n longitude: this.longitude,\n height: this.height,\n };\n }\n\n /** Freeze this Cartographic */\n public freeze(): Readonly<this> {\n return Object.freeze(this);\n }\n\n /** longitude, in degrees */\n public get longitudeDegrees() {\n return Angle.radiansToDegrees(this.longitude);\n }\n\n /** latitude, in degrees */\n public get latitudeDegrees() {\n return Angle.radiansToDegrees(this.latitude);\n }\n\n private static _oneMinusF = 1 - (Constant.earthRadiusWGS84.equator - Constant.earthRadiusWGS84.polar) / Constant.earthRadiusWGS84.equator;\n private static _equatorOverPolar = Constant.earthRadiusWGS84.equator / Constant.earthRadiusWGS84.polar;\n /** return the geocentric latitude angle for the input geodetic latitude angle (both in radians).\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static geocentricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Math.tan(geodeticLatitude));\n }\n /** return the parametric latitude angle for the input geodetic latitude angle (both in radians). The parametric latitude\n * is appropriate for input to the Ellipsoid methods.\n * @param geodeticLatitude geodetic latitude angle in radians\n */\n public static parametricLatitudeFromGeodeticLatitude(geodeticLatitude: number): number {\n return Math.atan(Cartographic._oneMinusF * Cartographic._oneMinusF * Cartographic._equatorOverPolar * Math.tan(geodeticLatitude));\n }\n\n /** Create a new Cartographic from longitude and latitude specified in degrees. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are numbers specified in degrees. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object onto which to store the result.\n */\n public static fromDegrees(args: { longitude: number, latitude: number, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: Angle.degreesToRadians(args.longitude), latitude: Angle.degreesToRadians(args.latitude), height: args.height }, result);\n }\n\n /** Create a new Cartographic from longitude and latitude in [Angle]($geometry)s. The values in the resulting object will be in radians.\n * @param args an object containing a longitude, latitude, and an optional height property. The longitude and latitude properties are Angle objects. The height property, if specified, is a number which contains the height in meters above the ellipsoid; if undefined, this height will default to zero.\n * @param result The object into which to store the result (optional)\n */\n public static fromAngles(args: { longitude: Angle, latitude: Angle, height?: number }, result?: Cartographic) {\n return Cartographic.fromRadians({ longitude: args.longitude.radians, latitude: args.latitude.radians, height: args.height }, result);\n }\n\n private static _cartesianToCartographicN = new Point3d();\n private static _cartesianToCartographicP = new Point3d();\n private static _cartesianToCartographicH = new Vector3d();\n private static _wgs84OneOverRadii = new Point3d(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);\n private static _wgs84OneOverRadiiSquared = new Point3d(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));\n private static _wgs84RadiiSquared = new Point3d(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);\n private static _wgs84CenterToleranceSquared = 0.1;\n private static _scratchN = new Vector3d();\n private static _scratchK = new Vector3d();\n\n /** Creates a new Cartographic from an [ECEF](https://en.wikipedia.org/wiki/ECEF) position.\n * @param cartesian The position, in ECEF, to convert to cartographic representation.\n * @param [result] The object onto which to store the result.\n * @returns The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.\n */\n public static fromEcef(cartesian: Point3d, result?: Cartographic): Cartographic | undefined {\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const p = Cartographic.scalePointToGeodeticSurface(cartesian, Cartographic._cartesianToCartographicP);\n\n if (!p)\n return undefined;\n\n const n = Cartographic._cartesianToCartographicN;\n Cartographic.multiplyComponents(p, oneOverRadiiSquared, n);\n Cartographic.normalize(n, n);\n\n const h = p.vectorTo(cartesian, Cartographic._cartesianToCartographicH);\n const longitude = Math.atan2(n.y, n.x);\n const latitude = Math.asin(n.z);\n const height = Math.sign(h.dotProduct(cartesian)) * h.magnitude();\n\n if (!result)\n return new Cartographic(longitude, latitude, height);\n\n result.longitude = longitude;\n result.latitude = latitude;\n result.height = height;\n return result;\n }\n\n /** Scale point to geodetic surface\n * @param point in ECEF to scale to the surface\n * @param [result] The object onto which to store the result.\n * @returns a point on the geodetic surface\n */\n public static scalePointToGeodeticSurface(point: Point3d, result?: Point3d): Point3d | undefined {\n const oneOverRadii = Cartographic._wgs84OneOverRadii;\n const oneOverRadiiSquared = Cartographic._wgs84OneOverRadiiSquared;\n const centerToleranceSquared = Cartographic._wgs84CenterToleranceSquared;\n return Cartographic._scaleToGeodeticSurface(point, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result);\n }\n\n /** Duplicates a Cartographic. */\n public clone(result?: Cartographic): Cartographic {\n if (!result)\n return new Cartographic(this.longitude, this.latitude, this.height);\n\n result.longitude = this.longitude;\n result.latitude = this.latitude;\n result.height = this.height;\n return result;\n }\n\n /** Return true if this Cartographic is the same as right */\n public equals(right: CartographicProps): boolean {\n return (this === right) ||\n ((this.longitude === right.longitude) &&\n (this.latitude === right.latitude) &&\n (this.height === right.height));\n }\n\n /** Compares this Cartographic component-wise and returns true if they are within the provided epsilon, */\n public equalsEpsilon(right: CartographicProps, epsilon: number): boolean {\n return (this === right) ||\n ((Math.abs(this.longitude - right.longitude) <= epsilon) &&\n (Math.abs(this.latitude - right.latitude) <= epsilon) &&\n (Math.abs(this.height - right.height) <= epsilon));\n }\n\n private static normalize(cartesian: XYZ, result: XYZ) {\n const magnitude = cartesian.magnitude();\n result.x = cartesian.x / magnitude;\n result.y = cartesian.y / magnitude;\n result.z = cartesian.z / magnitude;\n }\n\n private static multiplyComponents(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x * right.x;\n result.y = left.y * right.y;\n result.z = left.z * right.z;\n }\n\n private static scalePoint(cartesian: XYAndZ, scalar: number, result: XYZ) {\n result.x = cartesian.x * scalar;\n result.y = cartesian.y * scalar;\n result.z = cartesian.z * scalar;\n }\n\n private static addPoints(left: XYAndZ, right: XYAndZ, result: XYZ) {\n result.x = left.x + right.x;\n result.y = left.y + right.y;\n result.z = left.z + right.z;\n }\n\n /** Create a string representing this cartographic in the format '(longitude, latitude, height)'. */\n public toString(): string { return `(${this.longitude}, ${this.latitude}, ${this.height})`; }\n\n private static _scaleToGeodeticSurfaceIntersection = new Point3d();\n private static _scaleToGeodeticSurfaceGradient = new Point3d();\n private static _scaleToGeodeticSurface(cartesian: Point3d, oneOverRadii: XYAndZ, oneOverRadiiSquared: XYAndZ, centerToleranceSquared: number, result?: Point3d) {\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = Cartographic._scaleToGeodeticSurfaceIntersection;\n Cartographic.scalePoint(cartesian, ratio, intersection);\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return !isFinite(ratio) ? undefined : Point3d.createFrom(intersection, result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = Cartographic._scaleToGeodeticSurfaceGradient;\n gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;\n gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;\n gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda = (1.0 - ratio) * cartesian.magnitude() / (0.5 * gradient.magnitude());\n let correction = 0.0;\n let func;\n let denominator;\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let xMultiplier2;\n let yMultiplier2;\n let zMultiplier2;\n let xMultiplier3;\n let yMultiplier3;\n let zMultiplier3;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n xMultiplier2 = xMultiplier * xMultiplier;\n yMultiplier2 = yMultiplier * yMultiplier;\n zMultiplier2 = zMultiplier * zMultiplier;\n\n xMultiplier3 = xMultiplier2 * xMultiplier;\n yMultiplier3 = yMultiplier2 * yMultiplier;\n zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > 0.01);\n\n if (!result)\n return new Point3d(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);\n\n result.x = positionX * xMultiplier;\n result.y = positionY * yMultiplier;\n result.z = positionZ * zMultiplier;\n return result;\n }\n\n /** Return an ECEF point from a Cartographic point */\n public toEcef(result?: Point3d): Point3d {\n const cosLatitude = Math.cos(this.latitude);\n const scratchN = Cartographic._scratchN;\n const scratchK = Cartographic._scratchK;\n scratchN.x = cosLatitude * Math.cos(this.longitude);\n scratchN.y = cosLatitude * Math.sin(this.longitude);\n scratchN.z = Math.sin(this.latitude);\n Cartographic.normalize(scratchN, scratchN);\n\n Cartographic.multiplyComponents(Cartographic._wgs84RadiiSquared, scratchN, scratchK);\n const gamma = Math.sqrt(scratchN.dotProduct(scratchK));\n Cartographic.scalePoint(scratchK, 1.0 / gamma, scratchK);\n Cartographic.scalePoint(scratchN, this.height, scratchN);\n\n result = result ? result : new Point3d();\n Cartographic.addPoints(scratchK, scratchN, result);\n return result;\n }\n}\n/** A cartographic range representing a rectangular region if low longitude/latitude > high then area crossing seam is indicated.\n * @public\n */\nexport class CartographicRange {\n private _ranges: Range2d[] = [];\n\n // These following are used to preserve the min/max latitude and longitudes.\n // The longitudes are raw values and may cross over the -PI or 2PI boundaries.\n private _minLongitude = 0;\n private _maxLongitude = 0;\n private _minLatitude = 0;\n private _maxLatitude = 0;\n constructor(spatialRange: Range3d, spatialToEcef: Transform) {\n // Compute 8 corners in spatial coordinate system before converting to ECEF\n // We want a box oriented in the spatial coordinate system and not in the ECEF coordinate system\n const spatialCorners = spatialRange.corners();\n const ecefCorners = spatialToEcef.multiplyPoint3dArray(spatialCorners);\n let low: Cartographic | undefined, high: Cartographic | undefined;\n\n for (const ecefCorner of ecefCorners) {\n const geoPt = Cartographic.fromEcef(ecefCorner);\n if (!geoPt)\n continue;\n if (undefined === low || undefined === high) {\n low = geoPt;\n high = geoPt.clone();\n continue;\n }\n low.latitude = Math.min(low.latitude, geoPt.latitude);\n low.longitude = Math.min(low.longitude, geoPt.longitude);\n high.latitude = Math.max(high.latitude, geoPt.latitude);\n high.longitude = Math.max(high.longitude, geoPt.longitude);\n }\n\n if (!low || !high) {\n assert(false);\n return;\n }\n\n const longitudeRanges = [];\n this._minLongitude = Math.min(low.longitude, high.longitude), this._maxLongitude = Math.max(low.longitude, high.longitude);\n if (this._maxLongitude - this._minLongitude > Angle.piRadians) {\n longitudeRanges.push(Range1d.createXX(0.0, this._minLongitude));\n longitudeRanges.push(Range1d.createXX(this._maxLongitude, Angle.pi2Radians));\n } else {\n longitudeRanges.push(Range1d.createXX(this._minLongitude, this._maxLongitude));\n }\n\n for (const longitudeRange of longitudeRanges) {\n this._minLatitude = Math.min(low.latitude, high.latitude), this._maxLatitude = Math.max(low.latitude, high.latitude);\n if (this._maxLatitude - this._minLatitude > Angle.piOver2Radians) {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, 0.0, longitudeRange.high, this._minLatitude));\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._maxLatitude, longitudeRange.high, Angle.piRadians));\n } else {\n this._ranges.push(Range2d.createXYXY(longitudeRange.low, this._minLatitude, longitudeRange.high, this._maxLatitude));\n }\n }\n }\n\n public intersectsRange(other: CartographicRange): boolean {\n for (const range of this._ranges)\n for (const otherRange of other._ranges)\n if (range.intersectsRange(otherRange))\n return true;\n return false;\n }\n\n /** This method returns the raw latitude / longitude for the range in a Range2d object.\n * The X value represents the longitude and the Y value the latitudes.\n * Y values are kept between -PI and +PI while\n * longitude values can be expressed in any range between -2PI to +2PI\n * given the minimum longitude is always smaller numerically than the maximum longitude.\n * Note that usually the longitudes are usually by convention in the range of -PI to PI except\n * for ranges that overlap the -PI/+PI frontier in which case either representation is acceptable.\n */\n public getLongitudeLatitudeBoundingBox(): Range2d {\n return Range2d.createXYXY(this._minLongitude, this._minLatitude, this._maxLongitude, this._maxLatitude);\n }\n}\n"]}
@@ -33,6 +33,7 @@ export var IpcWebSocketMessage;
33
33
  })(IpcWebSocketMessage || (IpcWebSocketMessage = {}));
34
34
  /** @internal */
35
35
  export class IpcWebSocket {
36
+ static { this.receivers = new Set(); }
36
37
  constructor() {
37
38
  this._channels = new Map();
38
39
  IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));
@@ -63,7 +64,6 @@ export class IpcWebSocket {
63
64
  handler(evt, ...arg);
64
65
  }
65
66
  }
66
- IpcWebSocket.receivers = new Set();
67
67
  /** @internal */
68
68
  export class IpcWebSocketFrontend extends IpcWebSocket {
69
69
  constructor() {