diff options
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index a9e78b79159..60920aa1bb5 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -156,7 +156,7 @@ typedef enum DMDrawFlag { typedef enum DMForeachFlag { DM_FOREACH_NOP = 0, - DM_FOREACH_USE_NORMAL = (1 << 0), /* foreachMappedVert, foreachMappedFaceCenter */ + DM_FOREACH_USE_NORMAL = (1 << 0), /* foreachMappedVert, foreachMappedLoop, foreachMappedFaceCenter */ } DMForeachFlag; typedef enum DMDirtyFlag { @@ -309,6 +309,15 @@ struct DerivedMesh { const float v0co[3], const float v1co[3]), void *userData); + /** Iterate over each mapped loop in the derived mesh, calling the given function + * with the original loop index and the mapped loops's new coordinate and normal. + */ + void (*foreachMappedLoop)(DerivedMesh *dm, + void (*func)(void *userData, int vertex_index, int face_index, + const float co[3], const float no[3]), + void *userData, + DMForeachFlag flag); + /** Iterate over each mapped face in the derived mesh, calling the * given function with the original face and the mapped face's (or * faces') center and normal. |