code wiki / (root) / nx_isosurf.nx

nx_isosurf.nx

buildroot/runtime/nx_isosurf.nx

7105 B145 linesdepth 4pulls 6 transitivereach 22 importersview sourcekind librarytopic isosurf
docsdependenciesstructsconstsfunctions

about

nx_isosurf.nx -- ★F0 UNIFY implicit + explicit (from the graphics foundation census): a SURFACE-NETS polygonizer that turns a signed-distance FIELD into a real TRIANGLE MESH. This is the bridge that lets us MESH THE BEING (or any SDF): sample the SDF on a grid, place one vertex per surface-straddling cell (averaged edge crossings), connect the 4 cells around every sign-changing grid edge into a quad. Per-vertex normals come from the SDF GRADIENT (so smooth Gouraud shading is winding-independent). Fills the nx_trimesh buffers -> render with the existing rasterizer. license_tier: ORIGINAL

dependencies 3 imports · 22 importers

nx_syscalls.nx nx_trimesh.nx nx_vecmath.nx nx_isosurf.nx nx_arousal_mesh.nx nx_being_showcase.nx nx_bodyatlas_mesh_gate.nx nx_dance_emit.nx nx_engine_lod_gate.nx nx_engine_scene_gate.nx nx_gltf_anim_gate.nx nx_gltf_mesh_gate.nx nx_gltf_scene_gate.nx nx_hands_gate.nx

diagram shows first 10 each side; +0 more imports, +12 more importers in the complete lists below.

imports: nx_syscalls.nxnx_trimesh.nxnx_vecmath.nx

imported by: nx_arousal_mesh.nxnx_being_showcase.nxnx_bodyatlas_mesh_gate.nxnx_dance_emit.nxnx_engine_lod_gate.nxnx_engine_scene_gate.nxnx_gltf_anim_gate.nxnx_gltf_mesh_gate.nxnx_gltf_scene_gate.nxnx_hands_gate.nxnx_hull_mesh.nxnx_isosurf_gate.nxnx_person_mesh_candidate_t343.nxnx_phong_gate.nxnx_retarget_emit.nxnx_retarget_showcase.nxnx_skullsdf.nxnx_skullsdf_region_gate_t334.nxnx_skullsdf_verified_candidate_t333.nxnx_skullsdf_verified_r3_t333.nxnx_skullsdf_verified_r4_t333.nxnx_texture_gate.nx

structs

none

consts

9const K_MAGIC_1024: i64 = 1024
10const K_MAGIC_4096: i64 = 4096

functions

12func iso_isqrt(v: i64) -> i64 { return vm_isqrt(v) }
called by 1: surface_nets calls 1: vm_isqrt
16func surface_nets(grid: *i64, GX: i64, GY: i64, GZ: i64, ox: i64, oy: i64, oz: i64, cell: i64, iso: i64, col: i64) -> i64