|
|
> So my algorithm tests all triangles that use the nearest vertex, and then
> calculates the minimum distance to each triangle, keeping the smallest of those.
>
Ah, I think I figured out the problem.
Instead of testing the distance to all triangles that share the nearest vertex,
what I *should* be doing is finding a bounding box around the test point based
on the distance to the nearest vertex (probably plus some tolerance), then test
all triangles that overlap that bounding box (which I should be able to use the
bounding box tree to find quickly).
Post a reply to this message
|
|