diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-08 11:07:21 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-08 12:36:48 +0300 |
commit | abb58eec5393820ee990926915c176664e205bab (patch) | |
tree | a9555705ae68ac6c2f9d9f22b60215003504769a /source/blender/makesdna/DNA_mesh_types.h | |
parent | d915aa57f8ecc0f6fee7334f140f5bbf7c913f6f (diff) |
looptri + bvhtree support for Mesh
Diffstat (limited to 'source/blender/makesdna/DNA_mesh_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index d951f67a7c4..af81ac8423b 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -39,11 +39,13 @@ struct AnimData; struct Ipo; struct Key; +struct LinkNode; struct MCol; struct MEdge; struct MFace; struct MLoop; struct MLoopCol; +struct MLoopTri; struct MLoopUV; struct MPoly; struct MTexPoly; @@ -65,6 +67,18 @@ typedef struct EditMeshData { const float (*polyCos)[3]; } EditMeshData; + +/** + * \warning Typical access is done via #BKE_mesh_get_looptri_array, #BKE_mesh_get_looptri_num. + */ +struct LooptrisData { + /* WARNING! swapping between array (ready-to-be-used data) and array_wip (where data is actually computed) + * shall always be protected by same lock as one used for looptris computing. */ + struct MLoopTri *array, *array_wip; + int num; + int num_alloc; +}; + /* not saved in file! */ typedef struct MeshRuntime { struct EditMeshData *edit_data; @@ -74,6 +88,11 @@ typedef struct MeshRuntime { int64_t cd_dirty_edge; int64_t cd_dirty_loop; int64_t cd_dirty_poly; + + struct LooptrisData looptris; + + /** 'BVHCache', for 'BKE_bvhutil.c' */ + struct LinkNode *bvh_cache; } MeshRuntime; typedef struct Mesh { |