import { type PreviewPose, type PreviewRest } from '../../visualQa/avatarPreviewMath'; import type { VisualQaAssert } from '../../visualQa/types'; import type { MotionId } from './types'; export declare const EXTREMITY_LIMITS: { /** Share of the feet's own surface with an edge stretched over 3x that fails the walk and the run. */ feetTornShareMax: number; edgeStretchRatio: number; }; /** * The fewest triangles a region must own before its tear share means anything. It was 20, which refused to measure a * low-poly Dreamer avatar (the Marketplace page draws it with 8 foot triangles, 0.0 % stretched over 16 poses): the check * then exited 2 after six minutes and `publish_avatar_version` sealed nothing. Under 4 triangles is not a foot; from 4 the * share is real (one torn triangle of 8 is 12.5 %, over the 10 % limit), and the detail says how coarse the region was. */ export declare const MIN_REGION_TRIS = 4; export interface RegionTear { measured: boolean; why?: string; tris: number; areaCm2: number; maxShare: number; phase: number | null; maxEdgeRatio: number; } export interface ExtremityMeasure { feet: RegionTear; hands: RegionTear; } export declare function measureExtremities(rest: PreviewRest, poses: PreviewPose[]): ExtremityMeasure; export declare function judgeFeet(motion: MotionId, m: ExtremityMeasure | null): VisualQaAssert; export interface HandClearance { measured: boolean; why?: string; /** Closest approach of a hand vertex to the torso/hip surface, signed (cm, negative = inside), the minimum over the cycle. */ minCm: number; /** The same per phase, then averaged (cm). */ meanOfMinCm: number; /** Phase of the minimum. */ phase: number | null; handVerts: number; } /** * How far the hands stay from the torso/hips through the cycle, as a lateral clearance. Per phase and per hand vertex (>= 0.6 * weight on the hand and fingers): look at the torso/hip surface (>= 0.6 on pelvis/spine/thigh) in a 3 cm x 4 cm window of the * same height and depth; the body's outermost point there, measured away from the midline on the hand's own side, against the * hand vertex. Past the outermost point the hand is clear (positive gap); short of it the hand is inside the body (negative, * how deep). Signed by the outline, not by a vertex normal, so it does not flip where a cuff or a pocket folds the surface. * A hand with no body within 25 cm reads +25. */ export declare function measureHandClearance(rest: PreviewRest, poses: PreviewPose[]): HandClearance; /** Hands against the hips, beside the control's on the same clip. Reported, never blocking: robots and puppets pass the gate with their hands on the hip. */ export declare const HAND_CLEARANCE_WARN_BELOW_CONTROL_CM = 4; export declare function judgeHandClearance(motion: MotionId, h: HandClearance | null, control: HandClearance | null): VisualQaAssert;