/** @packageDocumentation * @module DisplayStyles */ import { Range1d, Range1dProps } from "@bentley/geometry-core"; import { ThematicGradientSettings, ThematicGradientSettingsProps } from "./ThematicDisplay"; import { Gradient } from "./Gradient"; /** JSON representation of an [[AnalysisStyleDisplacement]]. * @see [[AnalysisStyleProps.displacement]]. * @public */ export interface AnalysisStyleDisplacementProps { /** @see [[AnalysisStyleDisplacement.channelName]]. */ channelName: string; /** @see [[AnalysisStyleDisplacement.scale]]. * Default value: 1. */ scale?: number; } /** Describes how an [[AnalysisStyle]] deforms a [Polyface]($geometry-core) by applying translation to its vertices. * @see [[AnalysisStyle.displacement]]. * @public */ export declare class AnalysisStyleDisplacement { /** The name of the [AuxChannel]($geometry-core) supplying the displacements to be applied to the vertices. */ readonly channelName: string; /** A scale applied to the displacements to adjust the magnitude of the effect. * Default value: 1. */ readonly scale: number; /** @internal */ private constructor(); /** Create from JSON representation. */ static fromJSON(props: AnalysisStyleDisplacementProps): AnalysisStyleDisplacement; /** Convert to JSON representation. */ toJSON(): AnalysisStyleDisplacementProps; /** Return true if `this` is equivalent to `other`. */ equals(other: AnalysisStyleDisplacement): boolean; } /** JSON representation of an [[AnalysisStyleScalar]]. * @see [[AnalysisStyleProps.scalar]]. * @public */ export interface AnalysisStyleScalarProps { /** @see [[AnalysisStyleScalar.channelName]]. */ channelName: string; /** @see [[AnalysisStyleScalar.range]]. */ range: Range1dProps; /** @see [[AnalysisStyleScalar.thematicSettings]]. * Default value: [[ThematicGradientSettings.defaults]]. */ thematicSettings?: ThematicGradientSettingsProps; } /** Describes how an [[AnalysisStyle]] recolors [Polyface]($geometry-core) vertices by mapping scalar values supplied * by an [AuxChannel]($geometry-core) to colors supplied by a [[Gradient]] image. * @see [[AnalysisStyle.scalar]]. * @public */ export declare class AnalysisStyleScalar { /** The name of the [AuxChannel]($geometry-core) supplying the scalar values from which the vertex colors are computed. */ readonly channelName: string; /** The minimum and maximum scalar values that map to colors in the [[Gradient]] image. Vertices with values outside of * this range are displayed with the gradient's margin color. */ readonly range: Readonly; /** Settings used to produce the [[Gradient]] image. */ readonly thematicSettings: ThematicGradientSettings; private _gradient?; /** @internal */ private constructor(); /** Create from JSON representation. */ static fromJSON(props: AnalysisStyleScalarProps): AnalysisStyleScalar; /** Convert to JSON representation. */ toJSON(): AnalysisStyleScalarProps; /** The gradient computed from [[thematicSettings]]. */ get gradient(): Gradient.Symb; /** Return true if `this` is equivalent to `other`. */ equals(other: AnalysisStyleScalar): boolean; } /** JSON representation of an [[AnalysisStyle]]. * @public */ export interface AnalysisStyleProps { /** @see [[AnalysisStyle.displacement]]. */ displacement?: AnalysisStyleDisplacementProps; /** @see [[AnalysisStyle.scalar]]. */ scalar?: AnalysisStyleScalarProps; /** @see [[AnalysisStyle.normalChannelName]]. */ normalChannelName?: string; } /** At time of writing, the only iModel in existence that uses AnalysisStyle is the one created by the analysis-importer test app. * To avoid breaking existing saved views of that iModel, AnalysisStyle.fromJSON() continues to accept the old JSON representation - * but that representation is not part of the public API. * @internal exported strictly for tests. */ export interface LegacyAnalysisStyleProps { displacementChannelName?: string; scalarChannelName?: string; normalChannelName?: string; displacementScale?: number; scalarRange?: Range1dProps; scalarThematicSettings?: ThematicGradientSettingsProps; } /** As part of a [[DisplayStyleSettings]], describes how to animate meshes in the view that have been augmented with * [PolyfaceAuxData]($geometry-core). The style specifies which channels to use, and can deform the meshes by * translating vertices and/or recolor vertices using [[ThematicDisplay]]. * @see [[DisplayStyleSettings.analysisStyle]] to define the analysis style for a [DisplayStyle]($backend). * @see [[DisplayStyleSettings.analysisFraction]] to control playback of the animation. * @public */ export declare class AnalysisStyle { readonly displacement?: AnalysisStyleDisplacement; readonly scalar?: AnalysisStyleScalar; /** If defined, the name of the [AuxChannel]($geometry-core) from which to obtain normal vectors for the vertices. */ readonly normalChannelName?: string; /** Create an analysis style from its JSON representation. * @note AnalysisStyle is an immutable type - use [[clone]] to produce a modified copy. */ static fromJSON(props?: AnalysisStyleProps): AnalysisStyle; /** @internal */ private constructor(); /** Convert this style to its JSON representation. */ toJSON(): AnalysisStyleProps; /** Produce a copy of this style identical except for properties explicitly specified by `changedProps`. */ clone(changedProps: AnalysisStyleProps): AnalysisStyle; /** Return true if this style is equivalent to `other`. */ equals(other: AnalysisStyle): boolean; static readonly defaults: AnalysisStyle; } //# sourceMappingURL=AnalysisStyle.d.ts.map