/** @packageDocumentation * @module DisplayStyles */ import { CompressedId64Set, Id64String, OrderedId64Iterable } from "@bentley/bentleyjs-core"; /** The different modes by which a [[PlanarClipMaskSettings]] collects the geometry used to mask a model. * @public */ export declare enum PlanarClipMaskMode { /** No masking. */ None = 0, /** Mask based on priority. Different types of models have different default priorities as enumerated by [[PlanarClipMaskPriority]]. * For example, background maps have the lowest priority, so they are masked by all other types, while design models have the highest priority and are therefore never masked. * The priority of a reality model can be overridden by [[PlanarClipMaskSettings.priority]]. This is useful to allow one reality model to mask another overlapping one. */ Priority = 1, /** Indicates that masks should be produced from the geometry in a set of [GeometricModel]($backend)s. */ Models = 2, /** Indicates that masks should be produced from geometry belonging to a set of subcategories. */ IncludeSubCategories = 3, /** Indicates that masks should be produced from the geometry of a set of [GeometricElement]($backend)s. */ IncludeElements = 4, /** Indicates that masks should be produced from the geometry of all [GeometricElement]($backend)s in a view, **except** for a specified set of excluded elements. */ ExcludeElements = 5 } /** The default priority values for a [[PlanarClipMaskSettings]], based on model type. Models with a lower priority are masked by models with a higher priority. * The default can be overridden by [[PlanarClipMaskSettings.priority]]. * @public */ export declare enum PlanarClipMaskPriority { /** Background map. */ BackgroundMap = -2048, /** A reality model that spans the globe - e.g., OpenStreetMaps Buildings. */ GlobalRealityModel = -1024, /** A reality model with a bounded range. */ RealityModel = 0, /** A design model stored in the [IModelDb]($backend). */ DesignModel = 2048 } /** JSON representation of a [[PlanarClipMaskSettings]]. * @see [[DisplayStyleSettingsProps.planarClipOvr]] and [[ContextRealityModelProps.planarClipMask]]. * @public */ export interface PlanarClipMaskProps { /** Controls how the mask geometry is collected */ mode: PlanarClipMaskMode; /** @see [[PlanarClipMaskSettings.modelIds]]. */ modelIds?: CompressedId64Set; /** @see [[PlanarClipMaskSettings.subCategoryOrElementIds]]. */ subCategoryOrElementIds?: CompressedId64Set; /** @see [[PlanarClipMaskSettings.priority]]. */ priority?: number; /** @see [[PlanarClipMaskSettings.transparency]]. */ transparency?: number; } /** Describes how to mask the geometry of one [GeometricModel]($backend) for display. The mask is produced by projecting geometry from any number of other models - * optionally filtered by [SubCategory]($backend) or by a set of specific [GeometricElement]($backend)s - onto a plane. Regions of the masked model that intersect the * mask are rendered partially or completely transparent. This is useful for, e.g., making subsurface geometry visible below the background map, or clipping out portions * of a reality model that intersect a design model. * @note Currently reality models (including background maps and terrain) can be masked, but design models can only produce masks. * @see [[DisplayStyleSettings.planarClipMasks]] to define clip masks for a [DisplayStyle]($backend). * @see [[ContextRealityModel.planarClipMaskSettings]] to apply a clip mask to a context reality model. * @public */ export declare class PlanarClipMaskSettings { /** Specifies how the mask geometry is produced. */ readonly mode: PlanarClipMaskMode; /** For any mode other than [[PlanarClipMaskMode.Priority]], the Ids of the [GeometricModel]($backend)s containing the geometry used to produce the mask. * If `undefined`, the set of all models in the view's [ModelSelector]($backend) is used. * The mask geometry can be filtered by [[subCategoryOrElementIds]]. */ readonly modelIds?: OrderedId64Iterable; /** For [[PlanarClipMaskMode.IncludeElements]] or [[PlanarClipMaskMode.ExcludedElements]], the Ids of the [GeometricElement]($backend)s to include or exclude from masking; * for [[PlanarClipMaskMode.IncludeSubCategories]], the Ids of the subcategories whose geometry contributes to the mask. */ readonly subCategoryOrElementIds?: OrderedId64Iterable; /** For [[PlanarClipMaskMode.Priority]], the priority value. */ readonly priority?: number; /** A value between 0 and 1 indicating an override for mask transparency. A transparency of 0 indicates complete masking. 1 is completely transparent (no masking). If no transparency is defined then the transparencies of the mask elements are used. */ readonly transparency?: number; private readonly _modelIds?; private readonly _subCategoryOrElementIds?; /** The compressed representation of [[modelIds]]. */ get compressedModelIds(): CompressedId64Set | undefined; /** Create a new [[PlanarClipMaskSettings]] object from its JSON representation. */ static fromJSON(json?: PlanarClipMaskProps): PlanarClipMaskSettings; /** Create settings for [[PlanarClipMaskMode.Models]]. */ static createForModels(modelIds: Iterable | undefined, transparency?: number): PlanarClipMaskSettings; /** Create settings that filter by element or subcategory. */ static createForElementsOrSubCategories(mode: PlanarClipMaskMode.IncludeElements | PlanarClipMaskMode.ExcludeElements | PlanarClipMaskMode.IncludeSubCategories, elementOrSubCategoryIds: Iterable, modelIds?: Iterable, transparency?: number): PlanarClipMaskSettings; /** Create settings that mask by priority. * @see [[PlanarClipMaskPriority]] for default priority values based on model type. */ static createByPriority(priority: number, transparency?: number): PlanarClipMaskSettings; /** Create JSON object representing this [[PlanarClipMaskSettings]] */ toJSON(): PlanarClipMaskProps; /** Returns true if masking is enabled. */ get isValid(): boolean; equals(other: PlanarClipMaskSettings): boolean; /** Create a copy of this TerrainSettings, optionally modifying some of its properties. * @param changedProps JSON representation of the properties to change. * @returns A PlanarClipMaskSettings with all of its properties set to match those of`this`, except those explicitly defined in `changedProps`. */ clone(changedProps?: PlanarClipMaskProps): PlanarClipMaskSettings; private constructor(); /** A default PlanarClipMask which masks nothing. */ static defaults: PlanarClipMaskSettings; } //# sourceMappingURL=PlanarClipMask.d.ts.map