nx_quadruped.nx
buildroot/runtime/nx_quadruped.nx
about
nx_quadruped.nx -- QUADRUPED rig + walk gait + body-fill: the bestiary's ANIMALS move too (operator thesis:
reuse synthetic assets "from animals to people to monsters" + give them motion). An 18-joint quadruped rig on
the SAME nx_skeleton FK substrate (root barrel -> chest/head + hips/tail + 4 three-bone legs), a DIAGONAL
WALK gait (FL+HR swing in phase, FR+HL antiphase -- the real quadruped walk coordination; legs point -y so a
pitch(Rz) swing moves the foot along the body axis x), and quadpose_fill = the wolf body as bone-anchored
ellipsoids + sphere-chain legs/tail on the CURRENT pose, rendering on the production shader like everything
else. Gait parameters are data (amplitudes/period per call). license_tier: ORIGINAL
dependencies 3 imports · 2 importers
imports: nx_syscalls.nxnx_bodypose.nxnx_itrig.nx
imported by: nx_quad_gaits_gate.nxnx_wolf_walk_gate.nx
structs
| none |
consts
| 11 | const QR_MAGIC_12868: i64 = 12868 |
| 12 | const QR_MAGIC_25736: i64 = 25736 |
| 13 | const QR_MAGIC_4096: i64 = 4096 |
| 14 | const QR_MAGIC_6434: i64 = 6434 |
| 15 | const QR_MAGIC_2048: i64 = 2048 |
| 16 | const QR_MAGIC_2300: i64 = 2300 |
| 17 | const QR_MAGIC_2900: i64 = 2900 |
| 19 | const QR_ROOT: i64 = 0 |
| 20 | const QR_CHEST: i64 = 1 |
| 21 | const QR_HEAD: i64 = 2 |
| 22 | const QR_HIPS: i64 = 3 |
| 23 | const QR_FLHIP: i64 = 4 |
| 24 | const QR_FLKNEE: i64 = 5 |
| 25 | const QR_FLFOOT: i64 = 6 |
| 26 | const QR_FRHIP: i64 = 7 |
| 27 | const QR_FRKNEE: i64 = 8 |
| 28 | const QR_FRFOOT: i64 = 9 |
| 29 | const QR_HLHIP: i64 = 10 |
| 30 | const QR_HLKNEE: i64 = 11 |
| 31 | const QR_HLFOOT: i64 = 12 |
| 32 | const QR_HRHIP: i64 = 13 |
| 33 | const QR_HRKNEE: i64 = 14 |
| 34 | const QR_HRFOOT: i64 = 15 |
| 35 | const QR_TAIL1: i64 = 16 |
| 36 | const QR_TAIL2: i64 = 17 |
functions
| 38 | func qdeg(d: i64) -> i64 { return d * QR_MAGIC_12868 / 180 } |
| 41 | func quad_build(sk: i64) -> i64 |
| 66 | func quad_gait_pose(sk: i64, t4096: i64, swing_deg: i64) -> i64 |
| 93 | func qleg(a: i64, ampfx: i64, off: i64) -> i64 { let p: i64 = a + off * QR_MAGIC_25736 / QR_MAGIC_4096; return ampfx * it_sin4096(p) / QR_MAGIC_4096 } |
| 94 | func qabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } called by 1: quad_gait_pose_g |
| 98 | func quad_gait_pose_g(sk: i64, t4096: i64, gait: i64) -> i64 |
| 125 | func quad_add_horns(base: i64, n0: i64, sk: i64) -> i64 |
| 138 | func quadpose_fill(base: i64, sk: i64) -> i64 |