MCPcopy Create free account
hub / github.com/OctoMap/octomap / createTree

Method createTree

octomap/src/AbstractOcTree.cpp:184–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 AbstractOcTree* AbstractOcTree::createTree(const std::string class_name, double res){
185 std::map<std::string, AbstractOcTree*>::iterator it = classIDMapping().find(class_name);
186 if (it == classIDMapping().end()){
187 OCTOMAP_ERROR("Could not create octree of type %s, not in store in classIDMapping\n", class_name.c_str());
188 return NULL;
189 } else {
190 AbstractOcTree* tree = it->second->create();
191
192 tree->setResolution(res);
193 return tree;
194 }
195 }
196
197 std::map<std::string, AbstractOcTree*>& AbstractOcTree::classIDMapping(){
198 // we will "leak" the memory of the map and all trees until program exits,

Callers

nothing calls this directly

Calls 3

endMethod · 0.45
createMethod · 0.45
setResolutionMethod · 0.45

Tested by

no test coverage detected