Add needsdf flag to mjsMesh.

PiperOrigin-RevId: 782949528
Change-Id: Iaa96326a91795c3469c991bd8def53560b38e4f0
This commit is contained in:
Alessio Quaglino
2025-07-14 10:10:27 -07:00
committed by Copybara-Service
parent 92bcbeb5d3
commit 9a41d385c1
6 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -1689,7 +1689,7 @@ void mjCModel::IndexAssets(bool discard) {
((mjCMesh*)mesh)->SetNotVisual(); // reset to true by mesh->Compile()
}
geom->mesh = (discard && geom->visual_) ? nullptr : (mjCMesh*)mesh;
static_cast<mjCMesh*>(mesh)->needoct_ |= geom->spec.type == mjGEOM_SDF;
static_cast<mjCMesh*>(mesh)->spec.needsdf |= geom->spec.type == mjGEOM_SDF;
} else {
throw mjCError(geom, "mesh '%s' not found in geom %d", geom->get_meshname().c_str(), i);
}