diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-18 02:05:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-18 02:14:47 +0400 |
commit | 7da21752716a0e9e6e6ad8ccbda20fb1c5e8e123 (patch) | |
tree | d72216f3cdf2e5887282fbce2e0eec28d025392d /source/blender/editors | |
parent | a861e5572a70111bbe3ae84d82595eddc43b7d88 (diff) |
KDTree: deprecate 'normal' argument
Normals for each kdtree node were allocated but never used,
and search args only use in particles/boids code.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 4 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 20 |
3 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 5558e6fae72..c1d1c10124e 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -681,7 +681,7 @@ int ED_mesh_mirror_spatial_table(Object *ob, BMEditMesh *em, const float co[3], int i; - i = BLI_kdtree_find_nearest(MirrKdStore.tree, co, NULL, &nearest); + i = BLI_kdtree_find_nearest(MirrKdStore.tree, co, &nearest); if (i != -1) { if (nearest.dist < KD_THRESH) { @@ -717,7 +717,7 @@ int ED_mesh_mirror_spatial_table(Object *ob, BMEditMesh *em, const float co[3], BM_mesh_elem_table_ensure(em->bm, BM_VERT); BM_ITER_MESH_INDEX (eve, &iter, em->bm, BM_VERTS_OF_MESH, i) { - BLI_kdtree_insert(MirrKdStore.tree, i, eve->co, NULL); + BLI_kdtree_insert(MirrKdStore.tree, i, eve->co); } } else { @@ -725,7 +725,7 @@ int ED_mesh_mirror_spatial_table(Object *ob, BMEditMesh *em, const float co[3], int i; for (i = 0, mvert = me->mvert; i < me->totvert; i++, mvert++) { - BLI_kdtree_insert(MirrKdStore.tree, i, mvert->co, NULL); + BLI_kdtree_insert(MirrKdStore.tree, i, mvert->co); } } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f1a04f81979..5fd6fcfaa47 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -785,7 +785,7 @@ static void parent_set_vert_find(KDTree *tree, Object *child, int vert_par[3], b KDTreeNearest nearest[3]; int tot; - tot = BLI_kdtree_find_nearest_n(tree, co_find, NULL, nearest, 3); + tot = BLI_kdtree_find_nearest_n(tree, co_find, nearest, 3); BLI_assert(tot == 3); vert_par[0] = nearest[0].index; @@ -795,7 +795,7 @@ static void parent_set_vert_find(KDTree *tree, Object *child, int vert_par[3], b BLI_assert(min_iii(UNPACK3(vert_par)) >= 0); } else { - vert_par[0] = BLI_kdtree_find_nearest(tree, co_find, NULL, NULL); + vert_par[0] = BLI_kdtree_find_nearest(tree, co_find, NULL); BLI_assert(vert_par[0] >= 0); vert_par[1] = 0; vert_par[2] = 0; diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 0dee36d31cd..aa1d01775f5 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -749,7 +749,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys) psys_mat_hair_to_orco(ob, psmd->dm, psys->part->from, pa, mat); copy_v3_v3(co, key->co); mul_m4_v3(mat, co); - BLI_kdtree_insert(tree, p, co, NULL); + BLI_kdtree_insert(tree, p, co); } BLI_kdtree_balance(tree); @@ -765,7 +765,7 @@ static void PE_update_mirror_cache(Object *ob, ParticleSystem *psys) mul_m4_v3(mat, co); co[0] = -co[0]; - index= BLI_kdtree_find_nearest(tree, co, NULL, &nearest); + index= BLI_kdtree_find_nearest(tree, co, &nearest); /* this needs a custom threshold still, duplicated for editmode mirror */ if (index != -1 && index != p && (nearest.dist <= 0.0002f)) @@ -939,7 +939,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit) dist_1st *= dist * pset->emitterdist; } else { - index= BLI_kdtree_find_nearest(edit->emitter_field, key->co, NULL, NULL); + index= BLI_kdtree_find_nearest(edit->emitter_field, key->co, NULL); vec=edit->emitter_cosnos +index*6; nor=vec+3; @@ -1123,7 +1123,7 @@ static void recalc_emitter_field(Object *ob, ParticleSystem *psys) normalize_v3(nor); - BLI_kdtree_insert(edit->emitter_field, i, vec, NULL); + BLI_kdtree_insert(edit->emitter_field, i, vec); } BLI_kdtree_balance(edit->emitter_field); @@ -2459,7 +2459,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) psys_mat_hair_to_object(ob, psmd->dm, psys->part->from, psys->particles+p, mat); copy_v3_v3(co, point->keys->co); mul_m4_v3(mat, co); - BLI_kdtree_insert(tree, p, co, NULL); + BLI_kdtree_insert(tree, p, co); } BLI_kdtree_balance(tree); @@ -2470,7 +2470,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) copy_v3_v3(co, point->keys->co); mul_m4_v3(mat, co); - totn = BLI_kdtree_find_nearest_n(tree, co, NULL, nearest, 10); + totn = BLI_kdtree_find_nearest_n(tree, co, nearest, 10); for (n=0; n<totn; n++) { /* this needs a custom threshold still */ @@ -3023,7 +3023,7 @@ static void brush_puff(PEData *data, int point_index) mul_m4_v3(mat, co); mul_v3_m4v3(kco, data->ob->imat, co); /* use 'kco' as the object space version of worldspace 'co', ob->imat is set before calling */ - point_index= BLI_kdtree_find_nearest(edit->emitter_field, kco, NULL, NULL); + point_index= BLI_kdtree_find_nearest(edit->emitter_field, kco, NULL); if (point_index == -1) return; copy_v3_v3(co_root, co); @@ -3107,7 +3107,7 @@ static void brush_puff(PEData *data, int point_index) mul_m4_v3(mat, oco); mul_v3_m4v3(kco, data->ob->imat, oco); /* use 'kco' as the object space version of worldspace 'co', ob->imat is set before calling */ - point_index= BLI_kdtree_find_nearest(edit->emitter_field, kco, NULL, NULL); + point_index= BLI_kdtree_find_nearest(edit->emitter_field, kco, NULL); if (point_index != -1) { copy_v3_v3(onor, &edit->emitter_cosnos[point_index*6+3]); mul_mat3_m4_v3(data->ob->obmat, onor); /* normal into worldspace */ @@ -3434,7 +3434,7 @@ static int brush_add(PEData *data, short number) for (i=0, pa=psys->particles; i<totpart; i++, pa++) { psys_particle_on_dm(psmd->dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, cur_co, 0, 0, 0, 0, 0); - BLI_kdtree_insert(tree, i, cur_co, NULL); + BLI_kdtree_insert(tree, i, cur_co); } BLI_kdtree_balance(tree); @@ -3478,7 +3478,7 @@ static int brush_add(PEData *data, short number) float maxd, totw=0.0, weight[3]; psys_particle_on_dm(psmd->dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, co1, 0, 0, 0, 0, 0); - maxw = BLI_kdtree_find_nearest_n(tree, co1, NULL, ptn, 3); + maxw = BLI_kdtree_find_nearest_n(tree, co1, ptn, 3); maxd= ptn[maxw-1].dist; |