Open 538Michael opened 1 year ago
In
m_kdTree = new KDTreeType(3, cloud, nanoflann::KDTreeSingleIndexAdaptorParams(10));
cloud
are referenced but not copied, by const DatasetAdaptor& KDTreeSingleIndexAdaptor::dataset_
.
When 'generateKDTree()' completes, 'cloud' is deconstructed and 'dataset_' becomes a null reference.
Hi, I've created a KDTree Class, I call, from main.cpp, another .cpp file to create the KDTree object and then return to me the KDTree object created for searchs, but when the object is passed throw reference, for some reason the dataset is empty.
Heres the code: KDTree.h
KDTree.cpp
genenerateKDTree.cpp
main.cpp