Vertex Lookup Revisited

I made a post about this previously on this web log. After making my original post I received some feedback about some problems with my approach.
I believe I have no addressed those issues and I am uploading a new implementation. It shares the same API but is implemented in a completely different way.
The purpose of this routine is to weld vertices together when building an indexed triangle list. The brute force way to do this is to iterate through all previously defined vertices and measure the distance to each and return as matching only those vertices which are within the distance threshold supplied. My previous technique of using delta x, delta y, and delt z, comparisons does not entirely work doe to certain edge conditions. The only valid way is to perform a true range based search.
Since this is exactly what a Kd-Tree does, this new implementation uses a Kd-Tree to compute the array indices. I have been using it this past week on some heavy duty meshing code and I am confident that this takes care of all edge conditions.
VertexLookup.h
VertexLookup.cpp

0 Comments:
Post a Comment
<< Home