UNPKG

@itwin/core-frontend

Version:
113 lines 4.24 kB
/** @packageDocumentation * @module Views */ import { Matrix3d, Point2d, Point3d, XAndY, XYAndZ } from "@itwin/core-geometry"; import { AuxCoordSystem2dProps, AuxCoordSystem3dProps, AuxCoordSystemProps } from "@itwin/core-common"; import { ElementState } from "./EntityState"; import { IModelConnection } from "./IModelConnection"; import { DecorateContext } from "./ViewContext"; import { Viewport } from "./Viewport"; import { ViewState } from "./ViewState"; /** * @public * @extensions */ export declare enum ACSType { None = 0, Rectangular = 1, Cylindrical = 2, Spherical = 3 } /** * @public * @extensions */ export declare enum ACSDisplayOptions { None = 0,// used for testing individual bits. Active = 1, Deemphasized = 2, Hilite = 4, CheckVisible = 8, Dynamics = 16 } /** The state of an AuxCoordSystem element in the frontend * @public * @extensions */ export declare abstract class AuxCoordSystemState extends ElementState implements AuxCoordSystemProps { static get className(): string; type: number; description?: string; static fromProps(props: AuxCoordSystemProps, iModel: IModelConnection): AuxCoordSystemState; /** Create a new AuxCoordSystemState. * @param acsName the name for the new AuxCoordSystem * @param iModel the iModel for which the ACS applies. * @note call this method with the appropriate subclass (e.g. AuxCoordSystemSpatialState, AuxCoordSystem2dState, etc), not on AuxCoordSystemState directly */ static createNew(acsName: string, iModel: IModelConnection): AuxCoordSystemState; constructor(props: AuxCoordSystemProps, iModel: IModelConnection); toJSON(): AuxCoordSystemProps; isValidForView(view: ViewState): boolean; abstract getOrigin(result?: Point3d): Point3d; abstract setOrigin(val: XYAndZ | XAndY): void; /** get a *copy of* the rotation matrix for this ACS. */ abstract getRotation(result?: Matrix3d): Matrix3d; abstract setRotation(val: Matrix3d): void; get is3d(): boolean; drawGrid(context: DecorateContext): void; /** Returns the value, clamped to the supplied range. */ private static limitRange; /** * Given an origin point, returns whether the point falls within the view or not. If adjustOrigin is set to true, a point outside * the view will be modified to fall within the appropriate range. */ static isOriginInView(drawOrigin: Point3d, viewport: Viewport, adjustOrigin: boolean): boolean; private getAdjustedColor; private addAxisLabel; private addAxis; /** Returns a GraphicBuilder for this AuxCoordSystemState. */ private createGraphicBuilder; display(context: DecorateContext, options: ACSDisplayOptions): void; } /** The state of an AuxCoordSystem2d element in the frontend * @public * @extensions */ export declare class AuxCoordSystem2dState extends AuxCoordSystemState implements AuxCoordSystem2dProps { static get className(): string; readonly origin: Point2d; angle: number; private readonly _rMatrix; constructor(props: AuxCoordSystem2dProps, iModel: IModelConnection); toJSON(): AuxCoordSystem2dProps; getOrigin(result?: Point3d): Point3d; setOrigin(val: XYAndZ | XAndY): void; getRotation(result?: Matrix3d): Matrix3d; setRotation(val: Matrix3d): void; } /** The state of an AuxCoordSystem3d element in the frontend * @public * @extensions */ export declare class AuxCoordSystem3dState extends AuxCoordSystemState implements AuxCoordSystem3dProps { static get className(): string; readonly origin: Point3d; yaw: number; pitch: number; roll: number; private readonly _rMatrix; constructor(props: AuxCoordSystem3dProps, iModel: IModelConnection); toJSON(): AuxCoordSystem3dProps; getOrigin(result?: Point3d): Point3d; setOrigin(val: XYAndZ | XAndY): void; getRotation(result?: Matrix3d): Matrix3d; setRotation(rMatrix: Matrix3d): void; } /** The state of an AuxCoordSystemSpatial element in the frontend * @public * @extensions */ export declare class AuxCoordSystemSpatialState extends AuxCoordSystem3dState { static get className(): string; } //# sourceMappingURL=AuxCoordSys.d.ts.map