/** @packageDocumentation * @module NavigationAids */ import "./CubeNavigationAid.scss"; import * as React from "react"; import { Matrix3d, Vector3d } from "@itwin/core-geometry"; import type { IModelConnection, Viewport } from "@itwin/core-frontend"; import type { CommonProps } from "@itwin/core-react"; import { Face } from "./Cube.js"; /** @public */ export declare enum CubeNavigationHitBoxX { None = 0, Right = 1, Left = -1 } /** @public */ export declare enum CubeNavigationHitBoxY { None = 0, Back = 1, Front = -1 } /** @public */ export declare enum CubeNavigationHitBoxZ { None = 0, Top = 1, Bottom = -1 } /** @internal */ export declare enum CubeHover { None = 0, Hover = 1, Active = 2 } /** Properties for the [[CubeNavigationAid]] component * @public */ export interface CubeNavigationAidProps extends CommonProps { iModelConnection: IModelConnection; viewport?: Viewport; /** @internal */ onAnimationEnd?: () => void; /** @internal */ animationTime?: number; favorHeadsUpRotation?: boolean; } /** @public */ interface CubeNavigationAidState { dragging: boolean; startRotMatrix: Matrix3d; endRotMatrix: Matrix3d; animation: number; hoverMap: { [key: string]: CubeHover; }; face: Face; } /** Cube Navigation Aid Component * @public */ export declare class CubeNavigationAid extends React.Component { private _start; readonly state: Readonly; private _lastTime; private _animationFrame; private _mounted; private _labels; componentDidMount(): void; componentWillUnmount(): void; private _handleViewRotationChangeEvent; private _animation; private _animationEnd; private static _animationFn; private static _isMatrixFace; render(): React.ReactNode; private _handleCellHoverChange; private _isInteractionLocked; private static _getMatrixFace; private static _interpolateRotMatrix; private static correctSmallNumber; /** * Snap coordinates of a vector to zero and to each other so that the vector prefers to be * * perpendicular to a face of the unit cube. * * or pass through a nearby vertex or edge of the unit cube. * @param zVector existing z vector. * @param tolerance tolerance to determine if a z vector component is close to zero or 1. */ private static snapVectorToCubeFeatures; /** * Adjust a worldToView matrix to favor both * * direct view at faces, edges, and corners of a view cube. * * heads up * @param worldToView candidate matrix * @param tolerance tolerance for cleaning up fuzz. The default (1.0e-6) is appropriate if very dirty viewing operations are expected. * @param result optional result. */ private static snapWorldToViewMatrixToCubeFeatures; private getArrowRotationAndFace; private _onArrowClick; private getArrowTitle; private _lastClientXY; private _processDrag; private _handleBoxMouseDown; private _onMouseMove; private _onMouseUp; private _handleBoxTouchStart; private _onTouchMove; private _onTouchEnd; private _handleFaceCellClick; private _animateRotation; private _setRotation; } /** @internal */ export interface NavCubeFaceProps extends React.AllHTMLAttributes { face: Face; label: string; hoverMap: { [key: string]: CubeHover; }; onFaceCellClick: (vector: Vector3d, face: Face) => void; onFaceCellHoverChange: (vector: Vector3d, state: CubeHover) => void; } /** @internal */ export declare class NavCubeFace extends React.Component { private includeCell; render(): React.ReactNode; static faceCellToPos: (face: Face, x: number, y: number) => Vector3d; } /** @internal */ export interface FaceCellProps extends React.AllHTMLAttributes { center?: boolean; onFaceCellClick?: (vector: Vector3d, face: Face) => void; onFaceCellHoverChange?: (vector: Vector3d, state: CubeHover) => void; hoverMap?: { [key: string]: CubeHover; }; vector: Vector3d; face: Face; } /** @internal */ export declare class FaceCell extends React.Component { private _startMouse; render(): React.ReactNode; private _handleMouseOver; private _handleMouseOut; private _handleMouseDown; private _handleMouseUp; private _handleTouchStart; private _handleTouchEnd; private handlePointerDown; private handlePointerUp; } export {}; //# sourceMappingURL=CubeNavigationAid.d.ts.map