MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/SOAR / Build

Method Build

src/simulator/local_sensing/include/ikd-Tree/ikd_Tree.cpp:337–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337void KD_TREE::Build(PointVector point_cloud){
338 if (Root_Node != nullptr){
339 delete_tree_nodes(&Root_Node);
340 }
341 if (point_cloud.size() == 0) return;
342 STATIC_ROOT_NODE = new KD_TREE_NODE;
343 InitTreeNode(STATIC_ROOT_NODE);
344 BuildTree(&STATIC_ROOT_NODE->left_son_ptr, 0, point_cloud.size()-1, point_cloud);
345 Update(STATIC_ROOT_NODE);
346 STATIC_ROOT_NODE->TreeSize = 0;
347 Root_Node = STATIC_ROOT_NODE->left_son_ptr;
348}
349
350void KD_TREE::Nearest_Search(PointType point, int k_nearest, PointVector& Nearest_Points, vector<float> & Point_Distance, double max_dist){
351 MANUAL_HEAP q(2*k_nearest);

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected