@itwin/frontend-devtools
Version:
Debug menu and supporting UI widgets
58 lines • 2.51 kB
TypeScript
import { DecorateContext, Decorator, Tool, Viewport } from "@itwin/core-frontend";
interface FrustumDecorationOptions {
showPreloadFrustum?: boolean;
showBackgroundIntersections?: boolean;
}
/**
* Decorates the viewport with a graphical depiction of a Frustum.
* This is obviously only useful when drawn inside a viewport using a *different* Frustum.
* Options for doing so include:
* - Having more than one viewport, and drawing the frustum of one viewport inside the other viewports; and
* - Allowing the user to take a snapshot of the current frustum, then navigate the view to inspect it within the same viewport.
* @beta
*/
export declare class FrustumDecorator implements Decorator {
private readonly _decoration?;
private constructor();
/** This will allow the render system to cache and reuse the decorations created by this decorator's decorate() method. */
readonly useCachedDecorations = true;
decorate(context: DecorateContext): void;
private static _instance?;
/** Add the decoration to the specified viewport. */
static enable(vp: Viewport, options?: FrustumDecorationOptions): void;
/** Remove the decoration from the specified viewport. */
static disable(): void;
static get isEnabled(): boolean;
}
/** Enable ("ON"), disable ("OFF"), or toggle ("TOGGLE" or omitted) the [[FrustumDecorator]].
* @beta
*/
export declare class ToggleFrustumSnapshotTool extends Tool {
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
run(enable?: boolean, showPreloadFrustum?: boolean, showBackgroundIntersections?: boolean): Promise<boolean>;
parseAndRun(...args: string[]): Promise<boolean>;
}
/** Enable ("ON"), disable ("OFF"), or toggle ("TOGGLE" or omitted) the selected view frustum decoration.
* @beta
*/
export declare class ToggleSelectedViewFrustumTool extends Tool {
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
run(enable?: boolean): Promise<boolean>;
parseAndRun(...args: string[]): Promise<boolean>;
}
/** Toggle visualization of the selected viewport's shadow frustum in all other viewports.
* @beta
*/
export declare class ToggleShadowFrustumTool extends Tool {
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
run(enable?: boolean): Promise<boolean>;
parseAndRun(...args: string[]): Promise<boolean>;
}
export {};
//# sourceMappingURL=FrustumDecoration.d.ts.map