nx_obj_export.nx
buildroot/runtime/nx_obj_export.nx
about
nx_obj_export.nx -- sovereign Wavefront OBJ writer for the bestiary meshes (game/DCC reuse: engines + Blender
import OBJ+normals far cleaner than the print-only STL). Takes the nx_meshgen verts+tris, computes SMOOTH
per-vertex normals (accumulate face normals -> normalize), and emits v / vn / f (with //vn indices), 1-indexed.
Buffered (one write). Verts stay in the mesh's fx1024 units (importers rescale). license_tier: ORIGINAL
dependencies 3 imports · 3 importers
imports: nx_syscalls.nxnx_vecmath.nxnx_vnormals_lib.nx
imported by: nx_obj_export_gate.nxnx_vnormals_gate.nxnx_xport_lib.nx
structs
| none |
consts
| none |
functions
| 12 | func oe_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){d[o+i]=s[i]; i=i+1} return o+i } called by 1: write_obj |
| 13 | func oe_num(d: *u8, o: i64, v: i64) -> i64 |
| 25 | func write_obj(vbuf: *i64, fbuf: *i64, nv: i64, nf: i64, path: *u8) -> i64 |