BLI_kdtree: refactor to support different numbers of dimensions
authorCampbell Barton <ideasman42@gmail.com>
Mon, 18 Mar 2019 00:22:48 +0000 (11:22 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 Mar 2019 13:30:45 +0000 (00:30 +1100)
commit0719d5fa0c8244feb70efa330b10f103a6da2f3c
tree60eda71273eeeaacbaadf61fa68f95b876032f87
parente72dc667c4d3ef0b4a4c306dd6b12cae9d37287b
BLI_kdtree: refactor to support different numbers of dimensions

This moves logic into kdtree_impl.h which is included in a source
file that defines the number of dimensions - so we can easily support
different numbers of dimensions as needed
(currently 3D and 4D are supported).

Macro use isn't so nice but avoids a lot of duplicate code.
source/blender/blenlib/BLI_kdtree.h
source/blender/blenlib/BLI_kdtree_impl.h [new file with mode: 0644]
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/kdtree_3d.c [new file with mode: 0644]
source/blender/blenlib/intern/kdtree_4d.c [new file with mode: 0644]
source/blender/blenlib/intern/kdtree_impl.h [moved from source/blender/blenlib/intern/BLI_kdtree.c with 83% similarity]