UNPKG

@cearth/tools

Version:
105 lines 2.3 kB
import { Cartesian3, HeadingPitchRoll, Quaternion } from "cesium"; import type { Matrix4 } from "cesium"; /** * 迪卡尔坐标轴 */ export declare enum CartesianAxis { x = 0, y = 1, z = 2 } export declare enum Xyz_Hpr { x = "roll", y = "pitch", z = "heading" } export declare namespace Xyz_Hpr { function toKey(value: any): string | undefined; function toCartesian3(hpr: HeadingPitchRoll): Cartesian3; function toHeadingPitchRoll(xyz: { x: number; y: number; z: number; }): HeadingPitchRoll; } /** * HeadingPitchRoll 的 各个分量 */ export declare enum HeadingPitchRollComponent { heading = 0, pitch = 1, roll = 2 } /** * 旋转操作信息 */ export interface RotationInfo { /** * 旋转轴 */ axis: Cartesian3; /** * 旋转角度 */ angle: number; } /** * 变换信息 */ export interface TransformInfo<Rotation = RotationInfo> { translation?: Cartesian3 | null; rotation?: Rotation | null; scale?: Cartesian3 | null; } /** * 轴变换信息 */ export type AxisTransformInfo = TransformInfo<Cartesian3>; /** * 变换信息 */ export type QuateTransformInfo = TransformInfo<Quaternion>; /** * 用于可视化的变换信息 */ export interface VisualizeTransformInfo extends AxisTransformInfo { position?: Cartesian3; matrix?: Matrix4 | null; name?: string; id?: any; } /** * 变换信息选项 */ export interface TransformInfoOptions { /** * 参考坐标系的变换矩阵 */ referFrame?: Matrix4 | null; /** * 是否是世界坐标系 */ world?: boolean | { translation?: boolean; rotation?: boolean; scale?: boolean; }; } export type TransformOptions = TransformInfo<Cartesian3 | RotationInfo> & TransformInfoOptions; /** * 扁平化选项 * @param options * @returns */ export declare function flatTransformInfoOptions(options?: TransformInfoOptions | null): { worldTranslation: boolean | undefined; worldRotation: boolean | undefined; worldScale: boolean | undefined; referFrame?: Matrix4 | null; world?: boolean | { translation?: boolean; rotation?: boolean; scale?: boolean; }; }; //# sourceMappingURL=type.d.ts.map