Support arbitrary large meshes in multiccd by reusing EPA memory.
PiperOrigin-RevId: 947709621 Change-Id: Idc4f168434b9d0a8555c0bed989adb0e99770a78
This commit is contained in:
committed by
Copybara-Service
parent
0afafacfc5
commit
2444defc63
@@ -1321,6 +1321,17 @@ static void setSpring(mjModel* m, mjData* d) {
|
||||
|
||||
// entry point: set all remaining constant fields of mjModel, except for lengthrange
|
||||
void mj_setConst(mjModel* m, mjData* d) {
|
||||
// compute npolygonmax and nmeshdegmax
|
||||
m->npolygonmax = 0;
|
||||
for (int i=0; i < m->nmeshpoly; i++) {
|
||||
m->npolygonmax = mjMAX(m->npolygonmax, m->mesh_polyvertnum[i]);
|
||||
}
|
||||
|
||||
m->nmeshdegmax = 0;
|
||||
for (int i=0; i < m->nmeshvert; i++) {
|
||||
m->nmeshdegmax = mjMAX(m->nmeshdegmax, m->mesh_polymapnum[i]);
|
||||
}
|
||||
|
||||
// recompute sameframe flags from current model geometry
|
||||
setSameframe(m);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user