@itwin/core-common 5.2.0-dev.3 → 5.2.0-dev.7
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.
- package/CHANGELOG.md +24 -1
- package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
- package/lib/cjs/AnalysisStyle.js +2 -0
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/BlobReader.d.ts.map +1 -1
- package/lib/cjs/BlobReader.js +10 -2
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/FeatureIndex.d.ts.map +1 -1
- package/lib/cjs/FeatureIndex.js +2 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/GeometryParams.d.ts.map +1 -1
- package/lib/cjs/GeometryParams.js +6 -0
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/Gradient.d.ts.map +1 -1
- package/lib/cjs/Gradient.js +5 -0
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/HiddenLine.d.ts.map +1 -1
- package/lib/cjs/HiddenLine.js +4 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/IModel.d.ts.map +1 -1
- package/lib/cjs/IModel.js +7 -7
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/Localization.d.ts.map +1 -1
- package/lib/cjs/Localization.js +3 -0
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/TextureMapping.js +2 -2
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/ThematicDisplay.d.ts.map +1 -1
- package/lib/cjs/ThematicDisplay.js +3 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Tween.d.ts +1 -1
- package/lib/cjs/Tween.d.ts.map +1 -1
- package/lib/cjs/Tween.js +4 -2
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.d.ts.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js +1 -0
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.d.ts.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js +13 -0
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js +7 -0
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +19 -10
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js +1 -0
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.d.ts.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js +7 -0
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js +2 -2
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.d.ts.map +1 -1
- package/lib/cjs/geometry/LineStyle.js +3 -0
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.d.ts.map +1 -1
- package/lib/cjs/geometry/Placement.js +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.d.ts +0 -3
- package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js +10 -2
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/AnalysisStyle.d.ts.map +1 -1
- package/lib/esm/AnalysisStyle.js +2 -0
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/BlobReader.d.ts.map +1 -1
- package/lib/esm/BlobReader.js +10 -2
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
- package/lib/esm/DisplayStyleSettings.js +2 -2
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSqlTypes.js +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/FeatureIndex.d.ts.map +1 -1
- package/lib/esm/FeatureIndex.js +2 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/GeometryParams.d.ts.map +1 -1
- package/lib/esm/GeometryParams.js +6 -0
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/Gradient.d.ts.map +1 -1
- package/lib/esm/Gradient.js +5 -0
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/HiddenLine.d.ts.map +1 -1
- package/lib/esm/HiddenLine.js +4 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/IModel.d.ts.map +1 -1
- package/lib/esm/IModel.js +8 -8
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/Localization.d.ts.map +1 -1
- package/lib/esm/Localization.js +3 -0
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/TextureMapping.js +3 -3
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/ThematicDisplay.d.ts.map +1 -1
- package/lib/esm/ThematicDisplay.js +3 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Tween.d.ts +1 -1
- package/lib/esm/Tween.d.ts.map +1 -1
- package/lib/esm/Tween.js +4 -2
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.d.ts.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js +1 -0
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.d.ts.map +1 -1
- package/lib/esm/geometry/AreaPattern.js +13 -0
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.d.ts.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js +7 -0
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +20 -11
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js +1 -0
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.d.ts.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js +7 -0
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.d.ts.map +1 -1
- package/lib/esm/geometry/GeometryStream.js +3 -3
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/LineStyle.d.ts.map +1 -1
- package/lib/esm/geometry/LineStyle.js +3 -0
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.d.ts.map +1 -1
- package/lib/esm/geometry/Placement.js +2 -2
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js +2 -2
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.d.ts +0 -3
- package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js +10 -2
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js +2 -2
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/package.json +6 -6
|
@@ -183,16 +183,19 @@ class GeometryParams {
|
|
|
183
183
|
return false;
|
|
184
184
|
if ((this.lineColor === undefined) !== (other.lineColor === undefined))
|
|
185
185
|
return false;
|
|
186
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
186
187
|
if (this.lineColor && !this.lineColor.equals(other.lineColor))
|
|
187
188
|
return false;
|
|
188
189
|
if (this.weight !== other.weight)
|
|
189
190
|
return false;
|
|
190
191
|
if ((this.materialId === undefined) !== (other.materialId === undefined))
|
|
191
192
|
return false;
|
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
192
194
|
if (this.materialId && this.materialId !== other.materialId)
|
|
193
195
|
return false;
|
|
194
196
|
if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))
|
|
195
197
|
return false;
|
|
198
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
196
199
|
if (this.styleInfo && !this.styleInfo.equals(other.styleInfo))
|
|
197
200
|
return false;
|
|
198
201
|
if (this.fillDisplay !== other.fillDisplay)
|
|
@@ -200,6 +203,7 @@ class GeometryParams {
|
|
|
200
203
|
if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {
|
|
201
204
|
if ((this.gradient === undefined) !== (other.gradient === undefined))
|
|
202
205
|
return false;
|
|
206
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
203
207
|
if (this.gradient && !this.gradient.equals(other.gradient))
|
|
204
208
|
return false;
|
|
205
209
|
if (this.backgroundFill !== other.backgroundFill)
|
|
@@ -207,12 +211,14 @@ class GeometryParams {
|
|
|
207
211
|
if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {
|
|
208
212
|
if ((this.fillColor === undefined) !== (other.fillColor === undefined))
|
|
209
213
|
return false;
|
|
214
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
210
215
|
if (this.fillColor && !this.fillColor.equals(other.fillColor))
|
|
211
216
|
return false;
|
|
212
217
|
}
|
|
213
218
|
}
|
|
214
219
|
if ((this.pattern === undefined) !== (other.pattern === undefined))
|
|
215
220
|
return false;
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
216
222
|
if (this.pattern && !this.pattern.equals(other.pattern))
|
|
217
223
|
return false;
|
|
218
224
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeometryParams.js","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AAKvD,qCAAkC;AAElC;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,gEAAgE;IAChE,+CAAS,CAAA;IACT,wDAAwD;IACxD,iDAAU,CAAA;IACV,sEAAsE;IACtE,iDAAU,CAAA;IACV;;OAEG;IACH,qDAAY,CAAA;AACd,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB;AAED;;;GAGG;AACH,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,kGAAkG;IAClG,mDAAQ,CAAA;IACR,8EAA8E;IAC9E,qDAAS,CAAA;IACT,gGAAgG;IAChG,yDAAW,CAAA;AACb,C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AAC;oBAC5D,OAAO,KAAK,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC;YAChE,OAAO,KAAK,CAAC;QACf,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAQ,CAAC;YACtD,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oLAAoL;IAC7K,aAAa,CAAC,UAAsB,EAAE,wBAAwB,GAAG,IAAI;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,eAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,gHAAgH;IACzG,gBAAgB,CAAC,aAAyB,EAAE,wBAAwB,GAAG,IAAI;QAChF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CACF;AApLD,wCAoLC","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 Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\nimport { AreaPattern } from \"./geometry/AreaPattern\";\nimport { LineStyle } from \"./geometry/LineStyle\";\nimport { Gradient } from \"./Gradient\";\nimport { IModel } from \"./IModel\";\n\n/** Whether a closed region should be drawn for wireframe display with its internal area filled or not.\n * @public\n * @extensions\n */\nexport enum FillDisplay {\n /** don't fill, even if fill attribute is on for the viewport */\n Never = 0,\n /** fill if the fill attribute is on for the viewport */\n ByView = 1,\n /** always fill, even if the fill attribute is off for the viewport */\n Always = 2,\n /** always fill, fill will always be behind other geometry belonging to the same element.\n * @note Edge geometry is not produced for shapes with this fill type. If you want an outline, add it as separate geometry.\n */\n Blanking = 3,\n}\n\n/** Describes how a view's background color affects the interior area of a closed region.\n * @public\n * @extensions\n */\nexport enum BackgroundFill {\n /** single color fill uses the fill color and line color to draw either a solid or outline fill */\n None = 0,\n /** single color fill uses the view's background color to draw a solid fill */\n Solid = 1,\n /** single color fill uses the view's background color and line color to draw an outline fill */\n Outline = 2,\n}\n\n/** Categorizes a piece of geometry within a GeometryStream. Visibility of classes of geometry can be toggled\n * within a view using [[ViewFlags]].\n * @see [[GeometryStreamProps]].\n * @see [[Feature]].\n * @public\n * @extensions\n */\nexport enum GeometryClass {\n /** Used to classify the \"real\" geometry within a model. Most geometry falls within this class. */\n Primary = 0,\n /** Used to classify geometry used as a drawing aid in constructing the Primary geometry. For example, grid lines. */\n Construction = 1,\n /** Used to classify annotations which dimension (measure) the Primary geometry. */\n Dimension = 2,\n /** Used to classify geometry used to fill planar regions with a 2d pattern (e.g., hatch lines). */\n Pattern = 3,\n}\n\n/** Describes the display properties of graphics in a persistent element's GeometryStream that aren't inherited from [[SubCategoryAppearance]].\n * @see [[GeometryStreamProps]].\n * @public\n */\nexport class GeometryParams {\n /** Optional render material to override [[SubCategoryAppearance.materialId]].\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.materialId]] with no material.\n */\n public materialId?: Id64String;\n /** Optional display priority added to [[SubCategoryAppearance.priority]].\n * The net display priority value is used to control z ordering when drawing to 2d views.\n */\n public elmPriority?: number;\n /** Optional line weight to override [[SubCategoryAppearance.weight]].\n * The weight is an integer in the range of [0,31] that by default corresponds to a pixel width of weight+1.\n */\n public weight?: number;\n /** Optional line color to override [[SubCategoryAppearance.color]].\n * The transparency component is ignored and should instead be specified using [[elmTransparency]].\n */\n public lineColor?: ColorDef;\n /** Optional fill color for region interiors. Set the same as [[lineColor]] for an opaque fill.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]], [[gradient]] is undefined, and [[backgroundFill]] is [[BackgroundFill.None]].\n * The transparency component is ignored and should instead be specified using [[fillTransparency]].\n */\n public fillColor?: ColorDef;\n /** Optional fill using the current view background color for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]] and [[gradient]] is undefined. Default is [[BackgroundFill.None]].\n */\n public backgroundFill?: BackgroundFill;\n /** Optional fill specification that determines when and if a region interior will display using [[gradient]], [[backgroundFill]], or [[fillColor]] in that order of preference.\n * Fill only applies to [[RenderMode.Wireframe]] views. In a [[RenderMode.SmoothShade]] or [[RenderMode.SolidFill]] view, regions will always display as surfaces preferring [[fillColor]] when present over [[lineColor]].\n * Default is [[FillDisplay.Never]].\n */\n public fillDisplay?: FillDisplay;\n /** Optional line color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent element on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque and 1.0 for completely transparent.\n */\n public elmTransparency?: number;\n /** Optional fill color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent fill on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque, 1.0 for completely transparent, or leave undefined to use [[elmTransparency]].\n */\n public fillTransparency?: number;\n /** Optional geometry classification that can be toggled off with a [[ViewFlags]] independent of [[SubCategoryAppearance.invisible]].\n * Default is [[GeometryClass.Primary]].\n */\n public geometryClass?: GeometryClass;\n /** Optional line style to override [[SubCategoryAppearance.styleId]] plus modifiers to override the line style definition.\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.styleId]] with a solid line.\n */\n public styleInfo?: LineStyle.Info;\n /** Optional gradient fill settings for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]].\n */\n public gradient?: Gradient.Symb;\n /** Optional area pattern settings for region interiors.\n * Independent of fill, a region can have both fill and pattern.\n */\n public pattern?: AreaPattern.Params;\n\n /** Create a GeometryParams given a [[Category]] Id for a [[GeometricElement]] and optional [[SubCategory]] Id. The [[SubCategory.appearance]] establishes the non-overriden display properties of\n * graphics in a GeometricElement's [[GeometryStreamProps]]. A GeometricElement refers to a single Category through [[GeometricElement.category]], while it's graphics can appear on multiple SubCategories\n * by adding a [[GeometryAppearanceProps]] with a SubCategory change to the GeometryStream.\n * @note If a valid SubCategory Id is not supplied, the default SubCategory for the parent Category is used. To be considered valid, [[SubCategory.getCategoryId]] must refer to the specified Category Id.\n */\n constructor(public categoryId: Id64String, public subCategoryId = Id64.invalid) {\n if (!Id64.isValid(subCategoryId))\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n }\n\n public clone(): GeometryParams {\n const retVal = new GeometryParams(this.categoryId, this.subCategoryId);\n retVal.materialId = this.materialId;\n retVal.elmPriority = this.elmPriority;\n retVal.weight = this.weight;\n retVal.lineColor = this.lineColor;\n retVal.fillColor = this.fillColor;\n retVal.backgroundFill = this.backgroundFill;\n retVal.fillDisplay = this.fillDisplay;\n retVal.elmTransparency = this.elmTransparency;\n retVal.fillTransparency = this.fillTransparency;\n retVal.geometryClass = this.geometryClass;\n retVal.styleInfo = this.styleInfo ? this.styleInfo.clone() : undefined;\n retVal.gradient = this.gradient ? this.gradient.clone() : undefined;\n retVal.pattern = this.pattern ? this.pattern.clone() : undefined;\n return retVal;\n }\n\n /** Clears [[SubCategoryAppearance]] overrides while preserving [[categoryId]] and [[subCategoryId]]. */\n public resetAppearance() {\n this.materialId = undefined;\n this.elmPriority = undefined;\n this.weight = undefined;\n this.lineColor = undefined;\n this.fillColor = undefined;\n this.backgroundFill = undefined;\n this.fillDisplay = undefined;\n this.elmTransparency = undefined;\n this.fillTransparency = undefined;\n this.geometryClass = undefined;\n this.styleInfo = undefined;\n this.gradient = undefined;\n this.pattern = undefined;\n }\n\n /** Compare two [[GeometryParams]] for equivalence, i.e. both values are undefined and inherited from [[SubCategoryAppearance]] or have the same override. */\n public isEquivalent(other: GeometryParams): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.categoryId !== other.categoryId)\n return false;\n if (this.subCategoryId !== other.subCategoryId)\n return false;\n if (this.geometryClass !== other.geometryClass)\n return false;\n\n if (this.elmPriority !== other.elmPriority)\n return false;\n if (this.elmTransparency !== other.elmTransparency)\n return false;\n if (this.fillTransparency !== other.fillTransparency)\n return false;\n\n if ((this.lineColor === undefined) !== (other.lineColor === undefined))\n return false;\n if (this.lineColor && !this.lineColor.equals(other.lineColor!))\n return false;\n\n if (this.weight !== other.weight)\n return false;\n\n if ((this.materialId === undefined) !== (other.materialId === undefined))\n return false;\n if (this.materialId && this.materialId !== other.materialId!)\n return false;\n\n if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))\n return false;\n if (this.styleInfo && !this.styleInfo.equals(other.styleInfo!))\n return false;\n\n if (this.fillDisplay !== other.fillDisplay)\n return false;\n\n if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {\n if ((this.gradient === undefined) !== (other.gradient === undefined))\n return false;\n if (this.gradient && !this.gradient.equals(other.gradient!))\n return false;\n if (this.backgroundFill !== other.backgroundFill)\n return false;\n if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {\n if ((this.fillColor === undefined) !== (other.fillColor === undefined))\n return false;\n if (this.fillColor && !this.fillColor.equals(other.fillColor!))\n return false;\n }\n }\n\n if ((this.pattern === undefined) !== (other.pattern === undefined))\n return false;\n if (this.pattern && !this.pattern.equals(other.pattern!))\n return false;\n\n return true;\n }\n\n /** Change [[categoryId]] to the supplied id, [[subCategoryId]] to the supplied category's the default subCategory, and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setCategoryId(categoryId: Id64String, clearAppearanceOverrides = true) {\n this.categoryId = categoryId;\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n\n /** Change [[subCategoryId]] to the supplied id and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setSubCategoryId(subCategoryId: Id64String, clearAppearanceOverrides = true) {\n this.subCategoryId = subCategoryId;\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GeometryParams.js","sourceRoot":"","sources":["../../src/GeometryParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AAKvD,qCAAkC;AAElC;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,gEAAgE;IAChE,+CAAS,CAAA;IACT,wDAAwD;IACxD,iDAAU,CAAA;IACV,sEAAsE;IACtE,iDAAU,CAAA;IACV;;OAEG;IACH,qDAAY,CAAA;AACd,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB;AAED;;;GAGG;AACH,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,kGAAkG;IAClG,mDAAQ,CAAA;IACR,8EAA8E;IAC9E,qDAAS,CAAA;IACT,gGAAgG;IAChG,yDAAW,CAAA;AACb,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB;AAED;;;;;;GAMG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACvB,kGAAkG;IAClG,uDAAW,CAAA;IACX,qHAAqH;IACrH,iEAAgB,CAAA;IAChB,mFAAmF;IACnF,2DAAa,CAAA;IACb,mGAAmG;IACnG,uDAAW,CAAA;AACb,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAED;;;GAGG;AACH,MAAa,cAAc;IA+DN;IAA+B;IA9DlD;;OAEG;IACI,UAAU,CAAc;IAC/B;;OAEG;IACI,WAAW,CAAU;IAC5B;;OAEG;IACI,MAAM,CAAU;IACvB;;OAEG;IACI,SAAS,CAAY;IAC5B;;;OAGG;IACI,SA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,CAAC,UAAsB,EAAE,wBAAwB,GAAG,IAAI;QAC1E,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,eAAM,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC;QAChE,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED,gHAAgH;IACzG,gBAAgB,CAAC,aAAyB,EAAE,wBAAwB,GAAG,IAAI;QAChF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,wBAAwB;YAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;CACF;AA1LD,wCA0LC","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 Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ColorDef } from \"./ColorDef\";\nimport { AreaPattern } from \"./geometry/AreaPattern\";\nimport { LineStyle } from \"./geometry/LineStyle\";\nimport { Gradient } from \"./Gradient\";\nimport { IModel } from \"./IModel\";\n\n/** Whether a closed region should be drawn for wireframe display with its internal area filled or not.\n * @public\n * @extensions\n */\nexport enum FillDisplay {\n /** don't fill, even if fill attribute is on for the viewport */\n Never = 0,\n /** fill if the fill attribute is on for the viewport */\n ByView = 1,\n /** always fill, even if the fill attribute is off for the viewport */\n Always = 2,\n /** always fill, fill will always be behind other geometry belonging to the same element.\n * @note Edge geometry is not produced for shapes with this fill type. If you want an outline, add it as separate geometry.\n */\n Blanking = 3,\n}\n\n/** Describes how a view's background color affects the interior area of a closed region.\n * @public\n * @extensions\n */\nexport enum BackgroundFill {\n /** single color fill uses the fill color and line color to draw either a solid or outline fill */\n None = 0,\n /** single color fill uses the view's background color to draw a solid fill */\n Solid = 1,\n /** single color fill uses the view's background color and line color to draw an outline fill */\n Outline = 2,\n}\n\n/** Categorizes a piece of geometry within a GeometryStream. Visibility of classes of geometry can be toggled\n * within a view using [[ViewFlags]].\n * @see [[GeometryStreamProps]].\n * @see [[Feature]].\n * @public\n * @extensions\n */\nexport enum GeometryClass {\n /** Used to classify the \"real\" geometry within a model. Most geometry falls within this class. */\n Primary = 0,\n /** Used to classify geometry used as a drawing aid in constructing the Primary geometry. For example, grid lines. */\n Construction = 1,\n /** Used to classify annotations which dimension (measure) the Primary geometry. */\n Dimension = 2,\n /** Used to classify geometry used to fill planar regions with a 2d pattern (e.g., hatch lines). */\n Pattern = 3,\n}\n\n/** Describes the display properties of graphics in a persistent element's GeometryStream that aren't inherited from [[SubCategoryAppearance]].\n * @see [[GeometryStreamProps]].\n * @public\n */\nexport class GeometryParams {\n /** Optional render material to override [[SubCategoryAppearance.materialId]].\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.materialId]] with no material.\n */\n public materialId?: Id64String;\n /** Optional display priority added to [[SubCategoryAppearance.priority]].\n * The net display priority value is used to control z ordering when drawing to 2d views.\n */\n public elmPriority?: number;\n /** Optional line weight to override [[SubCategoryAppearance.weight]].\n * The weight is an integer in the range of [0,31] that by default corresponds to a pixel width of weight+1.\n */\n public weight?: number;\n /** Optional line color to override [[SubCategoryAppearance.color]].\n * The transparency component is ignored and should instead be specified using [[elmTransparency]].\n */\n public lineColor?: ColorDef;\n /** Optional fill color for region interiors. Set the same as [[lineColor]] for an opaque fill.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]], [[gradient]] is undefined, and [[backgroundFill]] is [[BackgroundFill.None]].\n * The transparency component is ignored and should instead be specified using [[fillTransparency]].\n */\n public fillColor?: ColorDef;\n /** Optional fill using the current view background color for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]] and [[gradient]] is undefined. Default is [[BackgroundFill.None]].\n */\n public backgroundFill?: BackgroundFill;\n /** Optional fill specification that determines when and if a region interior will display using [[gradient]], [[backgroundFill]], or [[fillColor]] in that order of preference.\n * Fill only applies to [[RenderMode.Wireframe]] views. In a [[RenderMode.SmoothShade]] or [[RenderMode.SolidFill]] view, regions will always display as surfaces preferring [[fillColor]] when present over [[lineColor]].\n * Default is [[FillDisplay.Never]].\n */\n public fillDisplay?: FillDisplay;\n /** Optional line color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent element on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque and 1.0 for completely transparent.\n */\n public elmTransparency?: number;\n /** Optional fill color transparency to combine with [[SubCategoryAppearance.transparency]].\n * Transparency values are combined by multiplying the opaqueness. A 50% transparent fill on a 50% transparent sub-category creates a 75% transparent result (1 - ((1 - .5) * (1 - .5)) = 0.75).\n * Value range is [0.0,1.0]. Pass 0.0 for completely opaque, 1.0 for completely transparent, or leave undefined to use [[elmTransparency]].\n */\n public fillTransparency?: number;\n /** Optional geometry classification that can be toggled off with a [[ViewFlags]] independent of [[SubCategoryAppearance.invisible]].\n * Default is [[GeometryClass.Primary]].\n */\n public geometryClass?: GeometryClass;\n /** Optional line style to override [[SubCategoryAppearance.styleId]] plus modifiers to override the line style definition.\n * Specify an invalid [[Id64]] to override [[SubCategoryAppearance.styleId]] with a solid line.\n */\n public styleInfo?: LineStyle.Info;\n /** Optional gradient fill settings for region interiors.\n * Valid when [[fillDisplay]] is not [[FillDisplay.Never]].\n */\n public gradient?: Gradient.Symb;\n /** Optional area pattern settings for region interiors.\n * Independent of fill, a region can have both fill and pattern.\n */\n public pattern?: AreaPattern.Params;\n\n /** Create a GeometryParams given a [[Category]] Id for a [[GeometricElement]] and optional [[SubCategory]] Id. The [[SubCategory.appearance]] establishes the non-overriden display properties of\n * graphics in a GeometricElement's [[GeometryStreamProps]]. A GeometricElement refers to a single Category through [[GeometricElement.category]], while it's graphics can appear on multiple SubCategories\n * by adding a [[GeometryAppearanceProps]] with a SubCategory change to the GeometryStream.\n * @note If a valid SubCategory Id is not supplied, the default SubCategory for the parent Category is used. To be considered valid, [[SubCategory.getCategoryId]] must refer to the specified Category Id.\n */\n constructor(public categoryId: Id64String, public subCategoryId = Id64.invalid) {\n if (!Id64.isValid(subCategoryId))\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n }\n\n public clone(): GeometryParams {\n const retVal = new GeometryParams(this.categoryId, this.subCategoryId);\n retVal.materialId = this.materialId;\n retVal.elmPriority = this.elmPriority;\n retVal.weight = this.weight;\n retVal.lineColor = this.lineColor;\n retVal.fillColor = this.fillColor;\n retVal.backgroundFill = this.backgroundFill;\n retVal.fillDisplay = this.fillDisplay;\n retVal.elmTransparency = this.elmTransparency;\n retVal.fillTransparency = this.fillTransparency;\n retVal.geometryClass = this.geometryClass;\n retVal.styleInfo = this.styleInfo ? this.styleInfo.clone() : undefined;\n retVal.gradient = this.gradient ? this.gradient.clone() : undefined;\n retVal.pattern = this.pattern ? this.pattern.clone() : undefined;\n return retVal;\n }\n\n /** Clears [[SubCategoryAppearance]] overrides while preserving [[categoryId]] and [[subCategoryId]]. */\n public resetAppearance() {\n this.materialId = undefined;\n this.elmPriority = undefined;\n this.weight = undefined;\n this.lineColor = undefined;\n this.fillColor = undefined;\n this.backgroundFill = undefined;\n this.fillDisplay = undefined;\n this.elmTransparency = undefined;\n this.fillTransparency = undefined;\n this.geometryClass = undefined;\n this.styleInfo = undefined;\n this.gradient = undefined;\n this.pattern = undefined;\n }\n\n /** Compare two [[GeometryParams]] for equivalence, i.e. both values are undefined and inherited from [[SubCategoryAppearance]] or have the same override. */\n public isEquivalent(other: GeometryParams): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.categoryId !== other.categoryId)\n return false;\n if (this.subCategoryId !== other.subCategoryId)\n return false;\n if (this.geometryClass !== other.geometryClass)\n return false;\n\n if (this.elmPriority !== other.elmPriority)\n return false;\n if (this.elmTransparency !== other.elmTransparency)\n return false;\n if (this.fillTransparency !== other.fillTransparency)\n return false;\n\n if ((this.lineColor === undefined) !== (other.lineColor === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.lineColor && !this.lineColor.equals(other.lineColor!))\n return false;\n\n if (this.weight !== other.weight)\n return false;\n\n if ((this.materialId === undefined) !== (other.materialId === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.materialId && this.materialId !== other.materialId!)\n return false;\n\n if ((this.styleInfo === undefined) !== (other.styleInfo === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.styleInfo && !this.styleInfo.equals(other.styleInfo!))\n return false;\n\n if (this.fillDisplay !== other.fillDisplay)\n return false;\n\n if (this.fillDisplay !== undefined && this.fillDisplay !== FillDisplay.Never) {\n if ((this.gradient === undefined) !== (other.gradient === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.gradient && !this.gradient.equals(other.gradient!))\n return false;\n if (this.backgroundFill !== other.backgroundFill)\n return false;\n if (this.backgroundFill === undefined || this.backgroundFill === BackgroundFill.None) {\n if ((this.fillColor === undefined) !== (other.fillColor === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.fillColor && !this.fillColor.equals(other.fillColor!))\n return false;\n }\n }\n\n if ((this.pattern === undefined) !== (other.pattern === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.pattern && !this.pattern.equals(other.pattern!))\n return false;\n\n return true;\n }\n\n /** Change [[categoryId]] to the supplied id, [[subCategoryId]] to the supplied category's the default subCategory, and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setCategoryId(categoryId: Id64String, clearAppearanceOverrides = true) {\n this.categoryId = categoryId;\n this.subCategoryId = IModel.getDefaultSubCategoryId(categoryId);\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n\n /** Change [[subCategoryId]] to the supplied id and optionally clear any [[SubCategoryAppearance]] overrides. */\n public setSubCategoryId(subCategoryId: Id64String, clearAppearanceOverrides = true) {\n this.subCategoryId = subCategoryId;\n if (clearAppearanceOverrides)\n this.resetAppearance();\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,WAAW,EAAqB,MAAM,SAAS,CAAC;AACzD,OAAO,EAAqD,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAE/I;;;;GAIG;AACH,yBAAiB,QAAQ,CAAC;IACxB,4CAA4C;IAC5C,KAAY,KAAK;QACf,gBAAgB;QAChB,IAAI,IAAI;QACR,8CAA8C;QAC9C,MAAM,IAAI;QACV,2EAA2E;QAC3E,OAAO,IAAI;KACZ;IAED,+FAA+F;IAC/F,KAAY,IAAI;QACd,IAAI,IAAI;QACR,MAAM,IAAI;QACV,MAAM,IAAI;QACV,WAAW,IAAI;QACf,SAAS,IAAI;QACb,aAAa,IAAI;QACjB,4DAA4D;QAC5D,QAAQ,IAAI;KACb;IAED,mDAAmD;IACnD,UAAiB,aAAa;QAC5B,iEAAiE;QACjE,KAAK,EAAE,MAAM,CAAC;QACd,qCAAqC;QACrC,KAAK,EAAE,aAAa,CAAC;KACtB;IAED;;OAEG;IACH,MAAa,QAAQ;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,QAAQ,CAAC;oBACJ,IAAI,EAAE,aAAa;KAIvC;IAED,wEAAwE;IACxE,SAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAEhE;IAED,+EAA+E;IAC/E,UAAiB,SAAS;QACxB,gGAAgG;QAChG,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ED,kEAAkE;QAClE,IAAW,UAAU,IAAI,OAAO,CAA+C;QAE/E;;;WAGG;QACI,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW;QAsDrE;;;;;WAKG;QACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW;QAO3D,kDAAkD;QAC3C,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,WAAW;KAuJzD;CACF"}
|
package/lib/cjs/Gradient.js
CHANGED
|
@@ -165,7 +165,9 @@ var Gradient;
|
|
|
165
165
|
return -1;
|
|
166
166
|
else
|
|
167
167
|
return 1;
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
168
169
|
if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle))
|
|
170
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
169
171
|
return lhs.angle.radians - rhs.angle.radians;
|
|
170
172
|
if (lhs.keys.length !== rhs.keys.length)
|
|
171
173
|
return lhs.keys.length - rhs.keys.length;
|
|
@@ -429,6 +431,9 @@ var Gradient;
|
|
|
429
431
|
const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
|
|
430
432
|
color = this.mapColor(fStep);
|
|
431
433
|
}
|
|
434
|
+
else {
|
|
435
|
+
throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);
|
|
436
|
+
}
|
|
432
437
|
break;
|
|
433
438
|
}
|
|
434
439
|
case ThematicDisplay_1.ThematicGradientMode.Smooth:
|
package/lib/cjs/Gradient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,I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A,qBAAM,EAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;YAC1B,MAAM,WAAW,GAAG,mBAAW,CAAC,MAAM,CAAC,KAAK,EAAE,yBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC7E,IAAA,qBAAM,EAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAjaU,aAAI,OAkahB,CAAA;AACH,CAAC,EAvfgB,QAAQ,wBAAR,QAAQ,QAufxB","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 Symbology\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** Produce an image suitable for use for thematic rendering.\n * This function is chiefly useful for the WebGL renderer.\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color!.getAlpha();\n image[currentIdx--] = color!.colors.b;\n image[currentIdx--] = color!.colors.g;\n image[currentIdx--] = color!.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../src/Gradient.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,wDAAyD;AACzD,yCAAqD;AACrD,mCAAyD;AACzD,uDAA+I;AAE/I;;;;GAIG;AACH,IAAiB,QAAQ,CA2fxB;AA3fD,WAAiB,QAAQ;IACvB,4CAA4C;IAC5C,IAAY,KAOX;IAPD,WAAY,KAAK;QACf,gBAAgB;QAChB,iCAAQ,CAAA;QACR,8CAA8C;QAC9C,qCAAU,CAAA;QACV,2EAA2E;QAC3E,uCAAW,CAAA;IACb,CAAC,EAPW,KAAK,GAAL,cAAK,KAAL,cAAK,QAOhB;IAED,+FAA+F;IAC/F,IAAY,IASX;IATD,WAAY,IAAI;QACd,+BAAQ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C;YAC7E,IAAA,qBAAM,EAAC,SAAS,KAAK,WAAW,CAAC,CAAC;YAClC,OAAO,WAAW,CAAC;QACrB,CAAC;;IAraU,aAAI,OAsahB,CAAA;AACH,CAAC,EA3fgB,QAAQ,wBAAR,QAAQ,QA2fxB","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 Symbology\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { Angle, AngleProps } from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { ImageBuffer, ImageBufferFormat } from \"./Image\";\nimport { ThematicGradientColorScheme, ThematicGradientMode, ThematicGradientSettings, ThematicGradientSettingsProps } from \"./ThematicDisplay\";\n\n/** Namespace containing types for defining a color gradient, often used for filled planar regions.\n * @see [[GeometryParams]]\n * @see [[GraphicParams]]\n * @public\n */\nexport namespace Gradient {\n /** Flags applied to a [[Gradient.Symb]]. */\n export enum Flags {\n /** No flags. */\n None = 0,\n /** Reverse the order of the gradient keys. */\n Invert = 1,\n /** Draw an outline around the surface to which the gradient is applied. */\n Outline = 2,\n }\n\n /** Enumerates the modes by which a [[Gradient.Symb]]'s keys are applied to create an image. */\n export enum Mode {\n None = 0,\n Linear = 1,\n Curved = 2,\n Cylindrical = 3,\n Spherical = 4,\n Hemispherical = 5,\n /** For a gradient created based for [[ThematicDisplay]]. */\n Thematic = 6,\n }\n\n /** Gradient fraction value to [[ColorDef]] pair */\n export interface KeyColorProps {\n /** Fraction from 0.0 to 1.0 to denote position along gradient */\n value: number;\n /** Color value for given fraction */\n color: ColorDefProps;\n }\n\n /** Gradient fraction value to [[ColorDef]] pair\n * @see [[Gradient.KeyColorProps]]\n */\n export class KeyColor {\n public value: number;\n public color: ColorDef;\n public constructor(json: KeyColorProps) {\n this.value = json.value;\n this.color = ColorDef.fromJSON(json.color);\n }\n }\n\n /** Compare two KeyColor objects for equality. Returns true if equal. */\n export function keyColorEquals(a: KeyColor, b: KeyColor): boolean {\n return (a.value === b.value) && a.color.equals(b.color);\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position */\n export interface SymbProps {\n /** Gradient type, must be set to something other than [[Gradient.Mode.None]] to display fill */\n mode: Mode;\n /** Gradient flags to enable outline display and invert color fractions, Flags.None if undefined */\n flags?: Flags;\n /** Gradient rotation angle, 0.0 if undefined */\n angle?: AngleProps;\n /** Gradient tint value from 0.0 to 1.0, only used when [[Gradient.KeyColorProps]] size is 1, 0.0 if undefined */\n tint?: number;\n /** Gradient shift value from 0.0 to 1.0, 0.0 if undefined */\n shift?: number;\n /** Gradient fraction value/color pairs, 1 minimum (uses tint for 2nd color), 8 maximum */\n keys: KeyColorProps[];\n /** Settings applicable to [[ThematicDisplay]]. */\n thematicSettings?: ThematicGradientSettingsProps;\n }\n\n /** Arguments supplied to [[Gradient.Symb.produceImage]].\n * @public\n */\n export interface ProduceImageArgs {\n /** The desired width of the image in pixels. Must be an integer greater than zero. */\n width: number;\n /** The desired height of the image in pixels. Must be an integer greater than zero. */\n height: number;\n /** If true and the gradient uses [[Gradient.Mode.Thematic]], the margin color specified by [[ThematicGradientSettings.marginColor]] will be included\n * in the top and bottom rows of the image; otherwise only the gradient colors will be included in the image.\n */\n includeThematicMargin?: boolean;\n }\n\n /** Multi-color area fill defined by a range of colors that vary by position.\n * Gradient fill can be applied to planar regions.\n * @see [[Gradient.SymbProps]]\n */\n export class Symb {\n public mode = Mode.None;\n public flags: Flags = Flags.None;\n public angle?: Angle;\n public tint?: number;\n public shift: number = 0;\n public thematicSettings?: ThematicGradientSettings;\n public keys: KeyColor[] = [];\n\n /** create a GradientSymb from a json object. */\n public static fromJSON(json?: SymbProps) {\n const result = new Symb();\n if (!json)\n return result;\n result.mode = json.mode;\n result.flags = (json.flags === undefined) ? Flags.None : json.flags;\n result.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n result.tint = json.tint;\n result.shift = json.shift ? json.shift : 0;\n json.keys.forEach((key) => result.keys.push(new KeyColor(key)));\n result.thematicSettings = (json.thematicSettings === undefined) ? undefined : ThematicGradientSettings.fromJSON(json.thematicSettings);\n\n return result;\n }\n\n private static _fixedSchemeKeys = [\n // NB: these color values are ordered as rbg. Note how the components are applied below.\n [[0.0, 0, 255, 0], [0.25, 0, 255, 255], [0.5, 0, 0, 255], [0.75, 255, 0, 255], [1.0, 255, 0, 0]], // Blue Red.\n [[0.0, 255, 0, 0], [0.25, 255, 0, 255], [0.5, 0, 0, 255], [0.75, 0, 255, 255], [1.0, 0, 255, 0]], // Red blue.\n [[0.0, 0, 0, 0], [1.0, 255, 255, 255]], // Monochrome.\n [[0.0, 152, 148, 188], [0.5, 204, 160, 204], [1.0, 152, 72, 128]], // Based off of the topographic gradients in Point Clouds.\n [[0.0, 0, 255, 0], [0.2, 72, 96, 160], [0.4, 152, 96, 160], [0.6, 128, 32, 104], [0.7, 148, 180, 128], [1.0, 240, 240, 240]], // Based off of the sea-mountain gradient in Point Clouds.\n ];\n private static _fixedCustomKeys = [[0.0, 255, 0, 0], [1.0, 0, 255, 0]];\n\n /** Create for [[ThematicDisplay]]. */\n public static createThematic(settings: ThematicGradientSettings) {\n const result = new Symb();\n result.mode = Mode.Thematic;\n result.thematicSettings = settings;\n\n if (settings.colorScheme < ThematicGradientColorScheme.Custom) {\n for (const keyValue of Gradient.Symb._fixedSchemeKeys[settings.colorScheme])\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.computeTbgrFromComponents(keyValue[1], keyValue[3], keyValue[2]) }));\n } else { // custom color scheme; must use custom keys\n assert(settings.customKeys.length > 1, \"Custom thematic mode requires at least two keys to be defined\");\n if (settings.customKeys.length > 1) {\n settings.customKeys.forEach((keyColor) => result.keys.push(keyColor));\n } else { // if custom color keys are not specified properly, revert to some basic key scheme and assert\n for (const keyValue of Gradient.Symb._fixedCustomKeys)\n result.keys.push(new KeyColor({ value: keyValue[0], color: ColorDef.from(keyValue[1], keyValue[3], keyValue[2]).toJSON() }));\n }\n }\n return result;\n }\n\n public toJSON(): SymbProps {\n return {\n ...this,\n thematicSettings: this.thematicSettings?.toJSON(),\n keys: this.keys.map((key) => ({ value: key.value, color: key.color.toJSON() })),\n };\n }\n\n public clone(): Symb {\n return Symb.fromJSON(this.toJSON());\n }\n\n /** Returns true if this symbology is equal to another, false otherwise. */\n public equals(other: Symb): boolean {\n return Symb.compareSymb(this, other) === 0;\n }\n\n /** Compares two gradient symbologies. Used for ordering Gradient.Symb objects.\n * @param lhs First gradient to compare\n * @param rhs Second gradient to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compareSymb(lhs: Gradient.Symb, rhs: Gradient.Symb): number {\n if (lhs === rhs)\n return 0; // Same pointer\n if (lhs.mode !== rhs.mode)\n return lhs.mode - rhs.mode;\n if (lhs.flags !== rhs.flags)\n if (lhs.flags === undefined)\n return -1;\n else if (rhs.flags === undefined)\n return 1;\n else\n return lhs.flags - rhs.flags;\n if (lhs.tint !== rhs.tint)\n if (lhs.tint === undefined)\n return -1;\n else if (rhs.tint === undefined)\n return 1;\n else\n return lhs.tint - rhs.tint;\n if (lhs.shift !== rhs.shift)\n if (lhs.shift === undefined)\n return -1;\n else if (rhs.shift === undefined)\n return 1;\n else\n return lhs.shift - rhs.shift;\n if ((lhs.angle === undefined) !== (rhs.angle === undefined))\n if (lhs.angle === undefined)\n return -1;\n else\n return 1;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (lhs.angle && !lhs.angle.isAlmostEqualNoPeriodShift(rhs.angle!))\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return lhs.angle.radians - rhs.angle!.radians;\n if (lhs.keys.length !== rhs.keys.length)\n return lhs.keys.length - rhs.keys.length;\n for (let i = 0; i < lhs.keys.length; i++) {\n if (lhs.keys[i].value !== rhs.keys[i].value)\n return lhs.keys[i].value - rhs.keys[i].value;\n if (!lhs.keys[i].color.equals(rhs.keys[i].color))\n return lhs.keys[i].color.tbgr - rhs.keys[i].color.tbgr;\n }\n if (lhs.thematicSettings !== rhs.thematicSettings)\n if (undefined === lhs.thematicSettings)\n return -1;\n else if (undefined === rhs.thematicSettings)\n return 1;\n else {\n const thematicCompareResult = ThematicGradientSettings.compare(lhs.thematicSettings, rhs.thematicSettings);\n if (0 !== thematicCompareResult)\n return thematicCompareResult;\n }\n return 0;\n }\n\n /** Compare this symbology to another.\n * @see [[Gradient.Symb.compareSymb]]\n */\n public compare(other: Symb): number {\n return Gradient.Symb.compareSymb(this, other);\n }\n\n /**\n * Ensure the value given is within the range of 0 to 255,\n * and truncate the value to only the 8 least significant bits.\n */\n private roundToByte(num: number): number {\n return Math.min(num + .5, 255.0) & 0xFF;\n }\n\n /** Maps a value to an RGBA value adjusted from a color present in this symbology's array. */\n public mapColor(value: number) {\n if (value < 0)\n value = 0;\n else if (value > 1)\n value = 1;\n\n if ((this.flags & Flags.Invert) !== 0)\n value = 1 - value;\n\n let idx = 0;\n let d;\n let w0;\n let w1;\n if (this.keys.length <= 2) {\n w0 = 1.0 - value;\n w1 = value;\n } else { // locate value in map, blend corresponding colors\n while (idx < (this.keys.length - 2) && value > this.keys[idx + 1].value)\n idx++;\n\n d = this.keys[idx + 1].value - this.keys[idx].value;\n w1 = d < 0.0001 ? 0.0 : (value - this.keys[idx].value) / d;\n w0 = 1.0 - w1;\n }\n\n const color0 = this.keys[idx].color;\n const color1 = this.keys[idx + 1].color;\n const colors0 = color0.colors;\n const colors1 = color1.colors;\n const red = w0 * colors0.r + w1 * colors1.r;\n const green = w0 * colors0.g + w1 * colors1.g;\n const blue = w0 * colors0.b + w1 * colors1.b;\n const transparency = w0 * colors0.t + w1 * colors1.t;\n\n return ColorDef.from(this.roundToByte(red), this.roundToByte(green), this.roundToByte(blue), this.roundToByte(transparency));\n }\n\n public get hasTranslucency(): boolean {\n for (const key of this.keys) {\n if (!key.color.isOpaque)\n return true;\n }\n\n return false;\n }\n\n /** Returns true if the [[Gradient.Flags.Outline]] flag is set. */\n public get isOutlined(): boolean { return 0 !== (this.flags & Flags.Outline); }\n\n /** Produce an image suitable for use for thematic rendering.\n * This function is chiefly useful for the WebGL renderer.\n * @see [[Gradient.Symb.getImage]] to obtain a generally useful image instead.\n */\n public getThematicImageForRenderer(maxDimension: number): ImageBuffer {\n assert(Mode.Thematic === this.mode, \"getThematicImageForRenderer only is used for thematic display.\");\n\n let settings = this.thematicSettings;\n if (settings === undefined) {\n settings = ThematicGradientSettings.defaults;\n }\n\n const stepCount = Math.min(settings.stepCount, maxDimension);\n const dimension = (ThematicGradientMode.Smooth === settings.mode) ? maxDimension : stepCount;\n const image = new Uint8Array(1 * dimension * 4);\n let currentIdx = image.length - 1;\n\n function addColor(color: ColorDef) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n\n switch (settings.mode) {\n case ThematicGradientMode.Smooth: {\n for (let j = 0; j < dimension; j++) {\n const f = (1 - j / (dimension));\n addColor(this.mapColor(f));\n }\n break;\n }\n\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n // The work to generate the delimiter lines and isolines is done completely in the shader.\n // Therefore, we just fall through here and use a regular stepped gradient.\n case ThematicGradientMode.Stepped: {\n assert(settings.stepCount > 1, \"Step count must be at least two to generate renderer gradient for thematic display\");\n for (let j = 0; j < dimension; j++) {\n // If we use Smooth's approach to generate the gradient...\n // We would get these values for stepCount five: 0 .2 .4 .6 .8\n // We really want these values: 0 .25 .5 .75 1\n // This preserves an exact color mapping of a n-step gradient when stepCount also equals n.\n // stepCount must be at least two for this. The thematic API enforces stepCount of at least 2.\n const f = (1 - j / (dimension - 1));\n addColor(this.mapColor(f));\n }\n break;\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, 1);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n\n /** Produces a bitmap image from this gradient.\n * @param width Width of the image\n * @param height Height of the image\n * @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.\n * @see [[produceImage]] for more customization.\n */\n public getImage(width: number, height: number): ImageBuffer {\n if (this.mode === Mode.Thematic)\n width = 1;\n\n return this.produceImage({ width, height, includeThematicMargin: true });\n }\n\n /** Produces a bitmap image from this gradient. */\n public produceImage(args: ProduceImageArgs): ImageBuffer {\n const { width, height, includeThematicMargin } = { ...args };\n\n const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;\n const cosA = Math.cos(thisAngle);\n const sinA = Math.sin(thisAngle);\n const image = new Uint8Array(width * height * 4);\n let currentIdx = image.length - 1;\n const shift = Math.min(1.0, Math.abs(this.shift));\n\n switch (this.mode) {\n case Mode.Linear:\n case Mode.Cylindrical: {\n const xs = 0.5 - 0.25 * shift * cosA;\n const ys = 0.5 - 0.25 * shift * sinA;\n let dMax;\n let dMin = dMax = 0.0;\n let d;\n for (let j = 0; j < 2; j++) {\n for (let i = 0; i < 2; i++) {\n d = (i - xs) * cosA + (j - ys) * sinA;\n if (d < dMin)\n dMin = d;\n if (d > dMax)\n dMax = d;\n }\n }\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n d = x * cosA + y * sinA;\n let f;\n if (this.mode === Mode.Linear) {\n if (d > 0)\n f = 0.5 + 0.5 * d / dMax;\n else\n f = 0.5 - 0.5 * d / dMin;\n } else {\n if (d > 0)\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMax));\n else\n f = Math.sin(Math.PI / 2 * (1.0 - d / dMin));\n }\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Curved: {\n const xs = 0.5 + 0.5 * sinA - 0.25 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.25 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const xr = 0.8 * (x * cosA + y * sinA);\n const yr = y * cosA - x * sinA;\n const f = Math.sin(Math.PI / 2 * (1 - Math.sqrt(xr * xr + yr * yr)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Spherical: {\n const r = 0.5 + 0.125 * Math.sin(2.0 * thisAngle);\n const xs = 0.5 * shift * (cosA + sinA) * r;\n const ys = 0.5 * shift * (sinA - cosA) * r;\n for (let j = 0; j < height; j++) {\n const y = ys + j / height - 0.5;\n for (let i = 0; i < width; i++) {\n const x = xs + i / width - 0.5;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y) / r));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Hemispherical: {\n const xs = 0.5 + 0.5 * sinA - 0.5 * shift * cosA;\n const ys = 0.5 - 0.5 * cosA - 0.5 * shift * sinA;\n for (let j = 0; j < height; j++) {\n const y = j / height - ys;\n for (let i = 0; i < width; i++) {\n const x = i / width - xs;\n const f = Math.sin(Math.PI / 2 * (1.0 - Math.sqrt(x * x + y * y)));\n const color = this.mapColor(f);\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n break;\n }\n case Mode.Thematic: {\n const settings = this.thematicSettings ?? ThematicGradientSettings.defaults;\n\n for (let j = 0; j < height; j++) {\n let f = 1 - j / height;\n let color: ColorDef;\n\n if (includeThematicMargin && (f < ThematicGradientSettings.margin || f > ThematicGradientSettings.contentMax)) {\n color = settings.marginColor;\n } else {\n f = (f - ThematicGradientSettings.margin) / (ThematicGradientSettings.contentRange);\n switch (settings.mode) {\n case ThematicGradientMode.SteppedWithDelimiter:\n case ThematicGradientMode.IsoLines:\n case ThematicGradientMode.Stepped: {\n if (settings.stepCount > 1) {\n const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);\n color = this.mapColor(fStep);\n } else {\n throw new Error(`Thematic gradient mode ${String(settings.mode)} requires at least two steps.`);\n }\n break;\n }\n case ThematicGradientMode.Smooth:\n color = this.mapColor(f);\n break;\n }\n }\n\n for (let i = 0; i < width; i++) {\n image[currentIdx--] = color.getAlpha();\n image[currentIdx--] = color.colors.b;\n image[currentIdx--] = color.colors.g;\n image[currentIdx--] = color.colors.r;\n }\n }\n }\n }\n\n assert(-1 === currentIdx);\n const imageBuffer = ImageBuffer.create(image, ImageBufferFormat.Rgba, width);\n assert(undefined !== imageBuffer);\n return imageBuffer;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenLine.d.ts","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,yBAAiB,UAAU,CAAC;IAC1B;;;;;;;;;;;;OAYG;IACH,UAAiB,UAAU;QACzB,4EAA4E;QAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,mJAAmJ;QACnJ,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,oKAAoK;QACpK,OAAO,CAAC,EAAE,UAAU,CAAC;QACrB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,gEAAgE;IAChE,MAAa,K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QAS/C,MAAM,IAAI,aAAa;QAU9B,oHAAoH;QAC7G,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,QAAQ;QAWxC,MAAM,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;QASvC,IAAW,eAAe,IAAI,OAAO,CAEpC;QAED,OAAO;KAKR;CACF"}
|
package/lib/cjs/HiddenLine.js
CHANGED
|
@@ -100,7 +100,10 @@ var HiddenLine;
|
|
|
100
100
|
return true;
|
|
101
101
|
else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)
|
|
102
102
|
return false;
|
|
103
|
+
else if ((undefined === this.color) !== (undefined === other.color))
|
|
104
|
+
return false;
|
|
103
105
|
else
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
104
107
|
return undefined === this.color || this.color.equals(other.color);
|
|
105
108
|
}
|
|
106
109
|
toJSON() {
|
|
@@ -133,7 +136,7 @@ var HiddenLine;
|
|
|
133
136
|
static defaults = new Settings({});
|
|
134
137
|
/** Create a DisplaySettings from its JSON representation. */
|
|
135
138
|
static fromJSON(json) {
|
|
136
|
-
if (core_bentley_1.JsonUtils.
|
|
139
|
+
if (!core_bentley_1.JsonUtils.isNonEmptyObject(json))
|
|
137
140
|
return this.defaults;
|
|
138
141
|
else if (json instanceof Settings)
|
|
139
142
|
return json;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,yCAAqD;AACrD,6CAA0C;AAE1C;;GAEG;AACH,IAAiB,UAAU,CA8N1B;AA9ND,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,kHAAkH;QAClG,KAAK,CAAY;QACjC,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AC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;gBAC5D,cAAc,EAAE,SAAS,KAAK,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB;aACzG,CAAC,CAAC;QACL,CAAC;QAEM,MAAM,CAAC,KAAe;YAC3B,IAAI,IAAI,KAAK,KAAK;gBAChB,OAAO,IAAI,CAAC;YAEd,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;mBACpC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;mBAChC,IAAI,CAAC,qBAAqB,KAAK,KAAK,CAAC,qBAAqB,CAAC;QAClE,CAAC;QAED,IAAW,eAAe;YACxB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAED,YAAoB,IAAmB;YACrC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAChD,IAAI,CAAC,qBAAqB,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EA9NgB,UAAU,0BAAV,UAAU,QA8N1B","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\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { LinePixels } from \"./LinePixels\";\n\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\n * @public\n */\nexport namespace HiddenLine {\n /** Describes the symbology with which edges should be drawn.\n * This JSON representation is awkward, but it must match that used in the db.\n * If the JSON came from the db then all members are present and:\n * - color is overridden only if ovrColor = true.\n * - width is overridden only if width != 0\n * - pattern is overridden only if pattern != LinePixels.Invalid\n * The 'public' JSON representation is more sensible:\n * - Color, width, and pattern are each overridden iff they are not undefined.\n * To make this work for both scenarios, the rules are:\n * - color is overridden if color != undefined and ovrColor != false\n * - width is overridden if width != undefined and width != 0\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\n */\n export interface StyleProps {\n /** If true, and [[color]] is defined, then the edge color is overridden. */\n ovrColor?: boolean;\n /** If defined, and [[ovrColor]] is not `false`, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n color?: ColorDefProps;\n /** If defined and not equal to [[LinePixels.Invalid]], the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n pattern?: LinePixels;\n /** If defined and non-zero, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n width?: number;\n }\n\n /** Describes the symbology with which edges should be drawn. */\n export class Style {\n public get ovrColor(): boolean { return undefined !== this.color; }\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n public readonly color?: ColorDef;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n public readonly pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n public readonly width?: number;\n\n private constructor(json?: StyleProps, hidden?: true) {\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\n if (hidden)\n this.pattern = LinePixels.HiddenLine;\n\n return;\n }\n\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\n if (undefined !== json.color && false !== json.ovrColor)\n this.color = ColorDef.fromJSON(json.color);\n\n if (undefined !== json.pattern) {\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\n if (LinePixels.Invalid !== pattern)\n this.pattern = pattern;\n } else if (hidden) {\n this.pattern = LinePixels.HiddenLine;\n }\n\n if (undefined !== json.width) {\n let width = JsonUtils.asInt(json.width, 0);\n if (0 !== width) {\n width = Math.max(1, width);\n this.width = Math.min(32, width);\n }\n }\n }\n\n public static readonly defaultVisible = new Style({});\n public static readonly defaultHidden = new Style({}, true);\n\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\n if (undefined !== json)\n return new Style(json, hidden);\n\n return hidden ? this.defaultHidden : this.defaultVisible;\n }\n\n /** Create a Style equivalent to this one but with the specified color override. */\n public overrideColor(color: ColorDef | undefined): Style {\n if (undefined === this.color && undefined === color)\n return this;\n\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\n return this;\n\n return Style.fromJSON({\n color: color?.toJSON(),\n ovrColor: undefined !== color,\n pattern: this.pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified pattern override. */\n public overridePattern(pattern: LinePixels | undefined): Style {\n if (pattern === this.pattern)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified width override. */\n public overrideWidth(width: number | undefined): Style {\n if (width === this.width)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern: this.pattern,\n width,\n });\n }\n\n /** Returns true if this Style is equivalent to the supplied Style. */\n public equals(other: Style): boolean {\n if (this === other)\n return true;\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\n return false;\n else\n return undefined === this.color || this.color.equals(other.color!);\n }\n\n public toJSON(): StyleProps {\n return {\n ovrColor: this.ovrColor,\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\n width: undefined !== this.width ? this.width : 0,\n };\n }\n }\n\n /** The JSON representation of a [[HiddenLine.Settings]]. */\n export interface SettingsProps {\n /** See [[HiddenLine.Settings.visible]]. */\n visible?: StyleProps;\n /** See [[HiddenLine.Settings.hidden]]. */\n hidden?: StyleProps;\n /** See [[HiddenLine.Settings.transparencyThreshold. */\n transThreshold?: number;\n }\n\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\n export class Settings {\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\n public readonly visible: Style;\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\n public readonly hidden: Style;\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\n * @note values will be clamped to the range [0.0, 1.0].\n * @note Defaults to 1.0.\n */\n public readonly transparencyThreshold: number;\n\n /** An alias for [[transparencyThreshold]]. */\n public get transThreshold(): number { return this.transparencyThreshold; }\n\n /** The default display settings. */\n public static defaults = new Settings({});\n\n /** Create a DisplaySettings from its JSON representation. */\n public static fromJSON(json?: SettingsProps): Settings {\n if (JsonUtils.isEmptyObjectOrUndefined(json))\n return this.defaults;\n else if (json instanceof Settings)\n return json;\n else\n return new Settings(json!);\n }\n\n public toJSON(): SettingsProps {\n const props: SettingsProps = {\n visible: this.visible.toJSON(),\n hidden: this.hidden.toJSON(),\n transThreshold: this.transThreshold,\n };\n\n return props;\n }\n\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\n public override(props: SettingsProps): Settings {\n const visible = props.visible;\n const hidden = props.hidden;\n const transparencyThreshold = props.transThreshold;\n return Settings.fromJSON({\n visible: undefined !== visible ? visible : this.visible.toJSON(),\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\n });\n }\n\n public equals(other: Settings): boolean {\n if (this === other)\n return true;\n\n return this.visible.equals(other.visible)\n && this.hidden.equals(other.hidden)\n && this.transparencyThreshold === other.transparencyThreshold;\n }\n\n public get matchesDefaults(): boolean {\n return this.equals(Settings.defaults);\n }\n\n private constructor(json: SettingsProps) {\n this.visible = Style.fromJSON(json.visible);\n this.hidden = Style.fromJSON(json.hidden, true);\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"HiddenLine.js","sourceRoot":"","sources":["../../src/HiddenLine.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,yCAAqD;AACrD,6CAA0C;AAE1C;;GAEG;AACH,IAAiB,UAAU,CAiO1B;AAjOD,WAAiB,UAAU;IA2BzB,gEAAgE;IAChE,MAAa,KAAK;QAChB,IAAW,QAAQ,KAAc,OAAO,SAAS,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACnE,kHAAkH;QAClG,KAAK,CAAY;QACjC,4HAA4H;QAC5G,OAAO,CAAc;QACrC;;WAEG;QACa,KAAK,CAAU;QAE/B,YAAoB,IAAiB,EAAE,MAAa;YAClD,IAAI,wBAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC7C,IAAI,MAAM;oBACR,IAAI,CAAC,OAAO,GAAG,uBAAU,CAAC,UAAU,CAAC;gBAEvC,OAAO;YACT,CAAC;YAED,IAAI,GAAG,IAAkB,CAAC,CAAC,2CAA2C;YACtE,IAAI,SAAS,KAAK,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,IAAI,CAAC,QAAQ;gBACrD,IAAI,CAAC,KAAK,GAAG,mBAAQ,CAAC,QA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AAC;YAEd,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;mBACpC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;mBAChC,IAAI,CAAC,qBAAqB,KAAK,KAAK,CAAC,qBAAqB,CAAC;QAClE,CAAC;QAED,IAAW,eAAe;YACxB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QAED,YAAoB,IAAmB;YACrC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAChD,IAAI,CAAC,qBAAqB,GAAG,wBAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QAC5E,CAAC;;IArEU,mBAAQ,WAsEpB,CAAA;AACH,CAAC,EAjOgB,UAAU,0BAAV,UAAU,QAiO1B","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\nimport { JsonUtils } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"./ColorDef\";\nimport { LinePixels } from \"./LinePixels\";\n\n/** Namespace containing types controlling how edges and surfaces should be drawn in \"hidden line\" and \"solid fill\" [[RenderMode]]s.\n * @public\n */\nexport namespace HiddenLine {\n /** Describes the symbology with which edges should be drawn.\n * This JSON representation is awkward, but it must match that used in the db.\n * If the JSON came from the db then all members are present and:\n * - color is overridden only if ovrColor = true.\n * - width is overridden only if width != 0\n * - pattern is overridden only if pattern != LinePixels.Invalid\n * The 'public' JSON representation is more sensible:\n * - Color, width, and pattern are each overridden iff they are not undefined.\n * To make this work for both scenarios, the rules are:\n * - color is overridden if color != undefined and ovrColor != false\n * - width is overridden if width != undefined and width != 0\n * - pattern is overridden if pattern != undefined and pattern != LinePixels.Invalid\n */\n export interface StyleProps {\n /** If true, and [[color]] is defined, then the edge color is overridden. */\n ovrColor?: boolean;\n /** If defined, and [[ovrColor]] is not `false`, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n color?: ColorDefProps;\n /** If defined and not equal to [[LinePixels.Invalid]], the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n pattern?: LinePixels;\n /** If defined and non-zero, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n width?: number;\n }\n\n /** Describes the symbology with which edges should be drawn. */\n export class Style {\n public get ovrColor(): boolean { return undefined !== this.color; }\n /** If defined, the color used to draw the edges. If undefined, edges are drawn using the element's line color. */\n public readonly color?: ColorDef;\n /** If defined, the pixel pattern used to draw the edges. If undefined, edges are drawn using the element's line pattern. */\n public readonly pattern?: LinePixels;\n /** If defined, the width of the edges in pixels. If undefined (or 0), edges are drawn using the element's line width.\n * @note Non-integer values are truncated, and values are clamped to the range [1, 32].\n */\n public readonly width?: number;\n\n private constructor(json?: StyleProps, hidden?: true) {\n if (JsonUtils.isEmptyObjectOrUndefined(json)) {\n if (hidden)\n this.pattern = LinePixels.HiddenLine;\n\n return;\n }\n\n json = json as StyleProps; // per JsonUtils.isEmptyObjectOrUndefined()\n if (undefined !== json.color && false !== json.ovrColor)\n this.color = ColorDef.fromJSON(json.color);\n\n if (undefined !== json.pattern) {\n const pattern = JsonUtils.asInt(json.pattern, hidden ? LinePixels.HiddenLine : LinePixels.Invalid);\n if (LinePixels.Invalid !== pattern)\n this.pattern = pattern;\n } else if (hidden) {\n this.pattern = LinePixels.HiddenLine;\n }\n\n if (undefined !== json.width) {\n let width = JsonUtils.asInt(json.width, 0);\n if (0 !== width) {\n width = Math.max(1, width);\n this.width = Math.min(32, width);\n }\n }\n }\n\n public static readonly defaultVisible = new Style({});\n public static readonly defaultHidden = new Style({}, true);\n\n public static fromJSON(json?: StyleProps, hidden?: true): Style {\n if (undefined !== json)\n return new Style(json, hidden);\n\n return hidden ? this.defaultHidden : this.defaultVisible;\n }\n\n /** Create a Style equivalent to this one but with the specified color override. */\n public overrideColor(color: ColorDef | undefined): Style {\n if (undefined === this.color && undefined === color)\n return this;\n\n if (undefined !== this.color && undefined !== color && this.color.equals(color))\n return this;\n\n return Style.fromJSON({\n color: color?.toJSON(),\n ovrColor: undefined !== color,\n pattern: this.pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified pattern override. */\n public overridePattern(pattern: LinePixels | undefined): Style {\n if (pattern === this.pattern)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern,\n width: this.width,\n });\n }\n\n /** Create a Style equivalent to this one but with the specified width override. */\n public overrideWidth(width: number | undefined): Style {\n if (width === this.width)\n return this;\n\n return Style.fromJSON({\n color: this.color?.toJSON(),\n ovrColor: this.ovrColor,\n pattern: this.pattern,\n width,\n });\n }\n\n /** Returns true if this Style is equivalent to the supplied Style. */\n public equals(other: Style): boolean {\n if (this === other)\n return true;\n else if (this.ovrColor !== other.ovrColor || this.pattern !== other.pattern || this.width !== other.width)\n return false;\n else if ((undefined === this.color) !== (undefined === other.color))\n return false;\n else\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return undefined === this.color || this.color.equals(other.color!);\n }\n\n public toJSON(): StyleProps {\n return {\n ovrColor: this.ovrColor,\n color: this.color ? this.color.toJSON() : ColorDef.white.toJSON(),\n pattern: undefined !== this.pattern ? this.pattern : LinePixels.Invalid,\n width: undefined !== this.width ? this.width : 0,\n };\n }\n }\n\n /** The JSON representation of a [[HiddenLine.Settings]]. */\n export interface SettingsProps {\n /** See [[HiddenLine.Settings.visible]]. */\n visible?: StyleProps;\n /** See [[HiddenLine.Settings.hidden]]. */\n hidden?: StyleProps;\n /** See [[HiddenLine.Settings.transparencyThreshold. */\n transThreshold?: number;\n }\n\n /** Describes how visible and hidden edges and transparent surfaces should be rendered in \"hidden line\" and \"solid fill\" [[RenderMode]]s. */\n export class Settings {\n /** Describes how visible edges (those unobscured by other geometry) should be displayed. */\n public readonly visible: Style;\n /** Describes how hidden edges (those obscured by other geometry) should be displayed. */\n public readonly hidden: Style;\n /** A value in the range [0.0, 1.0] specifying a threshold below which transparent surfaces should not be drawn.\n * A value of 0.0 indicates any surface that is not 100% opaque should not be drawn.\n * A value of 0.25 indicates any surface that is less than 25% opaque should not be drawn.\n * A value of 1.0 indicates that all surfaces should be drawn regardless of transparency.\n * @note values will be clamped to the range [0.0, 1.0].\n * @note Defaults to 1.0.\n */\n public readonly transparencyThreshold: number;\n\n /** An alias for [[transparencyThreshold]]. */\n public get transThreshold(): number { return this.transparencyThreshold; }\n\n /** The default display settings. */\n public static defaults = new Settings({});\n\n /** Create a DisplaySettings from its JSON representation. */\n public static fromJSON(json?: SettingsProps): Settings {\n if (!JsonUtils.isNonEmptyObject(json))\n return this.defaults;\n else if (json instanceof Settings)\n return json;\n else\n return new Settings(json);\n }\n\n public toJSON(): SettingsProps {\n const props: SettingsProps = {\n visible: this.visible.toJSON(),\n hidden: this.hidden.toJSON(),\n transThreshold: this.transThreshold,\n };\n\n return props;\n }\n\n /** Create a Settings equivalent to this one with the exception of those properties defined in the supplied JSON. */\n public override(props: SettingsProps): Settings {\n const visible = props.visible;\n const hidden = props.hidden;\n const transparencyThreshold = props.transThreshold;\n return Settings.fromJSON({\n visible: undefined !== visible ? visible : this.visible.toJSON(),\n hidden: undefined !== hidden ? hidden : this.hidden.toJSON(),\n transThreshold: undefined !== transparencyThreshold ? transparencyThreshold : this.transparencyThreshold,\n });\n }\n\n public equals(other: Settings): boolean {\n if (this === other)\n return true;\n\n return this.visible.equals(other.visible)\n && this.hidden.equals(other.hidden)\n && this.transparencyThreshold === other.transparencyThreshold;\n }\n\n public get matchesDefaults(): boolean {\n return this.equals(Settings.defaults);\n }\n\n private constructor(json: SettingsProps) {\n this.visible = Style.fromJSON(json.visible);\n this.hidden = Style.fromJSON(json.hidden, true);\n this.transparencyThreshold = JsonUtils.asDouble(json.transThreshold, 1.0);\n }\n }\n}\n"]}
|
package/lib/cjs/IModel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModel.d.ts","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,
|
|
1
|
+
{"version":3,"file":"IModel.d.ts","sourceRoot":"","sources":["../../src/IModel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,OAAO,EAAmC,UAAU,EAAQ,UAAU,EAAyB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACtJ,OAAO,EACL,KAAK,EAAsD,OAAO,EAAW,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAChJ,kBAAkB,EAAE,iBAAiB,EACtC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kHAAkH;IAClH,QAAQ,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC;IAC9B,0BAA0B;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,SAA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CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;IAYrD,gEAAgE;WAClD,uBAAuB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU;IAIzE,uFAAuF;IACvF,IAAW,YAAY,YAA+C;IAEtE;;OAEG;IACI,gBAAgB,IAAI,SAAS;IAMpC;;;;;OAKG;IACI,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;IAEhE;;;;;;OAMG;IACI,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO;IAE7D;;;;;OAKG;IACI,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,YAAY;IAE1F;;;;;;OAMG;IACI,6BAA6B,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,OAAO;CAClF"}
|
package/lib/cjs/IModel.js
CHANGED
|
@@ -74,9 +74,9 @@ class EcefLocation {
|
|
|
74
74
|
const eastCarto = Cartographic_1.Cartographic.fromRadians({ longitude: origin.longitude + deltaRadians, latitude: origin.latitude, height: origin.height });
|
|
75
75
|
const ecefNorth = northCarto.toEcef();
|
|
76
76
|
const ecefEast = eastCarto.toEcef();
|
|
77
|
-
const xVector = core_geometry_1.Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize();
|
|
78
|
-
const yVector = core_geometry_1.Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize();
|
|
79
|
-
const matrix = core_geometry_1.Matrix3d.createRigidFromColumns(xVector, yVector, core_geometry_1.AxisOrder.XYZ);
|
|
77
|
+
const xVector = (0, core_bentley_1.expectDefined)(core_geometry_1.Vector3d.createStartEnd(ecefOrigin, ecefEast).normalize());
|
|
78
|
+
const yVector = (0, core_bentley_1.expectDefined)(core_geometry_1.Vector3d.createStartEnd(ecefOrigin, ecefNorth).normalize());
|
|
79
|
+
const matrix = (0, core_bentley_1.expectDefined)(core_geometry_1.Matrix3d.createRigidFromColumns(xVector, yVector, core_geometry_1.AxisOrder.XYZ));
|
|
80
80
|
if (angle !== undefined) {
|
|
81
81
|
const north = core_geometry_1.Matrix3d.createRotationAroundAxisIndex(core_geometry_1.AxisIndex.Z, angle);
|
|
82
82
|
matrix.multiplyMatrixMatrix(north, matrix);
|
|
@@ -85,7 +85,7 @@ class EcefLocation {
|
|
|
85
85
|
const delta = matrix.multiplyVector(core_geometry_1.Vector3d.create(-point.x, -point.y, -point.z));
|
|
86
86
|
ecefOrigin.addInPlace(delta);
|
|
87
87
|
}
|
|
88
|
-
return new EcefLocation({ origin: ecefOrigin, orientation: core_geometry_1.YawPitchRollAngles.createFromMatrix3d(matrix), cartographicOrigin: origin });
|
|
88
|
+
return new EcefLocation({ origin: ecefOrigin, orientation: (0, core_bentley_1.expectDefined)(core_geometry_1.YawPitchRollAngles.createFromMatrix3d(matrix)), cartographicOrigin: origin });
|
|
89
89
|
}
|
|
90
90
|
/** Construct ECEF Location from transform with optional position on the earth used to establish the ECEF origin and orientation. */
|
|
91
91
|
static createFromTransform(transform) {
|
|
@@ -279,7 +279,7 @@ class IModel {
|
|
|
279
279
|
projectExtents: this.projectExtents.toJSON(),
|
|
280
280
|
globalOrigin: this.globalOrigin.toJSON(),
|
|
281
281
|
ecefLocation: this.ecefLocation,
|
|
282
|
-
geographicCoordinateSystem: this.geographicCoordinateSystem,
|
|
282
|
+
geographicCoordinateSystem: this.geographicCoordinateSystem?.toJSON(),
|
|
283
283
|
...this._getRpcProps(),
|
|
284
284
|
};
|
|
285
285
|
}
|
|
@@ -381,14 +381,14 @@ class IModel {
|
|
|
381
381
|
* @throws IModelError if [[isGeoLocated]] is false.
|
|
382
382
|
* @note The resultant point will only be meaningful if the ECEF coordinate is close on the earth to the iModel.
|
|
383
383
|
*/
|
|
384
|
-
ecefToSpatial(ecef, result) { return this.getEcefTransform().multiplyInversePoint3d(ecef, result); }
|
|
384
|
+
ecefToSpatial(ecef, result) { return (0, core_bentley_1.expectDefined)(this.getEcefTransform().multiplyInversePoint3d(ecef, result)); }
|
|
385
385
|
/** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using its [[IModel.ecefLocation]].
|
|
386
386
|
* @param spatial A point in the iModel's spatial coordinates
|
|
387
387
|
* @param result If defined, use this for output
|
|
388
388
|
* @returns A Cartographic location
|
|
389
389
|
* @throws IModelError if [[isGeoLocated]] is false.
|
|
390
390
|
*/
|
|
391
|
-
spatialToCartographicFromEcef(spatial, result) { return Cartographic_1.Cartographic.fromEcef(this.spatialToEcef(spatial), result); }
|
|
391
|
+
spatialToCartographicFromEcef(spatial, result) { return (0, core_bentley_1.expectDefined)(Cartographic_1.Cartographic.fromEcef(this.spatialToEcef(spatial), result)); }
|
|
392
392
|
/** Convert a [[Cartographic]] to a point in this iModel's Spatial coordinates using its [[IModel.ecefLocation]].
|
|
393
393
|
* @param cartographic A cartographic location
|
|
394
394
|
* @param result If defined, use this for output
|