IFClite TypeScript API
    Preparing search index...

    Interface MeshDistance

    Minimum-distance query, exposed here rather than left package-private because every consumer that wants it lives outside this package. The viewer's measure tool needs the exact surface-to-surface distance, and before this it could not reach any of the machinery: triTriDistance sits under math/, which has no export subpath, so a deep import is hard-blocked by ERR_PACKAGE_PATH_NOT_EXPORTED.

    buildMeshBvh / queryMeshCross come with it: a caller measuring one element against several should build each tree once rather than pay for it per query.

    interface MeshDistance {
        distance: number;
        pointA: Vec3;
        pointB: Vec3;
        triangleA: number;
        triangleB: number;
    }
    Index
    distance: number

    Minimum distance between the two surfaces. 0 when they touch or overlap.

    pointA: Vec3

    Witness point on mesh A.

    pointB: Vec3

    Witness point on mesh B.

    triangleA: number

    Triangle indices the witness points lie on.

    triangleB: number