Commit: 6c23a1b8b951ba76965ae2b33188dfaa4b4f2a29
Author: Germano Cavalcante
Date:   Sun Jan 29 14:19:58 2017 -0300
Branches: master
https://developer.blender.org/rB6c23a1b8b951ba76965ae2b33188dfaa4b4f2a29

Remove `BKE_boundbox_ray_hit_check`

Remove `BKE_boundbox_ray_hit_check` since it is no longer being used and can be 
easily replaced by `isect_ray_aabb_v3_simple`

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

M       source/blender/blenkernel/BKE_object.h
M       source/blender/blenkernel/intern/object.c
M       source/blender/editors/transform/transform_snap_object.c

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

diff --git a/source/blender/blenkernel/BKE_object.h 
b/source/blender/blenkernel/BKE_object.h
index cf07a178fe..4349e68f7c 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -136,10 +136,6 @@ void BKE_object_where_is_calc_mat4(struct Scene *scene, 
struct Object *ob, float
 /* possibly belong in own moduke? */
 struct BoundBox *BKE_boundbox_alloc_unit(void);
 void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], 
const float max[3]);
-bool BKE_boundbox_ray_hit_check(
-        const struct BoundBox *bb,
-        const float ray_start[3], const float ray_normal[3],
-        float *r_lambda);
 void BKE_boundbox_calc_center_aabb(const struct BoundBox *bb, float r_cent[3]);
 void BKE_boundbox_calc_size_aabb(const struct BoundBox *bb, float r_size[3]);
 void BKE_boundbox_minmax(const struct BoundBox *bb, float obmat[4][4], float 
r_min[3], float r_max[3]);
diff --git a/source/blender/blenkernel/intern/object.c 
b/source/blender/blenkernel/intern/object.c
index e93bfcdda8..41f725ba2c 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2816,45 +2816,6 @@ int BKE_object_obdata_texspace_get(Object *ob, short 
**r_texflag, float **r_loc,
        return 1;
 }
 
-/*
- * Test a bounding box for ray intersection
- * assumes the ray is already local to the boundbox space
- */
-bool BKE_boundbox_ray_hit_check(
-        const struct BoundBox *bb,
-        const float ray_start[3], const float ray_normal[3],
-        float *r_lambda)
-{
-       const int triangle_indexes[12][3] = {
-           {0, 1, 2}, {0, 2, 3},
-           {3, 2, 6}, {3, 6, 7},
-           {1, 2, 6}, {1, 6, 5},
-           {5, 6, 7}, {4, 5, 7},
-           {0, 3, 7}, {0, 4, 7},
-           {0, 1, 5}, {0, 4, 5}};
-
-       bool result = false;
-       int i;
-
-       for (i = 0; i < 12 && (!result || r_lambda); i++) {
-               float lambda;
-               int v1, v2, v3;
-               v1 = triangle_indexes[i][0];
-               v2 = triangle_indexes[i][1];
-               v3 = triangle_indexes[i][2];
-               if (isect_ray_tri_v3(ray_start, ray_normal, bb->vec[v1], 
bb->vec[v2], bb->vec[v3], &lambda, NULL) &&
-                   (!r_lambda || *r_lambda > lambda))
-               {
-                       result = true;
-                       if (r_lambda) {
-                               *r_lambda = lambda;
-                       }
-               }
-       }
-
-       return result;
-}
-
 static int pc_cmp(const void *a, const void *b)
 {
        const LinkData *ad = a, *bd = b;
diff --git a/source/blender/editors/transform/transform_snap_object.c 
b/source/blender/editors/transform/transform_snap_object.c
index a562a66597..47bb86561a 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -1089,7 +1089,7 @@ static bool snapDerivedMesh(
 
                                float tmin, tmax;
 
-                               /* was BKE_boundbox_ray_hit_check, see: T50486 
*/
+                               /* was BKE_boundbox_ray_hit_check, see: 
cf6ca226fa58 */
                                if (!isect_ray_aabb_v3_simple(
                                        ray_start_local, ray_normal_local, 
bb->vec[0], bb->vec[6], &tmin, &tmax))
                                {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to