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:
authorCampbell Barton <ideasman42@gmail.com>2019-08-25 07:08:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-25 08:49:26 +0300
commitbada34c766029b1054b7255fd471b0f90cdda8ce (patch)
tree375332f04582b7cea36442f981e909a2b4e8474a /source/blender/blenkernel/intern/mesh_evaluate.c
parent4ab50eb7facec7561bfb04838a74c5040d26a5e4 (diff)
Cleanup: remove BKE_mesh_calc_normals_tessface
This was used for versioning, now normals are calculated after initializing MPoly data.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_evaluate.c')
-rw-r--r--source/blender/blenkernel/intern/mesh_evaluate.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index ad06f4b7da1..7430bc14858 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -448,64 +448,6 @@ void BKE_mesh_calc_normals(Mesh *mesh)
mesh->runtime.cd_dirty_vert &= ~CD_MASK_NORMAL;
}
-void BKE_mesh_calc_normals_tessface(
- MVert *mverts, int numVerts, const MFace *mfaces, int numFaces, float (*r_faceNors)[3])
-{
- float(*tnorms)[3] = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tnorms), "tnorms");
- float(*fnors)[3] = (r_faceNors) ?
- r_faceNors :
- MEM_calloc_arrayN((size_t)numFaces, sizeof(*fnors), "meshnormals");
- int i;
-
- if (!tnorms || !fnors) {
- goto cleanup;
- }
-
- for (i = 0; i < numFaces; i++) {
- const MFace *mf = &mfaces[i];
- float *f_no = fnors[i];
- float *n4 = (mf->v4) ? tnorms[mf->v4] : NULL;
- const float *c4 = (mf->v4) ? mverts[mf->v4].co : NULL;
-
- if (mf->v4) {
- normal_quad_v3(
- f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co, mverts[mf->v4].co);
- }
- else {
- normal_tri_v3(f_no, mverts[mf->v1].co, mverts[mf->v2].co, mverts[mf->v3].co);
- }
-
- 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 */
- for (i = 0; i < numVerts; i++) {
- MVert *mv = &mverts[i];
- float *no = tnorms[i];
-
- if (UNLIKELY(normalize_v3(no) == 0.0f)) {
- normalize_v3_v3(no, mv->co);
- }
-
- normal_float_to_short_v3(mv->no, no);
- }
-
-cleanup:
- MEM_freeN(tnorms);
-
- if (fnors != r_faceNors) {
- MEM_freeN(fnors);
- }
-}
-
void BKE_mesh_calc_normals_looptri(MVert *mverts,
int numVerts,
const MLoop *mloop,