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>2012-01-06 04:08:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-06 04:08:37 +0400
commit2b2c1007f6a960274f3ddbcfa0ac2849e65894c9 (patch)
treec98b9422fc4df7d2090dbe6d5e75d0077993fd52 /source/blender/blenkernel/BKE_mesh.h
parent2c9f08302c13ace22befb0603ec5f5ee2c7f31b1 (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/blenkernel/BKE_mesh.h')
-rw-r--r--source/blender/blenkernel/BKE_mesh.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 9172ad86fee..6fcbb6d9f18 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -123,7 +123,7 @@ void copy_dverts(struct MDeformVert *dst, struct MDeformVert *src, int totvert);
void mesh_delete_material_index(struct Mesh *me, short index);
void mesh_set_smooth_flag(struct Object *meshOb, int enableSmooth);
void convert_mfaces_to_mpolys(struct Mesh *mesh);
-void mesh_calc_tessface_normals(struct MVert *mverts, int numVerts,struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]);
+void mesh_calc_normals_tessface(struct MVert *mverts, int numVerts,struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]);
/*used for unit testing; compares two meshes, checking only
differences we care about. should be usable with leaf's
@@ -143,14 +143,20 @@ void mesh_strip_loose_edges(struct Mesh *me);
/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
* and vertex normals are stored in actual mverts.
*/
-void mesh_calc_normals(struct MVert *mverts, int numVerts, struct MLoop *mloop,
- struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
- struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
+void mesh_calc_normals_mapping(
+ struct MVert *mverts, int numVerts,
+ struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
+ struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
/* extended version of 'mesh_calc_normals' with option not to calc vertex normals */
-void mesh_calc_normals_ex(struct MVert *mverts, int numVerts, struct MLoop *mloop,
- struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
- struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
- const short only_face_normals);
+void mesh_calc_normals_mapping_ex(
+ struct MVert *mverts, int numVerts, struct MLoop *mloop,
+ struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
+ struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3],
+ const short only_face_normals);
+
+void mesh_calc_normals(
+ struct MVert *mverts, int numVerts, struct MLoop *mloop,
+ struct MPoly *mpolys, int UNUSED(numLoops), int numPolys, float (*polyNors_r)[3]);
/* Return a newly MEM_malloc'd array of all the mesh vertex locations
* (_numVerts_r_ may be NULL) */