code wiki / _hdl_build / nx_anat_rig.nx

nx_anat_rig.nx

buildroot/runtime/_hdl_build/nx_anat_rig.nx

20507 B431 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic anat
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_png.nx nx_anat_rig.nx

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

main rg_satoi sys_mmap rg_sin_fill sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close rg_hw sys_write rg_rdbits rg_f32mul rg_rdbits ↻ rg_pn sys_mmap ↻ sys_write ↻ rg_wrap rg_fk_y rg_wrap ↻ rg_max rg_min rg_isqrt write_png sys_mmap ↻ png_g png_paeth png_sabs dfe_compress sys_mmap ↻ dfe_fill_tables dfe_deflate sys_mmap ↻ dfe_bits dfe_hash dfe_matchlen dfe_sym dfe_bits ↻ dfe_rev

structs

none

consts

10const RG_MAGIC_14000: i64 = 14000
11const RG_MAGIC_18000: i64 = 18000
12const RG_MAGIC_70000: i64 = 70000
13const RG_MAGIC_12000: i64 = 12000
14const RG_MAGIC_8388607: i64 = 8388607
15const RG_MAGIC_8388608: i64 = 8388608
16const RG_MAGIC_65536: i64 = 65536
17const RG_MAGIC_2000000000: i64 = 2000000000
18const RG_MAGIC_40500: i64 = 40500
19const RG_MAGIC_16384: i64 = 16384
20const RG_MAGIC_1024: i64 = 1024
21const RG_MAGIC_1280: i64 = 1280
22const RG_MAGIC_5423: i64 = 5423
23const RG_MAGIC_9487: i64 = 9487
24const RG_MAGIC_12206: i64 = 12206
25const RG_MAGIC_10160: i64 = 10160
26const RG_MAGIC_4064: i64 = 4064
27const RG_MAGIC_12190: i64 = 12190
28const RG_NL: i64 = 14
30const RG_GRAV: i64 = 460
31const RG_DAMP: i64 = 105
32const RG_STEPS: i64 = 7
34const RG_Q8: i64 = 256
35const RG_GY: i64 = 150 // gravity, Q8 units per substep^2
36const RG_REST: i64 = 280 // restitution per-1024 (bone on floor: mostly inelastic)
37const RG_DROP0: i64 = 260 // release height, model units
38const RG_STOPV: i64 = 900 // |v| below this on contact -> come to rest (no infinite micro-bounce)

functions

40func 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 }
called by 1: main calls 1: sys_write
41func rg_pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
50func rg_satoi(s: *u8) -> i64
called by 1: main
55func rg_rdbits(b: *u8, o: i64) -> i64
called by 2: rg_f32mulmain
58func rg_f32mul(b: *u8, o: i64, mul: i64) -> i64
called by 1: main calls 1: rg_rdbits
71func 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
72func rg_min(a: i64, b: i64) -> i64 { if a<b {return a} return b }
called by 1: main
73func rg_max(a: i64, b: i64) -> i64 { if a>b {return a} return b }
called by 1: main
75func rg_sin_fill(tab: *i64) -> i64
called by 1: main
85func rg_wrap(d: i64) -> i64 { var x: i64 = d % 360; if x < 0 { x = x + 360 } return x }
called by 2: rg_fk_ymain
87func rg_fk_y(px: i64, py: i64, pz: i64, L: i64, par: *i64, thD: *i64, pvY: *i64, pvZ: *i64, sinT: *i64) -> i64
called by 1: main calls 1: rg_wrap
108func main(argc: i64, argv: *i64) -> i64