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:
authorCampbell Barton <ideasman42@gmail.com>2015-07-16 20:36:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-16 20:55:14 +0300
commit595a491e63d6f3f3462675d38cfa71b4e784fe9c (patch)
treedf32ec17691b9280d7b2fa675cd5e5a0f87ea849 /source/blender/makesdna/DNA_meshdata_types.h
parentc8f6313487dfbbee030c6796220cc0d91228d658 (diff)
Add tessellation data to DerivedMesh (LoopTri)
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
Diffstat (limited to 'source/blender/makesdna/DNA_meshdata_types.h')
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index b76f40c884d..12c6e0ec0a5 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -89,6 +89,14 @@ typedef struct MLoop {
unsigned int e; /* edge index */
} MLoop;
+/* runtime only */
+#
+#
+typedef struct MLoopTri {
+ unsigned int tri[3];
+ unsigned int poly;
+} MLoopTri;
+
typedef struct MTexPoly {
struct Image *tpage;
char flag, transp;
@@ -345,6 +353,9 @@ enum {
#define ME_POLY_LOOP_PREV(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + (mp)->totloop - 1) % (mp)->totloop)])
#define ME_POLY_LOOP_NEXT(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + 1) % (mp)->totloop)])
+/* number of tri's that make up this polygon once tessellated */
+#define ME_POLY_TRI_TOT(mp) ((mp)->totloop - 2)
+
/* mselect->type */
enum {
ME_VSEL = 0,