Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_DerivedMesh.h
| Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | |||||
| typedef enum DMDrawFlag { | typedef enum DMDrawFlag { | ||||
| DM_DRAW_USE_COLORS = 1, | DM_DRAW_USE_COLORS = 1, | ||||
| DM_DRAW_ALWAYS_SMOOTH = 2 | DM_DRAW_ALWAYS_SMOOTH = 2 | ||||
| } DMDrawFlag; | } DMDrawFlag; | ||||
| typedef enum DMForeachFlag { | typedef enum DMForeachFlag { | ||||
| DM_FOREACH_NOP = 0, | DM_FOREACH_NOP = 0, | ||||
| DM_FOREACH_USE_NORMAL = (1 << 0), /* foreachMappedVert, foreachMappedFaceCenter */ | DM_FOREACH_USE_NORMAL = (1 << 0), /* foreachMappedVert, foreachMappedLoop, foreachMappedFaceCenter */ | ||||
| } DMForeachFlag; | } DMForeachFlag; | ||||
| typedef enum DMDirtyFlag { | typedef enum DMDirtyFlag { | ||||
| /* dm has valid tessellated faces, but tessellated CDDATA need to be updated. */ | /* dm has valid tessellated faces, but tessellated CDDATA need to be updated. */ | ||||
| DM_DIRTY_TESS_CDLAYERS = 1 << 0, | DM_DIRTY_TESS_CDLAYERS = 1 << 0, | ||||
| /* One of the MCOL layers have been updated, force updating of GPUDrawObject's colors buffer. | /* One of the MCOL layers have been updated, force updating of GPUDrawObject's colors buffer. | ||||
| * This is necessary with modern, VBO draw code, as e.g. in vpaint mode me->mcol may be updated | * This is necessary with modern, VBO draw code, as e.g. in vpaint mode me->mcol may be updated | ||||
| * without actually rebuilding dm (hence by defautl keeping same GPUDrawObject, and same colors | * without actually rebuilding dm (hence by defautl keeping same GPUDrawObject, and same colors | ||||
| ▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | struct DerivedMesh { | ||||
| * given function with the original edge and the mapped edge's new | * given function with the original edge and the mapped edge's new | ||||
| * coordinates. | * coordinates. | ||||
| */ | */ | ||||
| void (*foreachMappedEdge)(DerivedMesh *dm, | void (*foreachMappedEdge)(DerivedMesh *dm, | ||||
| void (*func)(void *userData, int index, | void (*func)(void *userData, int index, | ||||
| const float v0co[3], const float v1co[3]), | const float v0co[3], const float v1co[3]), | ||||
| void *userData); | 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 | /** Iterate over each mapped face in the derived mesh, calling the | ||||
| * given function with the original face and the mapped face's (or | * given function with the original face and the mapped face's (or | ||||
| * faces') center and normal. | * faces') center and normal. | ||||
| */ | */ | ||||
| void (*foreachMappedFaceCenter)(DerivedMesh *dm, | void (*foreachMappedFaceCenter)(DerivedMesh *dm, | ||||
| void (*func)(void *userData, int index, | void (*func)(void *userData, int index, | ||||
| const float cent[3], const float no[3]), | const float cent[3], const float no[3]), | ||||
| void *userData, | void *userData, | ||||
| ▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines | |||||