code wiki / (root) / nx_bodypose.nx

nx_bodypose.nx

buildroot/runtime/nx_bodypose.nx

6019 B105 linesdepth 4pulls 6 transitivereach 6 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_bodypose.nx -- SKIN THE MANNEQUIN (swap+motion S-ladder, toward S6): pose the CONTINUOUS SDF body from the FK rig, so a MOVE renders on the PHOTOREAL-path raymarcher (nx_sdfrender shading: SSS/pores/spec/AO) instead of the flat mannequin discs. Mapping (a BINDING IS DATA, per nx_bodybind doctrine): * TORSO/HEAD parts = the sdf_body ellipsoids, each anchored to a bone (center = boneWorld + rest offset). * LIMBS = SPHERE-CHAINS along each posed bone segment (3 tapered spheres shoulder->elbow etc.): spheres are ROTATION-INVARIANT, so a bent limb is orientation-correct BY CONSTRUCTION (no ellipsoid-rotation math), and smin fuses the chain into one smooth limb. 36 parts total (PARTS_CAP 48). bodypose_fill(base, sk) rewrites base's O_PARTS/O_NPART/O_KBLEND from the CURRENT skeleton pose; call after sk_update, before rendering. license_tier: ORIGINAL

dependencies 4 imports · 3 importers

nx_syscalls.nx nx_sdfrender.nx nx_skeleton.nx nx_figure_render.nx nx_bodypose.nx nx_creature_motion.nx nx_motion_photo_gate.nx nx_quadruped.nx

imports: nx_syscalls.nxnx_sdfrender.nxnx_skeleton.nxnx_figure_render.nx

imported by: nx_creature_motion.nxnx_motion_photo_gate.nxnx_quadruped.nx

structs

none

consts

14const K_MAGIC_4096: i64 = 4096

functions

16func bp_part(base: i64, i: i64, cx: i64, cy: i64, cz: i64, rx: i64, ry: i64, rz: i64) -> i64
24func bp_anchor(base: i64, i: i64, sk: i64, bone: i64, orr: *i64) -> i64
34func bp_chain(base: i64, idx: i64, sk: i64, b0: i64, b1: i64, r0: i64, r1: i64) -> i64
52func bp_ball(base: i64, idx: i64, sk: i64, bone: i64, o4: *i64) -> i64
62func bodypose_fill(base: i64, sk: i64) -> i64