nx_meshview.nx
buildroot/runtime/nx_meshview.nx
about
nx_meshview.nx -- look at an .nxmesh. The program emits NXMSH2 meshes and had NO WAY TO VIEW ONE,
which is exactly how a skull that renders as an egg passed a 6/6 gate: every tooth measured counts
and determinism, and nothing ever drew the thing.
Orthographic z-buffered triangle fill, flat-shaded off the stored per-triangle normal, three views
side by side (front / side / three-quarter) so a shape can be judged rather than described.
nx_meshview <in.nxmesh> <out.png> [layer] layer: -1 all (default), 0 skin, 1 muscle, 2 bone
license_tier: ORIGINAL expect_exit: 0 No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_png.nxnx_itoa_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const MV_MAGIC_8388607: i64 = 8388607 |
| 13 | const MV_MAGIC_8388608: i64 = 8388608 |
| 15 | const MV_W: i64 = 1200 |
| 16 | const MV_H: i64 = 460 |
| 17 | const MV_VW: i64 = 400 // per-view width |
| 18 | const MV_TS: i64 = 84 // triangle stride in the file |
| 23 | const MV_FAR: i64 = 2000000000 |
| 24 | const MV_BG: i64 = 0x141c28 // the dark slate the other gates use, so renders are comparable |
| 25 | const MV_MARGIN: i64 = 24 |
functions
| 27 | func mv_puts(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 |
| 32 | func mv_pn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 33 | func mv_atoi(s: *u8) -> i64 called by 1: main |
| 39 | func mv_abs(v: i64) -> i64 { if v<0 { return 0-v } return v } |
| 40 | func mv_rd32(b: *u8, o: i64) -> i64 called by 1: main |
| 46 | func mv_f32(bits: i64, scale: i64) -> i64 called by 1: main |
| 70 | func mv_px(vx: i64, vy: i64, vz: i64, view: i64) -> i64 called by 1: main |
| 78 | func mv_pz(vx: i64, vy: i64, vz: i64, view: i64) -> i64 called by 1: main |
| 84 | func main(argc: i64, argv: *i64) -> i64 |