Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2020-05-15 14:54:22 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2020-05-15 14:55:01 +0300
commit86580c437bb51a5a9c5f7875ad414bd619083886 (patch)
tree214b1210f0c57ac5bf46128a6171a9fedebd9aa9 /source/blender/blenkernel/intern/bvhutils.c
parent03659c2cf9b38eef65b7d1dcd4263ef8a5602bde (diff)
Cleanup: int->BVHCacheType enum
Diffstat (limited to 'source/blender/blenkernel/intern/bvhutils.c')
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 8f6b8bd6980..cd90ebc2eed 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -517,7 +517,7 @@ BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
BVHTree *tree = NULL;
@@ -581,7 +581,7 @@ BVHTree *bvhtree_from_mesh_verts_ex(BVHTreeFromMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
bool in_cache = false;
@@ -734,7 +734,7 @@ BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
BVHTree *tree = NULL;
@@ -801,7 +801,7 @@ BVHTree *bvhtree_from_mesh_edges_ex(BVHTreeFromMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
bool in_cache = false;
@@ -936,7 +936,7 @@ BVHTree *bvhtree_from_mesh_faces_ex(BVHTreeFromMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
bool in_cache = false;
@@ -1112,7 +1112,7 @@ BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
/* BMESH specific check that we have tessfaces,
@@ -1176,7 +1176,7 @@ BVHTree *bvhtree_from_mesh_looptri_ex(BVHTreeFromMesh *data,
float epsilon,
int tree_type,
int axis,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
bool in_cache = false;
@@ -1311,7 +1311,7 @@ static BLI_bitmap *looptri_no_hidden_map_get(const MPoly *mpoly,
*/
BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
struct Mesh *mesh,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
const int tree_type)
{
BVHTree *tree = NULL;
@@ -1492,7 +1492,7 @@ BVHTree *BKE_bvhtree_from_mesh_get(struct BVHTreeFromMesh *data,
BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
struct BMEditMesh *em,
const int tree_type,
- const int bvh_cache_type,
+ const BVHCacheType bvh_cache_type,
BVHCache **bvh_cache)
{
BVHTree *tree = NULL;
@@ -1621,7 +1621,7 @@ void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
* \{ */
typedef struct BVHCacheItem {
- int type;
+ BVHCacheType type;
BVHTree *tree;
} BVHCacheItem;
@@ -1629,7 +1629,7 @@ typedef struct BVHCacheItem {
/**
* Queries a bvhcache for the cache bvhtree of the request type
*/
-bool bvhcache_find(const BVHCache *cache, int type, BVHTree **r_tree)
+bool bvhcache_find(const BVHCache *cache, BVHCacheType type, BVHTree **r_tree)
{
while (cache) {
const BVHCacheItem *item = cache->link;
@@ -1662,7 +1662,7 @@ bool bvhcache_has_tree(const BVHCache *cache, const BVHTree *tree)
* A call to this assumes that there was no previous cached tree of the given type
* \warning The #BVHTree can be NULL.
*/
-void bvhcache_insert(BVHCache **cache_p, BVHTree *tree, int type)
+void bvhcache_insert(BVHCache **cache_p, BVHTree *tree, BVHCacheType type)
{
BVHCacheItem *item = NULL;