import { VecN } from '@holotope/core'; import { HyperplaneColliderN } from './hyperplane-collider.js'; import { GlomeSupportShapeN } from './support-shape.js'; export interface SmoothContactOptionsN { /** Separation/contact band in world units. Default 1e-12. */ readonly tolerance?: number; } export interface SmoothPointContactPatchN { readonly kind: 'point'; readonly normal: VecN; /** Actual surface witness on ordered shape A. */ readonly pointA: VecN; /** Actual surface witness on ordered shape B. */ readonly pointB: VecN; /** Signed motion of A along `normal` which aligns both witnesses. */ readonly alignmentShift: number; readonly translationA: VecN; /** The common point after applying `translationA` to A. */ readonly resolvedPoint: VecN; readonly penetrationDepth: number; } export interface GlomeGlomeContactOptionsN extends SmoothContactOptionsN { /** Extra spherical radius around A. Default 0. */ readonly marginA?: number; /** Extra spherical radius around B. Default 0. */ readonly marginB?: number; } export type GlomeGlomeContactStatusN = 'separated' | 'touching' | 'overlapping' | 'coincident-centers'; export interface GlomeGlomeContactResultN { readonly status: GlomeGlomeContactStatusN; readonly intersects: boolean; /** Center distance minus both effective radii. */ readonly signedDistance: number; readonly distance: number; readonly penetrationDepth: number; /** Unit direction from B toward A; null only at coincident centers. */ readonly normal: VecN | null; readonly effectiveRadiusA: number; readonly effectiveRadiusB: number; readonly pointA: VecN | null; readonly pointB: VecN | null; readonly patch: SmoothPointContactPatchN | null; } /** Exact point contact for two solid N-balls, including spherical margins. */ export declare function glomeGlomeContactN(glomeA: GlomeSupportShapeN, glomeB: GlomeSupportShapeN, options?: GlomeGlomeContactOptionsN): GlomeGlomeContactResultN; export interface GlomeHyperplaneContactOptionsN extends SmoothContactOptionsN { /** Extra radius around the glome. Default 0. */ readonly glomeMargin?: number; } export type GlomeHyperplaneContactStatusN = 'separated' | 'touching' | 'overlapping'; export interface GlomeHyperplaneContactResultN { readonly status: GlomeHyperplaneContactStatusN; readonly intersects: boolean; /** Minimum glome surface distance to the plane's allowed half-space. */ readonly signedDistance: number; readonly distance: number; readonly penetrationDepth: number; /** Unit direction from ordered B toward ordered A. */ readonly normal: VecN; readonly shapeAType: 'glome' | 'hyperplane'; readonly shapeBType: 'glome' | 'hyperplane'; readonly effectiveRadius: number; readonly pointA: VecN; readonly pointB: VecN; readonly patch: SmoothPointContactPatchN | null; } /** * Exact ordered point contact between one N-ball and one infinite hyperplane. * The returned normal always follows the library convention B toward A. */ export declare function glomeHyperplaneContactN(shapeA: GlomeSupportShapeN | HyperplaneColliderN, shapeB: GlomeSupportShapeN | HyperplaneColliderN, options?: GlomeHyperplaneContactOptionsN): GlomeHyperplaneContactResultN; //# sourceMappingURL=smooth-contact.d.ts.map