@itwin/core-backend 4.1.0-dev.7 → 4.1.0-dev.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/CHANGELOG.md +99 -1
  2. package/lib/cjs/BackendHubAccess.js.map +1 -1
  3. package/lib/cjs/BlobContainerService.d.ts +38 -28
  4. package/lib/cjs/BlobContainerService.d.ts.map +1 -1
  5. package/lib/cjs/BlobContainerService.js.map +1 -1
  6. package/lib/cjs/BriefcaseManager.d.ts +8 -5
  7. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  8. package/lib/cjs/BriefcaseManager.js +9 -16
  9. package/lib/cjs/BriefcaseManager.js.map +1 -1
  10. package/lib/cjs/Category.d.ts +4 -16
  11. package/lib/cjs/Category.d.ts.map +1 -1
  12. package/lib/cjs/Category.js +0 -12
  13. package/lib/cjs/Category.js.map +1 -1
  14. package/lib/cjs/ChannelControl.d.ts +5 -1
  15. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  16. package/lib/cjs/ChannelControl.js +10 -5
  17. package/lib/cjs/ChannelControl.js.map +1 -1
  18. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  19. package/lib/cjs/CheckpointManager.js +20 -9
  20. package/lib/cjs/CheckpointManager.js.map +1 -1
  21. package/lib/cjs/ClassRegistry.d.ts +2 -1
  22. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  23. package/lib/cjs/ClassRegistry.js +2 -1
  24. package/lib/cjs/ClassRegistry.js.map +1 -1
  25. package/lib/cjs/CloudSqlite.d.ts +57 -40
  26. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  27. package/lib/cjs/CloudSqlite.js +54 -39
  28. package/lib/cjs/CloudSqlite.js.map +1 -1
  29. package/lib/cjs/DisplayStyle.d.ts +2 -5
  30. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  31. package/lib/cjs/DisplayStyle.js +0 -3
  32. package/lib/cjs/DisplayStyle.js.map +1 -1
  33. package/lib/cjs/ECDb.d.ts +6 -0
  34. package/lib/cjs/ECDb.d.ts.map +1 -1
  35. package/lib/cjs/ECDb.js +6 -0
  36. package/lib/cjs/ECDb.js.map +1 -1
  37. package/lib/cjs/ECSchemaXmlContext.d.ts +28 -1
  38. package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -1
  39. package/lib/cjs/ECSchemaXmlContext.js +28 -1
  40. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  41. package/lib/cjs/Element.d.ts +40 -97
  42. package/lib/cjs/Element.d.ts.map +1 -1
  43. package/lib/cjs/Element.js +0 -57
  44. package/lib/cjs/Element.js.map +1 -1
  45. package/lib/cjs/ElementAspect.d.ts +2 -4
  46. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  47. package/lib/cjs/ElementAspect.js +2 -4
  48. package/lib/cjs/ElementAspect.js.map +1 -1
  49. package/lib/cjs/Entity.d.ts +5 -2
  50. package/lib/cjs/Entity.d.ts.map +1 -1
  51. package/lib/cjs/Entity.js +10 -2
  52. package/lib/cjs/Entity.js.map +1 -1
  53. package/lib/cjs/ExternalSource.d.ts +4 -11
  54. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  55. package/lib/cjs/ExternalSource.js +0 -7
  56. package/lib/cjs/ExternalSource.js.map +1 -1
  57. package/lib/cjs/IModelDb.d.ts +61 -26
  58. package/lib/cjs/IModelDb.d.ts.map +1 -1
  59. package/lib/cjs/IModelDb.js +164 -83
  60. package/lib/cjs/IModelDb.js.map +1 -1
  61. package/lib/cjs/IModelHost.d.ts +1 -3
  62. package/lib/cjs/IModelHost.d.ts.map +1 -1
  63. package/lib/cjs/IModelHost.js +3 -5
  64. package/lib/cjs/IModelHost.js.map +1 -1
  65. package/lib/cjs/IpcHost.d.ts +8 -2
  66. package/lib/cjs/IpcHost.d.ts.map +1 -1
  67. package/lib/cjs/IpcHost.js +6 -6
  68. package/lib/cjs/IpcHost.js.map +1 -1
  69. package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -1
  70. package/lib/cjs/LocalhostIpcHost.js +2 -3
  71. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  72. package/lib/cjs/Material.d.ts +0 -1
  73. package/lib/cjs/Material.d.ts.map +1 -1
  74. package/lib/cjs/Material.js +0 -1
  75. package/lib/cjs/Material.js.map +1 -1
  76. package/lib/cjs/Model.d.ts +4 -13
  77. package/lib/cjs/Model.d.ts.map +1 -1
  78. package/lib/cjs/Model.js +0 -9
  79. package/lib/cjs/Model.js.map +1 -1
  80. package/lib/cjs/NativeHost.d.ts.map +1 -1
  81. package/lib/cjs/NativeHost.js +2 -2
  82. package/lib/cjs/NativeHost.js.map +1 -1
  83. package/lib/cjs/PropertyStore.d.ts +3 -3
  84. package/lib/cjs/PropertyStore.d.ts.map +1 -1
  85. package/lib/cjs/PropertyStore.js +2 -5
  86. package/lib/cjs/PropertyStore.js.map +1 -1
  87. package/lib/cjs/Relationship.d.ts +2 -5
  88. package/lib/cjs/Relationship.d.ts.map +1 -1
  89. package/lib/cjs/Relationship.js +0 -3
  90. package/lib/cjs/Relationship.js.map +1 -1
  91. package/lib/cjs/SQLiteDb.d.ts +1 -1
  92. package/lib/cjs/SQLiteDb.d.ts.map +1 -1
  93. package/lib/cjs/SQLiteDb.js +1 -1
  94. package/lib/cjs/SQLiteDb.js.map +1 -1
  95. package/lib/cjs/Schema.d.ts +0 -1
  96. package/lib/cjs/Schema.d.ts.map +1 -1
  97. package/lib/cjs/Schema.js +0 -1
  98. package/lib/cjs/Schema.js.map +1 -1
  99. package/lib/cjs/SchemaUtils.d.ts +19 -0
  100. package/lib/cjs/SchemaUtils.d.ts.map +1 -0
  101. package/lib/cjs/SchemaUtils.js +42 -0
  102. package/lib/cjs/SchemaUtils.js.map +1 -0
  103. package/lib/cjs/SqliteStatement.d.ts +13 -1
  104. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  105. package/lib/cjs/SqliteStatement.js +23 -1
  106. package/lib/cjs/SqliteStatement.js.map +1 -1
  107. package/lib/cjs/Texture.d.ts +3 -4
  108. package/lib/cjs/Texture.d.ts.map +1 -1
  109. package/lib/cjs/Texture.js +1 -2
  110. package/lib/cjs/Texture.js.map +1 -1
  111. package/lib/cjs/TileStorage.d.ts +3 -0
  112. package/lib/cjs/TileStorage.d.ts.map +1 -1
  113. package/lib/cjs/TileStorage.js +9 -1
  114. package/lib/cjs/TileStorage.js.map +1 -1
  115. package/lib/cjs/ViewDefinition.d.ts +7 -28
  116. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  117. package/lib/cjs/ViewDefinition.js +0 -21
  118. package/lib/cjs/ViewDefinition.js.map +1 -1
  119. package/lib/cjs/ViewStore.d.ts +488 -0
  120. package/lib/cjs/ViewStore.d.ts.map +1 -0
  121. package/lib/cjs/ViewStore.js +1246 -0
  122. package/lib/cjs/ViewStore.js.map +1 -0
  123. package/lib/cjs/core-backend.d.ts +2 -0
  124. package/lib/cjs/core-backend.d.ts.map +1 -1
  125. package/lib/cjs/core-backend.js +2 -0
  126. package/lib/cjs/core-backend.js.map +1 -1
  127. package/lib/cjs/domains/FunctionalElements.d.ts +6 -12
  128. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  129. package/lib/cjs/domains/FunctionalElements.js +0 -6
  130. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  131. package/lib/cjs/rpc/tracing.js +2 -2
  132. package/lib/cjs/rpc/tracing.js.map +1 -1
  133. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +5 -3
  134. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
  135. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +53 -36
  136. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  137. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  138. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +0 -2
  139. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  140. package/lib/cjs/workspace/Workspace.d.ts +1 -1
  141. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  142. package/lib/cjs/workspace/Workspace.js +4 -4
  143. package/lib/cjs/workspace/Workspace.js.map +1 -1
  144. package/package.json +21 -40
@@ -18,9 +18,7 @@ export declare class ModelSelector extends DefinitionElement {
18
18
  static get className(): string;
19
19
  /** The array of modelIds of the GeometricModels displayed by this ModelSelector */
20
20
  models: Id64String[];
21
- /** @internal */
22
- constructor(props: ModelSelectorProps, iModel: IModelDb);
23
- /** @internal */
21
+ protected constructor(props: ModelSelectorProps, iModel: IModelDb);
24
22
  toJSON(): ModelSelectorProps;
25
23
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
26
24
  /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.
@@ -60,9 +58,7 @@ export declare class CategorySelector extends DefinitionElement {
60
58
  static get className(): string;
61
59
  /** The array of element Ids of the Categories selected by this CategorySelector */
62
60
  categories: Id64String[];
63
- /** @internal */
64
- constructor(props: CategorySelectorProps, iModel: IModelDb);
65
- /** @internal */
61
+ protected constructor(props: CategorySelectorProps, iModel: IModelDb);
66
62
  toJSON(): CategorySelectorProps;
67
63
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
68
64
  /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.
@@ -95,14 +91,7 @@ export declare class CategorySelector extends DefinitionElement {
95
91
  /**
96
92
  * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,
97
93
  * plus additional view-specific parameters in their [[Element.jsonProperties]].
98
- *
99
94
  * Subclasses of ViewDefinition determine which model(s) are viewed.
100
- *
101
- * **Example: Obtaining the background color for a view**
102
- * ``` ts
103
- * [[include:ViewDefinition.getBackgroundColor]]
104
- * ```
105
- *
106
95
  * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.
107
96
  * @public
108
97
  */
@@ -113,9 +102,7 @@ export declare abstract class ViewDefinition extends DefinitionElement {
113
102
  categorySelectorId: Id64String;
114
103
  /** The element Id of the [[DisplayStyle]] for this ViewDefinition */
115
104
  displayStyleId: Id64String;
116
- /** @internal */
117
105
  protected constructor(props: ViewDefinitionProps, iModel: IModelDb);
118
- /** @internal */
119
106
  toJSON(): ViewDefinitionProps;
120
107
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
121
108
  /** @beta */
@@ -168,9 +155,7 @@ export declare abstract class ViewDefinition3d extends ViewDefinition {
168
155
  angles: YawPitchRollAngles;
169
156
  /** The camera used for this view, if `cameraOn` is true. */
170
157
  camera: Camera;
171
- /** @internal */
172
- constructor(props: ViewDefinition3dProps, iModel: IModelDb);
173
- /** @internal */
158
+ protected constructor(props: ViewDefinition3dProps, iModel: IModelDb);
174
159
  toJSON(): ViewDefinition3dProps;
175
160
  /** Provides access to optional detail settings for this view. */
176
161
  get details(): ViewDetails3d;
@@ -194,11 +179,9 @@ export declare class SpatialViewDefinition extends ViewDefinition3d {
194
179
  static get className(): string;
195
180
  /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */
196
181
  modelSelectorId: Id64String;
197
- /** @internal */
198
- constructor(props: SpatialViewDefinitionProps, iModel: IModelDb);
182
+ protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb);
199
183
  /** Construct a SpatialViewDefinition from its JSON representation. */
200
184
  static fromJSON(props: Omit<SpatialViewDefinitionProps, "classFullName">, iModel: IModelDb): SpatialViewDefinition;
201
- /** Convert this view to its JSON representation. */
202
185
  toJSON(): SpatialViewDefinitionProps;
203
186
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
204
187
  /** @beta */
@@ -284,9 +267,7 @@ export declare class ViewDefinition2d extends ViewDefinition {
284
267
  delta: Point2d;
285
268
  /** The rotation of this view. */
286
269
  angle: Angle;
287
- /** @internal */
288
- constructor(props: ViewDefinition2dProps, iModel: IModelDb);
289
- /** @internal */
270
+ protected constructor(props: ViewDefinition2dProps, iModel: IModelDb);
290
271
  toJSON(): ViewDefinition2dProps;
291
272
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
292
273
  /** Provides access to optional detail settings for this view. */
@@ -300,8 +281,7 @@ export declare class ViewDefinition2d extends ViewDefinition {
300
281
  export declare class DrawingViewDefinition extends ViewDefinition2d {
301
282
  /** @internal */
302
283
  static get className(): string;
303
- /** @internal */
304
- constructor(props: ViewDefinition2dProps, iModel: IModelDb);
284
+ protected constructor(props: ViewDefinition2dProps, iModel: IModelDb);
305
285
  /** Create a DrawingViewDefinition
306
286
  * @param iModelDb The iModel
307
287
  * @param definitionModelId The [[DefinitionModel]]
@@ -424,7 +404,6 @@ export declare class LightLocation extends SpatialLocationElement {
424
404
  static get className(): string;
425
405
  /** Whether this light is currently turned on. */
426
406
  enabled: boolean;
427
- /** @internal */
428
- constructor(props: LightLocationProps, iModel: IModelDb);
407
+ protected constructor(props: LightLocationProps, iModel: IModelDb);
429
408
  }
430
409
  //# sourceMappingURL=ViewDefinition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewDefinition.d.ts","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,SAAS,EAAE,UAAU,EAA2B,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EACL,KAAK,EAAY,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAa,QAAQ,EAAE,kBAAkB,EAChH,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAe,MAAM,EAAE,qBAAqB,EAAE,IAAI,EAAE,cAAc,EACzH,mBAAmB,EAAE,kBAAkB,EAAe,kBAAkB,EAAE,kBAAkB,EAAE,cAAc,EACtH,0BAA0B,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,WAAW,EAC/H,aAAa,EACd,M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IAAI;CAIlG;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAAoC;IAClF;;;;OAIG;WACoB,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAI3G;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;IACpD,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA6B;IACpE,IAAI,EAAE,cAAc,CAAC;gBACT,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ;cAK5C,mBAAmB,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI;CAI/E;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IACvD,gBAAgB;IAChB,WAA2B,SAAS,IAAI,MAAM,CAA4B;IAC1E,iDAAiD;IAC1C,OAAO,EAAG,OAAO,CAAC;IAEzB,SAAS,aAAa,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ;CAClE"}
@@ -21,12 +21,10 @@ const Element_1 = require("./Element");
21
21
  class ModelSelector extends Element_1.DefinitionElement {
22
22
  /** @internal */
23
23
  static get className() { return "ModelSelector"; }
24
- /** @internal */
25
24
  constructor(props, iModel) {
26
25
  super(props, iModel);
27
26
  this.models = props.models;
28
27
  }
29
- /** @internal */
30
28
  toJSON() {
31
29
  const val = super.toJSON();
32
30
  val.models = this.models;
@@ -87,12 +85,10 @@ exports.ModelSelector = ModelSelector;
87
85
  class CategorySelector extends Element_1.DefinitionElement {
88
86
  /** @internal */
89
87
  static get className() { return "CategorySelector"; }
90
- /** @internal */
91
88
  constructor(props, iModel) {
92
89
  super(props, iModel);
93
90
  this.categories = props.categories;
94
91
  }
95
- /** @internal */
96
92
  toJSON() {
97
93
  const val = super.toJSON();
98
94
  val.categories = this.categories;
@@ -148,21 +144,13 @@ exports.CategorySelector = CategorySelector;
148
144
  /**
149
145
  * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,
150
146
  * plus additional view-specific parameters in their [[Element.jsonProperties]].
151
- *
152
147
  * Subclasses of ViewDefinition determine which model(s) are viewed.
153
- *
154
- * **Example: Obtaining the background color for a view**
155
- * ``` ts
156
- * [[include:ViewDefinition.getBackgroundColor]]
157
- * ```
158
- *
159
148
  * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.
160
149
  * @public
161
150
  */
162
151
  class ViewDefinition extends (_b = Element_1.DefinitionElement) {
163
152
  /** @internal */
164
153
  static get className() { return "ViewDefinition"; }
165
- /** @internal */
166
154
  constructor(props, iModel) {
167
155
  super(props, iModel);
168
156
  this.categorySelectorId = core_bentley_1.Id64.fromJSON(props.categorySelectorId);
@@ -172,7 +160,6 @@ class ViewDefinition extends (_b = Element_1.DefinitionElement) {
172
160
  if (!core_bentley_1.Id64.isValid(this.displayStyleId))
173
161
  throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadArg, `displayStyleId is invalid`);
174
162
  }
175
- /** @internal */
176
163
  toJSON() {
177
164
  const json = super.toJSON();
178
165
  json.categorySelectorId = this.categorySelectorId;
@@ -246,7 +233,6 @@ exports.ViewDefinition = ViewDefinition;
246
233
  class ViewDefinition3d extends ViewDefinition {
247
234
  /** @internal */
248
235
  static get className() { return "ViewDefinition3d"; }
249
- /** @internal */
250
236
  constructor(props, iModel) {
251
237
  super(props, iModel);
252
238
  this.cameraOn = core_bentley_1.JsonUtils.asBool(props.cameraOn);
@@ -256,7 +242,6 @@ class ViewDefinition3d extends ViewDefinition {
256
242
  this.camera = new core_common_1.Camera(props.camera);
257
243
  this._details = new core_common_1.ViewDetails3d(this.jsonProperties);
258
244
  }
259
- /** @internal */
260
245
  toJSON() {
261
246
  const val = super.toJSON();
262
247
  val.cameraOn = this.cameraOn;
@@ -287,7 +272,6 @@ exports.ViewDefinition3d = ViewDefinition3d;
287
272
  class SpatialViewDefinition extends (_d = ViewDefinition3d) {
288
273
  /** @internal */
289
274
  static get className() { return "SpatialViewDefinition"; }
290
- /** @internal */
291
275
  constructor(props, iModel) {
292
276
  super(props, iModel);
293
277
  this.modelSelectorId = core_bentley_1.Id64.fromJSON(props.modelSelectorId);
@@ -298,7 +282,6 @@ class SpatialViewDefinition extends (_d = ViewDefinition3d) {
298
282
  static fromJSON(props, iModel) {
299
283
  return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);
300
284
  }
301
- /** Convert this view to its JSON representation. */
302
285
  toJSON() {
303
286
  const json = super.toJSON();
304
287
  json.modelSelectorId = this.modelSelectorId;
@@ -442,7 +425,6 @@ exports.OrthographicViewDefinition = OrthographicViewDefinition;
442
425
  class ViewDefinition2d extends ViewDefinition {
443
426
  /** @internal */
444
427
  static get className() { return "ViewDefinition2d"; }
445
- /** @internal */
446
428
  constructor(props, iModel) {
447
429
  super(props, iModel);
448
430
  this.baseModelId = core_bentley_1.Id64.fromJSON(props.baseModelId);
@@ -451,7 +433,6 @@ class ViewDefinition2d extends ViewDefinition {
451
433
  this.angle = core_geometry_1.Angle.fromJSON(props.angle);
452
434
  this._details = new core_common_1.ViewDetails(this.jsonProperties);
453
435
  }
454
- /** @internal */
455
436
  toJSON() {
456
437
  const val = super.toJSON();
457
438
  val.baseModelId = this.baseModelId;
@@ -476,7 +457,6 @@ exports.ViewDefinition2d = ViewDefinition2d;
476
457
  class DrawingViewDefinition extends ViewDefinition2d {
477
458
  /** @internal */
478
459
  static get className() { return "DrawingViewDefinition"; }
479
- /** @internal */
480
460
  constructor(props, iModel) {
481
461
  super(props, iModel);
482
462
  }
@@ -634,7 +614,6 @@ exports.ViewAttachment = ViewAttachment;
634
614
  class LightLocation extends Element_1.SpatialLocationElement {
635
615
  /** @internal */
636
616
  static get className() { return "LightLocation"; }
637
- /** @internal */
638
617
  constructor(props, iModel) { super(props, iModel); }
639
618
  }
640
619
  exports.LightLocation = LightLocation;
@@ -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,sCAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ViewDefinitions\r\n */\r\n\r\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\r\n * @public\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n /** @internal */\r\n constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n /** @internal */\r\n constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n *\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n *\r\n * **Example: Obtaining the background color for a view**\r\n * ``` ts\r\n * [[include:ViewDefinition.getBackgroundColor]]\r\n * ```\r\n *\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n /** @internal */\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @internal */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\r\n super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n /** @internal */\r\n public constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n /** @internal */\r\n public constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Convert this view to its JSON representation. */\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n /** @internal */\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n /** @internal */\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n /** @internal */\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n /** @internal */\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type!: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle!: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw!: number;\r\n public pitch!: number;\r\n public roll!: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n /** @internal */\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled!: boolean;\r\n /** @internal */\r\n constructor(props: LightLocationProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n"]}
1
+ {"version":3,"file":"ViewDefinition.js","sourceRoot":"","sources":["../../src/ViewDefinition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;AAEH,sDAA2F;AAC3F,wDAE8B;AAC9B,oDAK4B;AAC5B,uCAA0F;AAK1F;;;;GAIG;AACH,MAAa,aAAc,SAAQ,2BAAiB;IAClD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAK1E,YAAsB,KAAyB,EAAE,MAAgB;QAC/D,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC7B,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,OAAO,GAAG,CAAC;IACb,CAAC;IAEkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC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AAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;CACF;AAbD,wCAaC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,gCAAsB;IACvD,gBAAgB;IACT,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IAI1E,YAAsB,KAAyB,EAAE,MAAgB,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC7F;AAPD,sCAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ViewDefinitions\r\n */\r\n\r\nimport { Id64, Id64Array, Id64String, IModelStatus, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, Matrix3d, Point2d, Point3d, Range2d, Range3d, StandardViewIndex, Transform, Vector3d, YawPitchRollAngles,\r\n} from \"@itwin/core-geometry\";\r\nimport {\r\n AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps, BisCodeSpec, Camera, CategorySelectorProps, Code, CodeScopeProps,\r\n CodeSpec, ConcreteEntityTypes, EntityReferenceSet, IModelError, LightLocationProps, ModelSelectorProps, RelatedElement,\r\n SpatialViewDefinitionProps, ViewAttachmentProps, ViewDefinition2dProps, ViewDefinition3dProps, ViewDefinitionProps, ViewDetails,\r\n ViewDetails3d,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement, GraphicalElement2d, SpatialLocationElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { DisplayStyle, DisplayStyle2d, DisplayStyle3d } from \"./DisplayStyle\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\n\r\n/** Holds the list of Ids of GeometricModels displayed by a [[SpatialViewDefinition]]. Multiple SpatialViewDefinitions may point to the same ModelSelector.\r\n * @see [ModelSelectorState]($frontend)\r\n * See [how to create a ModelSelector]$(docs/learning/backend/CreateElements.md#ModelSelector).\r\n * @public\r\n */\r\nexport class ModelSelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ModelSelector\"; }\r\n\r\n /** The array of modelIds of the GeometricModels displayed by this ModelSelector */\r\n public models: Id64String[];\r\n\r\n protected constructor(props: ModelSelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.models = props.models;\r\n }\r\n\r\n public override toJSON(): ModelSelectorProps {\r\n const val = super.toJSON() as ModelSelectorProps;\r\n val.models = this.models;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.models.forEach((modelId: Id64String) => referenceIds.addModel(modelId));\r\n }\r\n\r\n /** Create a Code for a ModelSelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the ModelSelector and provides the scope for its name.\r\n * @param codeValue The ModelSelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.modelSelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The newly constructed ModelSelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): ModelSelector {\r\n const modelSelectorProps: ModelSelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n models,\r\n isPrivate: false,\r\n };\r\n return new ModelSelector(modelSelectorProps, iModelDb);\r\n }\r\n /**\r\n * Insert a ModelSelector to select which Models are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new ModelSelector into this DefinitionModel\r\n * @param name The name/CodeValue of the ModelSelector\r\n * @param models Array of models to select for display\r\n * @returns The Id of the newly inserted ModelSelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, models: Id64Array): Id64String {\r\n const modelSelector = this.create(iModelDb, definitionModelId, name, models);\r\n return iModelDb.elements.insertElement(modelSelector.toJSON());\r\n }\r\n}\r\n\r\n/** Holds a list of Ids of Categories to be displayed in a view.\r\n * @see [CategorySelectorState]($frontend)\r\n * See [how to create a CategorySelector]$(docs/learning/backend/CreateElements.md#CategorySelector).\r\n * @public\r\n */\r\nexport class CategorySelector extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"CategorySelector\"; }\r\n /** The array of element Ids of the Categories selected by this CategorySelector */\r\n public categories: Id64String[];\r\n\r\n protected constructor(props: CategorySelectorProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.categories = props.categories;\r\n }\r\n\r\n public override toJSON(): CategorySelectorProps {\r\n const val = super.toJSON() as CategorySelectorProps;\r\n val.categories = this.categories;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n this.categories.forEach((categoryId: Id64String) => referenceIds.addElement(categoryId));\r\n }\r\n\r\n /** Create a Code for a CategorySelector given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the CategorySelector and provides the scope for its name.\r\n * @param codeValue The CategorySelector name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.categorySelector);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n\r\n /**\r\n * Create a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The newly constructed CategorySelector element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): CategorySelector {\r\n const categorySelectorProps: CategorySelectorProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n model: definitionModelId,\r\n categories,\r\n isPrivate: false,\r\n };\r\n return new CategorySelector(categorySelectorProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a CategorySelector to select which categories are displayed by a ViewDefinition.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new CategorySelector into this DefinitionModel\r\n * @param name The name of the CategorySelector\r\n * @param categories Array of categories to select for display\r\n * @returns The Id of the newly inserted CategorySelector element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, categories: Id64Array): Id64String {\r\n const categorySelector = this.create(iModelDb, definitionModelId, name, categories);\r\n return iModelDb.elements.insertElement(categorySelector.toJSON());\r\n }\r\n}\r\n\r\n/**\r\n * The definition element for a view. ViewDefinitions specify the area/volume that is viewed, the Ids of a DisplayStyle and a CategorySelector,\r\n * plus additional view-specific parameters in their [[Element.jsonProperties]].\r\n * Subclasses of ViewDefinition determine which model(s) are viewed.\r\n * @note ViewDefinition is only available in the backend. See [ViewState]($frontend) for usage in the frontend.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition\"; }\r\n /** The element Id of the [[CategorySelector]] for this ViewDefinition */\r\n public categorySelectorId: Id64String;\r\n /** The element Id of the [[DisplayStyle]] for this ViewDefinition */\r\n public displayStyleId: Id64String;\r\n\r\n protected constructor(props: ViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n\r\n this.categorySelectorId = Id64.fromJSON(props.categorySelectorId);\r\n if (!Id64.isValid(this.categorySelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `categorySelectorId is invalid`);\r\n\r\n this.displayStyleId = Id64.fromJSON(props.displayStyleId);\r\n if (!Id64.isValid(this.displayStyleId))\r\n throw new IModelError(IModelStatus.BadArg, `displayStyleId is invalid`);\r\n }\r\n\r\n public override toJSON(): ViewDefinitionProps {\r\n const json = super.toJSON() as ViewDefinitionProps;\r\n json.categorySelectorId = this.categorySelectorId;\r\n json.displayStyleId = this.displayStyleId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.categorySelectorId);\r\n referenceIds.addElement(this.displayStyleId);\r\n const acsId: Id64String = this.getAuxiliaryCoordinateSystemId();\r\n if (Id64.isValidId64(acsId)) {\r\n referenceIds.addElement(acsId);\r\n }\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"categorySelectorId\", \"displayStyleId\"];\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n categorySelectorId: ConcreteEntityTypes.Element,\r\n displayStyleId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** @internal */\r\n protected static override onCloned(context: IModelElementCloneContext, sourceElementProps: ViewDefinitionProps, targetElementProps: ViewDefinitionProps): void {\r\n super.onCloned(context, sourceElementProps, targetElementProps);\r\n if (context.isBetweenIModels && targetElementProps.jsonProperties && targetElementProps.jsonProperties.viewDetails) {\r\n const acsId: Id64String = Id64.fromJSON(targetElementProps.jsonProperties.viewDetails.acs);\r\n if (Id64.isValidId64(acsId)) {\r\n targetElementProps.jsonProperties.viewDetails.acs = context.findTargetElementId(acsId);\r\n }\r\n }\r\n }\r\n\r\n /** Type guard for `instanceof ViewDefinition3d` */\r\n public isView3d(): this is ViewDefinition3d { return this instanceof ViewDefinition3d; }\r\n /** Type guard for 'instanceof ViewDefinition2d` */\r\n public isView2d(): this is ViewDefinition2d { return this instanceof ViewDefinition2d; }\r\n /** Type guard for `instanceof SpatialViewDefinition` */\r\n public isSpatialView(): this is SpatialViewDefinition { return this instanceof SpatialViewDefinition; }\r\n /** Type guard for 'instanceof DrawingViewDefinition' */\r\n public isDrawingView(): this is DrawingViewDefinition { return this instanceof DrawingViewDefinition; }\r\n\r\n /** Load this view's DisplayStyle from the IModelDb. */\r\n public loadDisplayStyle(): DisplayStyle { return this.iModel.elements.getElement<DisplayStyle>(this.displayStyleId); }\r\n\r\n /** Load this view's CategorySelector from the IModelDb. */\r\n public loadCategorySelector(): CategorySelector { return this.iModel.elements.getElement<CategorySelector>(this.categorySelectorId); }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public abstract get details(): ViewDetails;\r\n\r\n /** The Id of the AuxiliaryCoordinateSystem for this ViewDefinition, or an invalid Id if no ACS is defined. */\r\n public getAuxiliaryCoordinateSystemId(): Id64String {\r\n return this.details.auxiliaryCoordinateSystemId;\r\n }\r\n\r\n /** Set or clear the AuxiliaryCoordinateSystem for this ViewDefinition.\r\n * @param acsId The Id of the new AuxiliaryCoordinateSystem. If `Id64.invalid` is passed, then no AuxiliaryCoordinateSystem will be used.\r\n */\r\n public setAuxiliaryCoordinateSystemId(acsId: Id64String) {\r\n this.details.auxiliaryCoordinateSystemId = acsId;\r\n }\r\n\r\n /** Create a Code for a ViewDefinition given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel to contain the ViewDefinition and provides the scope for its name.\r\n * @param codeValue The ViewDefinition name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.viewDefinition);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Defines a view of one or more 3d models.\r\n * @public\r\n */\r\nexport abstract class ViewDefinition3d extends ViewDefinition {\r\n private readonly _details: ViewDetails3d;\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition3d\"; }\r\n /** If true, camera is used. Otherwise, use an orthographic projection. */\r\n public cameraOn: boolean;\r\n /** The lower left back corner of the view frustum. */\r\n public origin: Point3d;\r\n /** The extent (size) of the view frustum, in meters, along its x,y,z axes. */\r\n public extents: Vector3d;\r\n /** Rotation from world coordinates to view coordinates. */\r\n public angles: YawPitchRollAngles;\r\n /** The camera used for this view, if `cameraOn` is true. */\r\n public camera: Camera;\r\n\r\n protected constructor(props: ViewDefinition3dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.cameraOn = JsonUtils.asBool(props.cameraOn);\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.extents = Vector3d.fromJSON(props.extents);\r\n this.angles = YawPitchRollAngles.fromJSON(props.angles);\r\n this.camera = new Camera(props.camera);\r\n this._details = new ViewDetails3d(this.jsonProperties);\r\n }\r\n\r\n public override toJSON(): ViewDefinition3dProps {\r\n const val = super.toJSON() as ViewDefinition3dProps;\r\n val.cameraOn = this.cameraOn;\r\n val.origin = this.origin;\r\n val.extents = this.extents;\r\n val.angles = this.angles;\r\n val.camera = this.camera;\r\n return val;\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails3d { return this._details; }\r\n\r\n /** Load this view's DisplayStyle3d from the IModelDb. */\r\n public loadDisplayStyle3d(): DisplayStyle3d { return this.iModel.elements.getElement<DisplayStyle3d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of one or more SpatialModels.\r\n * The list of viewed models is stored by the ModelSelector.\r\n *\r\n * This is how a SpatialViewDefinition selects the elements to display:\r\n *\r\n * SpatialViewDefinition\r\n * * ModelSelector\r\n * * ModelIds -------> SpatialModels <----------GeometricElement3d.Model\r\n * * CategorySelector\r\n * * CategoryIds -----> SpatialCategories <----------GeometricElement3d.Category\r\n * @public\r\n */\r\nexport class SpatialViewDefinition extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"SpatialViewDefinition\"; }\r\n /** The Id of the [[ModelSelector]] for this SpatialViewDefinition. */\r\n public modelSelectorId: Id64String;\r\n\r\n protected constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.modelSelectorId = Id64.fromJSON(props.modelSelectorId);\r\n if (!Id64.isValid(this.modelSelectorId))\r\n throw new IModelError(IModelStatus.BadArg, `modelSelectorId is invalid`);\r\n }\r\n\r\n /** Construct a SpatialViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<SpatialViewDefinitionProps, \"classFullName\">, iModel: IModelDb) {\r\n return new SpatialViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n public override toJSON(): SpatialViewDefinitionProps {\r\n const json = super.toJSON() as SpatialViewDefinitionProps;\r\n json.modelSelectorId = this.modelSelectorId;\r\n return json;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.modelSelectorId);\r\n }\r\n\r\n /** @beta */\r\n public static override readonly requiredReferenceKeys: ReadonlyArray<string> = [...super.requiredReferenceKeys, \"modelSelectorId\"];\r\n\r\n /** @alpha */\r\n public static override readonly requiredReferenceKeyTypeMap: Record<string, ConcreteEntityTypes> = {\r\n ...super.requiredReferenceKeyTypeMap,\r\n modelSelectorId: ConcreteEntityTypes.Element,\r\n };\r\n\r\n /** Load this view's ModelSelector from the IModelDb. */\r\n public loadModelSelector(): ModelSelector { return this.iModel.elements.getElement<ModelSelector>(this.modelSelectorId); }\r\n /**\r\n * Create a SpatialViewDefinition with the camera turned on.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @param cameraAngle Camera angle in radians.\r\n * @returns The newly constructed SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static createWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): SpatialViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const cameraDistance = 2 * (rotatedRange.diagonal().magnitudeXY() / 2.0) / Math.tan(cameraAngle / 2.0);\r\n const cameraLocation = rotatedRange.diagonalFractionToPoint(.5); // Start at center.\r\n cameraLocation.z += cameraDistance; // Back up by camera distance.\r\n rotation.multiplyTransposeVectorInPlace(cameraLocation);\r\n\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: true,\r\n camera: { lens: { radians: cameraAngle }, focusDist: cameraDistance, eye: cameraLocation },\r\n };\r\n\r\n return new SpatialViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n /**\r\n * Insert an SpatialViewDefinition with the camera turned on.\r\n * @see [[createWithCamera]] for details.\r\n * @returns The Id of the newly inserted SpatialViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insertWithCamera(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso, cameraAngle = Angle.piOver2Radians): Id64String {\r\n const viewDefinition = this.createWithCamera(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView, cameraAngle);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.\r\n * See [how to create a OrthographicViewDefinition]$(docs/learning/backend/CreateElements.md#OrthographicViewDefinition).\r\n * @public\r\n */\r\nexport class OrthographicViewDefinition extends SpatialViewDefinition {\r\n /** @internal */\r\n public static override get className(): string { return \"OrthographicViewDefinition\"; }\r\n\r\n constructor(props: SpatialViewDefinitionProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /**\r\n * Create an OrthographicViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The newly constructed OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is a problem creating the view\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): OrthographicViewDefinition {\r\n const rotation = Matrix3d.createStandardWorldToView(standardView);\r\n const angles = YawPitchRollAngles.createFromMatrix3d(rotation);\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n const viewDefinitionProps: SpatialViewDefinitionProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n modelSelectorId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z),\r\n extents: rotatedRange.diagonal(),\r\n angles,\r\n cameraOn: false,\r\n camera: new Camera(), // not used when cameraOn === false\r\n };\r\n return new OrthographicViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert an OrthographicViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new OrthographicViewDefinition into this DefinitionModel\r\n * @param name The name/CodeValue of the view\r\n * @param modelSelectorId The [[ModelSelector]] that this view should use\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle3d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @param standardView Optionally defines the view's rotation\r\n * @returns The Id of the newly inserted OrthographicViewDefinition element\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, modelSelectorId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range3d, standardView = StandardViewIndex.Iso): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, modelSelectorId, categorySelectorId, displayStyleId, range, standardView);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n\r\n /** Set a new viewed range without changing the rotation or any other properties. */\r\n public setRange(range: Range3d): void {\r\n const rotation = this.angles.toMatrix3d();\r\n const rotationTransform = Transform.createOriginAndMatrix(undefined, rotation);\r\n const rotatedRange = rotationTransform.multiplyRange(range);\r\n this.origin = Point3d.createFrom(rotation.multiplyTransposeXYZ(rotatedRange.low.x, rotatedRange.low.y, rotatedRange.low.z));\r\n this.extents = rotatedRange.diagonal();\r\n }\r\n}\r\n\r\n/** Defines a view of a single 2d model. Each 2d model has its own coordinate system, so only one may appear per view.\r\n * @public\r\n */\r\nexport class ViewDefinition2d extends ViewDefinition {\r\n private readonly _details: ViewDetails;\r\n\r\n /** @internal */\r\n public static override get className(): string { return \"ViewDefinition2d\"; }\r\n /** The Id of the Model displayed by this view. */\r\n public baseModelId: Id64String;\r\n /** The lower-left corner of this view in Model coordinates. */\r\n public origin: Point2d;\r\n /** The delta (size) of this view, in meters, aligned with view x,y. */\r\n public delta: Point2d;\r\n /** The rotation of this view. */\r\n public angle: Angle;\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.baseModelId = Id64.fromJSON(props.baseModelId);\r\n this.origin = Point2d.fromJSON(props.origin);\r\n this.delta = Point2d.fromJSON(props.delta);\r\n this.angle = Angle.fromJSON(props.angle);\r\n this._details = new ViewDetails(this.jsonProperties);\r\n }\r\n\r\n public override toJSON(): ViewDefinition2dProps {\r\n const val = super.toJSON() as ViewDefinition2dProps;\r\n val.baseModelId = this.baseModelId;\r\n val.origin = this.origin;\r\n val.delta = this.delta;\r\n val.angle = this.angle;\r\n return val;\r\n }\r\n\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.baseModelId);\r\n }\r\n\r\n /** Provides access to optional detail settings for this view. */\r\n public get details(): ViewDetails { return this._details; }\r\n\r\n /** Load this view's DisplayStyle2d from the IModelDb. */\r\n public loadDisplayStyle2d(): DisplayStyle2d { return this.iModel.elements.getElement<DisplayStyle2d>(this.displayStyleId); }\r\n}\r\n\r\n/** Defines a view of a [[DrawingModel]].\r\n * @public\r\n */\r\nexport class DrawingViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"DrawingViewDefinition\"; }\r\n\r\n protected constructor(props: ViewDefinition2dProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n }\r\n\r\n /** Create a DrawingViewDefinition\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is a problem creating the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): DrawingViewDefinition {\r\n const viewDefinitionProps: ViewDefinition2dProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n baseModelId,\r\n categorySelectorId,\r\n displayStyleId,\r\n origin: { x: range.low.x, y: range.low.y },\r\n delta: range.diagonal(),\r\n angle: 0,\r\n };\r\n return new DrawingViewDefinition(viewDefinitionProps, iModelDb);\r\n }\r\n\r\n /** Construct a DrawingViewDefinition from its JSON representation. */\r\n public static fromJSON(props: Omit<ViewDefinition2dProps, \"classFullName\">, iModel: IModelDb) {\r\n return new DrawingViewDefinition({ ...props, classFullName: this.classFullName }, iModel);\r\n }\r\n\r\n /** Insert a DrawingViewDefinition\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new DrawingViewDefinition into this [[DefinitionModel]]\r\n * @param name The name/CodeValue of the view\r\n * @param baseModelId The base [[DrawingModel]]\r\n * @param categorySelectorId The [[CategorySelector]] that this view should use\r\n * @param displayStyleId The [[DisplayStyle2d]] that this view should use\r\n * @param range Defines the view origin and extents\r\n * @throws [[IModelError]] if there is an insert problem.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, name: string, baseModelId: Id64String, categorySelectorId: Id64String, displayStyleId: Id64String, range: Range2d): Id64String {\r\n const viewDefinition = this.create(iModelDb, definitionModelId, name, baseModelId, categorySelectorId, displayStyleId, range);\r\n return iModelDb.elements.insertElement(viewDefinition.toJSON());\r\n }\r\n}\r\n\r\n/** Defines a view of a [[SheetModel]].\r\n * @public\r\n */\r\nexport class SheetViewDefinition extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"SheetViewDefinition\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 2d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition2d extends ViewDefinition2d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition2d\"; }\r\n}\r\n\r\n/** A ViewDefinition used to display a 3d template model.\r\n * @internal\r\n */\r\nexport class TemplateViewDefinition3d extends ViewDefinition3d {\r\n /** @internal */\r\n public static override get className(): string { return \"TemplateViewDefinition3d\"; }\r\n}\r\n\r\n/** An auxiliary coordinate system element. Auxiliary coordinate systems can be used by views to show\r\n * coordinate information in different units and/or orientations.\r\n * @public\r\n */\r\nexport abstract class AuxCoordSystem extends DefinitionElement {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem\"; }\r\n public type!: number;\r\n public description?: string;\r\n public constructor(props: AuxCoordSystemProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n\r\n/** A 2d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem2d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem2d\"; }\r\n public origin?: Point2d;\r\n public angle!: number;\r\n public constructor(props: AuxCoordSystem2dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem2d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem2d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem2d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem2d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A 3d auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystem3d extends AuxCoordSystem {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystem3d\"; }\r\n public origin?: Point3d;\r\n public yaw!: number;\r\n public pitch!: number;\r\n public roll!: number;\r\n public constructor(props: AuxCoordSystem3dProps, iModel: IModelDb) { super(props, iModel); }\r\n\r\n /** Create a Code for a AuxCoordSystem3d element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystem3d element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystem3d name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystem3d);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** A spatial auxiliary coordinate system.\r\n * @public\r\n */\r\nexport class AuxCoordSystemSpatial extends AuxCoordSystem3d {\r\n /** @internal */\r\n public static override get className(): string { return \"AuxCoordSystemSpatial\"; }\r\n /** Create a Code for a AuxCoordSystemSpatial element given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the AuxCoordSystemSpatial element and provides the scope for its name.\r\n * @param codeValue The AuxCoordSystemSpatial name\r\n */\r\n public static override createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, codeValue: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.auxCoordSystemSpatial);\r\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\r\n }\r\n}\r\n\r\n/** Represents an *attachment* of a [[ViewDefinition]] to a [[Sheet]].\r\n * @public\r\n */\r\nexport class ViewAttachment extends GraphicalElement2d {\r\n /** @internal */\r\n public static override get className(): string { return \"ViewAttachment\"; }\r\n public view: RelatedElement;\r\n public constructor(props: ViewAttachmentProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.view = new RelatedElement(props.view);\r\n // ###NOTE: scale, displayPriority, and clipping vectors are stored in ViewAttachmentProps.jsonProperties.\r\n }\r\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\r\n super.collectReferenceIds(referenceIds);\r\n referenceIds.addElement(this.view.id);\r\n }\r\n}\r\n\r\n/** The position in space of a Light.\r\n * @internal\r\n */\r\nexport class LightLocation extends SpatialLocationElement {\r\n /** @internal */\r\n public static override get className(): string { return \"LightLocation\"; }\r\n /** Whether this light is currently turned on. */\r\n public enabled!: boolean;\r\n\r\n protected constructor(props: LightLocationProps, iModel: IModelDb) { super(props, iModel); }\r\n}\r\n"]}