code wiki / (root) / nx_movelib.nx

nx_movelib.nx

buildroot/runtime/nx_movelib.nx

13683 B228 linesdepth 4pulls 5 transitivereach 11 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_movelib.nx -- MOTION AS DATA (swap+motion census SCOPE B, the operator's headline: a synthetic human wants a move that isn't in the library -> BUILD it). A MOVE is DATA: keyframes over a loop period, each keyframe = a per-bone {yaw,pitch} pose. move_gen is a PARAMETRIC generator (data-driven vocabulary, grows by adding a recipe -- exactly like nx_t2mesh grows objects; NOT neural MDM, which is the S6 rung). move_pose_at interpolates the keyframes and poses the skeleton via nx_skeleton FK. Both the synthetic human AND the game system draw from the same library. Angles in rad*4096 (nx_itrig). license_tier: ORIGINAL

dependencies 4 imports · 6 importers

nx_syscalls.nx nx_skeleton.nx nx_itrig.nx nx_figure_render.nx nx_movelib.nx nx_creature_motion_gate.nx nx_motion_neural.nx nx_motion_photo_gate.nx nx_motion_video_gate.nx nx_newmoves_gate.nx nx_synth_serve.nx

imports: nx_syscalls.nxnx_skeleton.nxnx_itrig.nxnx_figure_render.nx

imported by: nx_creature_motion_gate.nxnx_motion_neural.nxnx_motion_photo_gate.nxnx_motion_video_gate.nxnx_newmoves_gate.nxnx_synth_serve.nx

structs

none

consts

11const MOVE_MAGIC_12868: i64 = 12868
12const MOVE_MAGIC_1200: i64 = 1200
13const MOVE_MAGIC_1600: i64 = 1600
14const MOVE_MAGIC_1400: i64 = 1400
15const MOVE_MAGIC_1800: i64 = 1800
16const MOVE_MAGIC_1500: i64 = 1500
17const MOVE_MAGIC_2000: i64 = 2000
18const MOVE_MAGIC_4096: i64 = 4096
20const MOVE_MAXK: i64 = 8 // max keyframes

functions

22func mv_hdr(base: i64) -> *i64 { return base as *i64 } // [0]=nk [1]=period_ms
23func mv_time(base: i64) -> *i64 { return (base + 64) as *i64 } // [k] = key time ms
25func mv_pose(base: i64, k: i64, b: i64) -> *i64 { return (base + 64 + MOVE_MAXK * 8 + (k * RIG_NB + b) * 16) as *i64 }
26func move_bytes() -> i64 { return 64 + MOVE_MAXK * 8 + MOVE_MAXK * RIG_NB * 16 + 64 }
29func md_deg(d: i64) -> i64 { return d * MOVE_MAGIC_12868 / 180 }
31func mv_zero(base: i64) -> i64
called by 1: move_gen calls 1: mv_pose
40func mv_set(base: i64, k: i64, b: i64, yaw: i64, pitch: i64) -> i64 { let p: *i64 = mv_pose(base, k, b); p[0] = yaw; p[1] = pitch; return 0 }
called by 1: move_gen calls 1: mv_pose
42func mv_times(base: i64, nk: i64, period: i64) -> i64
called by 1: move_gen calls 2: mv_hdrmv_time
51func move_name(id: i64) -> *u8
called by 1: main
64func move_id_of(prompt: *u8) -> i64
calls 1: mv_has
86func mv_has(s: *u8, kw: *u8) -> i64
called by 1: move_id_of
105func move_gen(base: i64, id: i64) -> i64
202func move_pose_at(moveBase: i64, sk: i64, t: i64) -> i64