import { Bounds } from '@itk-viewer/utils/bounding-box.js'; import { ReadonlyVec3, mat4, vec3, quat, ReadonlyQuat } from 'gl-matrix'; import { ActorRefFrom, AnyActorRef } from 'xstate'; export type Pose = { center: vec3; rotation: quat; distance: number; }; export type ReadonlyPose = { readonly center: ReadonlyVec3; readonly rotation: ReadonlyQuat; readonly distance: number; }; export declare const toMat4: (out: mat4, pose: ReadonlyPose) => mat4; type Context = { pose: Pose; enableRotation: boolean; verticalFieldOfView: number; parallelScaleRatio: number; poseWatchers: Array; }; type SetPoseEvent = { type: 'setPose'; pose: ReadonlyPose & { parallelScale?: number; }; }; export declare const cameraMachine: import("xstate").StateMachine { pose: { center: vec3; rotation: quat; distance: number; }; enableRotation: true; parallelScaleRatio: number; verticalFieldOfView: number; poseWatchers: never[]; }; readonly states: { readonly active: { readonly on: { readonly setPose: { readonly actions: readonly [import("xstate").ActionFunction, { readonly type: "emitNewPose"; readonly params: ({ context: { pose, parallelScaleRatio } }: { context: Context; event: SetPoseEvent; }) => { pose: Pose; parallelScaleRatio: number; }; }]; }; readonly watchPose: { readonly actions: readonly [import("xstate").ActionFunction, ({ context: { pose, parallelScaleRatio }, event: { watcher } }: import("xstate").ActionArgs) => void]; }; readonly watchPoseStop: { readonly actions: readonly [import("xstate").ActionFunction]; }; readonly setEnableRotation: { readonly actions: import("xstate").ActionFunction; }; }; }; }; }>; export declare const createCamera: () => import("xstate").Actor { pose: { center: vec3; rotation: quat; distance: number; }; enableRotation: true; parallelScaleRatio: number; verticalFieldOfView: number; poseWatchers: never[]; }; readonly states: { readonly active: { readonly on: { readonly setPose: { readonly actions: readonly [import("xstate").ActionFunction, { readonly type: "emitNewPose"; readonly params: ({ context: { pose, parallelScaleRatio } }: { context: Context; event: SetPoseEvent; }) => { pose: Pose; parallelScaleRatio: number; }; }]; }; readonly watchPose: { readonly actions: readonly [import("xstate").ActionFunction, ({ context: { pose, parallelScaleRatio }, event: { watcher } }: import("xstate").ActionArgs) => void]; }; readonly watchPoseStop: { readonly actions: readonly [import("xstate").ActionFunction]; }; readonly setEnableRotation: { readonly actions: import("xstate").ActionFunction; }; }; }; }; }>>; export type Camera = ActorRefFrom; export declare const reset3d: (pose: Pose, verticalFieldOfView: number, bounds: Bounds, aspect: number) => { center: vec3; rotation: quat; distance: number; }; export declare const reset2d: (pose: Pose, verticalFieldOfView: number, pointsToFit: Array, aspect: number) => { center: vec3; rotation: quat; distance: number; parallelScale: number; }; export {}; //# sourceMappingURL=camera.d.ts.map