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:
authorCampbell Barton <ideasman42@gmail.com>2015-07-22 13:55:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-22 14:40:45 +0300
commitb604d5ade0fde241c84b802b4f7b7426f12d48be (patch)
treeabc5528f6443dff419a4c7dc5c2fbccb8f2e4599 /source/blender/blenkernel/BKE_bvhutils.h
parentb305041ce6779f90a282283ff04bd36f1807c728 (diff)
Add bvhtree_from_mesh_looptri utility function
Diffstat (limited to 'source/blender/blenkernel/BKE_bvhutils.h')
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index a956933aa22..9220082a73a 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -56,9 +56,13 @@ typedef struct BVHTreeFromMesh {
const struct MVert *vert;
const struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
const struct MFace *face;
+ const struct MLoop *loop;
+ const struct MLoopTri *looptri;
bool vert_allocated;
bool edge_allocated;
bool face_allocated;
+ bool loop_allocated;
+ bool looptri_allocated;
/* radius for raycast */
float sphere_radius;
@@ -100,6 +104,16 @@ BVHTree *bvhtree_from_mesh_faces_ex(
BLI_bitmap *mask, int numFaces_active,
float epsilon, int tree_type, int axis);
+BVHTree *bvhtree_from_mesh_looptri(
+ struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
+BVHTree *bvhtree_from_mesh_looptri_ex(
+ struct BVHTreeFromMesh *data,
+ const struct MVert *vert, const bool vert_allocated,
+ const struct MLoop *mloop, const bool loop_allocated,
+ const struct MLoopTri *looptri, const int numFaces, const bool face_allocated,
+ BLI_bitmap *mask, int numFaces_active,
+ float epsilon, int tree_type, int axis);
+
/**
* Frees data allocated by a call to bvhtree_from_mesh_*.
*/
@@ -125,6 +139,7 @@ enum {
BVHTREE_FROM_EDGES = 1,
BVHTREE_FROM_FACES = 2,
BVHTREE_FROM_FACES_EDITMESH = 3,
+ BVHTREE_FROM_LOOPTRI = 4,
};
typedef struct LinkNode *BVHCache;