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:
authorJoseph Eagar <joeedh@gmail.com>2009-05-16 20:18:08 +0400
committerJoseph Eagar <joeedh@gmail.com>2009-05-16 20:18:08 +0400
commit166c270f060e0ffadbc53c27afb112f294e7425e (patch)
tree75c12e8c7f45352eade8f3310ccf095caab62186 /source/blender/blenkernel/BKE_tessmesh.h
parent084aa7aedb33dbd86a98ac1e089933851ba2954b (diff)
NOTE: do not test. work-in-progress commit with editmesh ripped out and replaced with bmesh. this is not usable by any means. for those who read through this, note the design is still fairly messy in places, and fyi BMTessMesh is the replacement for EditMesh, I need to rename it to BMEditMesh.
Diffstat (limited to 'source/blender/blenkernel/BKE_tessmesh.h')
-rw-r--r--source/blender/blenkernel/BKE_tessmesh.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_tessmesh.h b/source/blender/blenkernel/BKE_tessmesh.h
new file mode 100644
index 00000000000..f8b1dfff222
--- /dev/null
+++ b/source/blender/blenkernel/BKE_tessmesh.h
@@ -0,0 +1,58 @@
+#include "bmesh.h"
+
+struct BMesh;
+struct BMLoop;
+struct DerivedMesh;
+struct BMFace;
+
+typedef struct BMEditSelection
+{
+ struct BMEditSelection *next, *prev;
+ short type;
+ void *data;
+} BMEditSelection;
+
+/*this structure replaces EditMesh.
+
+ through this, you get access to both the edit bmesh,
+ it's tesselation, and various stuff that doesn't belong in the BMesh
+ struct itself.
+
+ the entire derivedmesh and modifier system works with this structure,
+ and not BMesh. Mesh->editbmesh will store a pointer to this structure.*/
+typedef struct BMTessMesh {
+ struct BMesh *bm;
+
+ /*we store tesselations as triplets of three loops,
+ which each define a triangle.*/
+ struct BMLoop *(*looptris)[3];
+ int tottri;
+
+ /*derivedmesh stuff*/
+ struct DerivedMesh *derivedFinal, *derivedCage;
+ int lastDataMask;
+
+ /*retopo data pointer*/
+ struct RetopoPaintData *retopo_paint_data;
+
+ /*active face pointer*/
+ struct BMFace *act_face;
+
+ /*index tables, to map indices to elements via
+ EDBM_init_index_arrays and associated functions. don't
+ touch this or read it directly.*/
+ struct BMVert **vert_index;
+ struct BMEdge **edge_index;
+ struct BMFace **face_index;
+
+ /*selection order list*/
+ ListBase selected;
+
+ /*selection mode*/
+ int selectmode, totfacesel, totvertsel, totedgesel;
+} BMTessMesh;
+
+void TM_RecalcTesselation(BMTessMesh *tm);
+BMTessMesh *TM_Create(BMesh *bm);
+BMTessMesh *TM_Copy(BMTessMesh *tm);
+void TM_Free(BMTessMesh *em);