PiperOrigin-RevId: 631748750 Change-Id: I4e1ae01207568c90fc49bcd7d9f760f5187f1afa
This commit is contained in:
committed by
Copybara-Service
parent
4eca3b048d
commit
96844db926
@@ -2969,12 +2969,18 @@ void mjCModel::FuseStatic(void) {
|
||||
// recompute parent contype, conaffinity, and margin
|
||||
par->contype = par->conaffinity = 0;
|
||||
par->margin = 0;
|
||||
for (const auto& geom : geoms) {
|
||||
for (const auto& geom : par->geoms) {
|
||||
par->contype |= geom->contype;
|
||||
par->conaffinity |= geom->conaffinity;
|
||||
par->margin = mju_max(par->margin, geom->margin);
|
||||
}
|
||||
|
||||
// recompute BVH
|
||||
int nbvhfuse = body->tree.nbvh + par->tree.nbvh;
|
||||
par->ComputeBVH();
|
||||
nbvhstatic += par->tree.nbvh - nbvhfuse;
|
||||
nbvh += par->tree.nbvh - nbvhfuse;
|
||||
|
||||
//------------- delete body (without deleting children)
|
||||
|
||||
// delete allocation
|
||||
|
||||
Reference in New Issue
Block a user