Hi,
I'm creating a SOP and having some difficulties to remove duplicates points (based on their coordinates). I have to deal with possibly a lot of points (up to a million) and in that case my code is taking too much time (more than a half hour for removing around 2500 duplicates from 870 000 points). I've so far been using unordered_set from STL with the creation of appropriate hash function and overloading operator== (or at least I think I have ;p) but I'm searching some fastest way to do that.
I've discover sortAndRemoveDuplicates() in UT_PtrArray.h while browsing the HDK classes, but it is not doing anything to my points when I call it like that :
GEO_PointList myPoints = gdp->points();
myPoints.sortAndRemoveDuplicates();
Am I missing something ? The comment above that function does not say much. Anyone ever having to deal with that problem has an idea/piece of code to help ?
Thanks