diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_cdderivedmesh.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index 3f421331f0a..42e1aa8e083 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -135,7 +135,7 @@ struct MVert *CDDM_get_vert(struct DerivedMesh *dm, int index); struct MEdge *CDDM_get_edge(struct DerivedMesh *dm, int index); struct MFace *CDDM_get_tessface(struct DerivedMesh *dm, int index); struct MLoop *CDDM_get_loop(struct DerivedMesh *dm, int index); -struct MPoly *CDDM_get_face(struct DerivedMesh *dm, int index); +struct MPoly *CDDM_get_poly(struct DerivedMesh *dm, int index); /* vertex/edge/face array access functions - return the array holding the * desired data diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index d5ac277c798..4f0c9e11309 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -2717,6 +2717,8 @@ void CDDM_lower_num_polys(DerivedMesh *dm, int numPolys) dm->numPolyData = numPolys; } +/* mesh element access functions */ + MVert *CDDM_get_vert(DerivedMesh *dm, int index) { return &((CDDerivedMesh*)dm)->mvert[index]; @@ -2732,6 +2734,18 @@ MFace *CDDM_get_tessface(DerivedMesh *dm, int index) return &((CDDerivedMesh*)dm)->mface[index]; } +MLoop *CDDM_get_loop(DerivedMesh *dm, int index) +{ + return &((CDDerivedMesh*)dm)->mloop[index]; +} + +MPoly *CDDM_get_poly(DerivedMesh *dm, int index) +{ + return &((CDDerivedMesh*)dm)->mpoly[index]; +} + +/* array access functions */ + MVert *CDDM_get_verts(DerivedMesh *dm) { return ((CDDerivedMesh*)dm)->mvert; |