[Bf-blender-cvs] [3437fcf2f1d] master: BKE_bvhutils: implement hiden check

mano-wii noreply at git.blender.org
Sat Aug 24 14:23:34 CEST 2019


Commit: 3437fcf2f1d83394efaa6926e46ed577caf6a384
Author: mano-wii
Date:   Sat Aug 24 09:20:55 2019 -0300
Branches: master
https://developer.blender.org/rB3437fcf2f1d83394efaa6926e46ed577caf6a384

BKE_bvhutils: implement hiden check

Accidentally unused in rB7c3bbe93aaa2

===================================================================

M	source/blender/blenkernel/intern/bvhutils.c

===================================================================

diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index ce1210b41fc..07fc51953fd 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1277,8 +1277,6 @@ static BLI_bitmap *loose_edges_map_get(const MEdge *medge,
   return loose_edges_mask;
 }
 
-/* TODO: implement hidden check. */
-#if 0
 static BLI_bitmap *looptri_no_hidden_map_get(const MPoly *mpoly,
                                              const int looptri_len,
                                              int *r_looptri_active_len)
@@ -1307,7 +1305,6 @@ static BLI_bitmap *looptri_no_hidden_map_get(const MPoly *mpoly,
 
   return looptri_mask;
 }
-#endif
 
 /**
  * Builds or queries a bvhcache for the cache bvhtree of the request type.
@@ -1434,15 +1431,12 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
         const MLoopTri *mlooptri = BKE_mesh_runtime_looptri_ensure(mesh);
         int looptri_len = BKE_mesh_runtime_looptri_len(mesh);
 
-        /* TODO: implement hidden check. */
-#if 0
         int looptri_mask_active_len = -1;
         BLI_bitmap *looptri_mask = NULL;
         if (bvh_cache_type == BVHTREE_FROM_LOOPTRI_NO_HIDDEN) {
           looptri_mask = looptri_no_hidden_map_get(
               mesh->mpoly, looptri_len, &looptri_mask_active_len);
         }
-#endif
 
         tree = bvhtree_from_mesh_looptri_ex(data,
                                             mesh->mvert,
@@ -1452,8 +1446,8 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
                                             mlooptri,
                                             looptri_len,
                                             false,
-                                            NULL,
-                                            -1,
+                                            looptri_mask,
+                                            looptri_mask_active_len,
                                             0.0,
                                             tree_type,
                                             6,



More information about the Bf-blender-cvs mailing list