code wiki / (root) / nx_isosurf_orientation_candidate_t343.nx

nx_isosurf_orientation_candidate_t343.nx

buildroot/runtime/nx_isosurf_orientation_candidate_t343.nx

7105 B145 linesdepth 4pulls 6 transitivereach 2 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 · 2 importers

nx_syscalls.nx nx_trimesh.nx nx_vecmath.nx nx_isosurf_orientation_candida nx_isosurf_orientation_gate_t343.n nx_person_mesh_oriented_t343.nx

imports: nx_syscalls.nxnx_trimesh.nxnx_vecmath.nx

imported by: nx_isosurf_orientation_gate_t343.nxnx_person_mesh_oriented_t343.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