Support arbitrary large meshes in multiccd by reusing EPA memory.

PiperOrigin-RevId: 947709621
Change-Id: Idc4f168434b9d0a8555c0bed989adb0e99770a78
This commit is contained in:
Kyle Bayes
2026-07-14 08:47:52 -07:00
committed by Copybara-Service
parent 0afafacfc5
commit 2444defc63
18 changed files with 680 additions and 87 deletions
+3 -1
View File
@@ -1887,7 +1887,9 @@ static void collisionTask(const mjModel* m, mjData* d, void* arg, int thread_id,
static void mj_narrowphase(const mjModel* m, mjData* d, const mjcPair* buffer, int npair,
size_t parena) {
int nthread = mju_numThread(d);
int ccd_size = mjc_ccdSize(m->opt.ccd_iterations);
int npolygonmax = mjDISABLED(mjDSBL_MULTICCD) ? 0 : m->npolygonmax;
int nmeshdegmax = mjDISABLED(mjDSBL_MULTICCD) ? 0 : m->nmeshdegmax;
int ccd_size = mjc_ccdSize(npolygonmax, nmeshdegmax, m->opt.ccd_iterations);
mjtNum margin, gap;
// try to balance load of 5 chunks per thread (chunksize should be divisible by 16)