nx_autorig.nx
buildroot/runtime/nx_autorig.nx
about
nx_autorig.nx -- AUTO-RIG + PHYSICS-PARAM EMIT (generator-path R5, operator: the ecosystem emits rigged,
physics-ready objects -- not hand-authored per object). Given ANY generated SDF-part object (t2mesh output,
the pioneer body, ...), DERIVE from its geometry: (1) a SKELETON -- parts whose ellipsoids touch (support-
distance test along the center line, + the object's smin blend as slack) form a graph; a BFS spanning tree
from the largest-volume part (the natural pelvis-style root) = the bones; (2) MASS per part (volume rx*ry*rz);
(3) COLLISION proxy per part (the ellipsoid itself); (4) a SOFT param per part (mean radius -- bigger part =
softer/jigglier; v0 heuristic, data-driven refinement later). Serializes as an NXRG1 data pack (magic +
corrupt-reject) per the pack economy (NXM1/NXCH1/...). Integer, deterministic. license_tier: ORIGINAL
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_sdfrender.nx
imported by: nx_autorig_gate.nxnx_genloop_gate.nx
structs
| none |
consts
| 12 | const AR_MAXP: i64 = 32 |
functions
| 14 | func ar_isqrt(v: i64) -> i64 { if v <= 0 { return 0 } var x: i64 = v; var y: i64 = (x + 1) / 2; while y < x { x = y; y = (x + v / x) / 2 } return x } |
| 16 | func ar_np(base: i64) -> i64 called by 1: ar_build |
| 24 | func ar_support(base: i64, i: i64, dx: i64, dy: i64, dz: i64, dist: i64) -> i64 |
| 34 | func ar_gap(base: i64, i: i64, j: i64) -> i64 |
| 44 | func ar_vol(base: i64, i: i64) -> i64 called by 1: ar_build |
| 51 | func ar_build(base: i64, bones: *i64, masses: *i64, soft: *i64, out: *i64) -> i64 |
| 113 | func ar_pack(base: i64, bones: *i64, masses: *i64, soft: *i64, out: *i64, buf: *u8) -> i64 called by 1: main |
| 135 | func ar_unpack_ok(buf: *u8, len: i64) -> i64 called by 1: main |