code wiki / (root) / nx_nxa_hair.nx

nx_nxa_hair.nx

buildroot/runtime/nx_nxa_hair.nx

14999 B426 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind tooltopic nxa
docsdependenciesstructsconstsfunctions

about

nx_nxa_hair.nx -- HAIR MESH INGEST (SOTA rung 3): extracts the character's REAL groomed hair asset (FBX Geometry connected to a Hair-named Model; Eyelash excluded) and appends it to the NXA as HVRT/HTRI sections in the SAME mesh space as VERT -- viewers attach it via the head joint's delta matrix. TOOLING not handcraft: candidates are enumerated with names and sizes, the largest hair geometry wins, every step printed. usage: nx_nxa_hair <in.fbx> <in.nxa> <out.nxa> rc: 0 ok, 2 usage, 3 fbx unreadable, 4 no hair mesh found, 5 bad nxa, 9 io license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_zlib_wrap.nx nx_nxa.nx nx_nxa_hair.nx

imports: nx_syscalls.nxnx_zlib_wrap.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 hw sys_write sys_mmap sys_map_file sys_openat_rd sys_lseek sys_close h_u32 h_walk h_u64 h_u32 ↻ h_u32 ↻ h_walk ↻ hn sys_mmap ↻ sys_write ↻ h_wname sys_write ↻ h_namehas h_arr nx_zlib_inflate sys_mmap ↻ nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_byte_align nx_bitstream_read_byte_ali nx_bitstream_byte_align ↻ _deflate_build_static_litl sys_mmap ↻ nx_huffman_build _deflate_build_static_dist sys_mmap ↻ nx_huffman_build ↻

structs

none

consts

12const B_MAGIC_2047: i64 = 2047
13const B_MAGIC_1048575: i64 = 1048575
14const B_MAGIC_4503599627370496: i64 = 4503599627370496
15const B_MAGIC_99990: i64 = 99990
16const B_MAGIC_4096: i64 = 4096
17const B_MAGIC_7500: i64 = 7500
18const B_MAGIC_500000: i64 = 500000
19const B_MAGIC_2147483647: i64 = 2147483647
20const B_MAGIC_4294967296: i64 = 4294967296
23const B_MO: i64 = 16 // model ids x512
24const B_MN: i64 = 528 // model name off x512
25const B_ML: i64 = 1040 // model name len x512
26const B_GI: i64 = 1552 // geometry ids x512
27const B_GV: i64 = 2064 // geometry Vertices meta (off,alen,enc,clen) x512x4
28const B_GP: i64 = 4112 // geometry PolygonVertexIndex meta x512x4
29const B_CONN: i64 = 6160 // conns (src,dst) x100000x2
30const B_WORDS: i64 = 210000

functions

32func 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
33func hn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
45func h_u32(b: *u8, o: i64) -> i64
49func h_u64(b: *u8, o: i64) -> i64 { return h_u32(b, o) | (h_u32(b, o + 4) << 32) }
called by 1: h_walk calls 1: h_u32
50func h_f64(b: *u8, o: i64, scale: i64) -> i64
called by 1: main calls 1: h_u32
69func h_namehas(b: *u8, off: i64, len: i64, pat: *u8) -> i64
called by 1: main
86func h_wname(b: *u8, off: i64, len: i64) -> i64
called by 1: main calls 1: sys_write
97func h_walk(b: *u8, flen: i64, off0: i64, big: i64, G: *i64, gctx: i64) -> i64
called by 2: h_walkmain calls 3: h_u64h_u32h_walk
222func h_arr(b: *u8, off: i64, alen: i64, enc: i64, clen: i64, esz: i64) -> *u8
called by 1: main calls 1: nx_zlib_inflate
229func main(argc: i64, argv: *i64) -> i64