forked from bartvdbraak/blender
update bmesh design doc and added some comments to the code from it.
This commit is contained in:
parent
47c373c7a9
commit
21f1c99a78
@ -30,7 +30,7 @@
|
||||
/* bmesh data structures */
|
||||
|
||||
/* dissable holes for now, these are ifdef'd because they use more memory and cant be saved in DNA currently */
|
||||
// define USE_BMESH_HOLES
|
||||
#define USE_BMESH_HOLES
|
||||
|
||||
struct BMesh;
|
||||
struct BMVert;
|
||||
@ -95,7 +95,7 @@ typedef struct BMLoop {
|
||||
/* notice no flags layer */
|
||||
|
||||
struct BMVert *v;
|
||||
struct BMEdge *e;
|
||||
struct BMEdge *e; /* edge, using verts (v, next->v) */
|
||||
struct BMFace *f;
|
||||
|
||||
struct BMLoop *radial_next, *radial_prev;
|
||||
|
@ -90,23 +90,25 @@ BM_INLINE void _bmo_elem_flag_toggle(BMesh *bm, BMFlagLayer *oflags, const shor
|
||||
|
||||
/* slot type arrays are terminated by the last member
|
||||
* having a slot type of 0.*/
|
||||
#define BMO_OP_SLOT_SENTINEL 0
|
||||
#define BMO_OP_SLOT_BOOL 1
|
||||
#define BMO_OP_SLOT_INT 2
|
||||
#define BMO_OP_SLOT_FLT 3
|
||||
#define BMO_OP_SLOT_PNT 4
|
||||
#define BMO_OP_SLOT_MAT 5
|
||||
#define BMO_OP_SLOT_VEC 8
|
||||
enum {
|
||||
BMO_OP_SLOT_SENTINEL = 0,
|
||||
BMO_OP_SLOT_BOOL = 1,
|
||||
BMO_OP_SLOT_INT = 2,
|
||||
BMO_OP_SLOT_FLT = 3,
|
||||
|
||||
/* after BMO_OP_SLOT_VEC, everything is
|
||||
/* normally store pointers to object, scene,
|
||||
* _never_ store arrays corresponding to mesh elements with this */
|
||||
BMO_OP_SLOT_PNT = 4,
|
||||
BMO_OP_SLOT_MAT = 5,
|
||||
BMO_OP_SLOT_VEC = 8,
|
||||
|
||||
* dynamically allocated arrays. we
|
||||
* leave a space in the identifiers
|
||||
* for future growth.
|
||||
*/
|
||||
//it's very important this remain a power of two
|
||||
#define BMO_OP_SLOT_ELEMENT_BUF 9
|
||||
#define BMO_OP_SLOT_MAPPING 10
|
||||
/* after BMO_OP_SLOT_VEC, everything is dynamically allocated arrays.
|
||||
* We leave a space in the identifiers for future growth.
|
||||
*
|
||||
* it's very important this remain a power of two */
|
||||
BMO_OP_SLOT_ELEMENT_BUF = 9, /* list of verts/edges/faces */
|
||||
BMO_OP_SLOT_MAPPING = 10 /* simple hash map */
|
||||
};
|
||||
#define BMO_OP_SLOT_TOTAL_TYPES 11
|
||||
|
||||
/* please ignore all these structures, don't touch them in tool code, except
|
||||
|
@ -54,6 +54,7 @@ typedef struct BMWalker {
|
||||
BLI_mempool *worklist;
|
||||
ListBase states;
|
||||
|
||||
/* these masks are to be tested against elements BMO_elem_flag_test() */
|
||||
short mask_vert;
|
||||
short mask_edge;
|
||||
short mask_loop;
|
||||
|
Loading…
Reference in New Issue
Block a user