17 #ifndef GZ_SIM_SYSTEMS_PHYSICS_CANONICAL_LINK_MODEL_TRACKER_HH_
18 #define GZ_SIM_SYSTEMS_PHYSICS_CANONICAL_LINK_MODEL_TRACKER_HH_
21 #include <unordered_map>
27 #include "gz/sim/config.hh"
31 inline namespace GZ_SIM_VERSION_NAMESPACE {
32 namespace systems::physics_system
71 const Entity _canonicalLink)
const;
76 public:
void RemoveLink(
const Entity &_link);
89 void CanonicalLinkModelTracker::AddNewModels(
94 const components::ModelCanonicalLink *_canonicalLinkComp)
96 this->linkModelMap[_canonicalLinkComp->Data()].insert(_model);
100 void CanonicalLinkModelTracker::AddAllModels(
105 const components::ModelCanonicalLink *_canonicalLinkComp)
107 this->linkModelMap[_canonicalLinkComp->Data()].insert(_model);
113 const Entity _canonicalLink)
const
115 auto it = this->linkModelMap.
find(_canonicalLink);
116 if (it != this->linkModelMap.end())
120 return this->kEmptyModelOrdering;
123 void CanonicalLinkModelTracker::RemoveLink(
const Entity &_link)
125 this->linkModelMap.erase(_link);