/** @packageDocumentation * @module DisplayStyles */ /** Enumerates the available rendering modes. The rendering mode chiefly controls whether and how surfaces and their edges are drawn. * Generally speaking, * - Wireframe draws only edges. * - SmoothShade draws only surfaces. * - HiddenLine and SolidFill draw both surfaces and edges. * - Lighting is only applied in SmoothShade mode. * * The [[FillFlags]] associated with planar regions controls whether and how the region's interior area is displayed in Wireframe mode. * [[ViewFlags]] has options for enabling display of visible and/or hidden edges in SmoothShade mode. * [[HiddenLine.Settings]] allow aspects of edge and surface symbology to be overridden within a view. * @public */ export declare enum RenderMode { /** Render only edges, no surfaces, with exceptions for planar regions with [[FillFlags]] set up to render the surface in wireframe mode. */ Wireframe = 0, /** Render only surfaces, no edges, with lighting. */ SmoothShade = 6, /** Render edges and surfaces. Surfaces are drawn using the view's background color instead of the element's fill color. */ HiddenLine = 3, /** Render edges and surfaces. */ SolidFill = 4 } /** JSON representation of [[ViewFlags]] * @public */ export interface ViewFlagProps { /** If true, don't show construction class. */ noConstruct?: boolean; /** If true, don't show dimension class. */ noDim?: boolean; /** If true, don't show patterns. */ noPattern?: boolean; /** If true, don't line weights. */ noWeight?: boolean; /** If true, don't line styles. */ noStyle?: boolean; /** If true, don't use transparency. */ noTransp?: boolean; /** If true, don't show filled regions. */ noFill?: boolean; /** If true, show grids. */ grid?: boolean; /** If true, show AuxCoordSystem. */ acs?: boolean; /** If true, don't show textures. */ noTexture?: boolean; /** If true, don't show materials. */ noMaterial?: boolean; /** If true, don't use camera lights. * @note Currently the renderer only supports solar lighting. For backwards-compatibility reasons, solar lights will be displayed if any combination of [[noCameraLights]], [[noSourceLights]], or [[noSolarLight]] is set to `false`. */ noCameraLights?: boolean; /** If true, don't use source lights. * @note Currently the renderer only supports solar lighting. For backwards-compatibility reasons, solar lights will be displayed if any combination of [[noCameraLights]], [[noSourceLights]], or [[noSolarLight]] is set to `false`. */ noSourceLights?: boolean; /** If true, don't use solar lights. * @note Currently the renderer only supports solar lighting. For backwards-compatibility reasons, solar lights will be displayed if any combination of [[noCameraLights]], [[noSourceLights]], or [[noSolarLight]] is set to `false`. */ noSolarLight?: boolean; /** If true, show visible edges. */ visEdges?: boolean; /** If true, show hidden edges. */ hidEdges?: boolean; /** If true, show shadows. */ shadows?: boolean; /** If true, use the view's clipping volume. Has no effect on other types of clips like [[ModelClipGroups]]. */ clipVol?: boolean; /** If true, use hidden line material colors. */ hlMatColors?: boolean; /** If true, show view with monochrome settings. */ monochrome?: boolean; /** @internal unused */ edgeMask?: number; /** [[RenderMode]] */ renderMode?: number; /** Display background map. */ backgroundMap?: boolean; /** If true, show ambient occlusion. */ ambientOcclusion?: boolean; /** If true, show thematic display. * @note Currently, thematically displayed geometry will not receive shadows. If thematic display is enabled, shadows will not be received by thematically displayed geometry, even if shadows are enabled. */ thematicDisplay?: boolean; /** Controls whether surface discard is always applied regardless of other ViewFlags. * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with * non-planar surfaces always draw in front of those non-planar surfaces. * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed), * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute. */ forceSurfaceDiscard?: boolean; /** Disables the "white-on-white reversal" employed by some CAD applications. * @see [[ViewFlags.whiteOnWhiteReversal]]. */ noWhiteOnWhiteReversal?: boolean; } /** Flags for controlling how graphics appear within a View. * @public */ export declare class ViewFlags { /** The [[RenderMode]] of the view. */ renderMode: RenderMode; /** Shows or hides dimensions. */ dimensions: boolean; /** Shows or hides pattern geometry. */ patterns: boolean; /** Controls whether non-zero line weights are used or display using weight 0. */ weights: boolean; /** Controls whether custom line styles are used (e.g. control whether elements with custom line styles draw normally, or as solid lines). */ styles: boolean; /** Controls whether element transparency is used (e.g. control whether elements with transparency draw normally, or as opaque). */ transparency: boolean; /** Controls whether the fills on filled elements are displayed. */ fill: boolean; /** Controls whether to display texture maps for material assignments. When off only material color is used for display. */ textures: boolean; /** Controls whether materials are used (e.g. control whether geometry with materials draw normally, or as if it has no material). */ materials: boolean; /** Shows or hides the ACS triad. */ acsTriad: boolean; /** Shows or hides the grid. The grid settings are a design file setting. */ grid: boolean; /** Shows or hides visible edges in the shaded render mode. */ visibleEdges: boolean; /** Shows or hides hidden edges in the shaded render mode. */ hiddenEdges: boolean; /** Controls whether the source lights in spatial models are used * @note Currently the renderer only supports solar lighting. For backwards-compatibility reasons, solar lights will be displayed if any combination of [[noCameraLights]], [[noSourceLights]], or [[noSolarLight]] is set to `false`. * @see [[lighting]] for a more convenient way to toggle lighting on and off. */ sourceLights: boolean; /** Controls whether camera (ambient, portrait, flashbulb) lights are used. * @note Currently the renderer only supports solar lighting. For backwards-compatibility reasons, solar lights will be displayed if any combination of [[noCameraLights]], [[noSourceLights]], or [[noSolarLight]] is set to `false`. * @see [[lighting]] for a more convenient way to toggle lighting on and off. */ cameraLights: boolean; /** Controls whether sunlight used * @note Currently the renderer only supports solar lighting. For backwards-compatibility reasons, solar lights will be displayed if any combination of [[noCameraLights]], [[noSourceLights]], or [[noSolarLight]] is set to `false`. * @see [[lighting]] for a more convenient way to toggle lighting on and off. */ solarLight: boolean; /** Shows or hides shadows. */ shadows: boolean; /** Controls whether the view's clip volume is applied. Has no effect on other types of clips like [[ModelClipGroups]]. */ clipVolume: boolean; /** Shows or hides construction class geometry. */ constructions: boolean; /** Draw geometry using the view's monochrome color. * @see [DisplayStyleSettings.monochromeColor]($common) for details on how the color is applied. * @see [DisplayStyleSettings.monochromeMode]($common) to control the type of monochrome display applied. */ monochrome: boolean; /** @internal unused Ignore geometry maps */ noGeometryMap: boolean; /** Display background map */ backgroundMap: boolean; /** Use material colors for hidden lines */ hLineMaterialColors: boolean; /** @internal 0=none, 1=generate mask, 2=use mask */ edgeMask: number; /** Controls whether ambient occlusion is used. */ ambientOcclusion: boolean; /** Controls whether thematic display is used. * @note Currently, thematically displayed geometry will not receive shadows. If thematic display is enabled, shadows will not be received by thematically displayed geometry, even if shadows are enabled. */ thematicDisplay: boolean; /** Controls whether surface discard is always applied regardless of other ViewFlags. * Surface shaders contain complicated logic to ensure that the edges of a surface always draw in front of the surface, and that planar surfaces sketched coincident with * non-planar surfaces always draw in front of those non-planar surfaces. * When this view flag is set to false (the default), then for 3d views if the render mode is wireframe (only edges are displayed) or smooth shader with visible edges turned off (only surfaces are displayed), * that logic does not execute, potentially improving performance for no degradation in visual quality. In some scenarios - such as wireframe views containing many planar regions with interior fill, or smooth views containing many coincident planar and non-planar surfaces - enabling this view flag improves display quality by forcing that logic to execute. */ forceSurfaceDiscard: boolean; /** Whether to apply white-on-white reversal. * Some applications use this to cause white geometry to be drawn as black if the view's background color is white. * When enabled, the [[DisplayStyleSettings]]' [[WhiteOnWhiteReversalSettings]] control how white-on-white reversal is applied. * Default: true. */ whiteOnWhiteReversal: boolean; /** Controls whether or not lighting is applied. * @note Has no effect unless `renderMode` is set to [[RenderMode.SmoothShade]]. */ get lighting(): boolean; set lighting(enable: boolean); clone(out?: ViewFlags): ViewFlags; static createFrom(other?: ViewFlags, out?: ViewFlags): ViewFlags; /** @internal */ hiddenEdgesVisible(): boolean; /** Returns true if the edges of surfaces should be displayed, based on [[RenderMode]] and the [[visibleEdges]] flag. */ edgesRequired(): boolean; toJSON(): ViewFlagProps; /** Like [[toJSON]], but no properties are omitted. * @internal */ toFullyDefinedJSON(): Required; static fromJSON(json?: ViewFlagProps): ViewFlags; equals(other: ViewFlags): boolean; } /** Values used by [[ViewFlagOverrides]] to indicate which aspects of the [[ViewFlags]] are overridden. * @public */ export declare enum ViewFlagPresence { RenderMode = 0, Dimensions = 1, Patterns = 2, Weights = 3, Styles = 4, Transparency = 5, Unused = 6, Fill = 7, Textures = 8, Materials = 9, VisibleEdges = 10, HiddenEdges = 11, Lighting = 12, Shadows = 13, ClipVolume = 14, Constructions = 15, Monochrome = 16, GeometryMap = 17, HlineMaterialColors = 18, EdgeMask = 19, BackgroundMap = 20, ForceSurfaceDiscard = 21, WhiteOnWhiteReversal = 22, ThematicDisplay = 23 } /** JSON representation of [[ViewFlagOverrides]]. A flag is overridden if it is defined. * @public */ export interface ViewFlagOverridesProps { dimensions?: boolean; patterns?: boolean; weights?: boolean; styles?: boolean; transparency?: boolean; fill?: boolean; textures?: boolean; materials?: boolean; lighting?: boolean; visibleEdges?: boolean; hiddenEdges?: boolean; shadows?: boolean; clipVolume?: boolean; constructions?: boolean; monochrome?: boolean; noGeometryMap?: boolean; backgroundMap?: boolean; hLineMaterialColors?: boolean; forceSurfaceDiscard?: boolean; whiteOnWhiteReversal?: boolean; edgeMask?: number; renderMode?: RenderMode; thematicDisplay?: boolean; } /** Overrides a subset of [[ViewFlags]]. * @public */ export declare class ViewFlagOverrides { private _present; private readonly _values; /** Returns true if the specified flag is overridden. */ isPresent(flag: ViewFlagPresence): boolean; /** Mark the specified flag as overridden. */ setPresent(flag: ViewFlagPresence): void; /** Mark the specified flag as not overridden. */ clearPresent(flag: ViewFlagPresence): void; /** Construct a ViewFlagOverrides which overrides all flags to match the specified ViewFlags, or overrides nothing if no ViewFlags are supplied. */ constructor(flags?: ViewFlags); /** Marks all view flags as overridden. * @param flags If supplied, these overrides will match the input view flags; otherwise, they will match the default view flags. */ overrideAll(flags?: ViewFlags): void; /** Create a copy of these overrides. * @param out If supplied, the input overrides will be modified to match these overrides; otherwise, a new ViewFlagOverrides object will be created as the clone. * @returns A copy of these overrides. */ clone(out?: ViewFlagOverrides): ViewFlagOverrides; /** Modify these overrides to match the input overrides. */ copyFrom(other: ViewFlagOverrides): void; setShowDimensions(val: boolean): void; setShowPatterns(val: boolean): void; setShowWeights(val: boolean): void; setShowStyles(val: boolean): void; setShowTransparency(val: boolean): void; setShowFill(val: boolean): void; setShowTextures(val: boolean): void; setShowMaterials(val: boolean): void; setApplyLighting(val: boolean): void; setShowVisibleEdges(val: boolean): void; setShowHiddenEdges(val: boolean): void; setShowShadows(val: boolean): void; setShowClipVolume(val: boolean): void; setShowConstructions(val: boolean): void; setMonochrome(val: boolean): void; setIgnoreGeometryMap(val: boolean): void; setShowBackgroundMap(val: boolean): void; setUseHlineMaterialColors(val: boolean): void; setForceSurfaceDiscard(val: boolean): void; setWhiteOnWhiteReversal(val: boolean): void; setEdgeMask(val: number): void; setRenderMode(val: RenderMode): void; setThematicDisplay(val: boolean): void; /** Return whether these overrides applied to the specified ViewFlags require edges to be drawn. */ edgesRequired(viewFlags: ViewFlags): boolean; /** Returns true if any view flags are overridden. */ anyOverridden(): boolean; /** Marks all view flags as not overridden. */ clear(): void; clearClipVolume(): void; /** If ViewFlags.clipVolume is overridden, return the override value; else return undefined. * @internal */ get clipVolumeOverride(): boolean | undefined; /** Apply these overrides to the supplied ViewFlags. The values of any flags that are overridden will be replaced by the override values; the rest of the flags are untouched. */ apply(base: ViewFlags): ViewFlags; toJSON(): ViewFlagOverridesProps; static fromJSON(props?: ViewFlagOverridesProps): ViewFlagOverrides; private applyFlags; } //# sourceMappingURL=ViewFlags.d.ts.map