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:
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index eeaf0710a5f..0419a5ac348 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -4237,7 +4237,7 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
const float timescale = data->timescale;
const int c_index = data->c_index;
- KDTree *tree = data->treeData;
+ KDTree_3d *tree = data->treeData;
const float solidradius = data->solidradius;
const float smooth = brush->particle_smooth * surface->radius_scale;
@@ -4255,11 +4255,11 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
* It's enough to just find the nearest one.
*/
{
- KDTreeNearest nearest;
+ KDTreeNearest_3d nearest;
float smooth_range, part_solidradius;
/* Find nearest particle and get distance to it */
- BLI_kdtree_find_nearest(tree, bData->realCoord[bData->s_pos[index]].v, &nearest);
+ BLI_kdtree_3d_find_nearest(tree, bData->realCoord[bData->s_pos[index]].v, &nearest);
/* if outside maximum range, no other particle can influence either */
if (nearest.dist > range)
return;
@@ -4291,7 +4291,7 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
* If we use per particle radius, we have to sample all particles
* within max radius range
*/
- KDTreeNearest *nearest;
+ KDTreeNearest_3d *nearest;
float smooth_range = smooth * (1.0f - strength), dist;
/* calculate max range that can have particles with higher influence than the nearest one */
@@ -4299,7 +4299,7 @@ static void dynamic_paint_paint_particle_cell_point_cb_ex(
/* Make gcc happy! */
dist = max_range;
- const int particles = BLI_kdtree_range_search(
+ const int particles = BLI_kdtree_3d_range_search(
tree, bData->realCoord[bData->s_pos[index]].v, &nearest, max_range);
/* Find particle that produces highest influence */
@@ -4397,7 +4397,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
PaintBakeData *bData = sData->bData;
VolumeGrid *grid = bData->grid;
- KDTree *tree;
+ KDTree_3d *tree;
int particlesAdded = 0;
int invalidParticles = 0;
int p = 0;
@@ -4416,7 +4416,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
/*
* Build a kd-tree to optimize distance search
*/
- tree = BLI_kdtree_new(psys->totpart);
+ tree = BLI_kdtree_3d_new(psys->totpart);
/* loop through particles and insert valid ones to the tree */
p = 0;
@@ -4440,7 +4440,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
if (!boundIntersectPoint(&grid->grid_bounds, pa->state.co, range))
continue;
- BLI_kdtree_insert(tree, p, pa->state.co);
+ BLI_kdtree_3d_insert(tree, p, pa->state.co);
/* calc particle system bounds */
boundInsert(&part_bb, pa->state.co);
@@ -4452,7 +4452,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
/* If no suitable particles were found, exit */
if (particlesAdded < 1) {
- BLI_kdtree_free(tree);
+ BLI_kdtree_3d_free(tree);
return 1;
}
@@ -4465,7 +4465,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
int total_cells = grid->dim[0] * grid->dim[1] * grid->dim[2];
/* balance tree */
- BLI_kdtree_balance(tree);
+ BLI_kdtree_3d_balance(tree);
/* loop through space partitioning grid */
for (c_index = 0; c_index < total_cells; c_index++) {
@@ -4493,7 +4493,7 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
}
}
BLI_threaded_malloc_end();
- BLI_kdtree_free(tree);
+ BLI_kdtree_3d_free(tree);
return 1;
}