nx_softbody_region.nx
buildroot/runtime/nx_softbody_region.nx
about
nx_softbody_region.nx -- BODY-REGION soft physics with the OCCLUSION LAW (operator 2026-07-03: TittyMagic-
class "main physics parameters" for breast/ass/body regions + "when an object enters another object and is
occluded the physics should be more than visible area"). A REGION = an anchor + a ring of surface nodes
(the cross-section of a breast/glute/belly profile; full 3D shell = next rung) + a TittyMagic-class
PARAMETER BLOCK AS DATA: mass, spring, damper, per-axis gravity multipliers, collider softness, and the
VOLUME-REDISTRIBUTION gain. THE OCCLUSION LAW: when a capsule penetrates, each contact node's displacement
is measured and REDISTRIBUTED as outward push on the NON-contact nodes -- the flesh bulges where the
collider ISN'T (displaced volume goes somewhere; physics beyond the visible contact area).
ALL INTEGER (pos fx256, vel fx65536, 60Hz -- the ecosystem law) => byte-identical replays, VM-vettable.
Base-relative. license_tier: ORIGINAL
dependencies 1 imports · 4 importers
imports: nx_syscalls.nx
imported by: nx_bodybind.nxnx_softbody_region_gate.nxnx_softtissue_conserve_gate.nxnx_wasm_charlab.nx
structs
| none |
consts
| 19 | const SR_MAXN: i64 = 48 |
| 20 | const SR_MAXC: i64 = 8 |
| 21 | const SR_G: i64 = 178 |
functions
| 23 | func sr_hdr(base: i64) -> *i64 { return base as *i64 } |
| 24 | func sr_node(base: i64, i: i64) -> *i64 { return (base + 128 + i * 128) as *i64 } |
| 25 | func sr_cap(base: i64, i: i64) -> *i64 { return (base + 128 + SR_MAXN * 128 + i * 64) as *i64 } |
| 26 | func sr_bytes() -> i64 { return 128 + SR_MAXN * 128 + SR_MAXC * 64 + 64 } |
| 28 | func sr_isqrt(v: i64) -> i64 |
| 35 | func sr_iabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v } |
| 37 | func sr_init(base: i64, ax: i64, ay: i64, az: i64) -> i64 |
| 47 | func sr_param(base: i64, idx: i64, v: i64) -> i64 |
| 54 | func sr_add_node(base: i64, rx: i64, ry: i64, rz: i64) -> i64 |
| 67 | func sr_ring(base: i64, nn: i64, r: i64) -> i64 called by 6: mkrigmaincg_freeze_srcg_area_pctcg_bulgeworld_init calls 5: sys_mmapsr_add_nodesr_hdrsr_nodesr_isqrt |
| 106 | func sr_add_capsule(base: i64, x0: i64, y0: i64, z0: i64, x1: i64, y1: i64, z1: i64, r: i64) -> i64 |
| 116 | func sr_clear_capsules(base: i64) -> i64 |
| 121 | func sr_anchor(base: i64, ax: i64, ay: i64, az: i64) -> i64 |
| 127 | func sr_step(base: i64) -> i64 |
| 273 | func sr_pos(base: i64, i: i64, axis: i64) -> i64 { let n: *i64 = sr_node(base, i); return n[axis] } |
| 275 | func sr_area(base: i64) -> i64 |