AutoMovie API
    Preparing search index...

    Function scanJointRom

    • Measure one joint against its range of motion and report each fault to the caller, building no message: the single owner of what counts as a ROM fault and how far past the limit it lies, read by the pose gate (validateJointRom), which words each fault, and by the solvers' candidate ranking (jointRomOvershoot), which only sums them.

      Faults are reported in axis order (flexion, abduction, twist), then the combined swing. A null angle is rest and reports nothing on its own axis; 0 reports nothing on an immobile (null) axis, whose rest it is, but is measured against a range that excludes it. A non-finite angle is reported with an undefined overshoot, since it has no distance to a limit. An angle on an immobile axis overshoots by its whole magnitude, and one outside its interval by its distance to the nearer bound. The swing is the coupling of flexion and abduction, a null axis contributing its actual rotation, 0, and overshoots by what it exceeds swingDeg.

      A ball joint whose constraint declares swingTwist is measured by its rotation instead (swingTwistRange), in the frame of its bone the caller's rig resolves (rig), or the humanoid tables' (swingTwistRange.of): a swing fault by the degrees its direction lies past the reach of its flexion and abduction ranges, then a twist fault by the degrees its turn about its own axis lies past swingTwist.twist. A non-finite angle is reported as above and nothing else is measured. A bone with no axes in that frame keeps the three-angle scan.

      Parameters

      • joint: IAutoMovieJointPose

        Joint angles in the constraint's degree frame; null is rest.

      • constraint: IAutoMovieJointConstraint

        Finite ordered axis intervals and an optional swing cone.

      • report: (
            part: IAutoMovieScanJointRom.Part,
            actual: number,
            overshoot: number | undefined,
        ) => void

        Called once per fault with the faulted part, the measured value in degrees and its overshoot in degrees, undefined for a non-finite value.

      • Optionalrig: IAutoMovieJointRotationFrame

        The bone's frame as the caller's rig resolves it (swingTwistRange.of(bone, skeleton)); the humanoid tables' when absent.

      Returns void