MCPcopy Create free account
hub / github.com/MIT-SPARK/Clio / clearActiveComponents

Method clearActiveComponents

clio/src/object_update_functor.cpp:141–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void ObjectUpdateFunctor::clearActiveComponents(DynamicSceneGraph& graph,
142 const std::set<size_t>& active) const {
143 auto iter = components_.begin();
144 while (iter != components_.end()) {
145 if (!active.count(iter->first)) {
146 ++iter;
147 continue;
148 }
149
150 for (const auto node_id : iter->second->segments) {
151 node_to_component_.erase(node_id);
152 }
153
154 for (const auto& node_id : iter->second->objects) {
155 graph.removeNode(node_id);
156 active_.erase(node_id);
157 }
158
159 components_ids_.markFree(iter->first);
160 iter = components_.erase(iter);
161 }
162}
163
164std::set<size_t> ObjectUpdateFunctor::addSegmentEdges(DynamicSceneGraph& graph) const {
165 const auto& segments = graph.getLayer(DsgLayers::SEGMENTS);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected