UNPKG

@itwin/measure-tools-react

Version:
71 lines 3.4 kB
import type { Id64String } from "@itwin/core-bentley"; import type { XYZProps } from "@itwin/core-geometry"; import { Point3d } from "@itwin/core-geometry"; import type { GeometryStreamProps } from "@itwin/core-common"; import type { DecorateContext } from "@itwin/core-frontend"; import type { MeasurementEqualityOptions, MeasurementWidgetData } from "../api/Measurement.js"; import { Measurement, MeasurementPickContext, MeasurementSerializer } from "../api/Measurement.js"; import type { MeasurementProps } from "../api/MeasurementProps.js"; export interface AngleMeasurementProps extends MeasurementProps { startPoint?: XYZProps; center?: XYZProps; endPoint?: XYZProps; } export declare class AngleMeasurementSerializer extends MeasurementSerializer { static readonly angleMeasurementName = "angleMeasurement"; get measurementName(): string; isValidType(measurement: Measurement): boolean; protected parseSingle(data: MeasurementProps): Measurement | undefined; } export declare class AngleMeasurement extends Measurement { static readonly serializer: MeasurementSerializer | undefined; private _startPoint; private _center; private _endPoint; private _textMarker?; private _isDynamic; get isDynamic(): boolean; set isDynamic(v: boolean); constructor(props?: AngleMeasurementProps); get startPointRef(): Point3d | undefined; get centerRef(): Point3d | undefined; get endPointRef(): Point3d | undefined; get angle(): number | undefined; readFromJSON(props: AngleMeasurementProps): void; /** * Serializes properties to a JSON object. * @param json JSON object to append data to. */ protected writeToJSON(json: MeasurementProps): void; /** * Tests equality with another measurement. * @param other Measurement to test equality for. * @param opts Options for equality testing. * @returns true if the other measurement is equal, false if some property is not the same or if the measurement is not of the same type. */ equals(other: Measurement, opts?: MeasurementEqualityOptions): boolean; /** * Copies data from the other measurement into this instance. * @param other Measurement to copy property values from. */ protected copyFrom(other: Measurement): void; setStartPoint(point: Point3d): void; setCenter(point: Point3d): void; setEndPoint(point: Point3d): void; testDecorationHit(pickContext: MeasurementPickContext): boolean; getDecorationToolTip(_pickContext: MeasurementPickContext): Promise<HTMLElement | string>; getDecorationGeometry(_pickContext: MeasurementPickContext): GeometryStreamProps | undefined; private _getSnapId; protected onTransientIdChanged(_prevId: Id64String): void; private _createDecorationArc; decorate(context: DecorateContext): void; protected getDataForMeasurementWidgetInternal(): Promise<MeasurementWidgetData>; private createTextMarker; private updateMarkerStyle; protected onStyleChanged(_isLock: boolean, _prevStyle: string): void; protected onLockToggled(): void; private _handleTextMarkerButtonEvent; static fromJSON(data: AngleMeasurementProps): AngleMeasurement; static create(startPoint: Point3d, center?: Point3d, endPoint?: Point3d, viewType?: string): AngleMeasurement; } //# sourceMappingURL=AngleMeasurement.d.ts.map