import { BivectorN, VecN } from '@holotope/core'; import { PlanarRotationJoint4, type RegularPlanarRotationConstraint4 } from './planar-rotation-joint4.js'; export interface PlanarRotationPhaseBranch4 { readonly wrappedAngle: number; readonly unwrappedAngle: number; } export interface PlanarRotationPhase4Options { readonly constraint: RegularPlanarRotationConstraint4; /** Current unit world reference in A's complementary plane. */ readonly phaseDirectionA: VecN | ArrayLike; /** Current unit world reference in B's complementary plane. */ readonly phaseDirectionB: VecN | ArrayLike; readonly previousBranch?: PlanarRotationPhaseBranch4; /** Resolves an exactly half-turn sample when a preceding branch exists. */ readonly halfTurnDirection?: 1 | -1; /** Minimum common-plane projection length. Default 1e-10. */ readonly phaseTolerance?: number; /** Band used to report an equally short half-turn lift. Default 1e-10. */ readonly unwrapTolerance?: number; /** Unit and fixed-frame orthogonality validation band. Default 1e-10. */ readonly orthonormalTolerance?: number; } export type PlanarRotationPhaseEvaluation4 = { readonly status: 'regular'; readonly constraint: RegularPlanarRotationConstraint4; readonly phaseDirectionA: VecN; readonly phaseDirectionB: VecN; readonly projectedPhaseA: VecN; readonly projectedPhaseB: VecN; readonly phaseProjectionGuards: readonly [number, number]; readonly generator: BivectorN; readonly wrappedAngle: number; readonly angle: number; readonly angularSpeed: number; readonly branch: PlanarRotationPhaseBranch4; } | { readonly status: 'phase-degenerate'; readonly constraint: RegularPlanarRotationConstraint4; readonly phaseDirectionA: VecN; readonly phaseDirectionB: VecN; readonly phaseProjectionGuards: readonly [number, number]; } | { readonly status: 'unwrap-ambiguous'; readonly constraint: RegularPlanarRotationConstraint4; readonly phaseDirectionA: VecN; readonly phaseDirectionB: VecN; readonly projectedPhaseA: VecN; readonly projectedPhaseB: VecN; readonly phaseProjectionGuards: readonly [number, number]; readonly generator: BivectorN; readonly wrappedAngle: number; readonly angularSpeed: number; readonly previousBranch: PlanarRotationPhaseBranch4; readonly negativeBranch: PlanarRotationPhaseBranch4; readonly positiveBranch: PlanarRotationPhaseBranch4; }; /** * Evaluates the signed SO(2) phase left free by a regular five-row planar * rotation constraint. Successive samples must advance by less than pi. */ export declare function planarRotationPhase4(options: PlanarRotationPhase4Options): PlanarRotationPhaseEvaluation4; export type PlanarRotationCoordinate4Options = { readonly joint: PlanarRotationJoint4; readonly localPhaseDirectionA: VecN | ArrayLike; readonly localPhaseDirectionB: VecN | ArrayLike; readonly worldPhaseDirectionB?: never; readonly phaseTolerance?: number; readonly unwrapTolerance?: number; } | { readonly joint: PlanarRotationJoint4; readonly localPhaseDirectionA: VecN | ArrayLike; readonly localPhaseDirectionB?: never; readonly worldPhaseDirectionB: VecN | ArrayLike; readonly phaseTolerance?: number; readonly unwrapTolerance?: number; }; export type PlanarRotationCoordinateEvaluation4 = PlanarRotationPhaseEvaluation4 | { readonly status: 'first-antipodal'; readonly constraint: Extract, { readonly status: 'first-antipodal'; }>; } | { readonly status: 'second-degenerate'; readonly constraint: Extract, { readonly status: 'second-degenerate'; }>; }; /** Persistent local phase references plus explicit continuous unwrap state. */ export declare class PlanarRotationCoordinate4 { readonly joint: PlanarRotationJoint4; readonly localPhaseDirectionA: VecN; readonly phaseDirectionB: VecN; readonly phaseTolerance: number; readonly unwrapTolerance: number; private previousBranch; constructor(options: PlanarRotationCoordinate4Options); worldPhaseDirectionA(): VecN; worldPhaseDirectionB(): VecN; evaluation(options?: { readonly halfTurnDirection?: 1 | -1; }): PlanarRotationCoordinateEvaluation4; resetPhase(branch?: PlanarRotationPhaseBranch4): void; } //# sourceMappingURL=planar-rotation-coordinate4.d.ts.map