code wiki / (root) / nx_mesh_sculpt_test.nx

nx_mesh_sculpt_test.nx

buildroot/runtime/nx_mesh_sculpt_test.nx

4290 B82 linesdepth 7pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic mesh
docsdependenciesstructsconstsfunctions

about

nx_mesh_sculpt_test.nx -- KAT gate for the ZBrush-class curved primitive + sculpt brush. Closed-form invariants: octahedron axis verts sit exactly on the sphere; subdivision counts follow the formula; projection keeps the poles exact; a north-pole inflate brush raises max_z by EXACTLY the strength while leaving the far (south) pole untouched and conserving topology. expect_exit: 0.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_mesh.nx nx_mesh_edit.nx nx_mesh_sculpt.nx nx_mesh_sculpt_test.nx

imports: nx_syscalls.nxnx_mesh.nxnx_mesh_edit.nxnx_mesh_sculpt.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap w sys_write nx_mesh_make_octahedron nx_mesh_alloc sys_mmap ↻ nx_mesh_set_vertex nx_mesh_set_triangle chk w ↻ eqi nx_mesh_validate nx_mesh_vert_radius nx_mesh_get_vertex_x nx_mesh_get_vertex_y nx_mesh_get_vertex_z nx_isqrt nx_mesh_make_icosphere nx_mesh_make_octahedron ↻ nx_mesh_subdivide nx_mesh_alloc ↻ nx_mesh_set_vertex ↻ nx_mesh_get_vertex_x ↻ nx_mesh_get_vertex_y ↻ nx_mesh_get_vertex_z ↻ nx_mesh_get_color nx_mesh_set_triangle ↻ nx_mesh_project_to_sphere nx_isqrt ↻ wn sys_mmap ↻ sys_write ↻ near nx_mesh_aabb nx_mesh_get_vertex_x ↻ nx_mesh_get_vertex_y ↻ nx_mesh_get_vertex_z ↻ nx_mesh_sculpt_brush nx_isqrt ↻

structs

none

consts

none

functions

12func w(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 2: chkmain calls 1: sys_write
13func wn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
22func chk(cond: i64, pass: *i64, fail: *i64, label: *u8) -> i64
called by 1: main calls 1: w
27func eqi(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
29func near(a: i64, b: i64, tol: i64) -> i64 { var d: i64 = a - b; if d < 0 { d = 0 - d } if d <= tol { return 1 } return 0 }
called by 1: main
31func main() -> i64