ViewManip Class
Base class for tools that manipulate the frustum of a Viewport.
Extends
Extended by
- PanViewTool
- RotateViewTool
- LookViewTool
- ScrollViewTool
- ZoomViewTool
- LookAndMoveTool
- WalkViewTool
- FlyViewTool
Methods
Name | Description | |
---|---|---|
constructor(viewport: ScreenViewport | undefined, handleMask: number, oneShot: boolean, isDraggingRequired: boolean = false): ViewManip | ||
changeViewport(vp?: ScreenViewport): void | ||
decorate(context: DecorateContext): void | ||
enforceZUp(pivotPoint: Point3d): boolean | ||
isPointVisible(testPt: Point3d): boolean | Determine whether the supplied point is visible in this Viewport. | |
lensAngleMatches(angle: Angle, tolerance: number): boolean | ||
onCleanup(): void | ||
onDataButtonDown(ev: BeButtonEvent): Promise<EventHandled> | ||
onDataButtonUp(_ev: BeButtonEvent): Promise<EventHandled> | ||
onKeyTransition(wentDown: boolean, keyEvent: KeyboardEvent): Promise<EventHandled> | ||
onModifierKeyTransition(wentDown: boolean, modifier: BeModifierKeys, event: KeyboardEvent): Promise<EventHandled> | ||
onMouseEndDrag(ev: BeButtonEvent): Promise<EventHandled> | ||
onMouseMotion(ev: BeButtonEvent): Promise<void> | ||
onMouseStartDrag(ev: BeButtonEvent): Promise<EventHandled> | ||
onMouseWheel(inputEv: BeWheelEvent): Promise<EventHandled> | ||
onPostInstall(): void | ||
onReinitialize(): void | ||
onTouchCancel(ev: BeTouchEvent): Promise<void> | ||
onTouchComplete(ev: BeTouchEvent): Promise<void> | ||
onTouchEnd(ev: BeTouchEvent): Promise<void> | ||
onTouchMove(ev: BeTouchEvent): Promise<void> | ||
onTouchMoveStart(ev: BeTouchEvent, startEv: BeTouchEvent): Promise<EventHandled> | ||
onTouchStart(ev: BeTouchEvent): Promise<void> | ||
onTouchTap(ev: BeTouchEvent): Promise<EventHandled> | ||
processFirstPoint(ev: BeButtonEvent): boolean | ||
processPoint(ev: BeButtonEvent, inDynamics: boolean): boolean | ||
provideToolAssistance(mainInstrKey: string, additionalInstr?: ToolAssistanceInstruction[]): void | Beta | |
setCameraLensAngle(lensAngle: Angle, retainEyePoint: boolean): ViewStatus | ||
setTargetCenterWorld(pt: Point3d, lockTarget: boolean, saveTarget: boolean): void | Set the center of rotation for rotate handle. | |
updateTargetCenter(): void | ||
fitView(viewport: ScreenViewport, animateFrustumChange: boolean, marginPercent?: MarginPercent): void Static | ||
getDefaultTargetPointWorld(vp: Viewport): Point3d Static | ||
getFocusPlaneNpc(vp: Viewport): number Static | ||
zoomToAlwaysDrawnExclusive(viewport: ScreenViewport, animateFrustumChange: boolean, marginPercent?: MarginPercent): Promise<boolean> Static |
Inherited methods
Name | Inherited from | Description |
---|---|---|
applyToolSettingPropertyChange(_updatedValue: ToolSettingsPropertySyncItem): boolean | InteractiveTool | Used to receive property changes from UI. |
beginDynamicUpdate(): void | ViewTool | |
beginDynamics(): void | InteractiveTool | Call to initialize dynamics mode. |
changeLocateState(enableLocate: boolean, enableSnap?: false | true, cursor?: string, coordLockOvr?: CoordinateLockOverrides): void | InteractiveTool | Helper method to keep the view cursor, display of locate circle, and coordinate lock overrides consistent with AccuSnap.isLocateEnabled and AccuSnap.isSnapEnabled. |
decorateSuspended(_context: DecorateContext): void | InteractiveTool | Called to allow a suspended tool to display non-element decorations in overlay mode. |
endDynamicUpdate(): void | ViewTool | |
endDynamics(): void | InteractiveTool | Call to terminate dynamics mode. |
exitTool(): void | ViewTool | Do not override. |
filterHit(_hit: HitDetail, _out?: LocateResponse): Promise<LocateFilterStatus> | InteractiveTool | Invoked to allow tools to filter which elements can be located. |
getCurrentButtonEvent(ev: BeButtonEvent): void | InteractiveTool | Fill the supplied button event from the current cursor location. |
getDecorationGeometry(_hit: HitDetail): GeometryStreamProps | undefined | InteractiveTool | Called to allow snapping to pickable decoration geometry. |
getToolTip(_hit: HitDetail): Promise<HTMLElement | string> | InteractiveTool | Invoked before the locate tooltip is displayed to retrieve the information about the located element. |
initLocateElements(enableLocate: boolean = true, enableSnap?: false | true, cursor?: string, coordLockOvr?: CoordinateLockOverrides): void | InteractiveTool | Helper method for tools that need to locate existing elements. |
isCompatibleViewport(_vp: ScreenViewport, _isSelectedViewChange: boolean): boolean | InteractiveTool | |
isValidLocation(_ev: BeButtonEvent, _isButtonEvent: boolean): boolean | InteractiveTool | |
onDynamicFrame(_ev: BeButtonEvent, _context: DynamicsContext): void | InteractiveTool | Called to allow Tool to display dynamic elements. |
onInstall(): boolean | InteractiveTool | Override to execute additional logic when tool is installed. |
onMiddleButtonDown(_ev: BeButtonEvent): Promise<EventHandled> | InteractiveTool | Invoked when the middle mouse button is pressed. |
onMiddleButtonUp(_ev: BeButtonEvent): Promise<EventHandled> | InteractiveTool | Invoked when the middle mouse button is released. |
onResetButtonDown(_ev: BeButtonEvent): Promise<EventHandled> | InteractiveTool | Invoked when the reset button is pressed. |
onResetButtonUp(_ev: BeButtonEvent): Promise<EventHandled> | ViewTool | |
onSelectedViewportChanged(_previous: ScreenViewport | undefined, _current: ScreenViewport | undefined): void | InteractiveTool | Called when active view changes. |
onSuspend(): void | InteractiveTool | Notification of a ViewTool or InputCollector starting and this tool is being suspended. |
onUnsuspend(): void | InteractiveTool | Notification of a ViewTool or InputCollector exiting and this tool is being unsuspended. |
parseAndRun(..._args: string[]): boolean | Tool | Run this instance of a tool using a series of string arguments. |
run(..._args: any[]): boolean | ViewTool | |
supplyToolSettingsProperties(): ToolSettingsPropertyRecord[] | undefined | InteractiveTool | Used to supply list of properties that can be used to generate ToolSettings. |
syncToolSettingsProperties(syncData: ToolSettingsPropertySyncItem[]): void | InteractiveTool | Called by tool to synchronize the UI with property changes made by tool. |
testDecorationHit(_id: string): boolean | InteractiveTool | Called to support operations on pickable decorations, like snapping. |
register(namespace?: I18NNamespace, i18n?: I18N): void Static | Tool | Register this Tool class with the ToolRegistry. |
showPrompt(prompt: string): void Static | ViewTool | |
translate(val: string): any Static | ViewTool |
Properties
Name | Type | Description | |
---|---|---|---|
frustumValid | boolean | ||
handleMask ConstructorProperty | number | ||
inHandleModify | boolean | ||
isDragging | boolean | ||
isDraggingRequired ConstructorProperty | boolean | ||
isZUp Accessor ReadOnly | boolean | ||
nPts | number | ||
oneShot ConstructorProperty | boolean | ||
targetCenterLocked | boolean | ||
targetCenterValid | boolean | ||
targetCenterWorld | Point3d |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
description Accessor ReadOnly | string | Tool | Get the localized description string from this Tool's class |
description Accessor StaticReadOnly | string | Tool | Get the localized description for this Tool class. This returns the value of "tools." + this.toolId + ".description" from its registered Namespace (e.g. "en/MyApp.json"). If that key is not in the localization namespace, Tool.flyover is returned. |
englishKeyin Accessor StaticReadOnly | string | Tool | Get the English keyin string for this Tool class. This returns the value of "tools." + this.toolId + ".keyin" from its registered Namespace (e.g. "en/MyApp.json"). |
flyover Accessor ReadOnly | string | Tool | Get the localized flyover string from this Tool's class |
flyover Accessor StaticReadOnly | string | Tool | Get the localized flyover for this Tool class. This returns the value of "tools." + this.toolId + ".flyover" from its registered Namespace (e.g. "en/MyApp.json"). If that key is not in the localization namespace, Tool.keyin is returned. |
hidden Static | boolean | Tool | If true, this Tool will not appear in the list from ToolRegistry.getToolList. |
i18n Static | I18N | Tool | The internationalization services instance used to translate strings from the namespace. |
iconSpec Accessor ReadOnly | string | Tool | Get the iconSpec from this Tool's class. |
iconSpec Static | string | Tool | The icon for this Tool. |
inDynamicUpdate | boolean | ViewTool | |
isDynamicsStarted Accessor ReadOnly | boolean | InteractiveTool | Call to find out if dynamics are currently active. |
keyin Accessor ReadOnly | string | Tool | Get the localized keyin string from this Tool's class |
keyin Accessor StaticReadOnly | string | Tool | Get the localized keyin string for this Tool class. This returns the value of "tools." + this.toolId + ".keyin" from its registered Namespace (e.g. "en/MyApp.json"). |
maxArgs Accessor StaticReadOnly | number | undefined | Tool | The maximum number of arguments allowed by Tool.parseAndRun, or undefined if there is no maximum. If subclasses override Tool.parseAndRun, they should also override this method to indicate the maximum number of arguments their implementation expects. |
minArgs Accessor StaticReadOnly | number | Tool | The minimum number of arguments allowed by Tool.parseAndRun. If subclasses override Tool.parseAndRun, they should also override this method to indicate the minimum number of arguments their implementation expects. UI controls can use this information to ensure the tool has enough information to execute. |
namespace Static | I18NNamespace | Tool | The I18NNamespace that provides localized strings for this Tool. |
receivedDownEvent | boolean | InteractiveTool | Used to avoid sending tools up events for which they did not receive the down event. |
toolId Accessor ReadOnly | string | Tool | Get the toolId string for this Tool class. This string is used to identify the Tool in the ToolRegistry and is used to localize the keyin, description, etc. from the current locale. |
toolId Static | string | Tool | The unique string that identifies this tool. |
viewport ConstructorProperty | undefined | ScreenViewport | ViewTool |
Defined in
- core/frontend/src/tools/ViewTool.ts Line 281
Last Updated: 13 June, 2024