Added BVH nearest neighbour code, for now only works in 6-dop and finds the node...
authorAndre Susano Pinto <andresusanopinto@gmail.com>
Sun, 25 May 2008 15:43:18 +0000 (15:43 +0000)
committerAndre Susano Pinto <andresusanopinto@gmail.com>
Sun, 25 May 2008 15:43:18 +0000 (15:43 +0000)
commitad2fecf2660e9da7748ab6cce37569e1bc2a11e1
tree1c5a9c23d16906be1526d9e3033f8006aaa6ea30
parentcc98ef4012d77c384cfd22c2567f4a03b4187696
Added BVH nearest neighbour code, for now only works in 6-dop and finds the node with the nearest bounding volume.
I'll work on making it more generic.
So far it querys faster than kdtree, but building the tree is slower.
And bvhtree NN uses an heuristic based on the last match.

Shrinkwrap (OBCube)24578 over (OBSuzanne)31658
kdtree
build: 30.000000ms
query: 1360.000000ms

bvhtree
build: 140.000000ms
query: 490.000000ms

Shrinkwrap now uses bvhtree (binary tree, 6dop) for nearest vertex.
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenlib/BLI_kdopbvh.h
source/blender/blenlib/intern/BLI_kdopbvh.c