nx_trimesh.nx
buildroot/runtime/nx_trimesh.nx
about
dependencies 4 imports · 50 importers
diagram shows first 10 each side; +0 more imports, +40 more importers in the complete lists below.
imports: nx_syscalls.nxnx_itrig.nxnx_vecmath.nxnx_relief_lib.nx
imported by: nx_aa_gate.nxnx_authorworld_gate.nxnx_being_showcase.nxnx_bodyatlas_mesh_gate.nxnx_boxtex_gate.nxnx_bunny_gate.nxnx_cornell.nxnx_cornell_dyn_gate.nxnx_cornell_gate.nxnx_dance_emit.nxnx_donor_native.nxnx_engine_lod_gate.nxnx_engine_phys_gate.nxnx_engine_scene_gate.nxnx_engine_stream_gate.nxnx_gltf_accessor_candidate_t181.nxnx_gltf_anim.nxnx_gltf_anim_gate.nxnx_gltf_load.nxnx_gltf_load_gate.nxnx_gltf_load_inventory_t180.nxnx_gltf_load_preserve_t145.nxnx_gltf_mesh.nxnx_gltf_mesh_gate.nxnx_gltf_scene.nxnx_gltf_scene_gate.nxnx_hands_gate.nxnx_isosurf.nxnx_isosurf_gate.nxnx_isosurf_orientation_candidate_t343.nxnx_native_turntable.nxnx_nxa2glb_gate.nxnx_nxa_texbake_decode_t279.nxnx_nxa_texbake_lib.nxnx_objload.nxnx_part_solver_gate.nxnx_phong_gate.nxnx_retarget_emit.nxnx_retarget_showcase.nxnx_stdassets_gate.nxnx_texture_gate.nxnx_tissuefield_lib.nxnx_trimesh_gate.nxnx_wire_crawl_gate.nxnx_wire_diablo2_gate.nxnx_wire_endlesssky_gate.nxnx_wire_nethack_gate.nxnx_worldpipe.nxnx_worldpipe_gate.nxnx_worldpipe_render.nx
structs
| none |
consts
| 12 | const TM_MAGIC_1024: i64 = 1024 |
| 13 | const TM_MAGIC_1000000000: i64 = 1000000000 |
| 14 | const TM_MAGIC_374761393: i64 = 374761393 |
| 15 | const TM_MAGIC_668265263: i64 = 668265263 |
| 16 | const TM_MAGIC_1610612741: i64 = 1610612741 |
| 17 | const TM_MAGIC_1274126177: i64 = 1274126177 |
| 18 | const TM_MAGIC_1048576: i64 = 1048576 |
| 19 | const TM_MAGIC_4096: i64 = 4096 |
| 20 | const TM_MAGIC_1618: i64 = 1618 |
| 21 | const TM_MAGIC_65536: i64 = 65536 |
| 22 | const TM_MAGIC_1300: i64 = 1300 |
| 23 | const TM_MAGIC_2400: i64 = 2400 |
| 24 | const TM_MAGIC_3000: i64 = 3000 |
| 25 | const TM_MAGIC_100000: i64 = 100000 |
| 26 | const TM_MAGIC_90000: i64 = 90000 |
| 27 | const TM_MAGIC_65535: i64 = 65535 |
| 28 | const TM_MAGIC_37777: i64 = 37777 |
| 29 | const TM_MAGIC_91131: i64 = 91131 |
| 30 | const TM_MAGIC_6144: i64 = 6144 |
| 31 | const TM_MAGIC_81111: i64 = 81111 |
| 32 | const TM_MAGIC_2000000000: i64 = 2000000000 |
| 41 | const TM_GRID: i64 = 256 // max polygonizer grid resolution supported |
| 42 | const TM_FOLD: i64 = 16 // surface-crossings per cell column, worst case. MEASURED |
| 48 | const TM_VCAP: i64 = TM_GRID*TM_GRID*TM_FOLD |
| 49 | const TM_TCAP: i64 = TM_VCAP*2 // surface nets emits ~2 triangles per vertex |
| 85 | const TM_SHRES: i64 = 576 |
| 215 | const TM_NMID: i64 = 128 |
| 216 | const TM_NSCL: i64 = 127 |
functions
| 61 | func tm_vcap() -> i64 { if TM_VCAPN == 0 { return TM_VCAP } return TM_VCAPN } |
| 62 | func tm_tcap() -> i64 { if TM_TCAPN == 0 { return TM_TCAP } return TM_TCAPN } called by 1: tm_tri |
| 77 | func tm_ovf() -> i64 { return TM_OVF } |
| 79 | func tm_set_spec(v: i64) -> i64 { TM_SPEC = v; return 0 } |
| 81 | func tm_set_tex(scale: i64) -> i64 { TM_TEX = scale; return 0 } |
| 101 | func tm_set_sun(x: i64, y: i64, z: i64) -> i64 |
| 108 | func tm_set_shadow(v: i64) -> i64 { TM_SHON = v; return 0 } |
| 109 | func tm_shadow_bake() -> i64 |
| 192 | func tm_shadow_at(wx: i64, wy: i64, wz: i64) -> i64 called by 1: trimesh_render |
| 211 | func tm_set_image(rgb: *u8, w: i64, h: i64) -> i64 { TM_IMG = rgb as i64; TM_IMGW = w; TM_IMGH = h; return 0 } |
| 217 | func tm_set_normalmap(rgb: *u8, w: i64, h: i64) -> i64 { TM_NRM = rgb as i64; TM_NRMW = w; TM_NRMH = h; return 0 } |
| 226 | func tm_perturb_normal(nx: i64, ny: i64, nz: i64, tx: i64, ty: i64, tz: i64, out3: *i64) -> i64 |
| 257 | func tm_vuv(idx: i64, u: i64, v: i64) -> i64 { let pu: *i64 = TM_VU as *i64; let pv: *i64 = TM_VV as *i64; pu[idx] = u; pv[idx] = v; return 0 } |
| 261 | func tm_hash3(a: i64, b: i64, c: i64) -> i64 { return rlf_hash3(a, b, c) } |
| 264 | func tm_noise3(x: i64, y: i64, z: i64, S: i64) -> i64 { return rlf_noise3(x, y, z, S) } |
| 266 | func tm_isqrt(v: i64) -> i64 { return vm_isqrt(v) } called by 20: ntb_encode_normal_umntb_encode_normal_umntr_joint_extentsntr_footprintntr_pore_periodntr_run+14 calls 1: vm_isqrt |
| 267 | func tm_min(a: i64, b: i64) -> i64 { if a<b {return a} return b } called by 1: tm_min3 |
| 268 | func tm_max(a: i64, b: i64) -> i64 { if a>b {return a} return b } called by 1: tm_max3 |
| 269 | func tm_min3(a: i64, b: i64, c: i64) -> i64 { return tm_min(tm_min(a,b),c) } |
| 270 | func tm_max3(a: i64, b: i64, c: i64) -> i64 { return tm_max(tm_max(a,b),c) } |
| 272 | func tm_reset() -> i64 |
| 291 | func tm_bind_bytes(nv: i64, nt: i64) -> i64 { return nv*8*9 + nt*8*4 } |
| 292 | func tm_bind(mem: i64, nv: i64, nt: i64) -> i64 |
| 315 | func tm_vcol(idx: i64, col: i64) -> i64 { let p: *i64 = TM_VCOL as *i64; p[idx] = col; return 0 } |
| 317 | func tm_vpos(idx: i64, out: *i64) -> i64 { let px: *i64=TM_VX as *i64; let py: *i64=TM_VY as *i64; let pz: *i64=TM_VZ as *i64; out[0]=px[idx]; out[1]=py[idx]; out[2]=pz[idx]; return 0 } |
| 318 | func tm_vnorm(idx: i64, out: *i64) -> i64 { let px: *i64=TM_VNX as *i64; let py: *i64=TM_VNY as *i64; let pz: *i64=TM_VNZ as *i64; out[0]=px[idx]; out[1]=py[idx]; out[2]=pz[idx]; return 0 } |
| 319 | func tm_getvcol(idx: i64) -> i64 { let p: *i64=TM_VCOL as *i64; return p[idx] } |
| 323 | func tm_vx(i: i64) -> i64 { let p: *i64=TM_VX as *i64; return p[i] } |
| 324 | func tm_vy(i: i64) -> i64 { let p: *i64=TM_VY as *i64; return p[i] } |
| 325 | func tm_vz(i: i64) -> i64 { let p: *i64=TM_VZ as *i64; return p[i] } |
| 326 | func tm_vnx(i: i64) -> i64 { let p: *i64=TM_VNX as *i64; return p[i] } |
| 327 | func tm_vny(i: i64) -> i64 { let p: *i64=TM_VNY as *i64; return p[i] } |
| 328 | func tm_vnz(i: i64) -> i64 { let p: *i64=TM_VNZ as *i64; return p[i] } |
| 329 | func tm_ta(i: i64) -> i64 { let p: *i64=TM_TA as *i64; return p[i] } |
| 330 | func tm_tb(i: i64) -> i64 { let p: *i64=TM_TB as *i64; return p[i] } |
| 331 | func tm_tc(i: i64) -> i64 { let p: *i64=TM_TC as *i64; return p[i] } |
| 332 | func tm_tget(t: i64, out: *i64) -> i64 { let pa: *i64=TM_TA as *i64; let pb: *i64=TM_TB as *i64; let pc: *i64=TM_TC as *i64; out[0]=pa[t]; out[1]=pb[t]; out[2]=pc[t]; return 0 } |
| 334 | func tm_place(from: i64, to: i64, dx: i64, dy: i64, dz: i64, mil: i64) -> i64 |
| 346 | func tm_compute_normals() -> i64 |
| 373 | func tm_vert(x: i64, y: i64, z: i64) -> i64 |
| 382 | func tm_vert_n(x: i64, y: i64, z: i64, nx: i64, ny: i64, nz: i64) -> i64 called by 12: cornell_tomeshgltf_load_stdgltf_load_allgltf_load_stdgltf_load_allgltf_load_std+6 calls 1: tm_vcap |
| 391 | func tm_tri(a: i64, b: i64, c: i64, col: i64) -> i64 called by 26: cluster_decimategltf_loadgltf_load_stdgltf_load_allgltf_loadgltf_load_std+20 calls 1: tm_tcap |
| 399 | func tm_quad(a: i64, b: i64, c: i64, d: i64, col: i64) -> i64 { tm_tri(a,b,c,col); tm_tri(a,c,d,col); return 0 } |
| 400 | func tm_nt() -> i64 { return TM_NT } |
| 401 | func tm_nv() -> i64 { return TM_NV } |
| 404 | func tm_cube(cx: i64, cy: i64, cz: i64, s: i64, col: i64) -> i64 |
| 416 | func tm_tetra(cx: i64, cy: i64, cz: i64, s: i64, col: i64) -> i64 |
| 422 | func tm_octa(cx: i64, cy: i64, cz: i64, s: i64, col: i64) -> i64 |
| 429 | func tm_pyramid(cx: i64, cy: i64, cz: i64, s: i64, col: i64) -> i64 |
| 437 | func tm_prism(cx: i64, cy: i64, cz: i64, s: i64, col: i64) -> i64 { // triangular prism (extruded triangle along z) |
| 446 | func tm_icosa(cx: i64, cy: i64, cz: i64, s: i64, col: i64) -> i64 |
| 459 | func tm_uvsphere(cx: i64, cy: i64, cz: i64, s: i64, rings: i64, segs: i64, col: i64) -> i64 |
| 495 | func tm_figure(cx: i64, cy: i64, cz: i64, col: i64) -> i64 |
| 513 | func trimesh_render(fb: *i64, zbuf: *i64, W: i64, H: i64, yaw: i64, pitch: i64, camz: i64, focal: i64, smooth: i64) -> i64 |
| 748 | func trimesh_zclear(zbuf: *i64, n: i64) -> i64 { var i: i64=0; while i<n { zbuf[i] = TM_MAGIC_2000000000; i=i+1 } return 0 } |
| 750 | func trimesh_render_aa(fb: *i64, W: i64, H: i64, yaw: i64, pitch: i64, camz: i64, focal: i64, smooth: i64) -> i64 |