Add mju_interpolate3D.

This is a more general API in preparation of a higher interpolation order

PiperOrigin-RevId: 820174741
Change-Id: I81bd52ab44e0485d72579e21d1c8a48a1b35ec3f
This commit is contained in:
Alessio Quaglino
2025-10-16 04:38:15 -07:00
committed by Copybara-Service
parent 48f10bfcb6
commit ffdfe542cf
5 changed files with 44 additions and 15 deletions
+1 -3
View File
@@ -186,9 +186,7 @@ static int mj_vertBodyWeight(const mjModel* m, const mjData* d, int f, int v,
int nb = 0;
for (int i = nstart; i < nend; i++) {
mjtNum w = ((i-nstart)&1 ? coord[2] : 1-coord[2]) *
((i-nstart)&2 ? coord[1] : 1-coord[1]) *
((i-nstart)&4 ? coord[0] : 1-coord[0]);
mjtNum w = mju_evalBasis(coord, i-nstart, m->flex_interp[f]);
if (w < 1e-5) {
continue;
}