code wiki / _hdl_build / nx_anat_rig.nx
nx_anat_rig.nx
buildroot/runtime/_hdl_build/nx_anat_rig.nx
about
nx_anat_rig.nx -- ★SOVEREIGN ARTICULATED RIG + PHYSICS on the REAL 662k-tri BodyParts3D skeleton.
The being stops being a rendered corpse and becomes a DYNAMIC BODY: a joint tree (sagittal hinges) over the
15 bone layers, forward kinematics per vertex, and a DETERMINISTIC integer damped-pendulum integrator that
drives the joints. Because every BodyParts3D part shares one cadaver frame, the bones are already positioned
-- the rig only has to add joints. 100% integer, no float, no GPU: same pose sequence replays bit-identically.
nx_anat_rig <mesh> <nframes> <W> <H> <outprefix>
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_png.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 10 | const RG_MAGIC_14000: i64 = 14000 |
| 11 | const RG_MAGIC_18000: i64 = 18000 |
| 12 | const RG_MAGIC_70000: i64 = 70000 |
| 13 | const RG_MAGIC_12000: i64 = 12000 |
| 14 | const RG_MAGIC_8388607: i64 = 8388607 |
| 15 | const RG_MAGIC_8388608: i64 = 8388608 |
| 16 | const RG_MAGIC_65536: i64 = 65536 |
| 17 | const RG_MAGIC_2000000000: i64 = 2000000000 |
| 18 | const RG_MAGIC_40500: i64 = 40500 |
| 19 | const RG_MAGIC_16384: i64 = 16384 |
| 20 | const RG_MAGIC_1024: i64 = 1024 |
| 21 | const RG_MAGIC_1280: i64 = 1280 |
| 22 | const RG_MAGIC_5423: i64 = 5423 |
| 23 | const RG_MAGIC_9487: i64 = 9487 |
| 24 | const RG_MAGIC_12206: i64 = 12206 |
| 25 | const RG_MAGIC_10160: i64 = 10160 |
| 26 | const RG_MAGIC_4064: i64 = 4064 |
| 27 | const RG_MAGIC_12190: i64 = 12190 |
| 28 | const RG_NL: i64 = 14 |
| 30 | const RG_GRAV: i64 = 460 |
| 31 | const RG_DAMP: i64 = 105 |
| 32 | const RG_STEPS: i64 = 7 |
| 34 | const RG_Q8: i64 = 256 |
| 35 | const RG_GY: i64 = 150 // gravity, Q8 units per substep^2 |
| 36 | const RG_REST: i64 = 280 // restitution per-1024 (bone on floor: mostly inelastic) |
| 37 | const RG_DROP0: i64 = 260 // release height, model units |
| 38 | const RG_STOPV: i64 = 900 // |v| below this on contact -> come to rest (no infinite micro-bounce) |
functions
| 40 | func rg_hw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 41 | func rg_pn(v: i64) -> i64 |
| 50 | func rg_satoi(s: *u8) -> i64 called by 1: main |
| 55 | func rg_rdbits(b: *u8, o: i64) -> i64 |
| 58 | func rg_f32mul(b: *u8, o: i64, mul: i64) -> i64 |
| 71 | func rg_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 } called by 1: main |
| 72 | func rg_min(a: i64, b: i64) -> i64 { if a<b {return a} return b } called by 1: main |
| 73 | func rg_max(a: i64, b: i64) -> i64 { if a>b {return a} return b } called by 1: main |
| 75 | func rg_sin_fill(tab: *i64) -> i64 called by 1: main |
| 85 | func rg_wrap(d: i64) -> i64 { var x: i64 = d % 360; if x < 0 { x = x + 360 } return x } |
| 87 | func rg_fk_y(px: i64, py: i64, pz: i64, L: i64, par: *i64, thD: *i64, pvY: *i64, pvZ: *i64, sinT: *i64) -> i64 |
| 108 | func main(argc: i64, argv: *i64) -> i64 |