Store pointer to index in mjCBoundingVolume if possible.

PiperOrigin-RevId: 598592242
Change-Id: I8dc20a8d8a9a0e967688839fa22d75263c226958
This commit is contained in:
Alessio Quaglino
2024-01-15 06:03:28 -08:00
committed by Copybara-Service
parent cab1c6bb39
commit acf698e2df
4 changed files with 24 additions and 11 deletions
+2 -2
View File
@@ -600,7 +600,7 @@ void mjCMesh::Compile(const mjVFS* vfs) {
// get bounding volume
void mjCMesh::SetBoundingVolume(int faceid) {
mjCBoundingVolume* node = tree_.GetBoundingVolume(faceid);
node->id = faceid;
node->SetId(faceid);
node->conaffinity = 1;
node->contype = 1;
node->pos = center_ + 3*faceid;
@@ -2467,7 +2467,7 @@ void mjCFlex::CreateBVH(void) {
bv->contype = contype;
bv->conaffinity = conaffinity;
bv->quat = NULL;
bv->id = e;
bv->SetId(e);
bv->aabb = elemaabb.data() + 6*e;
bv->pos = bv->aabb;
}