diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-06 04:08:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-06 04:08:37 +0400 |
commit | 2b2c1007f6a960274f3ddbcfa0ac2849e65894c9 (patch) | |
tree | c98b9422fc4df7d2090dbe6d5e75d0077993fd52 /source/blender/editors/mesh/mesh_data.c | |
parent | 2c9f08302c13ace22befb0603ec5f5ee2c7f31b1 (diff) |
rename normal calc functions.
comparing bmesh to trunk, mesh_calc_normals() in bmesh is a much more comprehensive function, calculating mpoly,mface normals, where trunk only calculated vertex normals.
renamed:
* mesh_calc_normals() --> mesh_calc_normals_mapping_ex
* mesh_calc_tessface_normals --> mesh_calc_normals_tessface() - only calculates normals from tessface
* added mesh_calc_normals() - only calculates normals from poltys
this way we can have mesh_calc_normals() remain fast for parts of the code which only need vertex normals to be updated.
only refactor, no func changes- didnt replace mesh_calc_normals_mapping_ex() with mesh_calc_normals() anywhere yet.
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 48aa69eff46..93ea76db569 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -774,7 +774,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges) contain the normal of the poly the face was tesselated from. */ face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface); - mesh_calc_normals( + mesh_calc_normals_mapping( mesh->mvert, mesh->totvert, mesh->mloop, @@ -829,7 +829,7 @@ void ED_mesh_transform(Mesh *mesh, float *mat) for(i= 0; i < mesh->totvert; i++, mvert++) mul_m4_v3((float (*)[4])mat, mvert->co); - mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); + mesh_calc_normals_mapping(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); } static void mesh_add_edges(Mesh *mesh, int len) @@ -1015,5 +1015,5 @@ void ED_mesh_polys_add(Mesh *mesh, ReportList *reports, int count) void ED_mesh_calc_normals(Mesh *mesh) { - mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); + mesh_calc_normals_mapping(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); } |