import { VecN } from '@holotope/core'; import { type ContactPatchKind4 } from './contact-polyhedron4.js'; import { HyperboxSupportShape4 } from './hyperbox4.js'; import { type HyperboxSatAxisSource4, type HyperboxSatOptions4, type HyperboxSatResult4 } from './hyperbox-sat4.js'; export type HyperboxContactPatchKind4 = ContactPatchKind4; /** Stable local feature identity on the boundary of a 4D box. */ export interface HyperboxBoundaryFeature4 { /** Local axes fixed at their positive half extent. */ readonly positiveMask: number; /** Local axes fixed at their negative half extent. */ readonly negativeMask: number; /** Dimension of the containing box feature: vertex=0 through facet=3. */ readonly dimension: number; } export interface HyperboxContactVertex4 { /** Stable identity derived from the pair of local box features. */ readonly id: string; /** World-space R4 point in the resolved, just-touching configuration. */ readonly point: VecN; readonly featureA: HyperboxBoundaryFeature4; readonly featureB: HyperboxBoundaryFeature4; } export interface HyperboxContactPatchDiagnostics4 { readonly constraints: number; readonly effectiveConstraints: number; readonly triplesTested: number; readonly feasibleCandidates: number; readonly uniqueVertices: number; readonly solverPoints: number; } export interface HyperboxContactPatch4 { readonly kind: HyperboxContactPatchKind4; readonly intrinsicDim: 0 | 1 | 2 | 3; /** SAT normal from B toward A / A's escape direction. */ readonly normal: VecN; /** The patch lies in `normal.dot(point) = planeOffset`. */ readonly planeOffset: number; readonly penetrationDepth: number; /** Signed distance used to snap A onto the contact plane. */ readonly alignmentShift: number; /** Translation applied to A before generating every returned point. */ readonly translationA: VecN; /** Facet owner for facet SAT axes; cross-family contacts have no single owner. */ readonly referenceBox: 'a' | 'b' | null; readonly satSource: HyperboxSatAxisSource4; /** Complete vertex set of the convex contact patch. */ readonly vertices: readonly HyperboxContactVertex4[]; /** Deterministic bounded subset intended for a later constraint solver. */ readonly solverPoints: readonly HyperboxContactVertex4[]; readonly diagnostics: HyperboxContactPatchDiagnostics4; } export interface HyperboxContactResult4 { readonly sat: HyperboxSatResult4; readonly patch: HyperboxContactPatch4 | null; } export interface HyperboxContactOptions4 extends HyperboxSatOptions4 { /** Halfspace feasibility band in world units. Default 1e-9. */ clipTolerance?: number; /** Point merge band in world units. Default 1e-8. */ vertexTolerance?: number; /** Linear-independence band used for patch dimension. Default 1e-10. */ rankTolerance?: number; /** Maximum retained solver points. Default 8; must be in [4, 32]. */ maxSolverPoints?: number; } /** * Constructs the complete convex contact set of two oriented R4 boxes. * * For an overlap, A is first translated along the SAT minimum-translation * axis into a just-touching configuration. The returned patch therefore has * exact contact geometry, while `translationA` preserves its relation to the * original poses. A separated pair has no patch. */ export declare function hyperboxContactPatch4(boxA: HyperboxSupportShape4, boxB: HyperboxSupportShape4, options?: HyperboxContactOptions4): HyperboxContactResult4; /** Canonical stable key for one local boundary feature of a 4D box. */ export declare function hyperboxBoundaryFeatureKey4(feature: HyperboxBoundaryFeature4): string; /** Canonical persistent identity for a pair of contributing box features. */ export declare function hyperboxContactVertexId4(featureA: HyperboxBoundaryFeature4, featureB: HyperboxBoundaryFeature4): string; //# sourceMappingURL=hyperbox-contact4.d.ts.map