diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-01-17 20:31:13 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-01-17 20:31:13 +0400 |
commit | a8081c1d2bb9115833493b011bb93d6c08112b2d (patch) | |
tree | 4383d080b80786257b291068e48a06bdb0ef5bd6 /source/blender/blenkernel/BKE_mesh.h | |
parent | fcc54520d1f029b86cb8c6f43c239ef81090a99a (diff) |
Uv Tools branch GSOC 2011
=========================
Documentation: http://wiki.blender.org/index.php/User:Psy-Fi/UV_Tools
Major features include:
*16 bit image support in viewport
*Subsurf aware unwrapping
*Smart Stitch(snap/rotate islands, preview, middlepoint/endpoint stitching)
*Seams from islands tool (marks seams and sharp, depending on settings)
*Uv Sculpting(Grab/Pinch/Rotate)
All tools are complete apart from stitching that is considered stable but with an extra edge mode under development(will be in soc-2011-onion-uv-tools).
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 53ff7d873ad..30a4b154e31 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -52,7 +52,10 @@ struct CustomData; struct DerivedMesh; struct Scene; struct MLoopUV; - +struct UvVertMap; +struct UvMapVert; +struct UvElementMap; +struct UvElement; #ifdef __cplusplus extern "C" { #endif @@ -126,6 +129,39 @@ 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 EditFace *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 MFace *mface, struct MTFace *tface, unsigned int totface, unsigned int totvert, int selected, float *limit); UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v); void free_uv_vert_map(UvVertMap *vmap); |