eko Posted July 29, 2014 Share Posted July 29, 2014 Hi,I have a question! Is there a function about the K-Nearest Neighbor algorithm in HDK. I just find the "findAllCloseIdx(pt,maxdist,list)".It works fine. But I wonder if there is a function like ”pcopen()“ in vex. “findAllCloseIdx" has a "maxdist" option. I also need the "maxpoints" limit to make it more faster.Please help me!Thanks! Quote Link to comment Share on other sites More sharing options...
holycause Posted July 29, 2014 Share Posted July 29, 2014 with the GEO_PointTree, you can do that with the findNearestPT function http://www.sidefx.com/docs/hdk13.0/class_g_e_o___point_tree.html#a2678897fec3f911a590d0ef317ce3455 Quote Link to comment Share on other sites More sharing options...
eko Posted July 30, 2014 Author Share Posted July 30, 2014 Thanks for reply! Yes I have tried that . What I mean is I need points limit. i.e I just want to get 5 points within the maxdist(I don't care if these 5 points are the five closest points) and stop searching even if there is 1000 points within the maxdist. I think it will much more faster for searching. PS. In fact, many methods that return or use GEO_Point objects like findNearestPt() have been removed for the next major release of Houdini. Quote Link to comment Share on other sites More sharing options...
edward Posted July 30, 2014 Share Posted July 30, 2014 Please use GEO_PointTreeGAOffset instead of GEO_PointTree as the GEO_Point class is being phased out. Consider using the findNearestGroupIdx() method. Quote Link to comment Share on other sites More sharing options...
eko Posted July 30, 2014 Author Share Posted July 30, 2014 Please use GEO_PointTreeGAOffset instead of GEO_PointTree as the GEO_Point class is being phased out. Consider using the findNearestGroupIdx() method. That's right I used GEO_PointTreeGAOffset for hdk13. I will have a try for findNearestGroupIdx() method. Thanks ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.