diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-06 13:05:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-06 13:06:38 +0300 |
commit | 3df139c53062a141403ea9d359715ca3635c243c (patch) | |
tree | 08d57ac59b9fca80b70fd03950372d91b75ef055 /source/blender/blenkernel/intern | |
parent | 70aa33f069abf6a1ca1ed1542cb456cbf1b0c399 (diff) |
Cleanup: Math lib naming (use v3 suffix)
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/mball_tessellate.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 4 |
4 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/mball_tessellate.c b/source/blender/blenkernel/intern/mball_tessellate.c index 76965176be8..82d82ce71c4 100644 --- a/source/blender/blenkernel/intern/mball_tessellate.c +++ b/source/blender/blenkernel/intern/mball_tessellate.c @@ -423,13 +423,13 @@ static void make_face(PROCESS *process, int i1, int i2, int i3, int i4) #ifdef USE_ACCUM_NORMAL if (i4 == 0) { normal_tri_v3(n, process->co[i1], process->co[i2], process->co[i3]); - accumulate_vertex_normals( + accumulate_vertex_normals_v3( process->no[i1], process->no[i2], process->no[i3], NULL, n, process->co[i1], process->co[i2], process->co[i3], NULL); } else { normal_quad_v3(n, process->co[i1], process->co[i2], process->co[i3], process->co[i4]); - accumulate_vertex_normals( + accumulate_vertex_normals_v3( process->no[i1], process->no[i2], process->no[i3], process->no[i4], n, process->co[i1], process->co[i2], process->co[i3], process->co[i4]); } diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 643ca3ee536..b28ec7f4fff 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -225,7 +225,7 @@ static void mesh_calc_normals_poly_accum_task_cb(void *userdata, const int pidx) } /* accumulate angle weighted face normal */ - /* inline version of #accumulate_vertex_normals_poly */ + /* inline version of #accumulate_vertex_normals_poly_v3 */ { const float *prev_edge = edgevecbuf[nverts - 1]; @@ -334,8 +334,9 @@ void BKE_mesh_calc_normals_tessface( else normal_tri_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co); - accumulate_vertex_normals(tnorms[mf->v1], tnorms[mf->v2], tnorms[mf->v3], n4, - f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, c4); + accumulate_vertex_normals_v3( + tnorms[mf->v1], tnorms[mf->v2], tnorms[mf->v3], n4, + f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, c4); } /* following Mesh convention; we use vertex coordinate itself for normal in this case */ @@ -379,7 +380,7 @@ void BKE_mesh_calc_normals_looptri( f_no, mverts[vtri[0]].co, mverts[vtri[1]].co, mverts[vtri[2]].co); - accumulate_vertex_normals_tri( + accumulate_vertex_normals_tri_v3( tnorms[vtri[0]], tnorms[vtri[1]], tnorms[vtri[2]], f_no, mverts[vtri[0]].co, mverts[vtri[1]].co, mverts[vtri[2]].co); } @@ -845,7 +846,7 @@ static void split_loop_nor_fan_do(LoopSplitTaskDataCommon *common_data, LoopSpli // printf("\thandling edge %d / loop %d\n", mlfan_curr->e, mlfan_curr_index); { - /* Code similar to accumulate_vertex_normals_poly. */ + /* Code similar to accumulate_vertex_normals_poly_v3. */ /* Calculate angle between the two poly edges incident on this vertex. */ const float fac = saacos(dot_v3v3(vec_curr, vec_prev)); /* Accumulate */ diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index d739f804fef..aa8ab07518f 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -1837,7 +1837,7 @@ static bool nearest_to_ray_aabb_dist_sq(PBVHNode *node, void *data_v) } float co_dummy[3], depth; - node->tmin = dist_squared_ray_to_aabb(&rcd->dist_ray_to_aabb_precalc, bb_min, bb_max, co_dummy, &depth); + node->tmin = dist_squared_ray_to_aabb_v3(&rcd->dist_ray_to_aabb_precalc, bb_min, bb_max, co_dummy, &depth); /* Ideally we would skip distances outside the range. */ return depth > 0.0f; } @@ -1849,7 +1849,7 @@ void BKE_pbvh_find_nearest_to_ray( { FindNearestRayData ncd; - dist_squared_ray_to_aabb_precalc(&ncd.dist_ray_to_aabb_precalc, ray_start, ray_normal); + dist_squared_ray_to_aabb_v3_precalc(&ncd.dist_ray_to_aabb_precalc, ray_start, ray_normal); ncd.original = original; BKE_pbvh_search_callback_occluded(bvh, nearest_to_ray_aabb_dist_sq, &ncd, cb, data); diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 600bc3f453d..3052a708137 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -3412,7 +3412,7 @@ static void softbody_update_positions(Object *ob, SoftBody *sb, float (*vertexCo * lloc, lrot, lscale are allowed to be NULL, just in case you don't need it. * should be pretty useful for pythoneers :) * not! velocity .. 2nd order stuff - * vcloud_estimate_transform see + * vcloud_estimate_transform_v3 see */ void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]) @@ -3436,7 +3436,7 @@ void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float ls copy_v3_v3(opos[a], bp->pos); } - vcloud_estimate_transform(sb->totpoint, opos, NULL, rpos, NULL, com, rcom, lrot, lscale); + vcloud_estimate_transform_v3(sb->totpoint, opos, NULL, rpos, NULL, com, rcom, lrot, lscale); //sub_v3_v3(com, rcom); if (lloc) copy_v3_v3(lloc, com); copy_v3_v3(sb->lcom, com); |