@itwin/core-frontend 4.10.0-dev.27 → 4.10.0-dev.29
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/lib/cjs/DrawingViewState.d.ts +7 -2
- package/lib/cjs/DrawingViewState.d.ts.map +1 -1
- package/lib/cjs/DrawingViewState.js +18 -6
- package/lib/cjs/DrawingViewState.js.map +1 -1
- package/lib/cjs/HitDetail.d.ts +6 -7
- package/lib/cjs/HitDetail.d.ts.map +1 -1
- package/lib/cjs/HitDetail.js +1 -2
- package/lib/cjs/HitDetail.js.map +1 -1
- package/lib/cjs/ViewState.d.ts +6 -2
- package/lib/cjs/ViewState.d.ts.map +1 -1
- package/lib/cjs/ViewState.js +3 -1
- package/lib/cjs/ViewState.js.map +1 -1
- package/lib/cjs/render/GraphicBranch.d.ts +1 -1
- package/lib/cjs/render/GraphicBranch.js.map +1 -1
- package/lib/cjs/render/Pixel.d.ts +3 -1
- package/lib/cjs/render/Pixel.d.ts.map +1 -1
- package/lib/cjs/render/Pixel.js.map +1 -1
- package/lib/esm/DrawingViewState.d.ts +7 -2
- package/lib/esm/DrawingViewState.d.ts.map +1 -1
- package/lib/esm/DrawingViewState.js +18 -6
- package/lib/esm/DrawingViewState.js.map +1 -1
- package/lib/esm/HitDetail.d.ts +6 -7
- package/lib/esm/HitDetail.d.ts.map +1 -1
- package/lib/esm/HitDetail.js +1 -2
- package/lib/esm/HitDetail.js.map +1 -1
- package/lib/esm/ViewState.d.ts +6 -2
- package/lib/esm/ViewState.d.ts.map +1 -1
- package/lib/esm/ViewState.js +3 -1
- package/lib/esm/ViewState.js.map +1 -1
- package/lib/esm/render/GraphicBranch.d.ts +1 -1
- package/lib/esm/render/GraphicBranch.js.map +1 -1
- package/lib/esm/render/Pixel.d.ts +3 -1
- package/lib/esm/render/Pixel.d.ts.map +1 -1
- package/lib/esm/render/Pixel.js.map +1 -1
- package/lib/public/scripts/parse-imdl-worker.js +1 -1
- package/lib/workers/webpack/parse-imdl-worker.js +1 -1
- package/package.json +18 -18
|
@@ -113,7 +113,7 @@ export interface GraphicBranchOptions {
|
|
|
113
113
|
appearanceProvider?: FeatureAppearanceProvider;
|
|
114
114
|
/** @internal Secondary planar classifiers (map layers) */
|
|
115
115
|
secondaryClassifiers?: Map<number, RenderPlanarClassifier>;
|
|
116
|
-
/**
|
|
116
|
+
/** See HitDetail.viewAttachmentId.
|
|
117
117
|
* @internal
|
|
118
118
|
*/
|
|
119
119
|
viewAttachmentId?: Id64String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphicBranch.js","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4E;AAK5E,4CAAyC;AAqBzC;;;;;;;GAOG;AACH,MAAa,aAAa;IAqCxB;;OAEG;IACH,YAAmB,cAAuB,KAAK;QAvC/C,qCAAqC;QACrB,YAAO,GAAoB,EAAE,CAAC;QAG9C;;WAEG;QACI,sBAAiB,GAAsB,EAAE,CAAC;QAiC/C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED,oCAAoC;IAC7B,GAAG,CAAC,OAAsB;QAC/B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,YAAY,CAAC,KAAgB;QAClC,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAChD,CAAC;IAED,uFAAuF;IAChF,YAAY,CAAC,KAAgB;QAClC,IAAI,CAAC,iBAAiB,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IACxC,CAAC;IAED,oCAAoC;IAC7B,oBAAoB,CAAC,GAAsB;QAChD,IAAI,CAAC,iBAAiB,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;IACtC,CAAC;IAED,uFAAuF;IAChF,OAAO;QACZ,IAAI,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Y;QACpE,IAAI,CAAC,MAAM,CAAC,qBAAqB,IAAI,CAAC,MAAM,CAAC,gBAAgB;YAC3D,OAAO,SAAS,CAAC;QAEnB,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAgC,CAAC;QACzD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YAC1C,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC7D,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC1C,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC/B,QAAQ,CAAC,GAAG,CAAC,uBAAuB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;;oBAEnF,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;QAED,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,qCAArB,qBAAqB,QAqBrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\n\r\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\r\n * @internal\r\n */\r\nexport interface GraphicBranchFrustum {\r\n is3d: boolean;\r\n scale: {\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\n/**\r\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\r\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\r\n * Branches can be nested to build an arbitrarily-complex scene graph.\r\n * @see [[RenderSystem.createBranch]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\r\n /** The child nodes of this branch */\r\n public readonly entries: RenderGraphic[] = [];\r\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\r\n public readonly ownsEntries: boolean;\r\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\r\n * @see [[setViewFlagOverrides]].\r\n */\r\n public viewFlagOverrides: ViewFlagOverrides = {};\r\n /** Controls how reality models are displayed within this branch.\r\n * @beta\r\n */\r\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n /** @internal */\r\n public realityModelRange?: Range3d;\r\n /** Optional symbology overrides to be applied to all graphics in this branch */\r\n public symbologyOverrides?: FeatureSymbology.Overrides;\r\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\r\n * @internal\r\n */\r\n public animationId?: string;\r\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\r\n * @internal\r\n */\r\n public animationNodeId?: AnimationNodeId | number;\r\n\r\n /** Identifies the \"group\" to which this branch belongs.\r\n * Groups represent cross-cutting subsets of a tile tree's contents.\r\n * For example, if a tile tree contains geometry from multiple models, each model (or smaller groups of multiple models) could be considered a group.\r\n * The top-level branches containing graphics from multiple tiles will each specify the group they represent, and the child branches within each\r\n * tile will likewise specify the group to which they belong.\r\n * When drawing, only the graphics within a tile that correlate with the current group will be drawn.\r\n * Groups cannot nest.\r\n * @internal\r\n */\r\n public groupNodeId?: number;\r\n\r\n /** Constructor\r\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\r\n */\r\n public constructor(ownsEntries: boolean = false) {\r\n this.ownsEntries = ownsEntries;\r\n }\r\n\r\n /** Add a graphic to this branch. */\r\n public add(graphic: RenderGraphic): void {\r\n this.entries.push(graphic);\r\n }\r\n\r\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\r\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\r\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\r\n */\r\n public getViewFlags(flags: ViewFlags): ViewFlags {\r\n return flags.override(this.viewFlagOverrides);\r\n }\r\n\r\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\r\n public setViewFlags(flags: ViewFlags): void {\r\n this.viewFlagOverrides = { ...flags };\r\n }\r\n\r\n /** Change [[viewFlagOverrides]]. */\r\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\r\n this.viewFlagOverrides = { ...ovr };\r\n }\r\n\r\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\r\n public dispose() {\r\n this.clear();\r\n }\r\n\r\n /** Returns true if this branch contains no graphics. */\r\n public get isEmpty(): boolean {\r\n return 0 === this.entries.length;\r\n }\r\n\r\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\r\n public clear(): void {\r\n if (this.ownsEntries)\r\n disposeArray(this.entries);\r\n else\r\n this.entries.length = 0;\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n for (const entry of this.entries)\r\n entry.collectStatistics(stats);\r\n }\r\n}\r\n\r\n/** Options passed to [[RenderSystem.createGraphicBranch]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBranchOptions {\r\n /** Clip applied to the graphics in the branch. */\r\n clipVolume?: RenderClipVolume;\r\n /** @internal */\r\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\r\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\r\n hline?: HiddenLine.Settings;\r\n /** The iModel from which the graphics originate, if different than that associated with the view. */\r\n iModel?: IModelConnection;\r\n /** An optional transform from the coordinate system of [[iModel]] to those of a different [[IModelConnection]].\r\n * This is used by [[AccuSnap]] when displaying one iModel in the context of another iModel (i.e., the iModel associated\r\n * with the [[Viewport]]).\r\n */\r\n transformFromIModel?: Transform;\r\n /** @internal */\r\n frustum?: GraphicBranchFrustum;\r\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** @internal Secondary planar classifiers (map layers) */\r\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\r\n /** The Id of the [ViewAttachment]($backend) from which this branch's graphics originated.\r\n * @internal\r\n */\r\n viewAttachmentId?: Id64String;\r\n /** If true, the view's [DisplayStyleSettings.clipStyle]($common) will be disabled for this branch.\r\n * No [ClipStyle.insideColor]($common), [ClipStyle.outsideColor]($common), or [ClipStyle.intersectionStyle]($common) will be applied.\r\n */\r\n disableClipStyle?: true;\r\n}\r\n\r\n/** Clip/Transform for a branch that are varied over time.\r\n * @internal\r\n */\r\nexport interface AnimationBranchState {\r\n readonly clip?: RenderClipVolume;\r\n readonly omit?: boolean;\r\n}\r\n\r\n/** @internal */\r\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\r\n if (branchId < 0)\r\n return modelId;\r\n\r\n return `${modelId}_Node_${branchId.toString()}`;\r\n}\r\n\r\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\r\n const clipVector = timeline.getClipVector(time);\r\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\r\n if (clip)\r\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\r\n}\r\n\r\n/** Mapping from node/branch IDs to animation branch state\r\n * @internal\r\n */\r\nexport interface AnimationBranchStates {\r\n /** Maps node Id to branch state. */\r\n readonly branchStates: Map<string, AnimationBranchState>;\r\n /** Ids of nodes that apply a transform. */\r\n readonly transformNodeIds: ReadonlySet<number>;\r\n}\r\n\r\n/** @internal */\r\nexport namespace AnimationBranchStates {\r\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\r\n if (!script.containsModelClipping && !script.requiresBatching)\r\n return undefined;\r\n\r\n const branches = new Map<string, AnimationBranchState>();\r\n for (const model of script.modelTimelines) {\r\n addAnimationBranch(model.modelId, model, -1, branches, time);\r\n for (const elem of model.elementTimelines) {\r\n if (elem.getVisibility(time) <= 0)\r\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\r\n else\r\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\r\n }\r\n }\r\n\r\n return {\r\n branchStates: branches,\r\n transformNodeIds: script.transformBatchIds,\r\n };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"GraphicBranch.js","sourceRoot":"","sources":["../../../src/render/GraphicBranch.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA4E;AAK5E,4CAAyC;AAqBzC;;;;;;;GAOG;AACH,MAAa,aAAa;IAqCxB;;OAEG;IACH,YAAmB,cAAuB,K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,CAAC,CAAC;;oBAEnF,kBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;QAED,OAAO;YACL,YAAY,EAAE,QAAQ;YACtB,gBAAgB,EAAE,MAAM,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IAnBe,gCAAU,aAmBzB,CAAA;AACH,CAAC,EArBgB,qBAAqB,qCAArB,qBAAqB,QAqBrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { disposeArray, Id64String, IDisposable } from \"@itwin/core-bentley\";\r\nimport {\r\n FeatureAppearanceProvider, HiddenLine, RealityModelDisplaySettings, RenderSchedule, ViewFlagOverrides, ViewFlags,\r\n} from \"@itwin/core-common\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport { IModelApp } from \"../IModelApp\";\r\nimport { FeatureSymbology } from \"./FeatureSymbology\";\r\nimport { RenderClipVolume } from \"./RenderClipVolume\";\r\nimport { RenderGraphic } from \"./RenderGraphic\";\r\nimport { RenderMemory } from \"./RenderMemory\";\r\nimport { RenderPlanarClassifier } from \"./RenderPlanarClassifier\";\r\nimport { RenderTextureDrape } from \"./RenderSystem\";\r\nimport { Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { AnimationNodeId } from \"../common/internal/render/AnimationNodeId\";\r\n\r\n/** Carries information in a GraphicBranchOptions about a GraphicBranch produced by drawing one view into the context of another.\r\n * @internal\r\n */\r\nexport interface GraphicBranchFrustum {\r\n is3d: boolean;\r\n scale: {\r\n x: number;\r\n y: number;\r\n };\r\n}\r\n\r\n/**\r\n * A node in a scene graph. The branch itself is not renderable. Instead it contains a list of RenderGraphics,\r\n * and a transform, symbology overrides, and clip volume which are to be applied when rendering them.\r\n * Branches can be nested to build an arbitrarily-complex scene graph.\r\n * @see [[RenderSystem.createBranch]]\r\n * @public\r\n * @extensions\r\n */\r\nexport class GraphicBranch implements IDisposable /* , RenderMemory.Consumer */ {\r\n /** The child nodes of this branch */\r\n public readonly entries: RenderGraphic[] = [];\r\n /** If true, when the branch is disposed of, the RenderGraphics in its entries array will also be disposed */\r\n public readonly ownsEntries: boolean;\r\n /** Selectively overrides the view's [ViewFlags]($common) while drawing graphics within this branch. The default overrides nothing.\r\n * @see [[setViewFlagOverrides]].\r\n */\r\n public viewFlagOverrides: ViewFlagOverrides = {};\r\n /** Controls how reality models are displayed within this branch.\r\n * @beta\r\n */\r\n public realityModelDisplaySettings?: RealityModelDisplaySettings;\r\n /** @internal */\r\n public realityModelRange?: Range3d;\r\n /** Optional symbology overrides to be applied to all graphics in this branch */\r\n public symbologyOverrides?: FeatureSymbology.Overrides;\r\n /** Optional animation branch Id that incorporates the model Id and, for element timelines, the batch Id.\r\n * @internal\r\n */\r\n public animationId?: string;\r\n /** Identifies the node in the [RenderSchedule.Script]($backend) with which this branch is associated.\r\n * @internal\r\n */\r\n public animationNodeId?: AnimationNodeId | number;\r\n\r\n /** Identifies the \"group\" to which this branch belongs.\r\n * Groups represent cross-cutting subsets of a tile tree's contents.\r\n * For example, if a tile tree contains geometry from multiple models, each model (or smaller groups of multiple models) could be considered a group.\r\n * The top-level branches containing graphics from multiple tiles will each specify the group they represent, and the child branches within each\r\n * tile will likewise specify the group to which they belong.\r\n * When drawing, only the graphics within a tile that correlate with the current group will be drawn.\r\n * Groups cannot nest.\r\n * @internal\r\n */\r\n public groupNodeId?: number;\r\n\r\n /** Constructor\r\n * @param ownsEntries If true, when this branch is [[dispose]]d, all of the [[RenderGraphic]]s it contains will also be disposed.\r\n */\r\n public constructor(ownsEntries: boolean = false) {\r\n this.ownsEntries = ownsEntries;\r\n }\r\n\r\n /** Add a graphic to this branch. */\r\n public add(graphic: RenderGraphic): void {\r\n this.entries.push(graphic);\r\n }\r\n\r\n /** Compute the view flags that result from applying this branch's [[viewFlagOverrides]] to the input flags.\r\n * @param flags The input view flags, e.g., from the view's [[DisplayStyleState]].\r\n * @returns The result of applying [[viewFlagOverrides]] to `flags`.\r\n */\r\n public getViewFlags(flags: ViewFlags): ViewFlags {\r\n return flags.override(this.viewFlagOverrides);\r\n }\r\n\r\n /** Set [[viewFlagOverrides]] to override **all** ViewFlags as specified by `flags`. */\r\n public setViewFlags(flags: ViewFlags): void {\r\n this.viewFlagOverrides = { ...flags };\r\n }\r\n\r\n /** Change [[viewFlagOverrides]]. */\r\n public setViewFlagOverrides(ovr: ViewFlagOverrides): void {\r\n this.viewFlagOverrides = { ...ovr };\r\n }\r\n\r\n /** Disposes of all graphics in this branch, if and only if [[ownsEntries]] is true. */\r\n public dispose() {\r\n this.clear();\r\n }\r\n\r\n /** Returns true if this branch contains no graphics. */\r\n public get isEmpty(): boolean {\r\n return 0 === this.entries.length;\r\n }\r\n\r\n /** Empties the list of [[RenderGraphic]]s contained in this branch, and if the [[ownsEntries]] flag is set, also disposes of them. */\r\n public clear(): void {\r\n if (this.ownsEntries)\r\n disposeArray(this.entries);\r\n else\r\n this.entries.length = 0;\r\n }\r\n\r\n /** @internal */\r\n public collectStatistics(stats: RenderMemory.Statistics): void {\r\n for (const entry of this.entries)\r\n entry.collectStatistics(stats);\r\n }\r\n}\r\n\r\n/** Options passed to [[RenderSystem.createGraphicBranch]].\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicBranchOptions {\r\n /** Clip applied to the graphics in the branch. */\r\n clipVolume?: RenderClipVolume;\r\n /** @internal */\r\n classifierOrDrape?: RenderPlanarClassifier | RenderTextureDrape;\r\n /** Optionally replaces the view's hidden line settings when drawing the branch. */\r\n hline?: HiddenLine.Settings;\r\n /** The iModel from which the graphics originate, if different than that associated with the view. */\r\n iModel?: IModelConnection;\r\n /** An optional transform from the coordinate system of [[iModel]] to those of a different [[IModelConnection]].\r\n * This is used by [[AccuSnap]] when displaying one iModel in the context of another iModel (i.e., the iModel associated\r\n * with the [[Viewport]]).\r\n */\r\n transformFromIModel?: Transform;\r\n /** @internal */\r\n frustum?: GraphicBranchFrustum;\r\n /** Supplements the view's [[FeatureSymbology.Overrides]] for graphics in the branch. */\r\n appearanceProvider?: FeatureAppearanceProvider;\r\n /** @internal Secondary planar classifiers (map layers) */\r\n secondaryClassifiers?: Map<number, RenderPlanarClassifier>;\r\n /** See HitDetail.viewAttachmentId.\r\n * @internal\r\n */\r\n viewAttachmentId?: Id64String;\r\n /** If true, the view's [DisplayStyleSettings.clipStyle]($common) will be disabled for this branch.\r\n * No [ClipStyle.insideColor]($common), [ClipStyle.outsideColor]($common), or [ClipStyle.intersectionStyle]($common) will be applied.\r\n */\r\n disableClipStyle?: true;\r\n}\r\n\r\n/** Clip/Transform for a branch that are varied over time.\r\n * @internal\r\n */\r\nexport interface AnimationBranchState {\r\n readonly clip?: RenderClipVolume;\r\n readonly omit?: boolean;\r\n}\r\n\r\n/** @internal */\r\nexport function formatAnimationBranchId(modelId: Id64String, branchId: number): string {\r\n if (branchId < 0)\r\n return modelId;\r\n\r\n return `${modelId}_Node_${branchId.toString()}`;\r\n}\r\n\r\nfunction addAnimationBranch(modelId: Id64String, timeline: RenderSchedule.Timeline, branchId: number, branches: Map<string, AnimationBranchState>, time: number): void {\r\n const clipVector = timeline.getClipVector(time);\r\n const clip = clipVector ? IModelApp.renderSystem.createClipVolume(clipVector) : undefined;\r\n if (clip)\r\n branches.set(formatAnimationBranchId(modelId, branchId), { clip });\r\n}\r\n\r\n/** Mapping from node/branch IDs to animation branch state\r\n * @internal\r\n */\r\nexport interface AnimationBranchStates {\r\n /** Maps node Id to branch state. */\r\n readonly branchStates: Map<string, AnimationBranchState>;\r\n /** Ids of nodes that apply a transform. */\r\n readonly transformNodeIds: ReadonlySet<number>;\r\n}\r\n\r\n/** @internal */\r\nexport namespace AnimationBranchStates {\r\n export function fromScript(script: RenderSchedule.Script, time: number): AnimationBranchStates | undefined {\r\n if (!script.containsModelClipping && !script.requiresBatching)\r\n return undefined;\r\n\r\n const branches = new Map<string, AnimationBranchState>();\r\n for (const model of script.modelTimelines) {\r\n addAnimationBranch(model.modelId, model, -1, branches, time);\r\n for (const elem of model.elementTimelines) {\r\n if (elem.getVisibility(time) <= 0)\r\n branches.set(formatAnimationBranchId(model.modelId, elem.batchId), { omit: true });\r\n else\r\n addAnimationBranch(model.modelId, elem, elem.batchId, branches, time);\r\n }\r\n }\r\n\r\n return {\r\n branchStates: branches,\r\n transformNodeIds: script.transformBatchIds,\r\n };\r\n }\r\n}\r\n"]}
|
|
@@ -32,7 +32,9 @@ export declare namespace Pixel {
|
|
|
32
32
|
readonly transformFromIModel?: Transform;
|
|
33
33
|
/** @internal */
|
|
34
34
|
readonly tileId?: string;
|
|
35
|
-
/** The Id of the
|
|
35
|
+
/** The Id of the "attached" view, if any, from which the pixel originated.
|
|
36
|
+
* An attached view is a 2d view drawn into the context of another view - for example, a [[ViewAttachment]]($backend)
|
|
37
|
+
* rendered into a [[SheetViewState]], or a [[SpatialViewState]] rendered by a [SectionDrawing]($backend) view.
|
|
36
38
|
* @beta
|
|
37
39
|
*/
|
|
38
40
|
readonly viewAttachmentId?: Id64String;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pixel.d.ts","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC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AT,eAAS,KAAT,eAAS,QASpB;IAED;;;OAGG;IACH,IAAY,QAQX;IARD,WAAY,QAAQ;QAClB,uCAAQ,CAAA;QACR,wDAAwD;QACxD,6CAAgB,CAAA;QAChB,mJAAmJ;QACnJ,qEAA4B,CAAA;QAC5B,wCAAwC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EAtNgB,KAAK,qBAAL,KAAK,QAsNrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, ModelFeature } from \"@itwin/core-common\";\r\nimport { HitPriority, ViewAttachmentHitInfo } from \"../HitDetail\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport type { Viewport } from \"../Viewport\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n public readonly modelId?: Id64String;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly batchType?: BatchType;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly transformFromIModel?: Transform;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** The Id of the [ViewAttachment]($backend), if any, from which the pixel originated.\r\n * @beta\r\n */\r\n public readonly viewAttachmentId?: Id64String;\r\n /** @internal */\r\n public get isClassifier(): boolean {\r\n return undefined !== this.batchType && BatchType.Primary !== this.batchType;\r\n }\r\n\r\n /** @internal */\r\n public constructor(args?: {\r\n feature?: ModelFeature;\r\n distanceFraction?: number;\r\n type?: GeometryType;\r\n planarity?: Planarity;\r\n batchType?: BatchType;\r\n iModel?: IModelConnection;\r\n tileId?: string;\r\n viewAttachmentId?: string;\r\n transformFromIModel?: Transform;\r\n }) {\r\n if (args?.feature)\r\n this.feature = new Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);\r\n\r\n this.modelId = args?.feature?.modelId;\r\n this.distanceFraction = args?.distanceFraction ?? -1;\r\n this.type = args?.type ?? GeometryType.Unknown;\r\n this.planarity = args?.planarity ?? Planarity.Unknown;\r\n this.iModel = args?.iModel;\r\n this.tileId = args?.tileId;\r\n this.viewAttachmentId = args?.viewAttachmentId;\r\n this.transformFromIModel = args?.transformFromIModel;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return this.feature?.elementId;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return this.feature?.subCategoryId;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return this.feature?.geometryClass;\r\n }\r\n\r\n /** Computes the [[HitPriority]] of this pixel based on its [[type]] and [[planarity]]. */\r\n public computeHitPriority(): HitPriority {\r\n switch (this.type) {\r\n case Pixel.GeometryType.Surface:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarSurface : HitPriority.NonPlanarSurface;\r\n case Pixel.GeometryType.Linear:\r\n return HitPriority.WireEdge;\r\n case Pixel.GeometryType.Edge:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarEdge : HitPriority.NonPlanarEdge;\r\n case Pixel.GeometryType.Silhouette:\r\n return HitPriority.SilhouetteEdge;\r\n default:\r\n return HitPriority.Unknown;\r\n }\r\n }\r\n\r\n /** Convert this pixel to a [[Pixel.HitProps]] suitable for constructing a [[HitDetail]].\r\n * @param viewport The viewport in which the hit originated.\r\n */\r\n public toHitProps(viewport: Viewport): Pixel.HitProps {\r\n let viewAttachment: ViewAttachmentHitInfo | undefined;\r\n if (this.viewAttachmentId) {\r\n const attachmentViewport = viewport.view.getAttachmentViewport(this.viewAttachmentId);\r\n if (attachmentViewport)\r\n viewAttachment = { viewport: attachmentViewport, id: this.viewAttachmentId };\r\n }\r\n\r\n return {\r\n sourceId: this.elementId ?? Id64.invalid,\r\n priority: this.computeHitPriority(),\r\n distFraction: this.distanceFraction,\r\n subCategoryId: this.subCategoryId,\r\n geometryClass: this.geometryClass,\r\n modelId: this.modelId,\r\n tileId: this.tileId,\r\n isClassifier: this.isClassifier,\r\n sourceIModel: this.iModel,\r\n transformFromSourceIModel: this.transformFromIModel,\r\n viewAttachment,\r\n };\r\n }\r\n }\r\n\r\n /** Describes a subset of [[HitDetailProps]] computed from a [[Pixel.Data]], suitable for constructing a [[HitDetail]].\r\n * For example, the following function creates a `HitDetail` from a `Pixel.Data` and other hit information:\r\n * ```ts\r\n * function makeHitDetail(pixel: Pixel.Data, viewport: ScreenViewport, testPoint: Point3d, hitSource: HitSource, hitPoint: Point3d, distXY: number): HitDetail {\r\n * return new HitDetail({\r\n * ...pixel.toHitProps(viewport),\r\n * viewport, testPoint, hitSource, hitPoint, distXY,\r\n * };\r\n * }\r\n * ```\r\n * @see [[Data.toHitProps]] to convert a [[Pixel.Data]] to a `HitProps`.\r\n * @public\r\n */\r\n export interface HitProps {\r\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\r\n sourceId: Id64String;\r\n /** The hit geometry priority/classification. */\r\n priority: HitPriority;\r\n /** The distance in view coordinates between the hit and the near plane. */\r\n distFraction: number;\r\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\r\n subCategoryId?: Id64String;\r\n /** The class of the hit geometry. */\r\n geometryClass?: GeometryClass;\r\n /** The Id of the [[ModelState]] from which the hit originated. */\r\n modelId?: Id64String;\r\n /** The IModelConnection from which the hit originated.\r\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\r\n * other than the one associated with the viewport.\r\n * @internal\r\n */\r\n sourceIModel?: IModelConnection;\r\n /** @internal */\r\n transformFromSourceIModel?: Transform;\r\n /** @internal chiefly for debugging */\r\n tileId?: string;\r\n /** True if the hit originated from a reality model classifier.\r\n * @alpha\r\n */\r\n isClassifier?: boolean;\r\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\r\n * @note Only [[SheetViewState]]s can have view attachments.\r\n * @beta\r\n */\r\n viewAttachment?: ViewAttachmentHitInfo;\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Pixel.js","sourceRoot":"","sources":["../../../src/render/Pixel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAAqF;AACrF,4CAAkE;AAKlE;;;;GAIG;AACH,IAAiB,KAAK,CAwNrB;AAxND,WAAiB,KAAK;IACpB,0DAA0D;IAC1D,MAAa,IAAI;QAwBf,gBAAgB;QAChB,IAAW,YAAY;YACrB,OAAO,SAAS,KAAK,IAAI,CAAC,SAAS,IAAI,uBAAS,CAAC,OAAO,KAAK,IAAI,CAAC,SAAS,CAAC;QAC9E,CAAC;QAED,gBAAgB;QAChB,YAAmB,IAUlB;YACC,IAAI,IAAI,EAAE,OAAO;gBACf,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa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ACrG,qDAAO,CAAA;QACP,8CAA8C;QAC9C,+CAAI,CAAA;QACJ,qCAAqC;QACrC,qDAAO,CAAA;QACP,yDAAyD;QACzD,mDAAM,CAAA;QACN,uDAAuD;QACvD,+CAAI,CAAA;QACJ,wEAAwE;QACxE,2DAAU,CAAA;IACZ,CAAC,EAbW,YAAY,GAAZ,kBAAY,KAAZ,kBAAY,QAavB;IAED,iFAAiF;IACjF,IAAY,SASX;IATD,WAAY,SAAS;QACnB,0GAA0G;QAC1G,+CAAO,CAAA;QACP,8CAA8C;QAC9C,yCAAI,CAAA;QACJ,2CAA2C;QAC3C,6CAAM,CAAA;QACN,+CAA+C;QAC/C,mDAAS,CAAA;IACX,CAAC,EATW,SAAS,GAAT,eAAS,KAAT,eAAS,QASpB;IAED;;;OAGG;IACH,IAAY,QAQX;IARD,WAAY,QAAQ;QAClB,uCAAQ,CAAA;QACR,wDAAwD;QACxD,6CAAgB,CAAA;QAChB,mJAAmJ;QACnJ,qEAA4B,CAAA;QAC5B,wCAAwC;QACxC,qCAAmC,CAAA;IACrC,CAAC,EARW,QAAQ,GAAR,cAAQ,KAAR,cAAQ,QAQnB;AAeH,CAAC,EAxNgB,KAAK,qBAAL,KAAK,QAwNrB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { BatchType, Feature, GeometryClass, ModelFeature } from \"@itwin/core-common\";\r\nimport { HitPriority, ViewAttachmentHitInfo } from \"../HitDetail\";\r\nimport { IModelConnection } from \"../IModelConnection\";\r\nimport type { Viewport } from \"../Viewport\";\r\nimport { Transform } from \"@itwin/core-geometry\";\r\n\r\n/** Describes aspects of a pixel as read from a [[Viewport]].\r\n * @see [[Viewport.readPixels]].\r\n * @public\r\n * @extensions\r\n */\r\nexport namespace Pixel {\r\n /** Describes a single pixel within a [[Pixel.Buffer]]. */\r\n export class Data {\r\n /** The feature that produced the pixel. */\r\n public readonly feature?: Feature;\r\n public readonly modelId?: Id64String;\r\n /** The pixel's depth in [[CoordSystem.Npc]] coordinates (0 to 1), or -1 if depth was not written or not requested. */\r\n public readonly distanceFraction: number;\r\n /** The type of geometry that produced the pixel. */\r\n public readonly type: GeometryType;\r\n /** The planarity of the geometry that produced the pixel. */\r\n public readonly planarity: Planarity;\r\n /** @internal */\r\n public readonly batchType?: BatchType;\r\n /** The iModel from which the geometry producing the pixel originated. */\r\n public readonly iModel?: IModelConnection;\r\n /** @internal */\r\n public readonly transformFromIModel?: Transform;\r\n /** @internal */\r\n public readonly tileId?: string;\r\n /** The Id of the \"attached\" view, if any, from which the pixel originated.\r\n * An attached view is a 2d view drawn into the context of another view - for example, a [[ViewAttachment]]($backend)\r\n * rendered into a [[SheetViewState]], or a [[SpatialViewState]] rendered by a [SectionDrawing]($backend) view.\r\n * @beta\r\n */\r\n public readonly viewAttachmentId?: Id64String;\r\n /** @internal */\r\n public get isClassifier(): boolean {\r\n return undefined !== this.batchType && BatchType.Primary !== this.batchType;\r\n }\r\n\r\n /** @internal */\r\n public constructor(args?: {\r\n feature?: ModelFeature;\r\n distanceFraction?: number;\r\n type?: GeometryType;\r\n planarity?: Planarity;\r\n batchType?: BatchType;\r\n iModel?: IModelConnection;\r\n tileId?: string;\r\n viewAttachmentId?: string;\r\n transformFromIModel?: Transform;\r\n }) {\r\n if (args?.feature)\r\n this.feature = new Feature(args.feature.elementId, args.feature.subCategoryId, args.feature.geometryClass);\r\n\r\n this.modelId = args?.feature?.modelId;\r\n this.distanceFraction = args?.distanceFraction ?? -1;\r\n this.type = args?.type ?? GeometryType.Unknown;\r\n this.planarity = args?.planarity ?? Planarity.Unknown;\r\n this.iModel = args?.iModel;\r\n this.tileId = args?.tileId;\r\n this.viewAttachmentId = args?.viewAttachmentId;\r\n this.transformFromIModel = args?.transformFromIModel;\r\n }\r\n\r\n /** The Id of the element that produced the pixel. */\r\n public get elementId(): Id64String | undefined {\r\n return this.feature?.elementId;\r\n }\r\n\r\n /** The Id of the [SubCategory]($backend) that produced the pixel. */\r\n public get subCategoryId(): Id64String | undefined {\r\n return this.feature?.subCategoryId;\r\n }\r\n\r\n /** The class of geometry that produced the pixel. */\r\n public get geometryClass(): GeometryClass | undefined {\r\n return this.feature?.geometryClass;\r\n }\r\n\r\n /** Computes the [[HitPriority]] of this pixel based on its [[type]] and [[planarity]]. */\r\n public computeHitPriority(): HitPriority {\r\n switch (this.type) {\r\n case Pixel.GeometryType.Surface:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarSurface : HitPriority.NonPlanarSurface;\r\n case Pixel.GeometryType.Linear:\r\n return HitPriority.WireEdge;\r\n case Pixel.GeometryType.Edge:\r\n return Pixel.Planarity.Planar === this.planarity ? HitPriority.PlanarEdge : HitPriority.NonPlanarEdge;\r\n case Pixel.GeometryType.Silhouette:\r\n return HitPriority.SilhouetteEdge;\r\n default:\r\n return HitPriority.Unknown;\r\n }\r\n }\r\n\r\n /** Convert this pixel to a [[Pixel.HitProps]] suitable for constructing a [[HitDetail]].\r\n * @param viewport The viewport in which the hit originated.\r\n */\r\n public toHitProps(viewport: Viewport): Pixel.HitProps {\r\n let viewAttachment: ViewAttachmentHitInfo | undefined;\r\n if (this.viewAttachmentId) {\r\n const attachmentViewport = viewport.view.getAttachmentViewport(this.viewAttachmentId);\r\n if (attachmentViewport)\r\n viewAttachment = { viewport: attachmentViewport, id: this.viewAttachmentId };\r\n }\r\n\r\n return {\r\n sourceId: this.elementId ?? Id64.invalid,\r\n priority: this.computeHitPriority(),\r\n distFraction: this.distanceFraction,\r\n subCategoryId: this.subCategoryId,\r\n geometryClass: this.geometryClass,\r\n modelId: this.modelId,\r\n tileId: this.tileId,\r\n isClassifier: this.isClassifier,\r\n sourceIModel: this.iModel,\r\n transformFromSourceIModel: this.transformFromIModel,\r\n viewAttachment,\r\n };\r\n }\r\n }\r\n\r\n /** Describes a subset of [[HitDetailProps]] computed from a [[Pixel.Data]], suitable for constructing a [[HitDetail]].\r\n * For example, the following function creates a `HitDetail` from a `Pixel.Data` and other hit information:\r\n * ```ts\r\n * function makeHitDetail(pixel: Pixel.Data, viewport: ScreenViewport, testPoint: Point3d, hitSource: HitSource, hitPoint: Point3d, distXY: number): HitDetail {\r\n * return new HitDetail({\r\n * ...pixel.toHitProps(viewport),\r\n * viewport, testPoint, hitSource, hitPoint, distXY,\r\n * };\r\n * }\r\n * ```\r\n * @see [[Data.toHitProps]] to convert a [[Pixel.Data]] to a `HitProps`.\r\n * @public\r\n */\r\n export interface HitProps {\r\n /** The source of the geometry. This may be a persistent element Id, or a transient Id used for, e.g., pickable decorations. */\r\n sourceId: Id64String;\r\n /** The hit geometry priority/classification. */\r\n priority: HitPriority;\r\n /** The distance in view coordinates between the hit and the near plane. */\r\n distFraction: number;\r\n /** The [SubCategory]($backend) to which the hit geometry belongs. */\r\n subCategoryId?: Id64String;\r\n /** The class of the hit geometry. */\r\n geometryClass?: GeometryClass;\r\n /** The Id of the [[ModelState]] from which the hit originated. */\r\n modelId?: Id64String;\r\n /** The IModelConnection from which the hit originated.\r\n * This should almost always be left undefined, unless the hit is known to have originated from an iModel\r\n * other than the one associated with the viewport.\r\n * @internal\r\n */\r\n sourceIModel?: IModelConnection;\r\n /** @internal */\r\n transformFromSourceIModel?: Transform;\r\n /** @internal chiefly for debugging */\r\n tileId?: string;\r\n /** True if the hit originated from a reality model classifier.\r\n * @alpha\r\n */\r\n isClassifier?: boolean;\r\n /** Information about the [ViewAttachment]($backend) within which the hit geometry resides, if any.\r\n * @note Only [[SheetViewState]]s can have view attachments.\r\n * @beta\r\n */\r\n viewAttachment?: ViewAttachmentHitInfo;\r\n }\r\n\r\n /** Describes the type of geometry that produced the [[Pixel.Data]]. */\r\n export enum GeometryType {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the type could not be determined. */\r\n Unknown, // Geometry was not selected, or type could not be determined\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** A surface produced this pixel. */\r\n Surface,\r\n /** A point primitive or polyline produced this pixel. */\r\n Linear,\r\n /** This pixel was produced by an edge of a surface. */\r\n Edge,\r\n /** This pixel was produced by a silhouette edge of a curved surface. */\r\n Silhouette,\r\n }\r\n\r\n /** Describes the planarity of the foremost geometry which produced the pixel. */\r\n export enum Planarity {\r\n /** [[Pixel.Selector.GeometryAndDistance]] was not specified, or the planarity could not be determined. */\r\n Unknown,\r\n /** No geometry was rendered to this pixel. */\r\n None,\r\n /** Planar geometry produced this pixel. */\r\n Planar,\r\n /** Non-planar geometry produced this pixel. */\r\n NonPlanar,\r\n }\r\n\r\n /**\r\n * Bit-mask by which callers of [[Viewport.readPixels]] specify which aspects are of interest.\r\n * Aspects not specified will be omitted from the returned data.\r\n */\r\n export enum Selector {\r\n None = 0,\r\n /** Select the [[Feature]] which produced each pixel. */\r\n Feature = 1 << 0, // eslint-disable-line @typescript-eslint/no-shadow\r\n /** Select the type and planarity of geometry which produced each pixel as well as the fraction of its distance between the near and far planes. */\r\n GeometryAndDistance = 1 << 2,\r\n /** Select all aspects of each pixel. */\r\n All = GeometryAndDistance | Feature,\r\n }\r\n\r\n /** A rectangular array of pixels as read from a [[Viewport]]'s frame buffer. Each pixel is represented as a [[Pixel.Data]] object.\r\n * The contents of the pixel buffer will be specified using device pixels, not CSS pixels. See [[Viewport.devicePixelRatio]] and [[Viewport.cssPixelsToDevicePixels]].\r\n * @see [[Viewport.readPixels]].\r\n */\r\n export interface Buffer {\r\n /** Retrieve the data associated with the pixel at (x,y) in view coordinates. */\r\n getPixel(x: number, y: number): Data;\r\n }\r\n\r\n /** A function which receives the results of a call to [[Viewport.readPixels]].\r\n * @note The contents of the buffer become invalid once the Receiver function returns. Do not store a reference to it.\r\n */\r\n export type Receiver = (pixels: Buffer | undefined) => void;\r\n}\r\n"]}
|
|
@@ -9,7 +9,8 @@ import { DisplayStyle2dState } from "./DisplayStyleState";
|
|
|
9
9
|
import { IModelConnection } from "./IModelConnection";
|
|
10
10
|
import { DisclosedTileTreeSet } from "./tile/internal";
|
|
11
11
|
import { SceneContext } from "./ViewContext";
|
|
12
|
-
import {
|
|
12
|
+
import { Viewport } from "./Viewport";
|
|
13
|
+
import { AttachToViewportArgs, ComputeDisplayTransformArgs, ExtentLimits, ViewState2d, ViewState3d } from "./ViewState";
|
|
13
14
|
/** Strictly for testing.
|
|
14
15
|
* @internal
|
|
15
16
|
*/
|
|
@@ -74,6 +75,10 @@ export declare class DrawingViewState extends ViewState2d {
|
|
|
74
75
|
/** @internal */
|
|
75
76
|
get areAllTileTreesLoaded(): boolean;
|
|
76
77
|
/** @internal */
|
|
77
|
-
get secondaryViewports(): Iterable<
|
|
78
|
+
get secondaryViewports(): Iterable<Viewport>;
|
|
79
|
+
/** @internal */
|
|
80
|
+
getAttachmentViewport(id: Id64String): Viewport | undefined;
|
|
81
|
+
/** @internal */
|
|
82
|
+
computeDisplayTransform(args: ComputeDisplayTransformArgs): Transform | undefined;
|
|
78
83
|
}
|
|
79
84
|
//# sourceMappingURL=DrawingViewState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawingViewState.d.ts","sourceRoot":"","sources":["../../src/DrawingViewState.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAyB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EACL,gBAAgB,EAAW,4BAA4B,EAAE,6BAA6B,EAAkB,uBAAuB,EAAE,qBAAqB,EAAqB,cAAc,EAC1L,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAqB,SAAS,EAAkB,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAG1D,OAAO,E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E,gBAAgB;IACA,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAQxD,gBAAgB;IAChB,IAAoB,qBAAqB,IAAI,OAAO,CAEnD;IAED,gBAAgB;IAChB,IAAoB,kBAAkB,uBAErC;IAED,gBAAgB;IACA,qBAAqB,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS;IAI3E,gBAAgB;IACA,uBAAuB,CAAC,IAAI,EAAE,2BAA2B,GAAG,SAAS,GAAG,SAAS;CAOlG"}
|
|
@@ -128,14 +128,14 @@ class SectionAttachment {
|
|
|
128
128
|
return this._drawingExtents.z;
|
|
129
129
|
}
|
|
130
130
|
get drawingRange() {
|
|
131
|
-
const frustum3d = this._originalFrustum.transformBy(this.
|
|
131
|
+
const frustum3d = this._originalFrustum.transformBy(this.toDrawing);
|
|
132
132
|
return frustum3d.toRange();
|
|
133
133
|
}
|
|
134
134
|
constructor(view, toDrawing, fromDrawing, toSheet) {
|
|
135
135
|
this._viewRect = new ViewRect(0, 0, 1, 1);
|
|
136
136
|
this._originalFrustum = new Frustum();
|
|
137
137
|
// Save the input for clone(). Attach a copy to the viewport.
|
|
138
|
-
this.
|
|
138
|
+
this.toDrawing = toDrawing;
|
|
139
139
|
this._fromDrawing = fromDrawing;
|
|
140
140
|
this.viewport = OffScreenViewport.createViewport(view, new SectionTarget(this), true);
|
|
141
141
|
this.symbologyOverrides = new FeatureSymbology.Overrides(view);
|
|
@@ -143,13 +143,14 @@ class SectionAttachment {
|
|
|
143
143
|
let clip = this.view.getViewClip();
|
|
144
144
|
if (clip) {
|
|
145
145
|
clip = clip.clone();
|
|
146
|
-
const clipTransform = toSheet ? toSheet.multiplyTransformTransform(this.
|
|
146
|
+
const clipTransform = toSheet ? toSheet.multiplyTransformTransform(this.toDrawing) : this.toDrawing;
|
|
147
147
|
clip.transformInPlace(clipTransform);
|
|
148
148
|
clipVolume = IModelApp.renderSystem.createClipVolume(clip);
|
|
149
149
|
}
|
|
150
150
|
this._branchOptions = {
|
|
151
151
|
clipVolume,
|
|
152
152
|
hline: view.getDisplayStyle3d().settings.hiddenLineSettings,
|
|
153
|
+
viewAttachmentId: view.id,
|
|
153
154
|
frustum: {
|
|
154
155
|
is3d: true,
|
|
155
156
|
scale: { x: 1, y: 1 },
|
|
@@ -159,7 +160,7 @@ class SectionAttachment {
|
|
|
159
160
|
// Save off the original frustum (potentially adjusted by viewport).
|
|
160
161
|
this.viewport.setupFromView();
|
|
161
162
|
this.viewport.viewingSpace.getFrustum(CoordSystem.World, true, this._originalFrustum);
|
|
162
|
-
const drawingFrustum = this._originalFrustum.transformBy(this.
|
|
163
|
+
const drawingFrustum = this._originalFrustum.transformBy(this.toDrawing);
|
|
163
164
|
const drawingRange = drawingFrustum.toRange();
|
|
164
165
|
this._drawingExtents = drawingRange.diagonal();
|
|
165
166
|
this._drawingExtents.z = Math.abs(this._drawingExtents.z);
|
|
@@ -174,7 +175,7 @@ class SectionAttachment {
|
|
|
174
175
|
if (0 === pixelSize)
|
|
175
176
|
return;
|
|
176
177
|
// Adjust offscreen viewport's frustum based on intersection with drawing view frustum.
|
|
177
|
-
const frustum3d = this._originalFrustum.transformBy(this.
|
|
178
|
+
const frustum3d = this._originalFrustum.transformBy(this.toDrawing);
|
|
178
179
|
const frustumRange3d = frustum3d.toRange();
|
|
179
180
|
const frustum2d = context.viewport.getWorldFrustum();
|
|
180
181
|
const frustumRange2d = frustum2d.toRange();
|
|
@@ -207,7 +208,7 @@ class SectionAttachment {
|
|
|
207
208
|
graphics.symbologyOverrides = this.symbologyOverrides;
|
|
208
209
|
for (const graphic of source)
|
|
209
210
|
graphics.entries.push(graphic);
|
|
210
|
-
const branch = context.createGraphicBranch(graphics, this.
|
|
211
|
+
const branch = context.createGraphicBranch(graphics, this.toDrawing, this._branchOptions);
|
|
211
212
|
context.outputGraphic(branch);
|
|
212
213
|
};
|
|
213
214
|
outputGraphics(scene.foreground);
|
|
@@ -380,6 +381,17 @@ export class DrawingViewState extends ViewState2d {
|
|
|
380
381
|
get secondaryViewports() {
|
|
381
382
|
return this._attachment ? [this._attachment.viewport] : super.secondaryViewports;
|
|
382
383
|
}
|
|
384
|
+
/** @internal */
|
|
385
|
+
getAttachmentViewport(id) {
|
|
386
|
+
return id === this._attachment?.view.id ? this._attachment.viewport : undefined;
|
|
387
|
+
}
|
|
388
|
+
/** @internal */
|
|
389
|
+
computeDisplayTransform(args) {
|
|
390
|
+
if (args.viewAttachmentId === undefined || args.viewAttachmentId !== this._attachment?.view.id) {
|
|
391
|
+
return undefined;
|
|
392
|
+
}
|
|
393
|
+
return this._attachment.toDrawing;
|
|
394
|
+
}
|
|
383
395
|
}
|
|
384
396
|
/** Exposed strictly for testing and debugging. Indicates that when loading the view, the spatial view should be displayed even
|
|
385
397
|
* if `SectionDrawing.displaySpatialView` is not `true`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawingViewState.js","sourceRoot":"","sources":["../../src/DrawingViewState.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AACxE,OAAO,EACa,OAAO,EAA+D,cAAc,GACvG,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAA4B,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAC7E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C;IAED,gBAAgB;IAChB,IAAoB,qBAAqB;QACvC,OAAO,KAAK,CAAC,qBAAqB,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC3G,CAAC;IAED,gBAAgB;IAChB,IAAoB,kBAAkB;QACpC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACnF,CAAC;;AA/LD;;;GAGG;AACW,yCAAwB,GAAG,KAAK,CAAC;AAE/C;;GAEG;AACW,oCAAmB,GAAG,KAAK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { assert, dispose, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AxisAlignedBox3d, Frustum, HydrateViewStateRequestProps, HydrateViewStateResponseProps, QueryRowFormat, SectionDrawingViewProps, ViewDefinition2dProps, ViewFlagOverrides, ViewStateProps,\r\n} from \"@itwin/core-common\";\r\nimport { Constant, Range3d, Transform, TransformProps, Vector3d } from \"@itwin/core-geometry\";\r\nimport { CategorySelectorState } from \"./CategorySelectorState\";\r\nimport { CoordSystem } from \"./CoordSystem\";\r\nimport { DisplayStyle2dState } from \"./DisplayStyleState\";\r\nimport { Frustum2d } from \"./Frustum2d\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\nimport { FeatureSymbology } from \"./render/FeatureSymbology\";\r\nimport { GraphicBranch, GraphicBranchOptions } from \"./render/GraphicBranch\";\r\nimport { MockRender } from \"./render/MockRender\";\r\nimport { RenderGraphic } from \"./render/RenderGraphic\";\r\nimport { Scene } from \"./render/Scene\";\r\nimport { DisclosedTileTreeSet, TileGraphicType } from \"./tile/internal\";\r\nimport { SceneContext } from \"./ViewContext\";\r\nimport { OffScreenViewport } from \"./Viewport\";\r\nimport { ViewRect } from \"./common/ViewRect\";\r\nimport { AttachToViewportArgs, ExtentLimits, ViewState2d, ViewState3d } from \"./ViewState\";\r\n\r\n/** Strictly for testing.\r\n * @internal\r\n */\r\nexport interface SectionDrawingInfo {\r\n readonly spatialView: Id64String;\r\n readonly drawingToSpatialTransform: Transform;\r\n}\r\n\r\n/** The information required to instantiate a [[SectionAttachment]]. This information is supplied to DrawingViewState constructor via ViewStateProps.\r\n * The spatial view is obtained asynchronously in DrawingViewState.load(). The SectionAttachment is created in DrawingViewState.attachToViewport and\r\n * disposed of in DrawingViewState.detachFromViewport.\r\n */\r\nclass SectionAttachmentInfo {\r\n private _spatialView: Id64String | ViewState3d;\r\n private readonly _drawingToSpatialTransform: Transform;\r\n private readonly _displaySpatialView: boolean;\r\n\r\n public get spatialView(): Id64String | ViewState3d { return this._spatialView; }\r\n public get wantDisplayed(): boolean {\r\n return this._displaySpatialView || DrawingViewState.alwaysDisplaySpatialView;\r\n }\r\n\r\n private constructor(spatialView: Id64String | ViewState3d, drawingToSpatialTransform: Transform, displaySpatialView: boolean) {\r\n this._spatialView = spatialView;\r\n this._drawingToSpatialTransform = drawingToSpatialTransform;\r\n this._displaySpatialView = displaySpatialView;\r\n }\r\n\r\n public static fromJSON(props?: SectionDrawingViewProps): SectionAttachmentInfo {\r\n if (!props)\r\n return new SectionAttachmentInfo(Id64.invalid, Transform.createIdentity(), false);\r\n\r\n return new SectionAttachmentInfo(props.spatialView, Transform.fromJSON(props.drawingToSpatialTransform), true === props.displaySpatialView);\r\n }\r\n\r\n public toJSON(): SectionDrawingViewProps | undefined {\r\n if (\"string\" === typeof this._spatialView && !Id64.isValidId64(this._spatialView))\r\n return undefined;\r\n\r\n return {\r\n spatialView: (this._spatialView instanceof ViewState3d) ? this._spatialView.id : this._spatialView,\r\n drawingToSpatialTransform: this._drawingToSpatialTransform.isIdentity ? undefined : this._drawingToSpatialTransform.toJSON(),\r\n displaySpatialView: this._displaySpatialView,\r\n };\r\n }\r\n\r\n public clone(iModel: IModelConnection): SectionAttachmentInfo {\r\n let spatialView = this._spatialView;\r\n if (spatialView instanceof ViewState3d)\r\n spatialView = spatialView.clone(iModel);\r\n\r\n return new SectionAttachmentInfo(spatialView, this._drawingToSpatialTransform, this._displaySpatialView);\r\n }\r\n\r\n public preload(options: HydrateViewStateRequestProps): void {\r\n if (!this.wantDisplayed)\r\n return;\r\n\r\n if (this._spatialView instanceof ViewState3d)\r\n return;\r\n\r\n if (!Id64.isValidId64(this._spatialView))\r\n return;\r\n\r\n options.spatialViewId = this._spatialView;\r\n options.viewStateLoadProps = {\r\n displayStyle: {\r\n omitScheduleScriptElementIds: !IModelApp.tileAdmin.enableFrontendScheduleScripts,\r\n compressExcludedElementIds: true,\r\n },\r\n };\r\n }\r\n\r\n public async load(iModel: IModelConnection): Promise<void> {\r\n if (!this.wantDisplayed)\r\n return;\r\n\r\n if (this._spatialView instanceof ViewState3d)\r\n return;\r\n\r\n if (!Id64.isValidId64(this._spatialView))\r\n return;\r\n\r\n const spatialView = await iModel.views.load(this._spatialView);\r\n if (spatialView instanceof ViewState3d)\r\n this._spatialView = spatialView;\r\n }\r\n\r\n public async postload(options: HydrateViewStateResponseProps, iModel: IModelConnection): Promise<void> {\r\n let spatialView;\r\n if (options.spatialViewProps) {\r\n spatialView = await iModel.views.convertViewStatePropsToViewState(options.spatialViewProps);\r\n }\r\n\r\n if (spatialView instanceof ViewState3d)\r\n this._spatialView = spatialView;\r\n }\r\n\r\n public createAttachment(toSheet: Transform | undefined): SectionAttachment | undefined {\r\n if (!this.wantDisplayed || !(this._spatialView instanceof ViewState3d))\r\n return undefined;\r\n\r\n const spatialToDrawing = this._drawingToSpatialTransform.inverse();\r\n return spatialToDrawing ? new SectionAttachment(this._spatialView, spatialToDrawing, this._drawingToSpatialTransform, toSheet) : undefined;\r\n }\r\n\r\n public get sectionDrawingInfo(): SectionDrawingInfo {\r\n return {\r\n drawingToSpatialTransform: this._drawingToSpatialTransform,\r\n spatialView: this._spatialView instanceof ViewState3d ? this._spatialView.id : this._spatialView,\r\n };\r\n }\r\n}\r\n\r\n/** A mostly no-op [[RenderTarget]] for a [[SectionAttachment]]. It allocates no webgl resources. */\r\nclass SectionTarget extends MockRender.OffScreenTarget {\r\n private readonly _attachment: SectionAttachment;\r\n\r\n public constructor(attachment: SectionAttachment) {\r\n super(IModelApp.renderSystem, new ViewRect(0, 0, 1, 1));\r\n this._attachment = attachment;\r\n }\r\n\r\n public override changeScene(scene: Scene): void {\r\n this._attachment.scene = scene;\r\n }\r\n\r\n public override overrideFeatureSymbology(ovrs: FeatureSymbology.Overrides): void {\r\n this._attachment.symbologyOverrides = ovrs;\r\n }\r\n}\r\n\r\n/** Draws the contents of an orthographic [[ViewState3d]] directly into a [[DrawingViewState]], if the associated [SectionDrawing]($backend)\r\n * specifies it should be. We select tiles for the view in the context of a lightweight offscreen viewport with a no-op [[RenderTarget]], then\r\n * add the resultant graphics to the drawing view's scene. The attachment is created in DrawingViewState.attachToViewport and disposed of in\r\n * DrawingViewState.detachFromViewport.\r\n */\r\nclass SectionAttachment {\r\n private readonly _viewFlagOverrides: ViewFlagOverrides;\r\n private readonly _toDrawing: Transform;\r\n private readonly _fromDrawing: Transform;\r\n private readonly _viewRect = new ViewRect(0, 0, 1, 1);\r\n private readonly _originalFrustum = new Frustum();\r\n private readonly _drawingExtents: Vector3d;\r\n public readonly viewport: OffScreenViewport;\r\n private readonly _branchOptions: GraphicBranchOptions;\r\n public scene?: Scene;\r\n public symbologyOverrides: FeatureSymbology.Overrides;\r\n\r\n public get view(): ViewState3d {\r\n assert(this.viewport.view instanceof ViewState3d);\r\n return this.viewport.view;\r\n }\r\n\r\n public get zDepth(): number {\r\n return this._drawingExtents.z;\r\n }\r\n\r\n public get drawingRange() {\r\n const frustum3d = this._originalFrustum.transformBy(this._toDrawing);\r\n return frustum3d.toRange();\r\n }\r\n\r\n public constructor(view: ViewState3d, toDrawing: Transform, fromDrawing: Transform, toSheet: Transform | undefined) {\r\n // Save the input for clone(). Attach a copy to the viewport.\r\n this._toDrawing = toDrawing;\r\n this._fromDrawing = fromDrawing;\r\n\r\n this.viewport = OffScreenViewport.createViewport(view, new SectionTarget(this), true);\r\n\r\n this.symbologyOverrides = new FeatureSymbology.Overrides(view);\r\n let clipVolume;\r\n let clip = this.view.getViewClip();\r\n if (clip) {\r\n clip = clip.clone();\r\n const clipTransform = toSheet ? toSheet.multiplyTransformTransform(this._toDrawing) : this._toDrawing;\r\n clip.transformInPlace(clipTransform);\r\n clipVolume = IModelApp.renderSystem.createClipVolume(clip);\r\n }\r\n\r\n this._branchOptions = {\r\n clipVolume,\r\n hline: view.getDisplayStyle3d().settings.hiddenLineSettings,\r\n frustum: {\r\n is3d: true,\r\n scale: { x: 1, y: 1 },\r\n },\r\n };\r\n\r\n this._viewFlagOverrides = { ...view.viewFlags, lighting: false, shadows: false };\r\n\r\n // Save off the original frustum (potentially adjusted by viewport).\r\n this.viewport.setupFromView();\r\n this.viewport.viewingSpace.getFrustum(CoordSystem.World, true, this._originalFrustum);\r\n\r\n const drawingFrustum = this._originalFrustum.transformBy(this._toDrawing);\r\n const drawingRange = drawingFrustum.toRange();\r\n this._drawingExtents = drawingRange.diagonal();\r\n this._drawingExtents.z = Math.abs(this._drawingExtents.z);\r\n }\r\n\r\n public dispose(): void {\r\n this.viewport.dispose();\r\n }\r\n\r\n public addToScene(context: SceneContext): void {\r\n if (context.viewport.freezeScene)\r\n return;\r\n\r\n const pixelSize = context.viewport.getPixelSizeAtPoint();\r\n if (0 === pixelSize)\r\n return;\r\n\r\n // Adjust offscreen viewport's frustum based on intersection with drawing view frustum.\r\n const frustum3d = this._originalFrustum.transformBy(this._toDrawing);\r\n const frustumRange3d = frustum3d.toRange();\r\n const frustum2d = context.viewport.getWorldFrustum();\r\n const frustumRange2d = frustum2d.toRange();\r\n const intersect = frustumRange3d.intersect(frustumRange2d);\r\n if (intersect.isNull)\r\n return;\r\n\r\n frustum3d.initFromRange(intersect);\r\n frustum3d.transformBy(this._fromDrawing, frustum3d);\r\n this.viewport.setupViewFromFrustum(frustum3d);\r\n\r\n // Adjust view rect based on size of attachment on screen so tiles of appropriate LOD are selected.\r\n const width = this._drawingExtents.x * intersect.xLength() / frustumRange3d.xLength();\r\n const height = this._drawingExtents.y * intersect.yLength() / frustumRange3d.yLength();\r\n this._viewRect.width = Math.max(1, Math.round(width / pixelSize));\r\n this._viewRect.height = Math.max(1, Math.round(height / pixelSize));\r\n this.viewport.setRect(this._viewRect);\r\n\r\n // Propagate settings from drawing viewport.\r\n this.viewport.debugBoundingBoxes = context.viewport.debugBoundingBoxes;\r\n this.viewport.setTileSizeModifier(context.viewport.tileSizeModifier);\r\n\r\n // Create the scene.\r\n this.viewport.renderFrame();\r\n const scene = this.scene;\r\n if (!scene)\r\n return;\r\n\r\n // Extract graphics and insert into drawing's scene context.\r\n const outputGraphics = (source: RenderGraphic[]) => {\r\n if (0 === source.length)\r\n return;\r\n\r\n const graphics = new GraphicBranch();\r\n graphics.setViewFlagOverrides(this._viewFlagOverrides);\r\n graphics.symbologyOverrides = this.symbologyOverrides;\r\n\r\n for (const graphic of source)\r\n graphics.entries.push(graphic);\r\n\r\n const branch = context.createGraphicBranch(graphics, this._toDrawing, this._branchOptions);\r\n context.outputGraphic(branch);\r\n };\r\n\r\n outputGraphics(scene.foreground);\r\n context.withGraphicType(TileGraphicType.BackgroundMap, () => outputGraphics(scene.background));\r\n context.withGraphicType(TileGraphicType.Overlay, () => outputGraphics(scene.overlay));\r\n\r\n // Report tile statistics to drawing viewport.\r\n const tileAdmin = IModelApp.tileAdmin;\r\n const selectedAndReady = tileAdmin.getTilesForUser(this.viewport);\r\n const requested = tileAdmin.getRequestsForUser(this.viewport);\r\n tileAdmin.addExternalTilesForUser(context.viewport, {\r\n requested: requested?.size ?? 0,\r\n selected: selectedAndReady?.selected.size ?? 0,\r\n ready: selectedAndReady?.ready.size ?? 0,\r\n });\r\n }\r\n}\r\n\r\n/** A view of a [DrawingModel]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport class DrawingViewState extends ViewState2d {\r\n public static override get className() { return \"DrawingViewDefinition\"; }\r\n\r\n /** Exposed strictly for testing and debugging. Indicates that when loading the view, the spatial view should be displayed even\r\n * if `SectionDrawing.displaySpatialView` is not `true`.\r\n * @internal\r\n */\r\n public static alwaysDisplaySpatialView = false;\r\n\r\n /** Exposed strictly for testing and debugging. Indicates that the 2d graphics should not be displayed.\r\n * @internal\r\n */\r\n public static hideDrawingGraphics = false;\r\n\r\n private readonly _viewedExtents: AxisAlignedBox3d;\r\n private _attachmentInfo: SectionAttachmentInfo;\r\n private _attachment?: SectionAttachment;\r\n\r\n /** Strictly for testing. @internal */\r\n public get sectionDrawingProps(): SectionDrawingViewProps | undefined {\r\n return this._attachmentInfo.toJSON();\r\n }\r\n\r\n /** Strictly for testing. @internal */\r\n public get sectionDrawingInfo() {\r\n return this._attachmentInfo.sectionDrawingInfo;\r\n }\r\n\r\n /** Strictly for testing. @internal */\r\n public get attachment(): Object | undefined {\r\n return this._attachment;\r\n }\r\n\r\n /** Strictly for testing. @internal */\r\n public get attachmentInfo(): { spatialView: Id64String | ViewState3d } {\r\n return this._attachmentInfo;\r\n }\r\n\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelConnection, categories: CategorySelectorState, displayStyle: DisplayStyle2dState, extents: AxisAlignedBox3d, sectionDrawing?: SectionDrawingViewProps) {\r\n super(props, iModel, categories, displayStyle);\r\n if (categories instanceof DrawingViewState) {\r\n this._viewedExtents = categories._viewedExtents.clone();\r\n this._attachmentInfo = categories._attachmentInfo.clone(iModel);\r\n } else {\r\n this._viewedExtents = extents;\r\n this._attachmentInfo = SectionAttachmentInfo.fromJSON(sectionDrawing);\r\n }\r\n }\r\n\r\n /** See [[ViewState.attachToViewport]]. */\r\n public override attachToViewport(args: AttachToViewportArgs): void {\r\n super.attachToViewport(args);\r\n assert(undefined === this._attachment);\r\n this._attachment = this._attachmentInfo.createAttachment(args.drawingToSheetTransform);\r\n }\r\n\r\n /** See [[ViewState.detachFromViewport]]. */\r\n public override detachFromViewport(): void {\r\n super.detachFromViewport();\r\n this._attachment = dispose(this._attachment);\r\n }\r\n\r\n /** @internal */\r\n public override async changeViewedModel(modelId: Id64String): Promise<void> {\r\n await super.changeViewedModel(modelId);\r\n const props = await this.querySectionDrawingProps();\r\n this._attachmentInfo = SectionAttachmentInfo.fromJSON(props);\r\n\r\n // super.changeViewedModel() throws if attached to viewport, and attachment only allocated while attached to viewport\r\n assert(undefined === this._attachment);\r\n }\r\n\r\n private async querySectionDrawingProps(): Promise<SectionDrawingViewProps> {\r\n let spatialView = Id64.invalid;\r\n let drawingToSpatialTransform: TransformProps | undefined;\r\n let displaySpatialView = false;\r\n try {\r\n const ecsql = `\r\n SELECT spatialView,\r\n json_extract(jsonProperties, '$.drawingToSpatialTransform') as drawingToSpatialTransform,\r\n CAST(json_extract(jsonProperties, '$.displaySpatialView') as BOOLEAN) as displaySpatialView\r\n FROM bis.SectionDrawing\r\n WHERE ECInstanceId=${this.baseModelId}`;\r\n\r\n for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames })) {\r\n spatialView = Id64.fromJSON(row.spatialView?.id);\r\n displaySpatialView = !!row.displaySpatialView;\r\n try {\r\n drawingToSpatialTransform = JSON.parse(row.drawingToSpatialTransform);\r\n } catch {\r\n // We'll use identity transform.\r\n }\r\n\r\n break;\r\n }\r\n } catch (_ex) {\r\n // The version of BisCore ECSchema in the iModel is probably too old to contain the SectionDrawing ECClass.\r\n }\r\n\r\n return { spatialView, displaySpatialView, drawingToSpatialTransform };\r\n }\r\n\r\n /** @internal */\r\n protected override preload(hydrateRequest: HydrateViewStateRequestProps): void {\r\n assert(!this.isAttachedToViewport);\r\n super.preload(hydrateRequest);\r\n this._attachmentInfo.preload(hydrateRequest);\r\n }\r\n\r\n /** @internal */\r\n protected override async postload(hydrateResponse: HydrateViewStateResponseProps): Promise<void> {\r\n const promises = [];\r\n promises.push(super.postload(hydrateResponse));\r\n promises.push(this._attachmentInfo.postload(hydrateResponse, this.iModel));\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override createFromProps(props: ViewStateProps, iModel: IModelConnection): DrawingViewState {\r\n const cat = new CategorySelectorState(props.categorySelectorProps, iModel);\r\n const displayStyleState = new DisplayStyle2dState(props.displayStyleProps, iModel);\r\n const extents = props.modelExtents ? Range3d.fromJSON(props.modelExtents) : new Range3d();\r\n\r\n // use \"new this\" so subclasses are correct\r\n return new this(props.viewDefinitionProps as ViewDefinition2dProps, iModel, cat, displayStyleState, extents, props.sectionDrawing);\r\n }\r\n\r\n public override toProps(): ViewStateProps {\r\n const props = super.toProps();\r\n props.modelExtents = this._viewedExtents.toJSON();\r\n props.sectionDrawing = this._attachmentInfo.toJSON();\r\n return props;\r\n }\r\n\r\n public getViewedExtents(): AxisAlignedBox3d {\r\n const extents = this._viewedExtents.clone();\r\n if (this._attachment) {\r\n extents.extendRange(this._attachment.drawingRange);\r\n }\r\n\r\n return extents;\r\n }\r\n\r\n public get defaultExtentLimits(): ExtentLimits {\r\n return {\r\n min: Constant.oneMillimeter,\r\n max: 3 * Constant.diameterOfEarth,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override isDrawingView(): this is DrawingViewState { return true; }\r\n\r\n /** See [[ViewState.getOrigin]]. */\r\n public override getOrigin() {\r\n const origin = super.getOrigin();\r\n if (this._attachment)\r\n origin.z = -this._attachment.zDepth;\r\n\r\n return origin;\r\n }\r\n\r\n /** See [[ViewState.getExtents]]. */\r\n public override getExtents() {\r\n const extents = super.getExtents();\r\n if (this._attachment)\r\n extents.z = this._attachment.zDepth + Frustum2d.minimumZDistance;\r\n\r\n return extents;\r\n }\r\n\r\n /** @internal */\r\n public override discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n super.discloseTileTrees(trees);\r\n if (this._attachment)\r\n trees.disclose(this._attachment.viewport);\r\n }\r\n\r\n /** @internal */\r\n public override createScene(context: SceneContext): void {\r\n if (!DrawingViewState.hideDrawingGraphics)\r\n super.createScene(context);\r\n\r\n if (this._attachment)\r\n this._attachment.addToScene(context);\r\n }\r\n\r\n /** @internal */\r\n public override get areAllTileTreesLoaded(): boolean {\r\n return super.areAllTileTreesLoaded && (!this._attachment || this._attachment.view.areAllTileTreesLoaded);\r\n }\r\n\r\n /** @internal */\r\n public override get secondaryViewports() {\r\n return this._attachment ? [this._attachment.viewport] : super.secondaryViewports;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"DrawingViewState.js","sourceRoot":"","sources":["../../src/DrawingViewState.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AACxE,OAAO,EACa,OAAO,EAA+D,cAAc,GACvG,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAA4B,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAwB,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAwB,eAAe,EAAE,MAAM,iBAAiB,CAAC;A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AAqB,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC3G,CAAC;IAED,gBAAgB;IAChB,IAAoB,kBAAkB;QACpC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACnF,CAAC;IAED,gBAAgB;IACA,qBAAqB,CAAC,EAAc;QAClD,OAAO,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,gBAAgB;IACA,uBAAuB,CAAC,IAAiC;QACvE,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,IAAI,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;YAC/F,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;IACpC,CAAC;;AA7MD;;;GAGG;AACW,yCAAwB,GAAG,KAAK,CAAC;AAE/C;;GAEG;AACW,oCAAmB,GAAG,KAAK,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Views\r\n */\r\n\r\nimport { assert, dispose, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n AxisAlignedBox3d, Frustum, HydrateViewStateRequestProps, HydrateViewStateResponseProps, QueryRowFormat, SectionDrawingViewProps, ViewDefinition2dProps, ViewFlagOverrides, ViewStateProps,\r\n} from \"@itwin/core-common\";\r\nimport { Constant, Range3d, Transform, TransformProps, Vector3d } from \"@itwin/core-geometry\";\r\nimport { CategorySelectorState } from \"./CategorySelectorState\";\r\nimport { CoordSystem } from \"./CoordSystem\";\r\nimport { DisplayStyle2dState } from \"./DisplayStyleState\";\r\nimport { Frustum2d } from \"./Frustum2d\";\r\nimport { IModelApp } from \"./IModelApp\";\r\nimport { IModelConnection } from \"./IModelConnection\";\r\nimport { FeatureSymbology } from \"./render/FeatureSymbology\";\r\nimport { GraphicBranch, GraphicBranchOptions } from \"./render/GraphicBranch\";\r\nimport { MockRender } from \"./render/MockRender\";\r\nimport { RenderGraphic } from \"./render/RenderGraphic\";\r\nimport { Scene } from \"./render/Scene\";\r\nimport { DisclosedTileTreeSet, TileGraphicType } from \"./tile/internal\";\r\nimport { SceneContext } from \"./ViewContext\";\r\nimport { OffScreenViewport, Viewport } from \"./Viewport\";\r\nimport { ViewRect } from \"./common/ViewRect\";\r\nimport { AttachToViewportArgs, ComputeDisplayTransformArgs, ExtentLimits, ViewState2d, ViewState3d } from \"./ViewState\";\r\n\r\n/** Strictly for testing.\r\n * @internal\r\n */\r\nexport interface SectionDrawingInfo {\r\n readonly spatialView: Id64String;\r\n readonly drawingToSpatialTransform: Transform;\r\n}\r\n\r\n/** The information required to instantiate a [[SectionAttachment]]. This information is supplied to DrawingViewState constructor via ViewStateProps.\r\n * The spatial view is obtained asynchronously in DrawingViewState.load(). The SectionAttachment is created in DrawingViewState.attachToViewport and\r\n * disposed of in DrawingViewState.detachFromViewport.\r\n */\r\nclass SectionAttachmentInfo {\r\n private _spatialView: Id64String | ViewState3d;\r\n private readonly _drawingToSpatialTransform: Transform;\r\n private readonly _displaySpatialView: boolean;\r\n\r\n public get spatialView(): Id64String | ViewState3d { return this._spatialView; }\r\n public get wantDisplayed(): boolean {\r\n return this._displaySpatialView || DrawingViewState.alwaysDisplaySpatialView;\r\n }\r\n\r\n private constructor(spatialView: Id64String | ViewState3d, drawingToSpatialTransform: Transform, displaySpatialView: boolean) {\r\n this._spatialView = spatialView;\r\n this._drawingToSpatialTransform = drawingToSpatialTransform;\r\n this._displaySpatialView = displaySpatialView;\r\n }\r\n\r\n public static fromJSON(props?: SectionDrawingViewProps): SectionAttachmentInfo {\r\n if (!props)\r\n return new SectionAttachmentInfo(Id64.invalid, Transform.createIdentity(), false);\r\n\r\n return new SectionAttachmentInfo(props.spatialView, Transform.fromJSON(props.drawingToSpatialTransform), true === props.displaySpatialView);\r\n }\r\n\r\n public toJSON(): SectionDrawingViewProps | undefined {\r\n if (\"string\" === typeof this._spatialView && !Id64.isValidId64(this._spatialView))\r\n return undefined;\r\n\r\n return {\r\n spatialView: (this._spatialView instanceof ViewState3d) ? this._spatialView.id : this._spatialView,\r\n drawingToSpatialTransform: this._drawingToSpatialTransform.isIdentity ? undefined : this._drawingToSpatialTransform.toJSON(),\r\n displaySpatialView: this._displaySpatialView,\r\n };\r\n }\r\n\r\n public clone(iModel: IModelConnection): SectionAttachmentInfo {\r\n let spatialView = this._spatialView;\r\n if (spatialView instanceof ViewState3d)\r\n spatialView = spatialView.clone(iModel);\r\n\r\n return new SectionAttachmentInfo(spatialView, this._drawingToSpatialTransform, this._displaySpatialView);\r\n }\r\n\r\n public preload(options: HydrateViewStateRequestProps): void {\r\n if (!this.wantDisplayed)\r\n return;\r\n\r\n if (this._spatialView instanceof ViewState3d)\r\n return;\r\n\r\n if (!Id64.isValidId64(this._spatialView))\r\n return;\r\n\r\n options.spatialViewId = this._spatialView;\r\n options.viewStateLoadProps = {\r\n displayStyle: {\r\n omitScheduleScriptElementIds: !IModelApp.tileAdmin.enableFrontendScheduleScripts,\r\n compressExcludedElementIds: true,\r\n },\r\n };\r\n }\r\n\r\n public async load(iModel: IModelConnection): Promise<void> {\r\n if (!this.wantDisplayed)\r\n return;\r\n\r\n if (this._spatialView instanceof ViewState3d)\r\n return;\r\n\r\n if (!Id64.isValidId64(this._spatialView))\r\n return;\r\n\r\n const spatialView = await iModel.views.load(this._spatialView);\r\n if (spatialView instanceof ViewState3d)\r\n this._spatialView = spatialView;\r\n }\r\n\r\n public async postload(options: HydrateViewStateResponseProps, iModel: IModelConnection): Promise<void> {\r\n let spatialView;\r\n if (options.spatialViewProps) {\r\n spatialView = await iModel.views.convertViewStatePropsToViewState(options.spatialViewProps);\r\n }\r\n\r\n if (spatialView instanceof ViewState3d)\r\n this._spatialView = spatialView;\r\n }\r\n\r\n public createAttachment(toSheet: Transform | undefined): SectionAttachment | undefined {\r\n if (!this.wantDisplayed || !(this._spatialView instanceof ViewState3d))\r\n return undefined;\r\n\r\n const spatialToDrawing = this._drawingToSpatialTransform.inverse();\r\n return spatialToDrawing ? new SectionAttachment(this._spatialView, spatialToDrawing, this._drawingToSpatialTransform, toSheet) : undefined;\r\n }\r\n\r\n public get sectionDrawingInfo(): SectionDrawingInfo {\r\n return {\r\n drawingToSpatialTransform: this._drawingToSpatialTransform,\r\n spatialView: this._spatialView instanceof ViewState3d ? this._spatialView.id : this._spatialView,\r\n };\r\n }\r\n}\r\n\r\n/** A mostly no-op [[RenderTarget]] for a [[SectionAttachment]]. It allocates no webgl resources. */\r\nclass SectionTarget extends MockRender.OffScreenTarget {\r\n private readonly _attachment: SectionAttachment;\r\n\r\n public constructor(attachment: SectionAttachment) {\r\n super(IModelApp.renderSystem, new ViewRect(0, 0, 1, 1));\r\n this._attachment = attachment;\r\n }\r\n\r\n public override changeScene(scene: Scene): void {\r\n this._attachment.scene = scene;\r\n }\r\n\r\n public override overrideFeatureSymbology(ovrs: FeatureSymbology.Overrides): void {\r\n this._attachment.symbologyOverrides = ovrs;\r\n }\r\n}\r\n\r\n/** Draws the contents of an orthographic [[ViewState3d]] directly into a [[DrawingViewState]], if the associated [SectionDrawing]($backend)\r\n * specifies it should be. We select tiles for the view in the context of a lightweight offscreen viewport with a no-op [[RenderTarget]], then\r\n * add the resultant graphics to the drawing view's scene. The attachment is created in DrawingViewState.attachToViewport and disposed of in\r\n * DrawingViewState.detachFromViewport.\r\n */\r\nclass SectionAttachment {\r\n private readonly _viewFlagOverrides: ViewFlagOverrides;\r\n public readonly toDrawing: Transform;\r\n private readonly _fromDrawing: Transform;\r\n private readonly _viewRect = new ViewRect(0, 0, 1, 1);\r\n private readonly _originalFrustum = new Frustum();\r\n private readonly _drawingExtents: Vector3d;\r\n public readonly viewport: OffScreenViewport;\r\n private readonly _branchOptions: GraphicBranchOptions;\r\n public scene?: Scene;\r\n public symbologyOverrides: FeatureSymbology.Overrides;\r\n\r\n public get view(): ViewState3d {\r\n assert(this.viewport.view instanceof ViewState3d);\r\n return this.viewport.view;\r\n }\r\n\r\n public get zDepth(): number {\r\n return this._drawingExtents.z;\r\n }\r\n\r\n public get drawingRange() {\r\n const frustum3d = this._originalFrustum.transformBy(this.toDrawing);\r\n return frustum3d.toRange();\r\n }\r\n\r\n public constructor(view: ViewState3d, toDrawing: Transform, fromDrawing: Transform, toSheet: Transform | undefined) {\r\n // Save the input for clone(). Attach a copy to the viewport.\r\n this.toDrawing = toDrawing;\r\n this._fromDrawing = fromDrawing;\r\n\r\n this.viewport = OffScreenViewport.createViewport(view, new SectionTarget(this), true);\r\n\r\n this.symbologyOverrides = new FeatureSymbology.Overrides(view);\r\n let clipVolume;\r\n let clip = this.view.getViewClip();\r\n if (clip) {\r\n clip = clip.clone();\r\n const clipTransform = toSheet ? toSheet.multiplyTransformTransform(this.toDrawing) : this.toDrawing;\r\n clip.transformInPlace(clipTransform);\r\n clipVolume = IModelApp.renderSystem.createClipVolume(clip);\r\n }\r\n\r\n this._branchOptions = {\r\n clipVolume,\r\n hline: view.getDisplayStyle3d().settings.hiddenLineSettings,\r\n viewAttachmentId: view.id,\r\n frustum: {\r\n is3d: true,\r\n scale: { x: 1, y: 1 },\r\n },\r\n };\r\n\r\n this._viewFlagOverrides = { ...view.viewFlags, lighting: false, shadows: false };\r\n\r\n // Save off the original frustum (potentially adjusted by viewport).\r\n this.viewport.setupFromView();\r\n this.viewport.viewingSpace.getFrustum(CoordSystem.World, true, this._originalFrustum);\r\n\r\n const drawingFrustum = this._originalFrustum.transformBy(this.toDrawing);\r\n const drawingRange = drawingFrustum.toRange();\r\n this._drawingExtents = drawingRange.diagonal();\r\n this._drawingExtents.z = Math.abs(this._drawingExtents.z);\r\n }\r\n\r\n public dispose(): void {\r\n this.viewport.dispose();\r\n }\r\n\r\n public addToScene(context: SceneContext): void {\r\n if (context.viewport.freezeScene)\r\n return;\r\n\r\n const pixelSize = context.viewport.getPixelSizeAtPoint();\r\n if (0 === pixelSize)\r\n return;\r\n\r\n // Adjust offscreen viewport's frustum based on intersection with drawing view frustum.\r\n const frustum3d = this._originalFrustum.transformBy(this.toDrawing);\r\n const frustumRange3d = frustum3d.toRange();\r\n const frustum2d = context.viewport.getWorldFrustum();\r\n const frustumRange2d = frustum2d.toRange();\r\n const intersect = frustumRange3d.intersect(frustumRange2d);\r\n if (intersect.isNull)\r\n return;\r\n\r\n frustum3d.initFromRange(intersect);\r\n frustum3d.transformBy(this._fromDrawing, frustum3d);\r\n this.viewport.setupViewFromFrustum(frustum3d);\r\n\r\n // Adjust view rect based on size of attachment on screen so tiles of appropriate LOD are selected.\r\n const width = this._drawingExtents.x * intersect.xLength() / frustumRange3d.xLength();\r\n const height = this._drawingExtents.y * intersect.yLength() / frustumRange3d.yLength();\r\n this._viewRect.width = Math.max(1, Math.round(width / pixelSize));\r\n this._viewRect.height = Math.max(1, Math.round(height / pixelSize));\r\n this.viewport.setRect(this._viewRect);\r\n\r\n // Propagate settings from drawing viewport.\r\n this.viewport.debugBoundingBoxes = context.viewport.debugBoundingBoxes;\r\n this.viewport.setTileSizeModifier(context.viewport.tileSizeModifier);\r\n\r\n // Create the scene.\r\n this.viewport.renderFrame();\r\n const scene = this.scene;\r\n if (!scene)\r\n return;\r\n\r\n // Extract graphics and insert into drawing's scene context.\r\n const outputGraphics = (source: RenderGraphic[]) => {\r\n if (0 === source.length)\r\n return;\r\n\r\n const graphics = new GraphicBranch();\r\n graphics.setViewFlagOverrides(this._viewFlagOverrides);\r\n graphics.symbologyOverrides = this.symbologyOverrides;\r\n\r\n for (const graphic of source)\r\n graphics.entries.push(graphic);\r\n\r\n const branch = context.createGraphicBranch(graphics, this.toDrawing, this._branchOptions);\r\n context.outputGraphic(branch);\r\n };\r\n\r\n outputGraphics(scene.foreground);\r\n context.withGraphicType(TileGraphicType.BackgroundMap, () => outputGraphics(scene.background));\r\n context.withGraphicType(TileGraphicType.Overlay, () => outputGraphics(scene.overlay));\r\n\r\n // Report tile statistics to drawing viewport.\r\n const tileAdmin = IModelApp.tileAdmin;\r\n const selectedAndReady = tileAdmin.getTilesForUser(this.viewport);\r\n const requested = tileAdmin.getRequestsForUser(this.viewport);\r\n tileAdmin.addExternalTilesForUser(context.viewport, {\r\n requested: requested?.size ?? 0,\r\n selected: selectedAndReady?.selected.size ?? 0,\r\n ready: selectedAndReady?.ready.size ?? 0,\r\n });\r\n }\r\n}\r\n\r\n/** A view of a [DrawingModel]($backend)\r\n * @public\r\n * @extensions\r\n */\r\nexport class DrawingViewState extends ViewState2d {\r\n public static override get className() { return \"DrawingViewDefinition\"; }\r\n\r\n /** Exposed strictly for testing and debugging. Indicates that when loading the view, the spatial view should be displayed even\r\n * if `SectionDrawing.displaySpatialView` is not `true`.\r\n * @internal\r\n */\r\n public static alwaysDisplaySpatialView = false;\r\n\r\n /** Exposed strictly for testing and debugging. Indicates that the 2d graphics should not be displayed.\r\n * @internal\r\n */\r\n public static hideDrawingGraphics = false;\r\n\r\n private readonly _viewedExtents: AxisAlignedBox3d;\r\n private _attachmentInfo: SectionAttachmentInfo;\r\n private _attachment?: SectionAttachment;\r\n\r\n /** Strictly for testing. @internal */\r\n public get sectionDrawingProps(): SectionDrawingViewProps | undefined {\r\n return this._attachmentInfo.toJSON();\r\n }\r\n\r\n /** Strictly for testing. @internal */\r\n public get sectionDrawingInfo() {\r\n return this._attachmentInfo.sectionDrawingInfo;\r\n }\r\n\r\n /** Strictly for testing. @internal */\r\n public get attachment(): Object | undefined {\r\n return this._attachment;\r\n }\r\n\r\n /** Strictly for testing. @internal */\r\n public get attachmentInfo(): { spatialView: Id64String | ViewState3d } {\r\n return this._attachmentInfo;\r\n }\r\n\r\n public constructor(props: ViewDefinition2dProps, iModel: IModelConnection, categories: CategorySelectorState, displayStyle: DisplayStyle2dState, extents: AxisAlignedBox3d, sectionDrawing?: SectionDrawingViewProps) {\r\n super(props, iModel, categories, displayStyle);\r\n if (categories instanceof DrawingViewState) {\r\n this._viewedExtents = categories._viewedExtents.clone();\r\n this._attachmentInfo = categories._attachmentInfo.clone(iModel);\r\n } else {\r\n this._viewedExtents = extents;\r\n this._attachmentInfo = SectionAttachmentInfo.fromJSON(sectionDrawing);\r\n }\r\n }\r\n\r\n /** See [[ViewState.attachToViewport]]. */\r\n public override attachToViewport(args: AttachToViewportArgs): void {\r\n super.attachToViewport(args);\r\n assert(undefined === this._attachment);\r\n this._attachment = this._attachmentInfo.createAttachment(args.drawingToSheetTransform);\r\n }\r\n\r\n /** See [[ViewState.detachFromViewport]]. */\r\n public override detachFromViewport(): void {\r\n super.detachFromViewport();\r\n this._attachment = dispose(this._attachment);\r\n }\r\n\r\n /** @internal */\r\n public override async changeViewedModel(modelId: Id64String): Promise<void> {\r\n await super.changeViewedModel(modelId);\r\n const props = await this.querySectionDrawingProps();\r\n this._attachmentInfo = SectionAttachmentInfo.fromJSON(props);\r\n\r\n // super.changeViewedModel() throws if attached to viewport, and attachment only allocated while attached to viewport\r\n assert(undefined === this._attachment);\r\n }\r\n\r\n private async querySectionDrawingProps(): Promise<SectionDrawingViewProps> {\r\n let spatialView = Id64.invalid;\r\n let drawingToSpatialTransform: TransformProps | undefined;\r\n let displaySpatialView = false;\r\n try {\r\n const ecsql = `\r\n SELECT spatialView,\r\n json_extract(jsonProperties, '$.drawingToSpatialTransform') as drawingToSpatialTransform,\r\n CAST(json_extract(jsonProperties, '$.displaySpatialView') as BOOLEAN) as displaySpatialView\r\n FROM bis.SectionDrawing\r\n WHERE ECInstanceId=${this.baseModelId}`;\r\n\r\n for await (const row of this.iModel.createQueryReader(ecsql, undefined, { rowFormat: QueryRowFormat.UseJsPropertyNames })) {\r\n spatialView = Id64.fromJSON(row.spatialView?.id);\r\n displaySpatialView = !!row.displaySpatialView;\r\n try {\r\n drawingToSpatialTransform = JSON.parse(row.drawingToSpatialTransform);\r\n } catch {\r\n // We'll use identity transform.\r\n }\r\n\r\n break;\r\n }\r\n } catch (_ex) {\r\n // The version of BisCore ECSchema in the iModel is probably too old to contain the SectionDrawing ECClass.\r\n }\r\n\r\n return { spatialView, displaySpatialView, drawingToSpatialTransform };\r\n }\r\n\r\n /** @internal */\r\n protected override preload(hydrateRequest: HydrateViewStateRequestProps): void {\r\n assert(!this.isAttachedToViewport);\r\n super.preload(hydrateRequest);\r\n this._attachmentInfo.preload(hydrateRequest);\r\n }\r\n\r\n /** @internal */\r\n protected override async postload(hydrateResponse: HydrateViewStateResponseProps): Promise<void> {\r\n const promises = [];\r\n promises.push(super.postload(hydrateResponse));\r\n promises.push(this._attachmentInfo.postload(hydrateResponse, this.iModel));\r\n await Promise.all(promises);\r\n }\r\n\r\n public static override createFromProps(props: ViewStateProps, iModel: IModelConnection): DrawingViewState {\r\n const cat = new CategorySelectorState(props.categorySelectorProps, iModel);\r\n const displayStyleState = new DisplayStyle2dState(props.displayStyleProps, iModel);\r\n const extents = props.modelExtents ? Range3d.fromJSON(props.modelExtents) : new Range3d();\r\n\r\n // use \"new this\" so subclasses are correct\r\n return new this(props.viewDefinitionProps as ViewDefinition2dProps, iModel, cat, displayStyleState, extents, props.sectionDrawing);\r\n }\r\n\r\n public override toProps(): ViewStateProps {\r\n const props = super.toProps();\r\n props.modelExtents = this._viewedExtents.toJSON();\r\n props.sectionDrawing = this._attachmentInfo.toJSON();\r\n return props;\r\n }\r\n\r\n public getViewedExtents(): AxisAlignedBox3d {\r\n const extents = this._viewedExtents.clone();\r\n if (this._attachment) {\r\n extents.extendRange(this._attachment.drawingRange);\r\n }\r\n\r\n return extents;\r\n }\r\n\r\n public get defaultExtentLimits(): ExtentLimits {\r\n return {\r\n min: Constant.oneMillimeter,\r\n max: 3 * Constant.diameterOfEarth,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override isDrawingView(): this is DrawingViewState { return true; }\r\n\r\n /** See [[ViewState.getOrigin]]. */\r\n public override getOrigin() {\r\n const origin = super.getOrigin();\r\n if (this._attachment)\r\n origin.z = -this._attachment.zDepth;\r\n\r\n return origin;\r\n }\r\n\r\n /** See [[ViewState.getExtents]]. */\r\n public override getExtents() {\r\n const extents = super.getExtents();\r\n if (this._attachment)\r\n extents.z = this._attachment.zDepth + Frustum2d.minimumZDistance;\r\n\r\n return extents;\r\n }\r\n\r\n /** @internal */\r\n public override discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n super.discloseTileTrees(trees);\r\n if (this._attachment)\r\n trees.disclose(this._attachment.viewport);\r\n }\r\n\r\n /** @internal */\r\n public override createScene(context: SceneContext): void {\r\n if (!DrawingViewState.hideDrawingGraphics)\r\n super.createScene(context);\r\n\r\n if (this._attachment)\r\n this._attachment.addToScene(context);\r\n }\r\n\r\n /** @internal */\r\n public override get areAllTileTreesLoaded(): boolean {\r\n return super.areAllTileTreesLoaded && (!this._attachment || this._attachment.view.areAllTileTreesLoaded);\r\n }\r\n\r\n /** @internal */\r\n public override get secondaryViewports() {\r\n return this._attachment ? [this._attachment.viewport] : super.secondaryViewports;\r\n }\r\n\r\n /** @internal */\r\n public override getAttachmentViewport(id: Id64String): Viewport | undefined {\r\n return id === this._attachment?.view.id ? this._attachment.viewport : undefined;\r\n }\r\n\r\n /** @internal */\r\n public override computeDisplayTransform(args: ComputeDisplayTransformArgs): Transform | undefined {\r\n if (args.viewAttachmentId === undefined || args.viewAttachmentId !== this._attachment?.view.id) {\r\n return undefined;\r\n }\r\n\r\n return this._attachment.toDrawing;\r\n }\r\n}\r\n"]}
|
package/lib/esm/HitDetail.d.ts
CHANGED
|
@@ -92,12 +92,13 @@ export declare enum HitDetailType {
|
|
|
92
92
|
Snap = 2,
|
|
93
93
|
Intersection = 3
|
|
94
94
|
}
|
|
95
|
-
/** Describes the
|
|
96
|
-
*
|
|
95
|
+
/** Describes the "attached" view, if any, from which the hit represented by a [[HitDetail]] originated.
|
|
96
|
+
* An attached view is a 2d view drawn into the context of another view - for example, a [[ViewAttachment]]($backend)
|
|
97
|
+
* rendered into a [[SheetViewState]], or a [[SpatialViewState]] rendered by a [SectionDrawing]($backend) view.
|
|
97
98
|
* @beta
|
|
98
99
|
*/
|
|
99
100
|
export interface ViewAttachmentHitInfo {
|
|
100
|
-
/** The
|
|
101
|
+
/** The Id of the [ViewAttachment]($backend) element or - for a [SectionDrawing]($backend) view - the [SpatialViewDefinition]($backend) from which the hit originated. */
|
|
101
102
|
readonly id: Id64String;
|
|
102
103
|
/** The viewport that renders the contents of the attached view into the [[ScreenViewport]].
|
|
103
104
|
* @alpha
|
|
@@ -144,8 +145,7 @@ export interface HitDetailProps {
|
|
|
144
145
|
* @alpha
|
|
145
146
|
*/
|
|
146
147
|
readonly isClassifier?: boolean;
|
|
147
|
-
/** Information about the
|
|
148
|
-
* @note Only [[SheetViewState]]s can have view attachments.
|
|
148
|
+
/** Information about the attached view, if any, within which the hit geometry resides.
|
|
149
149
|
* @beta
|
|
150
150
|
*/
|
|
151
151
|
readonly viewAttachment?: ViewAttachmentHitInfo;
|
|
@@ -193,8 +193,7 @@ export declare class HitDetail {
|
|
|
193
193
|
* @alpha
|
|
194
194
|
*/
|
|
195
195
|
get isClassifier(): boolean | undefined;
|
|
196
|
-
/** Information about the
|
|
197
|
-
* @note Only [[SheetViewState]]s can have view attachments.
|
|
196
|
+
/** Information about the attached view within which the hit geometry resides, if any.
|
|
198
197
|
* @beta
|
|
199
198
|
*/
|
|
200
199
|
get viewAttachment(): ViewAttachmentHitInfo | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HitDetail.d.ts","sourceRoot":"","sources":["../../src/HitDetail.ts"],"names":[],"mappings":"AAIA;;GAE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-144,8 +144,7 @@ export class HitDetail {
|
|
|
144
144
|
* @alpha
|
|
145
145
|
*/
|
|
146
146
|
get isClassifier() { return this._props.isClassifier; }
|
|
147
|
-
/** Information about the
|
|
148
|
-
* @note Only [[SheetViewState]]s can have view attachments.
|
|
147
|
+
/** Information about the attached view within which the hit geometry resides, if any.
|
|
149
148
|
* @beta
|
|
150
149
|
*/
|
|
151
150
|
get viewAttachment() { return this._props.viewAttachment; }
|