Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/blenlib/BLI_kdtree_impl.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/blenlib/BLI_kdtree_impl.h')
-rw-r--r--source/blender/blenlib/BLI_kdtree_impl.h83
1 files changed, 46 insertions, 37 deletions
diff --git a/source/blender/blenlib/BLI_kdtree_impl.h b/source/blender/blenlib/BLI_kdtree_impl.h
index bd4fa908b14..e442bd7a99d 100644
--- a/source/blender/blenlib/BLI_kdtree_impl.h
+++ b/source/blender/blenlib/BLI_kdtree_impl.h
@@ -21,7 +21,7 @@
#include "BLI_compiler_attrs.h"
-#define _CONCAT_AUX(MACRO_ARG1, MACRO_ARG2) MACRO_ARG1 ## MACRO_ARG2
+#define _CONCAT_AUX(MACRO_ARG1, MACRO_ARG2) MACRO_ARG1##MACRO_ARG2
#define _CONCAT(MACRO_ARG1, MACRO_ARG2) _CONCAT_AUX(MACRO_ARG1, MACRO_ARG2)
#define BLI_kdtree_nd_(id) _CONCAT(KDTREE_PREFIX_ID, _##id)
@@ -29,60 +29,69 @@ struct KDTree;
typedef struct KDTree KDTree;
typedef struct KDTreeNearest {
- int index;
- float dist;
- float co[KD_DIMS];
+ int index;
+ float dist;
+ float co[KD_DIMS];
} KDTreeNearest;
KDTree *BLI_kdtree_nd_(new)(unsigned int maxsize);
void BLI_kdtree_nd_(free)(KDTree *tree);
void BLI_kdtree_nd_(balance)(KDTree *tree) ATTR_NONNULL(1);
-void BLI_kdtree_nd_(insert)(
- KDTree *tree, int index,
- const float co[KD_DIMS]) ATTR_NONNULL(1, 3);
-int BLI_kdtree_nd_(find_nearest)(
- const KDTree *tree, const float co[KD_DIMS],
- KDTreeNearest *r_nearest) ATTR_NONNULL(1, 2);
+void BLI_kdtree_nd_(insert)(KDTree *tree, int index, const float co[KD_DIMS]) ATTR_NONNULL(1, 3);
+int BLI_kdtree_nd_(find_nearest)(const KDTree *tree,
+ const float co[KD_DIMS],
+ KDTreeNearest *r_nearest) ATTR_NONNULL(1, 2);
-int BLI_kdtree_nd_(find_nearest_n)(
- const KDTree *tree, const float co[KD_DIMS],
- KDTreeNearest *r_nearest,
- const uint nearest_len_capacity) ATTR_NONNULL(1, 2, 3);
+int BLI_kdtree_nd_(find_nearest_n)(const KDTree *tree,
+ const float co[KD_DIMS],
+ KDTreeNearest *r_nearest,
+ const uint nearest_len_capacity) ATTR_NONNULL(1, 2, 3);
-int BLI_kdtree_nd_(range_search)(
- const KDTree *tree, const float co[KD_DIMS],
- KDTreeNearest **r_nearest,
- const float range) ATTR_NONNULL(1, 2) ATTR_WARN_UNUSED_RESULT;
+int BLI_kdtree_nd_(range_search)(const KDTree *tree,
+ const float co[KD_DIMS],
+ KDTreeNearest **r_nearest,
+ const float range) ATTR_NONNULL(1, 2) ATTR_WARN_UNUSED_RESULT;
int BLI_kdtree_nd_(find_nearest_cb)(
- const KDTree *tree, const float co[KD_DIMS],
- int (*filter_cb)(void *user_data, int index, const float co[KD_DIMS], float dist_sq), void *user_data,
- KDTreeNearest *r_nearest);
+ const KDTree *tree,
+ const float co[KD_DIMS],
+ int (*filter_cb)(void *user_data, int index, const float co[KD_DIMS], float dist_sq),
+ void *user_data,
+ KDTreeNearest *r_nearest);
void BLI_kdtree_nd_(range_search_cb)(
- const KDTree *tree, const float co[KD_DIMS], float range,
- bool (*search_cb)(void *user_data, int index, const float co[KD_DIMS], float dist_sq), void *user_data);
-
-int BLI_kdtree_nd_(calc_duplicates_fast)(
- const KDTree *tree, const float range, bool use_index_order,
- int *doubles);
+ const KDTree *tree,
+ const float co[KD_DIMS],
+ float range,
+ bool (*search_cb)(void *user_data, int index, const float co[KD_DIMS], float dist_sq),
+ void *user_data);
+int BLI_kdtree_nd_(calc_duplicates_fast)(const KDTree *tree,
+ const float range,
+ bool use_index_order,
+ int *doubles);
int BLI_kdtree_nd_(deduplicate)(KDTree *tree);
/* Versions of find/range search that take a squared distance callback to support bias. */
int BLI_kdtree_nd_(find_nearest_n_with_len_squared_cb)(
- const KDTree *tree, const float co[KD_DIMS],
- KDTreeNearest *r_nearest,
- const uint nearest_len_capacity,
- float (*len_sq_fn)(const float co_search[KD_DIMS], const float co_test[KD_DIMS], const void *user_data),
- const void *user_data) ATTR_NONNULL(1, 2, 3);
+ const KDTree *tree,
+ const float co[KD_DIMS],
+ KDTreeNearest *r_nearest,
+ const uint nearest_len_capacity,
+ float (*len_sq_fn)(const float co_search[KD_DIMS],
+ const float co_test[KD_DIMS],
+ const void *user_data),
+ const void *user_data) ATTR_NONNULL(1, 2, 3);
int BLI_kdtree_nd_(range_search_with_len_squared_cb)(
- const KDTree *tree, const float co[KD_DIMS],
- KDTreeNearest **r_nearest,
- const float range,
- float (*len_sq_fn)(const float co_search[KD_DIMS], const float co_test[KD_DIMS], const void *user_data),
- const void *user_data) ATTR_NONNULL(1, 2) ATTR_WARN_UNUSED_RESULT;
+ const KDTree *tree,
+ const float co[KD_DIMS],
+ KDTreeNearest **r_nearest,
+ const float range,
+ float (*len_sq_fn)(const float co_search[KD_DIMS],
+ const float co_test[KD_DIMS],
+ const void *user_data),
+ const void *user_data) ATTR_NONNULL(1, 2) ATTR_WARN_UNUSED_RESULT;
#undef _CONCAT_AUX
#undef _CONCAT