code wiki / _hdl_build / nx_bodybind_gate.nx

nx_bodybind_gate.nx

buildroot/runtime/_hdl_build/nx_bodybind_gate.nx

9251 B224 linesdepth 4pulls 8 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_bodybind_gate.nx -- gate for REGION-TO-BONE BINDING (Elara bar E4): bones + flesh + contact COMPOSED. T1 STATIC bind: anchor = boneWorld + boneRot*offset, hand-computed at 45deg yaw T2 POSE DRIVES FLESH: sweep the bone -> nodes LAG the moving anchor (secondary motion survives binding), then settle tracking it T3 OCCLUSION UNDER MOTION: a fixed capsule pressed by the ROCKING bone-driven region -> never-inside holds AND the far side still bulges (the law works around a MOVING anchor) T4 determinism: two rigs, same script -> region state byte-identical + PNG knowledge/nx_bodybind.png. Arenas are SEPARATE mmaps (sk_bytes()=188736 -- packing them in one 64KB world overlapped; caught by the arena guard BEFORE running). license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_bodybind.nx nx_bodybind_gate.nx

imports: nx_syscalls.nxnx_png.nxnx_bodybind.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sk_bytes sr_bytes bb_bytes mkrig sk_init sk_hdr sk_add_bone sk_hdr ↻ sk_bone sr_init sr_hdr sr_param sr_hdr ↻ sr_ring sys_mmap ↻ sr_add_node sr_hdr ↻ sr_node sr_hdr ↻ sr_node ↻ sr_isqrt bb_init bb_hdr bb_add bb_hdr ↻ bb_row sk_pose sk_bone ↻ sk_update sk_hdr ↻ sk_vs sk_lr sk_bone ↻ sk_localrot it_cos4096 it_sin4096 it_sin4096 ↻ sk_matmul

structs

none

consts

none

functions

14func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
15func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
27func gabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
28func isq(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 }
called by 2: lagdmain
30func mkrig(sk: i64, sr: i64, bb: i64) -> i64
42func lagd(sr: i64) -> i64
called by 1: main calls 3: sr_hdrsr_posisq
49func main() -> i64