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:
authorGermano Cavalcante <germano.costa@ig.com.br>2016-01-25 10:18:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-25 11:01:54 +0300
commit34076a79e381626e66f97cf5507257dba3cb519d (patch)
tree3ab9e4c3c20f6aa322364fd9ab500453d4a42e18 /source/blender/blenkernel/BKE_bvhutils.h
parent33a7c7408da50456d7f3ca6e65241b9651e8834f (diff)
Transform: optimize vertex snap w/ nearest-to-ray
Use BLI_bvhtree_find_nearest_to_ray for vertex snapping, avoids doing screen-space lookup on each vertex.
Diffstat (limited to 'source/blender/blenkernel/BKE_bvhutils.h')
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index 749b0db7c27..08c0fcc0f3c 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -51,6 +51,7 @@ typedef struct BVHTreeFromMesh {
/* default callbacks to bvh nearest and raycast */
BVHTree_NearestPointCallback nearest_callback;
BVHTree_RayCastCallback raycast_callback;
+ BVHTree_NearestToRayCallback nearest_to_ray_callback;
/* Vertex array, so that callbacks have instante access to data */
const struct MVert *vert;
@@ -147,6 +148,8 @@ enum {
BVHTREE_FROM_FACES_EDITMESH_ALL = 4,
/* visible unselected, only used for transform snapping */
BVHTREE_FROM_FACES_EDITMESH_SNAP = 5,
+ // BVHTREE_FROM_EDGES_EDITMESH_SNAP = 6,
+ BVHTREE_FROM_VERTS_EDITMESH_SNAP = 7,
};
typedef struct LinkNode *BVHCache;