Cleanup: Improve EditMeshData comments

This commit is contained in:
Hans Goudey 2024-04-02 21:09:55 -04:00
parent 06f04a2c19
commit 820865bacf
1 changed files with 16 additions and 3 deletions

View File

@ -17,13 +17,26 @@ struct BMEditMesh;
namespace blender::bke {
struct EditMeshData {
/** when set, \a vertexNos, faceNos are lazy initialized */
/**
* Deformed positions calculated by modifiers in the modifier stack that can can process an
* edit mesh input. When this is not empty, the other arrays will depend on the values.
*/
Array<float3> vert_positions;
/** lazy initialize (when \a vert_positions is set) */
/**
* Lazily initialized vertex normal cache (used when `vert_positions` is set.
* Access via #BKE_editmesh_cache_ensure_vert_normals instead of directly.
*/
Array<float3> vert_normals;
/**
* Lazily initialized face normal cache (used when `vert_positions` is set.
* Access via #BKE_editmesh_cache_ensure_face_normals instead of directly.
*/
Array<float3> face_normals;
/** also lazy init but don't depend on \a vert_positions */
/**
* Cache of face centers, also depends on `vert_positions` when it is not empty.
* Access via #BKE_editmesh_cache_ensure_face_centers instead of directly.
*/
Array<float3> face_centers;
};