code wiki / (root) / nx_autorig.nx

nx_autorig.nx

buildroot/runtime/nx_autorig.nx

6343 B153 linesdepth 4pulls 6 transitivereach 2 importersview sourcekind librarytopic autorig
docsdependenciesstructsconstsfunctions

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 3 imports · 2 importers

nx_syscalls.nx nx_sdfrender.nx nx_vecmath.nx nx_autorig.nx nx_autorig_gate.nx nx_genloop_gate.nx

imports: nx_syscalls.nxnx_sdfrender.nxnx_vecmath.nx

imported by: nx_autorig_gate.nxnx_genloop_gate.nx

structs

none

consts

13const AR_MAXP: i64 = 32

functions

15func ar_isqrt(v: i64) -> i64 { return vm_isqrt(v) }
called by 3: ar_supportar_gapgl_normals calls 1: vm_isqrt
17func ar_np(base: i64) -> i64
called by 1: ar_build
25func ar_support(base: i64, i: i64, dx: i64, dy: i64, dz: i64, dist: i64) -> i64
called by 1: ar_gap calls 1: ar_isqrt
35func ar_gap(base: i64, i: i64, j: i64) -> i64
called by 1: ar_build calls 2: ar_isqrtar_support
45func ar_vol(base: i64, i: i64) -> i64
called by 1: ar_build
52func ar_build(base: i64, bones: *i64, masses: *i64, soft: *i64, out: *i64) -> i64
114func ar_pack(base: i64, bones: *i64, masses: *i64, soft: *i64, out: *i64, buf: *u8) -> i64
called by 1: main
136func ar_unpack_ok(buf: *u8, len: i64) -> i64
called by 1: main