code wiki / (root) / nx_bodybind.nx

nx_bodybind.nx

buildroot/runtime/nx_bodybind.nx

2069 B48 linesdepth 3pulls 5 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_bodybind.nx -- REGION-TO-BONE BINDING (Elara bar E4): a soft-body region rides a skeleton bone -- the region's anchor = boneWorldPos + boneWorldRot * localOffset, recomputed after every sk_update. A posed or animated skeleton thereby DRIVES its flesh (chest bone -> breast region; pelvis -> glute; the TittyMagic anchoring model), and the region's spring/occlusion dynamics play out around the moving anchor. A BINDING IS DATA: rows {bone, offx, offy, offz, regionArenaOffset} in a bind arena -- a rig ships as data. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_skeleton.nx nx_softbody_region.nx nx_bodybind.nx nx_bodybind_gate.nx nx_wasm_charlab.nx

imports: nx_syscalls.nxnx_skeleton.nxnx_softbody_region.nx

imported by: nx_bodybind_gate.nxnx_wasm_charlab.nx

structs

none

consts

12const BB_MAXB: i64 = 16

functions

14func bb_hdr(base: i64) -> *i64 { return base as *i64 }
15func bb_row(base: i64, i: i64) -> *i64 { return (base + 64 + i * 64) as *i64 }
called by 2: bb_addbb_drive
16func bb_bytes() -> i64 { return 64 + BB_MAXB * 64 }
called by 1: main
18func bb_init(base: i64) -> i64
called by 2: mkrigworld_init calls 1: bb_hdr
23func bb_add(base: i64, bone: i64, ox: i64, oy: i64, oz: i64, region_off: i64) -> i64
called by 2: mkrigworld_init calls 2: bb_hdrbb_row
36func bb_drive(base: i64, skBase: i64, world: i64) -> i64