import { type CellComplex, TransformN, VecN } from '@holotope/core'; import type { ConvexPolytopeTopologyN } from './polytope-topology.js'; /** Stable source feature identity carried through support queries and GJK. */ export type SupportFeatureId = number | string; export interface SupportVertexN { /** Support point in the shape's current/world coordinate frame. */ readonly point: VecN; /** Stable source feature; vertex index for a vertex hull. */ readonly featureId: SupportFeatureId; } /** Minimal convex-shape contract required by dimension-generic GJK. */ export interface SupportShapeN { readonly dim: number; /** A point inside the convex hull, used only to choose an initial direction. */ readonly center: VecN; /** Farthest point in `direction`; ties must resolve deterministically. */ support(direction: VecN): SupportVertexN; /** * Rehydrate a direction-independent source feature at the current pose. * Optional because smooth and rounded supports depend on query direction. */ resolveFeature?(featureId: SupportFeatureId): SupportVertexN | undefined; /** * Enumerate every source vertex when the support shape is a polytope. * Smooth and opaque support functions leave this unavailable. Stable feature * IDs let contact features survive rigid pose changes. */ enumerateVertices?(): readonly SupportVertexN[] | undefined; /** Optional pose-independent incidence compiled from the stable vertex IDs. */ readonly polytopeTopology?: ConvexPolytopeTopologyN | undefined; } /** Returns a validated polytope vertex enumeration, or undefined when absent. */ export declare function supportShapeVerticesN(shape: SupportShapeN): readonly SupportVertexN[] | undefined; /** Type-preserving canonical key for a numeric or string support feature. */ export declare function supportFeatureKeyN(featureId: SupportFeatureId): string; /** * Convex hull of a packed vertex cloud. Cell topology is not required by GJK; * when constructed from a CellComplex, returned feature IDs are its vertex IDs. */ export declare class ConvexHullSupportShapeN implements SupportShapeN { readonly dim: number; readonly positions: Float64Array; readonly center: VecN; constructor(dim: number, positions: ArrayLike); static fromCellComplex(complex: CellComplex): ConvexHullSupportShapeN; get vertexCount(): number; support(direction: VecN): SupportVertexN; resolveFeature(featureId: SupportFeatureId): SupportVertexN | undefined; enumerateVertices(): readonly SupportVertexN[]; } /** Rigid world transform around any local support shape. */ export declare class TransformedSupportShapeN implements SupportShapeN { readonly source: SupportShapeN; transform: TransformN; constructor(source: SupportShapeN, transform?: TransformN); get dim(): number; get center(): VecN; get polytopeTopology(): ConvexPolytopeTopologyN | undefined; support(direction: VecN): SupportVertexN; resolveFeature(featureId: SupportFeatureId): SupportVertexN | undefined; enumerateVertices(): readonly SupportVertexN[] | undefined; } /** N-ball (a glome in R4) with analytic support. */ export declare class GlomeSupportShapeN implements SupportShapeN { readonly dim: number; readonly center: VecN; radius: number; constructor(center: VecN | ArrayLike, radius: number); support(direction: VecN): SupportVertexN; } /** Minkowski sum of a convex core with an N-ball margin. */ export declare class RoundedSupportShapeN implements SupportShapeN { readonly source: SupportShapeN; margin: number; constructor(source: SupportShapeN, margin: number); get dim(): number; get center(): VecN; support(direction: VecN): SupportVertexN; } //# sourceMappingURL=support-shape.d.ts.map