code wiki / (root) / nx_morph.nx

nx_morph.nx

buildroot/runtime/nx_morph.nx

4992 B137 linesdepth 3pulls 4 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_morph.nx -- MORPH TARGETS AS DATA (Elara bar E3; VAMX R4): a morph = a bank of vertex DELTAS over an nx_mesh3 base mesh + a weight slider 0..256; morphs COMPOSE additively (v' = v + sum w_m*delta_m/256). Applied to the BIND-POSE mesh BEFORE skinning (industry standard). THE POINT: a body/face slider is PURE DATA -- serializable to a pack blob (NXM1 format) that ships through the CID mod economy exactly like mineworld block packs. ALL INTEGER, base-relative, non-destructive apply (base mesh -> out mesh). license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_mesh3.nx nx_morph.nx nx_morph_gate.nx

imports: nx_syscalls.nxnx_mesh3.nx

imported by: nx_morph_gate.nx

structs

none

consts

9const MO_MAGIC_2147483648: i64 = 2147483648
10const MO_MAGIC_4294967296: i64 = 4294967296
14const MO_MAXM: i64 = 32
15const MO_MAXD: i64 = 16384

functions

17func mo_hdr(base: i64) -> *i64 { return base as *i64 }
18func mo_dir(base: i64, m: i64) -> *i64 { return (base + 64 + m * 32) as *i64 }
19func mo_delta(base: i64, d: i64) -> *i64 { return (base + 64 + MO_MAXM * 32 + d * 32) as *i64 }
20func mo_bytes() -> i64 { return 64 + MO_MAXM * 32 + MO_MAXD * 32 + 64 }
called by 1: main
22func mo_init(base: i64) -> i64
called by 1: main calls 1: mo_hdr
28func mo_begin(base: i64, id: i64) -> i64
called by 2: mo_loadmain calls 2: mo_hdrmo_dir
38func mo_add_delta(base: i64, m: i64, vi: i64, dx: i64, dy: i64, dz: i64) -> i64
called by 2: mo_loadmain calls 3: mo_hdrmo_deltamo_dir
51func mo_apply(base: i64, meshIn: i64, meshOut: i64, weights: *i64) -> i64
88func mo_w32(buf: *u8, off: i64, v: i64) -> i64
called by 1: mo_save
95func mo_r32(buf: *u8, off: i64) -> i64
called by 1: mo_load
101func mo_save(base: i64, m: i64, buf: *u8) -> i64
called by 1: main calls 3: mo_dirmo_w32mo_delta
119func mo_load(base: i64, buf: *u8, len: i64) -> i64
called by 1: main calls 3: mo_r32mo_beginmo_add_delta