diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-02-28 08:00:56 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-02-28 08:00:56 +0400 |
commit | 79fbd39aab6e945ba4a1c7b55b8e65f463538cf9 (patch) | |
tree | 4f45bbb088f607daaad306eef676089054b4b118 /source | |
parent | bfc331dd75717a84d56496f60c3399abc516b249 (diff) |
Remove DerivedMesh.getFaceMap and create_vert_face_map().
Not used anymore, both have BMesh replacements (DerivedMesh.getPolyMap
and create_vert_poly_map.)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 15 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 21 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 15 |
5 files changed, 0 insertions, 57 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 05b9519d2fe..b5b9e141ef8 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -271,10 +271,6 @@ struct DerivedMesh { */ struct ListBase *(*getPolyMap)(struct Object *ob, DerivedMesh *dm); - /* Get a map of vertices to faces - */ - struct ListBase *(*getFaceMap)(struct Object *ob, DerivedMesh *dm); - /* Get the BVH used for paint modes */ struct PBVH *(*getPBVH)(struct Object *ob, DerivedMesh *dm); diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 0855d8b6057..dd35103298f 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -238,8 +238,6 @@ typedef struct 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_face_map(struct ListBase **map, IndexNode **mem, const struct MFace *mface, - const int totvert, const int totface); void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct MEdge *medge, const int totvert, const int totedge); diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 43621b3550e..d2d3520b118 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -230,20 +230,6 @@ static ListBase *cdDM_getPolyMap(Object *ob, DerivedMesh *dm) return cddm->pmap; } -static ListBase *cdDM_getFaceMap(Object *ob, DerivedMesh *dm) -{ - CDDerivedMesh *cddm = (CDDerivedMesh*) dm; - - if(!cddm->fmap && ob->type == OB_MESH) { - Mesh *me= ob->data; - - create_vert_face_map(&cddm->fmap, &cddm->fmap_mem, me->mface, - me->totvert, me->totface); - } - - return cddm->fmap; -} - static int can_pbvh_draw(Object *ob, DerivedMesh *dm) { CDDerivedMesh *cddm = (CDDerivedMesh*) dm; @@ -1696,7 +1682,6 @@ static CDDerivedMesh *cdDM_create(const char *desc) dm->getPBVH = cdDM_getPBVH; dm->getPolyMap = cdDM_getPolyMap; - dm->getFaceMap = cdDM_getFaceMap; dm->drawVerts = cdDM_drawVerts; diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index ca22d917b50..6f63276f7e4 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2097,27 +2097,6 @@ void create_vert_poly_map(ListBase **map, IndexNode **mem, } /* Generates a map where the key is the vertex and the value is a list - of faces that use that vertex as a corner. The lists are allocated - from one memory pool. */ -void create_vert_face_map(ListBase **map, IndexNode **mem, const MFace *mface, const int totvert, const int totface) -{ - int i,j; - IndexNode *node = NULL; - - (*map) = MEM_callocN(sizeof(ListBase) * totvert, "vert face map"); - (*mem) = MEM_callocN(sizeof(IndexNode) * totface*4, "vert face map mem"); - node = *mem; - - /* Find the users */ - for (i = 0; i < totface; ++i) { - for (j = 0; j < (mface[i].v4?4:3); ++j, ++node) { - node->index = i; - BLI_addtail(&(*map)[((unsigned int*)(&mface[i]))[j]], node); - } - } -} - -/* Generates a map where the key is the vertex and the value is a list of edges that use that vertex as an endpoint. The lists are allocated from one memory pool. */ void create_vert_edge_map(ListBase **map, IndexNode **mem, const MEdge *medge, const int totvert, const int totedge) diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index f06f2cdb760..a63dfa486d4 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2792,20 +2792,6 @@ static ListBase *ccgDM_getPolyMap(Object *ob, DerivedMesh *dm) return ccgdm->pmap; } -static ListBase *ccgDM_getFaceMap(Object *ob, DerivedMesh *dm) -{ - CCGDerivedMesh *ccgdm= (CCGDerivedMesh*)dm; - - if(!ccgdm->multires.mmd && !ccgdm->fmap && ob->type == OB_MESH) { - Mesh *me= ob->data; - - create_vert_face_map(&ccgdm->fmap, &ccgdm->fmap_mem, me->mface, - me->totvert, me->totface); - } - - return ccgdm->fmap; -} - static int ccgDM_use_grid_pbvh(CCGDerivedMesh *ccgdm) { MultiresModifierData *mmd= ccgdm->multires.mmd; @@ -2973,7 +2959,6 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss, ccgdm->dm.getGridAdjacency = ccgDM_getGridAdjacency; ccgdm->dm.getGridOffset = ccgDM_getGridOffset; ccgdm->dm.getPolyMap = ccgDM_getPolyMap; - ccgdm->dm.getFaceMap = ccgDM_getFaceMap; ccgdm->dm.getPBVH = ccgDM_getPBVH; ccgdm->dm.getTessFace = ccgDM_getFinalFace; |