code wiki / (root) / nx_nxa_strands.nx

nx_nxa_strands.nx

buildroot/runtime/nx_nxa_strands.nx

9565 B247 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind tooltopic nxa
docsdependenciesstructsconstsfunctions

about

nx_nxa_strands.nx -- USC-HairSalon STRAND GROOM INGEST (dev oracle, license-clean for development): reads a .data hairstyle (i32 nstrands; per strand i32 npts + npts x 3 f32, y-up meters), downsamples to <=2200 strands x EXACTLY 8 points each, converts y-up->z-up, scales meters->units, and FITS the root cloud to the character's head BY MEASUREMENT (root-cloud center+width matched to the scalp band) -- tooling, no hand constants. Appends section HSTR: [nstrands] then per strand 24 words (8 points x xyz, mesh units, world space). The vendor/any sim is DISCARDED by design: our viewer's verlet drives these strands. usage: nx_nxa_strands <hairstyle.data> <in.nxa> <out.nxa> rc: 0 ok, 2 usage, 3 data unreadable, 5 bad nxa, 9 io license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_nxa.nx nx_nxa_strands.nx

imports: nx_syscalls.nxnx_nxa.nx

imported by: nobody (leaf or entry point)

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

main sw9 sys_write sys_mmap sys_map_file sys_openat_rd sys_lseek sys_close s_u32 sn9 sys_mmap ↻ sys_write ↻ s_f32 s_u32 ↻ nxa_find nxa_magic nxa_check2 nxa_tag4 nxa_check2 ↻ nxa_magic ↻ sys_openat_wr sys_write ↻ sys_close ↻

structs

none

consts

13const K_MAGIC_8388607: i64 = 8388607
14const K_MAGIC_8388608: i64 = 8388608
15const K_MAGIC_200000: i64 = 200000
16const K_MAGIC_2200: i64 = 2200
17const K_MAGIC_100000: i64 = 100000
18const K_MAGIC_4611686018427387903: i64 = 4611686018427387903
19const K_MAGIC_4096: i64 = 4096

functions

21func sw9(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
22func sn9(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
34func s_u32(b: *u8, o: i64) -> i64
called by 2: s_f32main
39func s_f32(b: *u8, o: i64, scale: i64) -> i64
called by 1: main calls 1: s_u32
53func main(argc: i64, argv: *i64) -> i64