diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-07-16 20:36:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-07-16 20:55:14 +0300 |
commit | 595a491e63d6f3f3462675d38cfa71b4e784fe9c (patch) | |
tree | df32ec17691b9280d7b2fa675cd5e5a0f87ea849 /source/blender/blenkernel/BKE_mesh.h | |
parent | c8f6313487dfbbee030c6796220cc0d91228d658 (diff) |
Add tessellation data to DerivedMesh (LoopTri)
This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.
This doesn't yet move all internal code from MFace to LoopTri just yet.
Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint
Thanks to @psy-fi for review, fixes and improvements to drawing!
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 1ff2c6bc862..afe6fda48ed 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -39,6 +39,7 @@ struct LinkNode; struct BLI_Stack; struct MemArena; struct BMesh; +struct MLoopTri; struct Main; struct Mesh; struct MPoly; @@ -178,6 +179,11 @@ void BKE_mesh_calc_normals_tessface( struct MVert *mverts, int numVerts, const struct MFace *mfaces, int numFaces, float (*r_faceNors)[3]); +void BKE_mesh_calc_normals_looptri( + struct MVert *mverts, int numVerts, + const struct MLoop *mloop, + const struct MLoopTri *looptri, int looptri_num, + float (*r_tri_nors)[3]); void BKE_mesh_loop_tangents_ex( const struct MVert *mverts, const int numVerts, const struct MLoop *mloops, float (*r_looptangent)[4], float (*loopnors)[3], const struct MLoopUV *loopuv, @@ -285,6 +291,11 @@ int BKE_mesh_recalc_tessellation( struct MVert *mvert, int totface, int totloop, int totpoly, const bool do_face_nor_copy); +void BKE_mesh_recalc_looptri( + const struct MLoop *mloop, const struct MPoly *mpoly, + const struct MVert *mvert, + int totloop, int totpoly, + struct MLoopTri *mlooptri); int BKE_mesh_mpoly_to_mface( struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, int totface, int totloop, int totpoly); |