diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-19 16:46:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-19 16:48:51 +0300 |
commit | 109cbdf2e1b609e93270100239906a8e17c64ab5 (patch) | |
tree | 821504319da91e5a5dea1ebaf64978560468288e /source/blender/blenkernel/intern/dynamicpaint.c | |
parent | e8777a729013d04dcb854b0b9f327e9b90191747 (diff) |
Cleanup: use BLI_kdtree_3d prefix
Use prefix now there isn't only the 3d version.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 22 |
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; } |