Fix bug in cached meshes where convex hull was missing. Previously if a mesh was copied from the cache it would not have its convex hull if the original mesh that was cached didn't previously compute it.
Fixes #2609 PiperOrigin-RevId: 756223337 Change-Id: I54705456636c270607a17340b249047e0df75d0b
This commit is contained in:
committed by
Copybara-Service
parent
6cfea71985
commit
f4774a5449
@@ -102,7 +102,8 @@ bool mjCCache::Insert(const std::string& modelname, const mjResource *resource,
|
||||
|
||||
|
||||
|
||||
// populate data from the cache into the given function
|
||||
// populate data from the cache into the given function, return true if data was
|
||||
// copied
|
||||
bool mjCCache::PopulateData(const mjResource* resource, mjCDataFunc fn) {
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
auto it = lookup_.find(resource->name);
|
||||
@@ -121,8 +122,7 @@ bool mjCCache::PopulateData(const mjResource* resource, mjCDataFunc fn) {
|
||||
entries_.erase(asset);
|
||||
entries_.insert(asset);
|
||||
|
||||
asset->PopulateData(fn);
|
||||
return true;
|
||||
return asset->PopulateData(fn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user