X-Git-Url: https://git.blender.org/gitweb/gitweb.cgi/blender.git/blobdiff_plain/55b31dd98ce592ef4e51a9f9edece9ade7c519db..5f22de843953131d4c114644867b8e6fde508ca2:/source/blender/blenlib/BLI_kdopbvh.h
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index e4203a01b17..c43b76c3c58 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -61,27 +61,41 @@ typedef struct BVHTreeOverlap {
} BVHTreeOverlap;
typedef struct BVHTreeNearest {
- int index; /* the index of the nearest found (untouched if none is found within a dist radius from the given coordinates) */
- float co[3]; /* nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
- float no[3]; /* normal at nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
- float dist_sq; /* squared distance to search around */
+ /** The index of the nearest found
+ * (untouched if none is found within a dist radius from the given coordinates) */
+ int index;
+ /** Nearest coordinates
+ * (untouched it none is found within a dist radius from the given coordinates). */
+ float co[3];
+ /** Normal at nearest coordinates
+ * (untouched it none is found within a dist radius from the given coordinates). */
+ float no[3];
+ /** squared distance to search around */
+ float dist_sq;
int flags;
} BVHTreeNearest;
typedef struct BVHTreeRay {
- float origin[3]; /* ray origin */
- float direction[3]; /* ray direction */
- float radius; /* radius around ray */
+ /** ray origin */
+ float origin[3];
+ /** ray direction */
+ float direction[3];
+ /** radius around ray */
+ float radius;
#ifdef USE_KDOPBVH_WATERTIGHT
struct IsectRayPrecalc *isect_precalc;
#endif
} BVHTreeRay;
typedef struct BVHTreeRayHit {
- int index; /* index of the tree node (untouched if no hit is found) */
- float co[3]; /* coordinates of the hit point */
- float no[3]; /* normal on hit point */
- float dist; /* distance to the hit point */
+ /** Index of the tree node (untouched if no hit is found). */
+ int index;
+ /** Coordinates of the hit point. */
+ float co[3];
+ /** Normal on hit point. */
+ float no[3];
+ /** Distance to the hit point. */
+ float dist;
} BVHTreeRayHit;
enum {
@@ -137,7 +151,8 @@ void BLI_bvhtree_update_tree(BVHTree *tree);
int BLI_bvhtree_overlap_thread_num(const BVHTree *tree);
-/* collision/overlap: check two trees if they overlap, alloc's *overlap with length of the int return value */
+/* collision/overlap: check two trees if they overlap,
+ * alloc's *overlap with length of the int return value */
BVHTreeOverlap *BLI_bvhtree_overlap(
const BVHTree *tree1, const BVHTree *tree2, unsigned int *r_overlap_tot,
BVHTree_OverlapCallback callback, void *userdata);
@@ -147,7 +162,8 @@ int BLI_bvhtree_get_tree_type(const BVHTree *tree);
float BLI_bvhtree_get_epsilon(const BVHTree *tree);
/* find nearest node to the given coordinates
- * (if nearest is given it will only search nodes where square distance is smaller than nearest->dist) */
+ * (if nearest is given it will only search nodes where
+ * square distance is smaller than nearest->dist) */
int BLI_bvhtree_find_nearest_ex(
BVHTree *tree, const float co[3], BVHTreeNearest *nearest,
BVHTree_NearestPointCallback callback, void *userdata,