code wiki / (root) / nx_skeleton.nx

nx_skeleton.nx

buildroot/runtime/nx_skeleton.nx

6111 B154 linesdepth 2pulls 3 transitivereach 34 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_skeleton.nx -- SKELETON + LINEAR-BLEND SKINNING (the character-foundation rung everything Elara needs hangs off: morphs, IK, jiggle-region binding, posing -- VAMX ladder R3, rides nx_mesh3 + nx_itrig per the reuse law). BONES ARE DATA: a rig is rows {parent, local offset, yaw, pitch} a mod can ship. World pose = parent-composed integer 3x3 rotations (fx256) + offsets (fx256). Skinned vertex = sum of per-bone weighted transforms of the vertex's BONE-LOCAL position (LBS with 2 influences, weights fx256 summing 256). ALL INTEGER => deterministic, VM-vettable, wasm-ready (base-relative). license_tier: ORIGINAL

dependencies 2 imports · 16 importers

nx_syscalls.nx nx_itrig.nx nx_skeleton.nx nx_bodybind.nx nx_bodypose.nx nx_creature_motion.nx nx_creature_motion_gate.nx nx_figure_render.nx nx_ik.nx nx_motion_neural_gate.nx nx_motion_photo_gate.nx nx_motion_video_gate.nx nx_movelib.nx

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

imports: nx_syscalls.nxnx_itrig.nx

imported by: nx_bodybind.nxnx_bodypose.nxnx_creature_motion.nxnx_creature_motion_gate.nxnx_figure_render.nxnx_ik.nxnx_motion_neural_gate.nxnx_motion_photo_gate.nxnx_motion_video_gate.nxnx_movelib.nxnx_pose_retarget.nxnx_pose_retarget_gate.nxnx_skeleton_gate.nxnx_synth_serve.nxnx_text2motion_gate.nxnx_wasm_charlab.nx

structs

none

consts

13const SK_MAXB: i64 = 32
17const SK_MAXV: i64 = 2048

functions

21func sk_hdr(base: i64) -> *i64 { return base as *i64 }
22func sk_lr(base: i64) -> *i64 { return (base + 16) as *i64 }
called by 1: sk_update
23func sk_vs(base: i64) -> *i64 { return (base + 88) as *i64 }
24func sk_bone(base: i64, i: i64) -> *i64 { return (base + 256 + i * 256) as *i64 }
25func sk_vert(base: i64, i: i64) -> *i64 { return (base + 256 + SK_MAXB * 256 + i * 64) as *i64 }
called by 2: sk_add_vertsk_skin
26func sk_out(base: i64, i: i64) -> *i64 { return (base + 256 + SK_MAXB * 256 + SK_MAXV * 64 + i * 24) as *i64 }
called by 2: sk_skinmain
27func sk_bytes() -> i64 { return 256 + SK_MAXB * 256 + SK_MAXV * 64 + SK_MAXV * 24 + 64 }
called by 21: mainmainmainmainmainmain+15
29func sk_init(base: i64) -> i64
35func sk_add_bone(base: i64, parent: i64, ox: i64, oy: i64, oz: i64) -> i64
46func sk_pose(base: i64, bone: i64, yaw: i64, pitch: i64) -> i64
52func sk_add_vert(base: i64, b0: i64, w0: i64, b1: i64, w1: i64, lx: i64, ly: i64, lz: i64) -> i64
called by 1: mk_tube calls 2: sk_hdrsk_vert
66func sk_localrot(yaw: i64, elev: i64, out: *i64) -> i64
82func sk_matmul(a: *i64, b: *i64, out: *i64) -> i64
94func sk_matvec(m: *i64, x: i64, y: i64, z: i64, out: *i64) -> i64
102func sk_update(base: i64) -> i64
129func sk_skin(base: i64) -> i64