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:
authorVictor-Louis De Gusseme <victorlouis>2021-02-05 17:28:31 +0300
committerHans Goudey <h.goudey@me.com>2021-02-05 17:28:31 +0300
commit4d39a0f8eb1103aa58611fff7219f4bf3d70f70f (patch)
treecd36763c81288f8c35e25deb05bf6da4de57b20b /source/blender/blenkernel/BKE_bvhutils.h
parent7054d03701250b245df9cf60b80c3c5e9aca308f (diff)
Geometry Nodes: Add Attribute Proximity Node
This node calculates a distance from each point to the closest position on a target geometry, similar to the vertex weight proximity modifier. Mapping the output distance to a different range can be done with an attribute math node after this node. A drop-down changes whether to calculate distances from points, edges, or faces. In points mode, the node also calculates distances from point cloud points. Design task and use cases: T84842 Differential Revision: https://developer.blender.org/D10154
Diffstat (limited to 'source/blender/blenkernel/BKE_bvhutils.h')
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index 84a17136361..78908908343 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -38,6 +38,7 @@ struct BMEditMesh;
struct MFace;
struct MVert;
struct Mesh;
+struct PointCloud;
struct BVHCache;
@@ -249,6 +250,20 @@ float bvhtree_sphereray_tri_intersection(const BVHTreeRay *ray,
const float v1[3],
const float v2[3]);
+typedef struct BVHTreeFromPointCloud {
+ struct BVHTree *tree;
+
+ BVHTree_NearestPointCallback nearest_callback;
+
+ const float (*coords)[3];
+} BVHTreeFromPointCloud;
+
+BVHTree *BKE_bvhtree_from_pointcloud_get(struct BVHTreeFromPointCloud *data,
+ const struct PointCloud *pointcloud,
+ const int tree_type);
+
+void free_bvhtree_from_pointcloud(struct BVHTreeFromPointCloud *data);
+
/**
* BVHCache
*/