code wiki / (root) / nx_softbody_region.nx

nx_softbody_region.nx

buildroot/runtime/nx_softbody_region.nx

12601 B288 linesdepth 2pulls 2 transitivereach 7 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_softbody_region.nx nx_bodybind.nx nx_softbody_region_gate.nx nx_softtissue_conserve_gate.nx nx_wasm_charlab.nx

imports: nx_syscalls.nx

imported by: nx_bodybind.nxnx_softbody_region_gate.nxnx_softtissue_conserve_gate.nxnx_wasm_charlab.nx

structs

none

consts

19const SR_MAXN: i64 = 48
20const SR_MAXC: i64 = 8
21const SR_G: i64 = 178

functions

23func sr_hdr(base: i64) -> *i64 { return base as *i64 }
24func sr_node(base: i64, i: i64) -> *i64 { return (base + 128 + i * 128) as *i64 }
25func sr_cap(base: i64, i: i64) -> *i64 { return (base + 128 + SR_MAXN * 128 + i * 64) as *i64 }
26func sr_bytes() -> i64 { return 128 + SR_MAXN * 128 + SR_MAXC * 64 + 64 }
28func sr_isqrt(v: i64) -> i64
called by 2: sr_ringsr_step
35func sr_iabs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
37func sr_init(base: i64, ax: i64, ay: i64, az: i64) -> i64
47func sr_param(base: i64, idx: i64, v: i64) -> i64
54func sr_add_node(base: i64, rx: i64, ry: i64, rz: i64) -> i64
called by 1: sr_ring calls 2: sr_hdrsr_node
67func sr_ring(base: i64, nn: i64, r: i64) -> i64
106func sr_add_capsule(base: i64, x0: i64, y0: i64, z0: i64, x1: i64, y1: i64, z1: i64, r: i64) -> i64
116func sr_clear_capsules(base: i64) -> i64
called by 1: main calls 1: sr_hdr
121func sr_anchor(base: i64, ax: i64, ay: i64, az: i64) -> i64
called by 2: bb_drivemain calls 1: sr_hdr
127func sr_step(base: i64) -> i64
273func sr_pos(base: i64, i: i64, axis: i64) -> i64 { let n: *i64 = sr_node(base, i); return n[axis] }
275func sr_area(base: i64) -> i64