Add engine-internal convenience macro for allocating typed arrays, improve error message.

PiperOrigin-RevId: 705126655
Change-Id: I2bd8fada6d33a919d2fb82297f93ac57958355a4
This commit is contained in:
Yuval Tassa
2024-12-11 09:03:39 -08:00
committed by Copybara-Service
parent 3ca97248a3
commit 2691887500
25 changed files with 283 additions and 274 deletions
+2 -2
View File
@@ -1351,8 +1351,8 @@ void mj_multiRay(const mjModel* m, mjData* d, const mjtNum pnt[3], const mjtNum*
mj_markStack(d);
// allocate source
mjtNum* geom_ba = mj_stackAllocNum(d, 4*m->ngeom);
int* geom_eliminate = mj_stackAllocInt(d, m->ngeom);
mjtNum* geom_ba = mjSTACKALLOC(d, 4*m->ngeom, mjtNum);
int* geom_eliminate = mjSTACKALLOC(d, m->ngeom, int);
// initialize source
mju_multiRayPrepare(m, d, pnt, NULL, geomgroup, flg_static, bodyexclude,