nx_figure_render.nx
buildroot/runtime/nx_figure_render.nx
about
nx_figure_render.nx -- the ELARA RIG (17-joint humanoid skeleton, bones-as-data) + a fast software renderer
that draws the POSED skeleton as a shaded humanoid (tapered capsules between joints + a head), with a per-pixel
Z-BUFFER so limbs occlude correctly regardless of draw order. This is the MOTION-v0 render surface (swap+motion
census SCOPE B): forward-kinematics from nx_skeleton give correct joint motion for ANY authored move; the
figure is a mannequin preview -- skinning it with the photoreal SDF body / a rigged mesh is the deep rung (S5/S6).
ALL INTEGER (deterministic, VM-vettable). Rig consts are shared by nx_movelib (which poses the bones) and this
renderer (which draws them). Reuses nx_skeleton FK + nx_itrig. license_tier: ORIGINAL
dependencies 3 imports · 16 importers
diagram shows first 10 each side; +0 more imports, +6 more importers in the complete lists below.
imports: nx_syscalls.nxnx_skeleton.nxnx_itrig.nx
imported by: nx_bodypose.nxnx_creature_motion.nxnx_creature_motion_gate.nxnx_figr_probe.nxnx_motion_neural_gate.nxnx_motion_photo_gate.nxnx_motion_video_gate.nxnx_movelib.nxnx_newmoves_gate.nxnx_pose_coach_gate.nxnx_pose_estimate_gate.nxnx_poseelm_gate.nxnx_poseest2.nxnx_poseest_gate.nxnx_synth_serve.nxnx_text2motion_gate.nx
structs
| none |
consts
| 11 | const RIG_MAGIC_65536: i64 = 65536 |
| 12 | const RIG_MAGIC_4096: i64 = 4096 |
| 13 | const RIG_MAGIC_2000000000: i64 = 2000000000 |
| 14 | const RIG_MAGIC_6000: i64 = 6000 |
| 15 | const RIG_MAGIC_1024: i64 = 1024 |
| 20 | const RIG_NB: i64 = 17 |
| 21 | const RG_PELVIS: i64 = 0 |
| 22 | const RG_SPINE: i64 = 1 |
| 23 | const RG_CHEST: i64 = 2 |
| 24 | const RG_NECK: i64 = 3 |
| 25 | const RG_HEAD: i64 = 4 |
| 26 | const RG_SHL: i64 = 5 |
| 27 | const RG_ELL: i64 = 6 |
| 28 | const RG_WRL: i64 = 7 |
| 29 | const RG_SHR: i64 = 8 |
| 30 | const RG_ELR: i64 = 9 |
| 31 | const RG_WRR: i64 = 10 |
| 32 | const RG_HIPL: i64 = 11 |
| 33 | const RG_KNL: i64 = 12 |
| 34 | const RG_ANL: i64 = 13 |
| 35 | const RG_HIPR: i64 = 14 |
| 36 | const RG_KNR: i64 = 15 |
| 37 | const RG_ANR: i64 = 16 |
| 107 | const SK_R: i64 = 236 |
| 108 | const SK_G: i64 = 182 |
| 109 | const SK_B: i64 = 158 |
functions
| 17 | func fr_dbg(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } calls 1: sys_write |
| 41 | func rig_build(sk: i64) -> i64 |
| 64 | func rig_r0(i: i64) -> i64 called by 1: rig_draw |
| 83 | func rig_r1(i: i64) -> i64 called by 1: rig_draw |
| 103 | func fr_abs(a: i64) -> i64 { if a < 0 { return 0 - a } return a } called by 1: fr_capsule |
| 104 | func fr_clamp(v: i64, lo: i64, hi: i64) -> i64 { if v < lo { return lo } if v > hi { return hi } return v } |
| 113 | func fr_disc(fb: *i64, zb: *i64, w: i64, h: i64, c: *i64) -> i64 |
| 158 | func fr_capsule(fb: *i64, zb: *i64, w: i64, h: i64, e: *i64) -> i64 |
| 184 | func rig_draw(sk: i64, fb: *i64, zb: *i64, w: i64, h: i64, camyaw: i64, scale: i64) -> i64 |