code wiki / (root) / nx_gltf_scene.nx

nx_gltf_scene.nx

buildroot/runtime/nx_gltf_scene.nx

10158 B178 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind librarytopic gltf
docsdependenciesstructsconstsfunctions

about

nx_gltf_scene.nx -- ★MULTI-MESH glTF export: assemble MANY nx_trimesh meshes (one per anatomical system) into ONE .glb scene -- each a named node/mesh/material -> a PEELABLE holistic being as a single standard 3D asset. Reuses the byte + float encoders from nx_gltf_mesh. Flow: sc_reset() ; for each system { build mesh in trimesh ; sc_add_mesh(name) } ; sc_finalize(out). Each system is tm_reset separately so its indices are already local/0-based per mesh. license_tier: ORIGINAL

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_trimesh.nx nx_gltf_mesh.nx nx_gltf_scene.nx nx_gltf_scene_gate.nx

imports: nx_syscalls.nxnx_trimesh.nxnx_gltf_mesh.nx

imported by: nx_gltf_scene_gate.nx

structs

none

consts

8const SC_MAGIC_16777216: i64 = 16777216
9const SC_MAGIC_2000000000: i64 = 2000000000
10const SC_MAGIC_32767: i64 = 32767
11const SC_MAGIC_65535: i64 = 65535
12const SC_MAGIC_131072: i64 = 131072
14const SC_MAXM: i64 = 16

functions

34func sc_jfrac(o: *u8, at: i64, milli: i64) -> i64
called by 1: sc_finalize
46func sc_reset() -> i64
called by 1: main calls 1: sys_mmap
59func sc_add_mesh(name: *u8, rough: i64, metal: i64) -> i64
111func sc_mesh_count() -> i64 { return SC_M }
called by 1: main
113func sc_finalize(out: *u8) -> i64