code wiki / (root) / nx_loop_subdiv.nx

nx_loop_subdiv.nx

buildroot/runtime/nx_loop_subdiv.nx

5694 B147 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind librarytopic loop
docsdependenciesstructsconstsfunctions

about

nx_loop_subdiv.nx -- LOOP SUBDIVISION (Charles Loop, 1987): the triangle-mesh SMOOTH-LIMIT subdivision scheme. Unlike linear midpoint refinement (nx_subdiv sd_subdivide, which keeps original vertices FIXED = same silhouette, only more triangles), Loop REPOSITIONS even (original) vertices toward the neighbour centroid, and weights each new odd (edge) vertex by the two OPPOSITE vertices (3/8(a+b) + 1/8(c+d)) -> the mesh converges to a smooth limit surface (a coarse octahedron -> a round blob). Integer fx256, deterministic. This is the census GAP "no Catmull-Clark smooth-limit subdivision" answered for triangle meshes. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_subdiv.nx nx_loop_subdiv.nx nx_loop_subdiv_gate.nx

imports: nx_subdiv.nx

imported by: nx_loop_subdiv_gate.nx

structs

none

consts

none

functions

11func lsd_neighbours(meshIn: i64, vi: i64, sum: *i64, seen: *i64) -> i64
called by 1: loop_subdivide calls 3: m3_hdrm3_trim3_vert
57func lsd_opposite(meshIn: i64, a: i64, b: i64, curT: i64) -> i64
called by 1: lsd_oddvert calls 2: m3_hdrm3_tri
87func lsd_oddvert(meshIn: i64, meshOut: i64, a: i64, b: i64, c: i64, curT: i64) -> i64
105func loop_subdivide(meshIn: i64, meshOut: i64, seen: *i64, sum: *i64) -> i64