From 32644615988277ce60e0447f08d40ef67971bd88 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 Oct 2013 02:05:33 +0000 Subject: move bmesh array lookup data and utility functions from editmesh into bmesh, since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces. developers note: - EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free - EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index - EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free - ED_uv_element_get -> BM_uv_element_get --- source/blender/bmesh/bmesh_class.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (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 90105b0dd81..9c43e5a2ee4 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -183,9 +183,28 @@ typedef struct BMesh { * BM_LOOP isn't handled so far. */ char elem_index_dirty; + /* flag array table as being dirty so we know when its safe to use it, + * or when it needs to be re-created */ + char elem_table_dirty; + + /* element pools */ struct BLI_mempool *vpool, *epool, *lpool, *fpool; + /* mempool lookup tables (optional) + * index tables, to map indices to elements via + * BM_mesh_elem_table_ensure and associated functions. don't + * touch this or read it directly.\ + * Use BM_mesh_elem_table_ensure(), BM_vert/edge/face_at_index() */ + BMVert **vtable; + BMEdge **etable; + BMFace **ftable; + + /* size of allocated tables */ + int vtable_tot; + int etable_tot; + int ftable_tot; + /* operator api stuff (must be all NULL or all alloc'd) */ struct BLI_mempool *vtoolflagpool, *etoolflagpool, *ftoolflagpool; -- cgit v1.2.3