Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/** \file
* \ingroup bli
* \brief A KD-tree for nearest neighbor search.
*/
/* 1D version */
#define KD_DIMS 1
#define KDTREE_PREFIX_ID BLI_kdtree_1d
#define KDTree KDTree_1d
#define KDTreeNearest KDTreeNearest_1d
#include "BLI_kdtree_impl.h"
#undef KD_DIMS
#undef KDTree
#undef KDTreeNearest
#undef KDTREE_PREFIX_ID
/* 2D version */
#define KD_DIMS 2
#define KDTREE_PREFIX_ID BLI_kdtree_2d
#define KDTree KDTree_2d
#define KDTreeNearest KDTreeNearest_2d
/* 3D version */
#define KD_DIMS 3
#define KDTREE_PREFIX_ID BLI_kdtree_3d
#define KDTree KDTree_3d
#define KDTreeNearest KDTreeNearest_3d
/* 4D version */
#define KD_DIMS 4
#define KDTREE_PREFIX_ID BLI_kdtree_4d
#define KDTree KDTree_4d
#define KDTreeNearest KDTreeNearest_4d
}