Hello,
I'm using your KDTree for 2D points with Euclidean norm and do KDTreeQueryKNN() and then KDTreeQueryResultsTags() Is the search result guaranteed to be ordered in meaning of nondecreasing distance to "search point"?
I need to "order" of points of more or less regular polyline and do it in quite naive way: I take the first point (it's specified) and find nearest one, then nearest one for the last found and so on. Your KDTree can not be modified (point can not be removed) and I have to store boolean array of already involved points. On each step I try to find K nearest points, then take FIRST unused (if all are used I increase the K number).
Is it possible to modify The tree for point remove support or to make it support some think like callback boolean function, returning should point be returned as search result or not (to pass the callback to search proc and to use Tag as callback parameter).
Thank you.
|