diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-17 08:41:36 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-17 08:41:36 +0400 |
commit | 3d87c23f4ffb791e6be13ed8ce936f081bdf60a0 (patch) | |
tree | 00ef0af3ccd790c3678e661cef677fb58af3baef /source/blender/blenkernel/BKE_mesh.h | |
parent | 681e023cb0d9f7079a43397a8a44c2ece7ea9dc1 (diff) |
Reduce poly map memory usage (used by sculpt smooth brush.)
Changed the create_vert_poly_map function to return a more compact
structure. Memory saved will vary depending on the mesh, but typically
it should be about one third of the old size.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 63d3a1f309a..c5d137b086f 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -251,13 +251,20 @@ UvMapVert *get_uv_map_vert(UvVertMap *vmap, unsigned int v); void free_uv_vert_map(UvVertMap *vmap); /* Connectivity data */ +typedef struct MeshElemMap { + int *indices; + int count; +} MeshElemMap; + typedef struct IndexNode { struct IndexNode *next, *prev; int index; } IndexNode; -void create_vert_poly_map(struct ListBase **map, IndexNode **mem, - struct MPoly *mface, struct MLoop *mloop, - const int totvert, const int totface, const int totloop); + +void create_vert_poly_map(MeshElemMap **map, int **mem, + const struct MPoly *mface, const struct MLoop *mloop, + int totvert, int totface, int totloop); + void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct MEdge *medge, const int totvert, const int totedge); |