diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-18 01:08:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-18 01:08:25 +0400 |
commit | 0f28c1c27aec41dd22e31aac2c02cdfae785dd1b (patch) | |
tree | 1c41b37d29a56390d810846cd7fe8f1218e40576 /source/blender/blenkernel/BKE_mesh.h | |
parent | 9be40c026df54fee796c4073ebd4734c55ed5807 (diff) | |
parent | 408f7963c5cfd65792d826390b01896282de8e97 (diff) |
svn merge ^/trunk/blender -r43461:43472
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 22cd822bf93..06e4787c741 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -53,7 +53,10 @@ struct CustomData; struct DerivedMesh; struct Scene; struct MLoopUV; - +struct UvVertMap; +struct UvMapVert; +struct UvElementMap; +struct UvElement; #ifdef __cplusplus extern "C" { #endif @@ -180,6 +183,38 @@ typedef struct UvMapVert { unsigned char tfindex, separate, flag; } UvMapVert; +typedef struct UvElementMap { + /* address UvElements by their vertex */ + struct UvElement **vert; + /* UvElement Store */ + struct UvElement *buf; + /* Total number of UVs in the layer. Useful to know */ + int totalUVs; + /* Number of Islands in the mesh */ + int totalIslands; + /* Stores the starting index in buf where each island begins */ + int *islandIndices; +} UvElementMap; + +typedef struct UvElement { + /* Next UvElement corresponding to same vertex */ + struct UvElement *next; + /* Face the element belongs to */ + struct BMFace *face; + /* Index in the editFace of the uv */ + unsigned char tfindex; + /* Whether this element is the first of coincident elements */ + unsigned char separate; + /* general use flag */ + unsigned char flag; + /* If generating element map with island sorting, this stores the island index */ + unsigned short island; +} UvElement; + +/* invalid island index is max short. If any one has the patience + * to make that many islands, he can bite me :p */ +#define INVALID_ISLAND 0xFFFF + UvVertMap *make_uv_vert_map(struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv, unsigned int totpoly, unsigned int totvert, int selected, float *limit); UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v); void free_uv_vert_map(UvVertMap *vmap); |