41 : top_level(std::move(top_level_))
46 const std::shared_ptr<BulletCollisionShape>& value)
48 assert(!key->getUUID().is_nil());
49 std::scoped_lock lock(
mutex_);
50 cache_[key->getUUID()] = value;
53 std::shared_ptr<BulletCollisionShape>
56 assert(!key->getUUID().is_nil());
57 std::scoped_lock lock(
mutex_);
58 auto it =
cache_.find(key->getUUID());
61 std::shared_ptr<BulletCollisionShape> collision_shape = it->second.lock();
62 if (collision_shape !=
nullptr)
63 return collision_shape;
65 cache_.erase(key->getUUID());
72 std::scoped_lock lock(
mutex_);
75 if (it->second.expired())