[Bf-blender-cvs] [70ef1f2] master: Patch T19235: bmesh comments (with updates)

Campbell Barton noreply at git.blender.org
Thu Dec 19 12:42:07 CET 2013


Commit: 70ef1f20043425d0b721cbb03eebaa26ec013af9
Author: Campbell Barton
Date:   Thu Dec 19 22:40:25 2013 +1100
http://developer.blender.org/rB70ef1f20043425d0b721cbb03eebaa26ec013af9

Patch T19235: bmesh comments (with updates)

===================================================================

M	source/blender/bmesh/bmesh_class.h

===================================================================

diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index c79e4ed..01e4c91 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -91,8 +91,14 @@ typedef struct BMVert {
 	BMHeader head;
 	struct BMFlagLayer *oflags; /* keep after header, an array of flags, mostly used by the operator stack */
 
-	float co[3];
-	float no[3];
+	float co[3];  /* vertex coordinates */
+	float no[3];  /* vertex normal */
+
+	/* pointer to (any) edge using this vertex (for disk cycles)
+	 *
+	 * note: some higher level functions set this to different edges that use this vertex,
+	 *       which is a bit of an abuse of internal bmesh data but also works OK for now (use with care!).
+	 */
 	struct BMEdge *e;
 } BMVert;
 
@@ -105,10 +111,14 @@ typedef struct BMEdge {
 	BMHeader head;
 	struct BMFlagLayer *oflags; /* keep after header, an array of flags, mostly used by the operator stack */
 
-	struct BMVert *v1, *v2;
+	struct BMVert *v1, *v2;  /* vertices (unordered) */
+
+	/* the list of loops around the edge (use l->radial_prev/next)
+	 * to access the other loops using the edge */
 	struct BMLoop *l;
 	
-	/* disk cycle pointers */
+	/* disk cycle pointers
+	 * relative data: d1 indicates indicates the next/prev edge around vertex v1 and d2 does the same for v2 */
 	BMDiskLink v1_disk_link, v2_disk_link;
 } BMEdge;
 
@@ -161,9 +171,9 @@ typedef struct BMFace {
 #else
 	BMLoop *l_first;
 #endif
-	int   len;   /* includes all boundary loops */
-	float no[3]; /* yes, we do store this here */
-	short mat_nr;
+	int   len;   /* number of vertices in the face */
+	float no[3];  /* face normal */
+	short mat_nr;  /* material index */
 //	short _pad[3];
 } BMFace;




More information about the Bf-blender-cvs mailing list