UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

152 lines 8.28 kB
/** @packageDocumentation * @module Views */ import { ViewFlagOverrides } from "./ViewFlags"; import { RgbColor, RgbColorProps } from "./RgbColor"; import { HiddenLine } from "./HiddenLine"; import { FeatureAppearance, FeatureAppearanceProps } from "./FeatureSymbology"; /** Wire format describing a [[CutStyle]] applied to section-cut geometry produced at intersections with a view's [ClipVector]($core-geometry). * @see [[ClipStyleProps.cutStyle]]. * @public * @extensions */ export interface CutStyleProps { /** If defined, overrides aspects of the view's [[ViewFlags]] when drawing the cut geometry. */ viewflags?: ViewFlagOverrides; /** If defined, overrides the view's [[HiddenLine.Settings]] when drawing the cut geometry. */ hiddenLine?: HiddenLine.SettingsProps; /** If defined, overrides aspects of the cut geometry's symbology. */ appearance?: FeatureAppearanceProps; } /** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed. * @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`. * @public */ export declare class CutStyle { /** Selectively overrides some of the view's [[ViewFlags]] when drawing the section-cut graphics. */ readonly viewflags: Readonly<ViewFlagOverrides>; /** If defined, overrides the settings the view uses to draw the edges of the section-cut graphics. */ readonly hiddenLine?: HiddenLine.Settings; /** If defined, overrides aspects of the symbology of the section-cut graphics. */ readonly appearance?: FeatureAppearance; /** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */ static readonly defaults: CutStyle; private constructor(); /** Create a CutStyle from its components. */ static create(viewflags?: Readonly<ViewFlagOverrides>, hiddenLine?: HiddenLine.Settings, appearance?: FeatureAppearance): CutStyle; static fromJSON(props?: CutStyleProps): CutStyle; /** Return JSON representation. The representation is `undefined` if this style matches the default style. */ toJSON(): CutStyleProps | undefined; /** Returns true if this style matches the default style - that is, it overrides none of the view's settings. */ get matchesDefaults(): boolean; } /** Wire format describing a [[ClipIntersectionStyle]]. * @see [[ClipStyleProps.ClipIntersectionStyle]]. * @public * @extensions */ export interface ClipIntersectionStyleProps { /** Color to apply to intersection of geometry and clip planes, default white */ color?: RgbColorProps; /** Number of pixels to be considered intersecting the clip plane, default 1 */ width?: number; } /** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes. * @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`. * @public * @extensions */ export declare class ClipIntersectionStyle { /** Color to apply to intersection of geometry and clip planes, default white */ readonly color: RgbColor; /** Number of pixels to be considered intersecting the clip plane, default 1 */ readonly width: number; private constructor(); /** Create a highlight from its components. */ static create(color?: RgbColor, width?: number): ClipIntersectionStyle; static readonly defaults: ClipIntersectionStyle; static fromJSON(props?: ClipIntersectionStyleProps): ClipIntersectionStyle; /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */ toJSON(): ClipIntersectionStyleProps | undefined; get matchesDefaults(): boolean; } /** Arguments supplied to [[ClipStyle.create]]. * @public * @extensions */ export interface ClipStyleCreateArgs { /** If `true`, geometry will be produced at the clip planes in a 3d view. * - Solids (closed volumes) will produce facets on the clip planes. * - Other surfaces will produce line strings representing the edges of the surface at the clip planes. * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models. */ produceCutGeometry?: boolean; /** If `true`, intersection of geometry and clip planes will be colorized */ colorizeIntersection?: boolean; /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */ cutStyle?: CutStyle; /** If defined, geometry inside the clip planes will be drawn in this color. */ insideColor?: RgbColor; /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */ outsideColor?: RgbColor; /** Controls the style of the intersection of geometry and clip planes */ intersectionStyle?: ClipIntersectionStyle; } /** Wire format describing a [[ClipStyle]]. * @see [[DisplayStyleSettingsProps.clipStyle]]. * @public * @extensions */ export interface ClipStyleProps { /** If `true`, geometry will be produced at the clip planes in a 3d view. * - Solids (closed volumes) will produce facets on the clip planes. * - Other surfaces will produce line strings representing the edges of the surface at the clip planes. * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models. */ produceCutGeometry?: boolean; /** If 'true', intersection of geometry and clip planes will be colorized */ colorizeIntersection?: boolean; /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */ cutStyle?: CutStyleProps; /** If defined, geometry inside the clip planes will be drawn in this color. */ insideColor?: RgbColorProps; /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */ outsideColor?: RgbColorProps; /** Controls the style of the intersection of geometry and clip planes */ intersectionStyle?: ClipIntersectionStyleProps; } /** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]]. * @see [[DisplayStyleSettings.clipStyle]]. * @public */ export declare class ClipStyle { /** If `true`, geometry will be produced at the clip planes. * - Solids (closed volumes) will produce facets on the clip planes. * - Other surfaces will produce line strings representing the edges of the surface at the clip planes. * @note Cut geometry will only be produced for element geometry - not for, e.g., terrain or reality models. */ readonly produceCutGeometry: boolean; /** If 'true', intersection of geometry and clip planes will be colorized */ readonly colorizeIntersection: boolean; /** Controls aspects of how the cut geometry is displayed, if [[produceCutGeometry]] is `true`. */ readonly cutStyle: CutStyle; /** If defined, geometry inside the clip planes will be drawn in this color. */ readonly insideColor?: RgbColor; /** If defined, geometry outside of the clip planes will be drawn in this color instead of being clipped. */ readonly outsideColor?: RgbColor; /** Controls the style of the intersection of geometry and clip planes */ readonly intersectionStyle?: ClipIntersectionStyle; /** The default style, which overrides none of the view's settings. */ static readonly defaults: ClipStyle; private constructor(); /** @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use [[create(style: ClipStyleCreateArgs]] */ static create(produceCutGeometry: boolean, cutStyle: CutStyle, insideColor?: RgbColor, outsideColor?: RgbColor): ClipStyle; /** Create a style from its components. */ static create(style: ClipStyleCreateArgs): ClipStyle; static fromJSON(props?: ClipStyleProps): ClipStyle; /** The JSON representation of this style. It is `undefined` if this style matches the defaults. */ toJSON(): ClipStyleProps | undefined; /** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */ get matchesDefaults(): boolean; } //# sourceMappingURL=ClipStyle.d.ts.map