From 70ef1f20043425d0b721cbb03eebaa26ec013af9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Dec 2013 22:40:25 +1100 Subject: Patch T19235: bmesh comments (with updates) --- source/blender/bmesh/bmesh_class.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'source/blender/bmesh/bmesh_class.h') diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index c79e4ed9d41..01e4c911d19 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; -- cgit v1.2.3