code wiki / (root) / nx_objload.nx

nx_objload.nx

buildroot/runtime/nx_objload.nx

4959 B119 linesdepth 3pulls 4 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_objload.nx -- ★sovereign Wavefront OBJ loader (the Stanford-corpus rung of the field-evidence foundation): parse `v x y z` + `f a b c` ASCII into nx_trimesh, bbox-normalized to a target extent. Signed 6-decimal coords are read in MICRO units (x1e6) so the bunny's 0.15-metre scale survives integer parsing. Two passes (bbox, emit). license_tier: ORIGINAL

dependencies 2 imports · 4 importers

nx_syscalls.nx nx_trimesh.nx nx_objload.nx nx_bunny_gate.nx nx_engine_lod_gate.nx nx_engine_phys_gate.nx nx_engine_scene_gate.nx

imports: nx_syscalls.nxnx_trimesh.nx

imported by: nx_bunny_gate.nxnx_engine_lod_gate.nxnx_engine_phys_gate.nxnx_engine_scene_gate.nx

structs

none

consts

6const K_MAGIC_1000000: i64 = 1000000
7const K_MAGIC_100000: i64 = 100000
8const K_MAGIC_2000000000: i64 = 2000000000
9const K_MAGIC_1024: i64 = 1024

functions

12func obj_num(buf: *u8, end: i64, p0: i64, out: *i64) -> i64
called by 1: obj_load
51func obj_linestart(buf: *u8, p: i64, ch: i64) -> i64
called by 1: obj_load
61func obj_load(path: *u8, target: i64, col: i64) -> i64