@itwin/core-frontend
Version:
iTwin.js frontend components
689 lines • 29.1 kB
TypeScript
/** @packageDocumentation
* @module AccuDraw
*/
import { BentleyStatus } from "@itwin/core-bentley";
import { Matrix3d, Point3d, Ray3d, Transform, Vector3d } from "@itwin/core-geometry";
import { ColorDef, GeometryStreamProps } from "@itwin/core-common";
import { AuxCoordSystemState } from "./AuxCoordSys";
import { HitDetail, SnapDetail } from "./HitDetail";
import { StandardViewId } from "./StandardView";
import { BeButtonEvent } from "./tools/Tool";
import { DecorateContext } from "./ViewContext";
import { ScreenViewport, Viewport } from "./Viewport";
import { FormatterSpec, ParserSpec } from "@itwin/core-quantity";
/** @internal */
export declare enum AccuDrawFlags {
None = 0,
SetModePolar = 1,
SetModeRect = 2,
SetOrigin = 4,
FixedOrigin = 8,
SetRMatrix = 16,
SetXAxis = 32,
SetNormal = 64,
SetDistance = 128,
LockDistance = 256,
Lock_X = 512,
Lock_Y = 1024,
Lock_Z = 2048,
Disable = 4096,
OrientDefault = 16384,
SetFocus = 32768,
OrientACS = 131072,
SetXAxis2 = 262144,
LockAngle = 524288,
AlwaysSetOrigin = 2097156,
RedrawCompass = 4194304,
UpdateRotation = 8388608,
SmartRotation = 16777216
}
/** AccuDraw coordinate input mode
* @public
*/
export declare enum CompassMode {
/** Coordinate input using distance and angle */
Polar = 0,
/** Coordinate input using x, y, and z deltas */
Rectangular = 1
}
/** AccuDraw compass base rotation
* @public
*/
export declare enum RotationMode {
/** Aligned with standard view top or ACS top when [[ToolAdmin.acsContextLock]] is enabled */
Top = 1,
/** Aligned with standard view front or ACS front when [[ToolAdmin.acsContextLock]] is enabled */
Front = 2,
/** Aligned with standard view right or ACS right when [[ToolAdmin.acsContextLock]] is enabled */
Side = 3,
/** Aligned with view */
View = 4,
/** Aligned with view ACS */
ACS = 5,
/** Not aligned with a standard rotation or ACS */
Context = 6
}
/** @internal */
export declare enum LockedStates {
NONE_LOCKED = 0,
X_BM = 1,
Y_BM = 2,
VEC_BM = 4,
DIST_BM = 8,
XY_BM = 3,
ANGLE_BM = 7
}
/** AccuDraw enabled states
* @public
*/
export declare enum CurrentState {
/** Compass disabled/unwanted for this session */
NotEnabled = 0,
/** Compass deactivated but CAN be activated by user */
Deactivated = 1,
/** Compass not displayed awaiting automatic activation (default tool state) */
Inactive = 2,
/** Compass displayed and adjusting points */
Active = 3
}
/** @internal */
export declare enum ContextMode {
Locked = 0,
XAxis = 1,
YAxis = 2,
ZAxis = 3,
XAxis2 = 4,
None = 15
}
/** AccuDraw coordinate input fields
* @public
*/
export declare enum ItemField {
/** Distance for polar mode */
DIST_Item = 0,
/** Angle for polar mode */
ANGLE_Item = 1,
/** X delta for rectangular mode */
X_Item = 2,
/** Y delta for rectangular mode */
Y_Item = 3,
/** Z delta (3d only) */
Z_Item = 4
}
/** @internal */
export declare enum KeyinStatus {
Dynamic = 0,
Partial = 1
}
/** @internal */
export declare class AccudrawData {
flags: number;
readonly origin: Point3d;
readonly delta: Point3d;
readonly rMatrix: Matrix3d;
readonly vector: Vector3d;
distance: number;
angle: number;
zero(): void;
}
/** @internal */
export declare class Flags {
redrawCompass: boolean;
dialogNeedsUpdate: boolean;
rotationNeedsUpdate: boolean;
lockedRotation: boolean;
indexLocked: boolean;
haveValidOrigin: boolean;
fixedOrg: boolean;
auxRotationPlane: RotationMode;
contextRotMode: number;
baseRotation: RotationMode;
baseMode: number;
pointIsOnPlane: boolean;
softAngleLock: boolean;
bearingFixToPlane2D: boolean;
inDataPoint: boolean;
ignoreDataButton: boolean;
animateRotation: boolean;
}
/** AccuDraw value round off settings. Allows dynamic distance and angle values to be rounded to the nearest increment of the specified units value(s).
* @public
*/
export declare class RoundOff {
/** Whether rounding is to be applied to the corresponding dynamic distance or angle value.
* @note To be considered active, units must also specify at least one increment value.
*/
active: boolean;
/** Round off increment value(s), meters for distance round off, and radians for angle round off.
* @note When multiple values are specified, rounding is based on smallest discernable value at current view zoom.
*/
units: Set<number>;
}
/** @internal */
export declare class SavedState {
state: CurrentState;
mode: CompassMode;
rotationMode: RotationMode;
readonly axes: ThreeAxes;
readonly origin: Point3d;
auxRotationPlane: number;
contextRotMode: number;
fixedOrg: boolean;
ignoreDataButton: boolean;
ignoreFlags: AccuDrawFlags;
}
/** @internal */
export declare class ThreeAxes {
readonly x: Vector3d;
readonly y: Vector3d;
readonly z: Vector3d;
setFrom(other: ThreeAxes): void;
fromMatrix3d(rMatrix: Matrix3d): void;
static createFromMatrix3d(rMatrix: Matrix3d, result?: ThreeAxes): ThreeAxes;
toMatrix3d(out?: Matrix3d): Matrix3d;
clone(): ThreeAxes;
equals(other: ThreeAxes): boolean;
}
/** Accudraw is an aide for entering coordinate data.
* This class is public to allow applications to provide a user interface for AccuDraw, either by implementing their own, or
* using the one supplied by the itwin appui package.
* @note When writing an [[InteractiveTool]] it is not correct to call methods on AccuDraw directly, tools should instead
* provide hints to AccuDraw using [[AccuDrawHintBuilder]].
* @public
*/
export declare class AccuDraw {
private _currentState;
/** Current AccuDraw state */
get currentState(): CurrentState;
set currentState(state: CurrentState);
/** The current compass mode */
compassMode: CompassMode;
/** The current compass rotation */
rotationMode: RotationMode;
/** @internal */
currentView?: ScreenViewport;
/** @internal */
readonly published: AccudrawData;
/** @internal */
readonly origin: Point3d;
/** @internal */
readonly axes: ThreeAxes;
/** @internal */
readonly delta: Vector3d;
private _distance;
private _angle;
/** @internal */
locked: LockedStates;
/** @internal */
indexed: LockedStates;
private readonly _distanceRoundOff;
private readonly _angleRoundOff;
/** @internal */
readonly flags: Flags;
private readonly _fieldLocked;
private readonly _keyinStatus;
/** @internal */
readonly savedStateViewTool: SavedState;
/** @internal */
readonly savedStateInputCollector: SavedState;
private readonly _savedDistances;
private readonly _savedAngles;
private _savedDistanceIndex;
private _savedAngleIndex;
/** @internal */
readonly baseAxes: ThreeAxes;
/** @internal */
readonly lastAxes: ThreeAxes;
private _lastDistance;
private _tolerance;
private _percentChanged;
private _threshold;
private _lastSnapDetail?;
/** @internal */
readonly planePt: Point3d;
private readonly _rawDelta;
private readonly _rawPoint;
private readonly _rawPointOnPlane;
/** @internal */
readonly point: Point3d;
/** @internal */
readonly vector: Vector3d;
private _xIsNegative;
private _yIsNegative;
private _xIsExplicit;
private _yIsExplicit;
/** Disable automatic focus change when user is entering input. */
dontMoveFocus: boolean;
/** Set input field to move focus to (X_Item or Y_Item) for automatic focus change. */
newFocus: ItemField;
private readonly _rMatrix;
/** @internal */
protected _acsPickId?: string;
/** @internal */
protected _compassSizeInches: number;
/** @internal */
protected _animationFrames: number;
/** @internal */
protected _indexToleranceInches: number;
/** @internal */
protected readonly _frameColor: ColorDef;
/** @internal */
protected readonly _fillColor: ColorDef;
/** @internal */
protected readonly _xColor: ColorDef;
/** @internal */
protected readonly _yColor: ColorDef;
/** @internal */
protected readonly _indexColor: ColorDef;
/** @internal */
protected readonly _frameColorNoFocus: ColorDef;
/** @internal */
protected readonly _fillColorNoFocus: ColorDef;
/** When true improve behavior for +/- input when cursor switches side and try to automatically manage focus */
smartKeyin: boolean;
/** When true the compass follows the origin hint as opposed to remaining at a fixed location */
floatingOrigin: boolean;
/** When true the z input field will remain locked with it's current value after a data button */
stickyZLock: boolean;
/** When true the compass is always active and on screen instead of following the current tools request to activate */
alwaysShowCompass: boolean;
/** When true all tool hints are applied as opposed to only selected hints */
contextSensitive: boolean;
/** When true the current point is adjusted to the x and y axes when within a close tolerance */
axisIndexing: boolean;
/** When true the current point is adjusted to the last locked distance value when within a close tolerance */
distanceIndexing: boolean;
/** When true locking the angle also moves focus to the angle input field */
autoFocusFields: boolean;
/** When true fully specifying a point by entering both distance and angle in polar mode or XY[Z] in rectangular mode, the point is automatically accepted */
autoPointPlacement: boolean;
/** When true and axisIndexing is allowed the current point is adjusted to the tangent or binormal vector from the last snap when within a close tolerance
* @beta
*/
snapIndexing: boolean;
/** Get distance round off settings */
get distanceRoundOff(): RoundOff;
/** Get angle round off settings */
get angleRoundOff(): RoundOff;
private static _tempRot;
/** @internal */
onInitialized(): void;
/** @internal */
getRotation(rMatrix?: Matrix3d): Matrix3d;
/** When true AccuDraw is enabled by the application and can be used by interactive tools */
get isEnabled(): boolean;
/** When true the compass is displayed and adjusting input points for the current interactive tool */
get isActive(): boolean;
/** When true the compass is not displayed or adjusting points, but it can be automatically activated by the current interactive tool or via shortcuts */
get isInactive(): boolean;
/** When true the compass is not displayed or adjusting points, the current interactive tool has disabled automatic activation, but can still be enabled via shortcuts */
get isDeactivated(): boolean;
/** Get the current lock state for the supplied input field */
getFieldLock(index: ItemField): boolean;
/** @internal */
getKeyinStatus(index: ItemField): KeyinStatus;
/** Get the current keyin status for the supplied input field */
isDynamicKeyinStatus(index: ItemField): boolean;
/** Get whether AccuDraw currently has input focus */
get hasInputFocus(): boolean;
/** Called to request input focus be set to AccuDraw. Focus is managed by AccuDraw UI. */
grabInputFocus(): void;
/** Get default focus item for the current compass mode */
defaultFocusItem(): ItemField;
/** @internal */
activate(): void;
/** @internal */
deactivate(): void;
/** Whether to show Z input field in 3d. Sub-classes can override to restrict AccuDraw to 2d input when working in overlays where
* depth is not important.
* @note Intended to be used in conjunction with ViewState.allow3dManipulations returning false to also disable 3d rotation and
* ToolAdmin.acsPlaneSnapLock set to true for projecting snapped points to the view's ACS plane.
* @see [[ViewState.allow3dManipulations]][[ToolAdmin.acsPlaneSnapLock]]
*/
is3dCompass(viewport: Viewport): boolean;
/** Change current compass input mode to either polar or rectangular */
setCompassMode(mode: CompassMode): void;
/** Change current compass orientation */
setRotationMode(mode: RotationMode): void;
/** Change the lock status for the supplied input field */
setFieldLock(index: ItemField, locked: boolean): void;
/** @internal */
setKeyinStatus(index: ItemField, status: KeyinStatus): void;
private needsRefresh;
private updateLastSnapDetail;
/** @internal */
adjustPoint(pointActive: Point3d, vp: ScreenViewport, fromSnap: boolean): boolean;
private setDefaultOrigin;
/** @internal */
isZLocked(vp: Viewport): boolean;
/** @internal */
accountForAuxRotationPlane(rot: ThreeAxes, plane: RotationMode): void;
private accountForACSContextLock;
private static useACSContextRotation;
/** Gets X, Y or Z vector from top, front, (right) side, ACS, or View. */
private getStandardVector;
private getBestViewedRotationFromXVector;
private getRotationFromVector;
/** @internal */
updateRotation(animate?: boolean, newRotationIn?: Matrix3d): void;
/**
* Enable AccuDraw so that it can be used by interactive tools.
* This method is public to allow applications to provide a user interface to enable/disable AccuDraw.
* @note Should not be called by interactive tools, those should use [[AccuDrawHintBuilder]]. AccuDraw is enabled for applications by default.
* @see [[disableForSession]]
*/
enableForSession(): void;
/**
* Disable AccuDraw so that it can not be used by interactive tools.
* This method is public to allow applications to provide a user interface to enable/disable AccuDraw.
* @note Should not be called by interactive tools, those should use [[AccuDrawHintBuilder]]. AccuDraw is enabled for applications by default.
* @see [[enableForSession]]
*/
disableForSession(): void;
/** @internal */
setLastPoint(pt: Point3d): void;
/** Emulate a mouse click at the specified location in the supplied view by sending button down/up events. */
sendDataPoint(pt: Point3d, viewport: ScreenViewport): Promise<void>;
/** @internal */
clearTentative(): boolean;
/** @internal */
doAutoPoint(index: ItemField, mode: CompassMode): Promise<void>;
/** Get the current value for the supplied input field */
getValueByIndex(index: ItemField): number;
/** Set the current value for the supplied input field */
setValueByIndex(index: ItemField, value: number): void;
private updateVector;
/** Allow the AccuDraw user interface to supply the distance parser */
getLengthParser(): ParserSpec | undefined;
/** Allow the AccuDraw user interface to supply the distance parser */
getLengthFormatter(): FormatterSpec | undefined;
private stringToDistance;
private stringFromDistance;
/** Allow the AccuDraw user interface to specify bearing */
get isBearingMode(): boolean;
/** Allow the AccuDraw user interface to specify bearing directions are always in xy plane */
get bearingFixedToPlane2d(): boolean;
set bearingFixedToPlane2d(enable: boolean);
/** Allow the AccuDraw user interface to supply the angle/direction parser */
getAngleParser(): ParserSpec | undefined;
/** Allow the AccuDraw user interface to supply the angle/direction formatter */
getAngleFormatter(): FormatterSpec | undefined;
private stringToAngle;
private stringFromAngle;
/** Can be called by sub-classes to get a formatted value to display for an AccuDraw input field
* @see [[onFieldValueChange]]
*/
getFormattedValueByIndex(index: ItemField): string;
private updateFieldValue;
/** @internal */
unlockAllFields(): void;
/** produces the normal vector of the closest plane to the view which
* contains inVec (uses true view rotation, never auxiliary)
*/
private planeByVectorAndView;
private _acosWithLimitCheck;
private handleDegeneratePolarCase;
private rawDeltaIsValid;
/** Call from an AccuDraw UI event to check if key is valid for updating the input field value. */
protected itemFieldInputIsValid(key: string, item: ItemField): boolean;
/** Call from an AccuDraw UI event to sync the supplied input field value */
processFieldInput(index: ItemField, input: string, synchText: boolean): Promise<void>;
private _lockFieldInternal;
private _unlockFieldInternal;
/** @internal */
updateFieldLock(index: ItemField, locked: boolean): void;
/** @internal */
static getSnapRotation(snap: SnapDetail, currentVp: Viewport | undefined, out?: Matrix3d): Matrix3d | undefined;
/** @internal */
static getStandardRotation(nStandard: StandardViewId, vp: Viewport | undefined, useACS: boolean, out?: Matrix3d): Matrix3d;
/** @internal */
static getCurrentOrientation(vp: Viewport, checkAccuDraw: boolean, checkACS: boolean, rMatrix?: Matrix3d): Matrix3d | undefined;
/** @internal */
static updateAuxCoordinateSystem(acs: AuxCoordSystemState, vp: Viewport, allViews?: boolean): void;
/** @internal */
distanceLock(synchText: boolean, saveInHistory: boolean): void;
/** @internal */
angleLock(): void;
/** @internal */
doLockAngle(isSnapped: boolean): void;
private saveAngle;
private saveDistance;
/** @internal */
saveCoordinate(index: ItemField, value: number): void;
private getSavedAngle;
private getSavedDistance;
/** @internal */
getSavedValue(index: ItemField, next: boolean): void;
/** @internal */
clearSavedValues(): void;
/** @internal */
changeCompassMode(animate?: boolean): void;
/** @internal */
changeBaseRotationMode(mode: RotationMode): void;
private getBaseRotation;
/** @internal */
setContextRotation(rMatrix: Matrix3d, locked: boolean, animate: boolean): void;
private clearContext;
/** @internal */
setContext(flags: AccuDrawFlags, originP?: Point3d, orientationP?: Matrix3d | Vector3d, deltaP?: Vector3d, distanceP?: number, angleP?: number, transP?: Transform): BentleyStatus;
private onEventCommon;
/** @internal */
onPrimitiveToolInstall(): boolean;
/** @internal */
onViewToolInstall(): boolean;
/** @internal */
onViewToolExit(): boolean;
/** @internal */
onInputCollectorInstall(): boolean;
/** @internal */
onInputCollectorExit(): boolean;
/** @internal */
saveState(stateBuffer: SavedState): void;
/** @internal */
restoreState(stateBuffer: SavedState): void;
private getCompassPlanePoint;
private getDisplayTransform;
private setIndexingTolerance;
private displayAlignments;
/** @internal */
testDecorationHit(id: string): boolean;
/** @internal */
getDecorationGeometry(hit: HitDetail): GeometryStreamProps | undefined;
/** @internal */
decorate(context: DecorateContext): void;
private checkRotation;
private saveLockedCoords;
/** Called after compass state is changed between the active state and one of the disabled states */
onCompassDisplayChange(_state: "show" | "hide"): void;
/** Called after compass mode is changed between polar and rectangular */
onCompassModeChange(): void;
/** Called after compass rotation is changed */
onRotationModeChange(): void;
/** Called after input field locked state is changed */
onFieldLockChange(_index: ItemField): void;
/** Called after input field value changes */
onFieldValueChange(_index: ItemField): void;
/** Called after input field keyin status changes */
onFieldKeyinStatusChange(_index: ItemField): void;
/** Called to request focus change to the specified input field */
setFocusItem(_index: ItemField): void;
/** Called to get the item field that currently has input focus */
getFocusItem(): ItemField | undefined;
private static getMinPolarMag;
/** projects cursor onto plane in view, or returns an error */
private constructionPlane;
/** @internal */
softConstructionPlane(outPtP: Point3d, inPtP: Point3d, pointOnPlaneP: Point3d, normalVectorP: Vector3d, vp: Viewport, isSnap: boolean): boolean;
/** @internal */
hardConstructionPlane(outPtP: Point3d, inPtP: Point3d, pointOnPlaneP: Point3d, normalVectorP: Vector3d, vp: Viewport, isSnap: boolean): boolean;
private static allowAxisIndexing;
private applyDistanceRoundOff;
private applyAngleRoundOff;
/** @internal */
fixPointPolar(vp: Viewport): void;
/** @internal */
fixPointRectangular(vp: Viewport): void;
private fixPointLastSnapDetail;
private fixPoint;
/** @internal */
refreshDecorationsAndDynamics(): void;
/** @internal */
upgradeToActiveState(): boolean;
/** @internal */
downgradeInactiveState(): boolean;
/** @internal */
onBeginDynamics(): boolean;
/** @internal */
onEndDynamics(): boolean;
/** Can be called by sub-classes as the default implementation of onMotion.
* @see [[onMotion]]
* @note Input fields are expected to call [[AccuDrawShortcuts.itemFieldNewInput]] when the user enters a value that is not a shortcut
* and call [[AccuDrawShortcuts.itemFieldCompletedInput]] when a value is accepted, such as when focusing out of the field. This is
* required for processMotion to correctly handle updating dynamic field values to reflect the current cursor location.
*/
processMotion(): void;
/** Implemented by sub-classes to update ui fields to show current deltas or coordinates when inactive.
* Should also choose active x or y input field in rectangular mode based on cursor position when
* axis isn't locked to support "smart lock".
* @see [[processMotion]]
*/
onMotion(_ev: BeButtonEvent): void;
/** @internal */
onPreButtonEvent(ev: BeButtonEvent): boolean;
/** @internal */
onPostButtonEvent(ev: BeButtonEvent): boolean;
/** @internal */
onTentative(): boolean;
private intersectXYCurve;
private intersectLine;
private intersectCircle;
/** @internal */
onSnap(snap: SnapDetail): boolean;
/** @internal */
onSelectedViewportChanged(previous: ScreenViewport | undefined, current: ScreenViewport | undefined): void;
private doProcessHints;
/** @internal */
processHints(): void;
}
/** Specify the rotation to return from [[AccuDrawHintBuilder.getContextRotation]].
* @public
* @extensions
*/
export declare enum ContextRotationId {
Top = 0,
Front = 1,
Left = 2,
Bottom = 3,
Back = 4,
Right = 5,
View = 6,
Face = 7
}
/** [[AccuDrawHintBuilder]] is an [[InteractiveTool]] helper class that facilitates AccuDraw interaction.
* Accudraw is an aide for entering coordinate data.
* A tool does not directly change the current AccuDraw state; the tool's job is merely
* to supply "hints" to AccuDraw regarding its preferred AccuDraw configuration for the
* current tool state. User settings such as "Context Sensitivity" and "Floating Origin"
* affect how and which hints are applied. Additionally the user can drive AccuDraw
* through keyboard shortcuts.
* @see [Using AccuDraw]($docs/learning/frontend/primitivetools.md#AccuDraw)*
* @public
* @extensions
*/
export declare class AccuDrawHintBuilder {
private _flagOrigin;
private _flagNormal;
private _flagRotation;
private _flagXAxis;
private _flagXAxis2;
private _flagDistance;
private _flagAngle;
private _flagModePolar;
private _flagModeRectangular;
private _origin?;
private _axis?;
private _rMatrix?;
private _distance;
private _angle;
/** Don't automatically set compass origin to point from data button events */
setOriginFixed: boolean;
/** Override "fixed" and "floating" origin settings for [[setOrigin] hint */
setOriginAlways: boolean;
/** Lock current distance value in polar mode */
setLockDistance: boolean;
/** Lock current angle value in polar mode */
setLockAngle: boolean;
/** Lock current x delta value in rectangular mode */
setLockX: boolean;
/** Lock current y delta value in rectangular mode */
setLockY: boolean;
/** Lock current z delta value in 3d views */
setLockZ: boolean;
/** Set the initial compass orientation from the current [[SnapDetail]] when activating */
enableSmartRotation: boolean;
/** Add hint to specify a new compass origin */
setOrigin(origin: Point3d): void;
/** Add hint to fully specify compass orientation from a Matrix3d */
setMatrix(matrix: Matrix3d): boolean;
/** @internal Add hint to fully specify compass orientation from a Matrix3d in row format */
setRotation(rowMatrix: Matrix3d): void;
/** Add hint to change compass orientation by combining the supplied x axis direction with the current base rotation */
setXAxis(xAxis: Vector3d): void;
/** Add hint to change compass orientation by combining the supplied x axis direction with the current base rotation preferring the result most closely aligned to the view */
setXAxis2(xAxis: Vector3d): void;
/** Add hint to change compass orientation by combining the supplied z axis direction with the current base rotation */
setNormal(normal: Vector3d): void;
/** Add hint to change compass to polar mode */
setModePolar(): void;
/** Add hint to change compass to rectangular mode */
setModeRectangular(): void;
/** Set current distance value in polar mode */
setDistance(distance: number): void;
/** Set current angle value in polar mode */
setAngle(angle: number): void;
/** Enable AccuDraw for the current tool without sending any hints */
static activate(): void;
/** Disable AccuDraw for the current tool */
static deactivate(): void;
/** Whether AccuDraw is enabled by the host application this session and can be used */
static get isEnabled(): boolean;
/** Whether AccuDraw compass is currently displayed and points are being adjusted */
static get isActive(): boolean;
/**
* Immediately process pending hints and update tool dynamics using the adjusted point when not called from a button down event.
* @note Provided to help with exceptions cases, such as starting an InputCollector from the active tool's drag event, that are not handled by normal hint processing.
* A typical interactive tool should not call this method and should only be calling sendHints.
* @see [[sendHints]]
*/
static processHintsImmediate(): void;
/**
* Provide hints to AccuDraw using the current builder state.
* @return true if hints were successfully sent.
*/
sendHints(activate?: boolean): boolean;
/** Adjust the location of the last data button. If dynamics are enabled on this event, [[InteractiveTool.onDynamicFrame]] is called with this location. */
setLastPoint(ev: BeButtonEvent): void;
/** Create a [[Ray3d]] whose origin is the supplied space point and direction is into the view */
static getBoresite(spacePt: Point3d, vp: Viewport, checkAccuDraw?: boolean, checkACS?: boolean): Ray3d;
/** Return ray intersection with a plane defined by a point and normal
* @see [[getBoresite]]
*/
static projectPointToPlaneInView(spacePt: Point3d, planePt: Point3d, planeNormal: Vector3d, vp: Viewport, checkAccuDraw?: boolean, checkACS?: boolean): Point3d | undefined;
/** Return ray intersection with a line defined by a point and direction
* @see [[getBoresite]]
*/
static projectPointToLineInView(spacePt: Point3d, linePt: Point3d, lineDirection: Vector3d, vp: Viewport, checkAccuDraw?: boolean, checkACS?: boolean): Point3d | undefined;
/** Return a [[Matrix3d]] representing the current working plane specified by AccuDraw, [[Viewport.auxCoordSystem]], or [[Viewport.rotation]]. */
static getCurrentRotation(vp: Viewport, checkAccuDraw: boolean, checkACS: boolean, matrix?: Matrix3d): Matrix3d | undefined;
/** Return a [[Matrix3d]] from a [[SnapDetail]].
* Uses [[SnapDetail.normal]] and [[SnapDetail.primitive]] when available to create the most well defined rotation for the given snap location.
*/
static getSnapRotation(snap: SnapDetail, matrix?: Matrix3d): Matrix3d | undefined;
/** Return a [[Matrix3d]] corresponding to the supplied [[ContextRotationId]].
* A [[ContextRotationId]] that corresponds to a standard view, "Top", "Front", etc. will return a [[Matrix3d]] that
* is relative to the current [[Viewport.auxCoordSystem]] when ACS context lock is enabled.
* @see [[ToolAdmin.acsContextLock]]
*/
static getContextRotation(id: ContextRotationId, vp: Viewport): Matrix3d | undefined;
}
//# sourceMappingURL=AccuDraw.d.ts.map